{ "swagger": "2.0", "info": { "title": "ComputeManagementClient", "description": "The Compute Management Client.", "version": "2024-07-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys": { "get": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_ListBySubscription", "description": "Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.", "parameters": [ { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeysGroupListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "SshPublicKey_ListBySubscription_MaximumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MaximumSet_Gen.json" }, "SshPublicKey_ListBySubscription_MinimumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_ListBySubscription_MinimumSet_Gen.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys": { "get": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_ListByResourceGroup", "description": "Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeysGroupListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "SshPublicKey_ListByResourceGroup_MaximumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MaximumSet_Gen.json" }, "SshPublicKey_ListByResourceGroup_MinimumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_ListByResourceGroup_MinimumSet_Gen.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}": { "put": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_Create", "description": "Creates a new SSH public key resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "name": "sshPublicKeyName", "in": "path", "required": true, "type": "string", "description": "The name of the SSH public key." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SshPublicKeyResource" }, "description": "Parameters supplied to create the SSH public key." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeyResource" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/SshPublicKeyResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-examples": { "Create a new SSH public key resource.": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Create.json" } } }, "patch": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_Update", "description": "Updates a new SSH public key resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "name": "sshPublicKeyName", "in": "path", "required": true, "type": "string", "description": "The name of the SSH public key." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SshPublicKeyUpdateResource" }, "description": "Parameters supplied to update the SSH public key." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeyResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-examples": { "SshPublicKey_Update_MaximumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Update_MaximumSet_Gen.json" }, "SshPublicKey_Update_MinimumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Update_MinimumSet_Gen.json" } } }, "delete": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_Delete", "description": "Delete an SSH public key.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "name": "sshPublicKeyName", "in": "path", "required": true, "type": "string", "description": "The name of the SSH public key." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-examples": { "SshPublicKey_Delete_MaximumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Delete_MaximumSet_Gen.json" }, "SshPublicKey_Delete_MinimumSet_Gen": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Delete_MinimumSet_Gen.json" } } }, "get": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_Get", "description": "Retrieves information about an SSH public key.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "name": "sshPublicKeyName", "in": "path", "required": true, "type": "string", "description": "The name of the SSH public key." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeyResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-examples": { "Get an ssh public key.": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_Get.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair": { "post": { "tags": [ "SshPublicKeys" ], "operationId": "SshPublicKeys_GenerateKeyPair", "description": "Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group." }, { "name": "sshPublicKeyName", "in": "path", "required": true, "type": "string", "description": "The name of the SSH public key." }, { "name": "parameters", "in": "body", "required": false, "schema": { "$ref": "#/definitions/SshGenerateKeyPairInputParameters" }, "description": "Parameters supplied to generate the SSH public key." }, { "$ref": "../../common-types/v1/common.json#/parameters/ApiVersionParameter" }, { "$ref": "../../common-types/v1/common.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SshPublicKeyGenerateKeyPairResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common-types/v1/common.json#/definitions/CloudError" } } }, "x-ms-examples": { "Generate an SSH key pair.": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair.json" }, "Generate an SSH key pair with RSA encryption.": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithRSA.json" }, "Generate an SSH key pair with Ed25519 encryption.": { "$ref": "./examples/sshPublicKeyExamples/SshPublicKey_GenerateKeyPair_EncryptionWithEd25519.json" } } } } }, "definitions": { "SshPublicKeyGenerateKeyPairResult": { "properties": { "privateKey": { "type": "string", "description": "Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret." }, "publicKey": { "type": "string", "description": "Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format." }, "id": { "type": "string", "description": "The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}" } }, "required": [ "privateKey", "publicKey", "id" ], "description": "Response from generation of an SSH key pair." }, "SshPublicKeyResourceProperties": { "properties": { "publicKey": { "type": "string", "description": "SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format." } }, "description": "Properties of the SSH public key." }, "SshPublicKeyResource": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/SshPublicKeyResourceProperties", "description": "Properties of the SSH public key." } }, "allOf": [ { "$ref": "../../common-types/v1/common.json#/definitions/Resource" } ], "description": "Specifies information about the SSH public key." }, "SshPublicKeyUpdateResource": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/SshPublicKeyResourceProperties", "description": "Properties of the SSH public key." } }, "allOf": [ { "$ref": "./computeRPCommon.json#/definitions/UpdateResource" } ], "description": "Specifies information about the SSH public key." }, "SshPublicKeysGroupListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/SshPublicKeyResource" }, "description": "The list of SSH public keys" }, "nextLink": { "type": "string", "description": "The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys." } }, "required": [ "value" ], "description": "The list SSH public keys operation response." }, "SshGenerateKeyPairInputParameters": { "type": "object", "properties": { "encryptionType": { "type": "string", "description": "The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of values. If not provided, will default to RSA", "enum": [ "RSA", "Ed25519" ], "x-ms-enum": { "name": "SshEncryptionTypes", "modelAsString": true } } }, "description": "Parameters for GenerateSshKeyPair." } } }