Skip to main content

SshPublicKey

Provides a SshPublicKey from the Compute group

Examples

Create a new SSH public key resource.

exports.createResources = () => [
{
type: "SshPublicKey",
group: "Compute",
name: "mySshPublicKey",
properties: () => ({
location: "westus",
properties: { publicKey: "{ssh-rsa public key}" },
}),
dependencies: ({}) => ({ resourceGroup: "myResourceGroup" }),
},
];

Dependencies

Swagger Schema

{
properties: {
properties: {
'x-ms-client-flatten': true,
description: 'Properties of the SSH public key.',
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.'
}
}
}
},
allOf: [
{
description: 'The Resource model definition.',
properties: {
id: { readOnly: true, type: 'string', description: 'Resource Id' },
name: {
readOnly: true,
type: 'string',
description: 'Resource name'
},
type: {
readOnly: true,
type: 'string',
description: 'Resource type'
},
location: { type: 'string', description: 'Resource location' },
tags: {
type: 'object',
additionalProperties: { type: 'string' },
description: 'Resource tags'
}
},
required: [ 'location' ],
'x-ms-azure-resource': true
}
],
description: 'Specifies information about the SSH public key.'
}

Misc

The resource version is 2022-03-01.

The Swagger schema used to generate this documentation can be found here.