SshPublicKeysOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:ssh_public_keys> attribute.

Inheritance
builtins.object
SshPublicKeysOperations

Constructor

SshPublicKeysOperations(*args, **kwargs)

Methods

create

Creates a new SSH public key resource.

delete

Delete an SSH public key.

generate_key_pair

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.

get

Retrieves information about an SSH public key.

list_by_resource_group

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.

list_by_subscription

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.

update

Updates a new SSH public key resource.

create

Creates a new SSH public key resource.

async create(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SshPublicKeyResource

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

ssh_public_key_name
Required
str

The name of the SSH public key. Required.

parameters
Required

Parameters supplied to create the SSH public key. Is either a SshPublicKeyResource type or a IO[bytes] type. Required.

Returns

Type Description

SshPublicKeyResource or the result of cls(response)

Exceptions

Type Description

delete

Delete an SSH public key.

async delete(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

ssh_public_key_name
Required
str

The name of the SSH public key. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

generate_key_pair

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.

async generate_key_pair(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> SshPublicKeyGenerateKeyPairResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

ssh_public_key_name
Required
str

The name of the SSH public key. Required.

Returns

Type Description

SshPublicKeyGenerateKeyPairResult or the result of cls(response)

Exceptions

Type Description

get

Retrieves information about an SSH public key.

async get(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> SshPublicKeyResource

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

ssh_public_key_name
Required
str

The name of the SSH public key. Required.

Returns

Type Description

SshPublicKeyResource or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

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.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncIterable[SshPublicKeyResource]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

Returns

Type Description

An iterator like instance of either SshPublicKeyResource or the result of cls(response)

Exceptions

Type Description

list_by_subscription

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.

list_by_subscription(**kwargs: Any) -> AsyncIterable[SshPublicKeyResource]

Returns

Type Description

An iterator like instance of either SshPublicKeyResource or the result of cls(response)

Exceptions

Type Description

update

Updates a new SSH public key resource.

async update(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshPublicKeyUpdateResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SshPublicKeyResource

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

ssh_public_key_name
Required
str

The name of the SSH public key. Required.

parameters
Required

Parameters supplied to update the SSH public key. Is either a SshPublicKeyUpdateResource type or a IO[bytes] type. Required.

Returns

Type Description

SshPublicKeyResource or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.compute.v2021_07_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2021_07_01\\models\\__init__.py'>