SshPublicKeysOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:ssh_public_keys> attribute.
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.
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
|
The name of the resource group. The name is case insensitive. Required. |
|
ssh_public_key_name
Required
|
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.
delete(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
ssh_public_key_name
Required
|
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.
generate_key_pair(resource_group_name: str, ssh_public_key_name: str, parameters: _models.SshGenerateKeyPairInputParameters | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SshPublicKeyGenerateKeyPairResult
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
ssh_public_key_name
Required
|
The name of the SSH public key. Required. |
|
parameters
|
Parameters supplied to generate the SSH public key. Is either a SshGenerateKeyPairInputParameters type or a IO[bytes] type. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
SshPublicKeyGenerateKeyPairResult or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Retrieves information about an SSH public key.
get(resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> SshPublicKeyResource
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
ssh_public_key_name
Required
|
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) -> ItemPaged[SshPublicKeyResource]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. 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) -> ItemPaged[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.
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
|
The name of the resource group. The name is case insensitive. Required. |
|
ssh_public_key_name
Required
|
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.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv89\\Lib\\site-packages\\azure\\mgmt\\compute\\models\\__init__.py'>