Ssh Public Keys - Update
匯報 新的 SSH 公鑰資源。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}?api-version=2024-03-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
resource
|
path | True |
string |
資源群組的名稱。 |
ssh
|
path | True |
string |
SSH 公鑰的名稱。 |
subscription
|
path | True |
string |
可唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。 |
api-version
|
query | True |
string |
用戶端 API 版本。 |
要求本文
名稱 | 類型 | Description |
---|---|---|
properties.publicKey |
string |
用來透過 ssh 向虛擬機驗證的 SSH 公鑰。 如果一開始未在建立資源時提供這個屬性,則會在呼叫 generateKeyPair 時填入 publicKey 屬性。 如果在資源建立時提供公鑰,則提供的公鑰至少必須是 2048 位,並以 ssh-rsa 格式提供。 |
tags |
object |
資源標籤 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Ssh |
Ssh |
SshPublicKey_Update_MaximumSet_Gen
Sample Request
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/aaaaaaaaaaaa?api-version=2024-03-01
{
"properties": {
"publicKey": "{ssh-rsa public key}"
},
"tags": {
"key2854": "a"
}
}
Sample Response
{
"location": "westus",
"properties": {
"publicKey": "{ssh-rsa public key}"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName",
"name": "mySshPublicKeyName",
"type": "aaaa",
"tags": {
"key6396": "aaaaaaaaaaaaa",
"key8839": "aaa"
}
}
SshPublicKey_Update_MinimumSet_Gen
Sample Request
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/aaaaaaaaaaa?api-version=2024-03-01
{}
Sample Response
{
"location": "westus"
}
定義
名稱 | Description |
---|---|
Api |
Api 錯誤。 |
Api |
Api 錯誤基底。 |
Cloud |
計算服務的錯誤回應。 |
Inner |
內部錯誤詳細數據。 |
Ssh |
指定 SSH 公鑰的相關資訊。 |
Ssh |
指定 SSH 公鑰的相關資訊。 |
ApiError
Api 錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
details |
API 錯誤詳細數據 |
|
innererror |
Api 內部錯誤 |
|
message |
string |
錯誤訊息。 |
target |
string |
特定錯誤的目標。 |
ApiErrorBase
Api 錯誤基底。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤碼。 |
message |
string |
錯誤訊息。 |
target |
string |
特定錯誤的目標。 |
CloudError
計算服務的錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
Api 錯誤。 |
InnerError
內部錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
errordetail |
string |
內部錯誤訊息或例外狀況傾印。 |
exceptiontype |
string |
例外狀況型別。 |
SshPublicKeyResource
指定 SSH 公鑰的相關資訊。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源標識碼 |
location |
string |
資源位置 |
name |
string |
資源名稱 |
properties.publicKey |
string |
用來透過 ssh 向虛擬機驗證的 SSH 公鑰。 如果一開始未在建立資源時提供這個屬性,則會在呼叫 generateKeyPair 時填入 publicKey 屬性。 如果在資源建立時提供公鑰,則提供的公鑰至少必須是 2048 位,並以 ssh-rsa 格式提供。 |
tags |
object |
資源標籤 |
type |
string |
資源類型 |
SshPublicKeyUpdateResource
指定 SSH 公鑰的相關資訊。
名稱 | 類型 | Description |
---|---|---|
properties.publicKey |
string |
用來透過 ssh 向虛擬機驗證的 SSH 公鑰。 如果一開始未在建立資源時提供這個屬性,則會在呼叫 generateKeyPair 時填入 publicKey 屬性。 如果在資源建立時提供公鑰,則提供的公鑰至少必須是 2048 位,並以 ssh-rsa 格式提供。 |
tags |
object |
資源標籤 |