Microsoft.Compute sshPublicKeys 2020-12-01

Template format

To create a Microsoft.Compute/sshPublicKeys resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.Compute/sshPublicKeys",
  "apiVersion": "2020-12-01",
  "location": "string",
  "tags": {},
  "properties": {
    "publicKey": "string"

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Compute/sshPublicKeys object


In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes The name of the SSH public key.
type enum Yes For JSON - Microsoft.Compute/sshPublicKeys
apiVersion enum Yes For JSON - 2020-12-01
location string Yes Resource location
tags object No Resource tags
properties object Yes Properties of the SSH public key. - SshPublicKeyResourceProperties object

SshPublicKeyResourceProperties object

Name Type Required Value
publicKey string No 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.