Condividi tramite


ServerKeysOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SqlManagementClient's

<xref:server_keys> attribute.

Constructor

ServerKeysOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a server key.

begin_delete

Deletes the server key with the given name.

get

Gets a server key.

list_by_server

Gets a list of server keys.

begin_create_or_update

Creates or updates a server key.

async begin_create_or_update(resource_group_name: str, server_name: str, key_name: str, parameters: _models.ServerKey, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.ServerKey]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required.

server_name
Required
str

The name of the server. Required.

key_name
Required
str

The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion. Required.

parameters
Required

The requested server key resource state. Is either a ServerKey type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either ServerKey or the result of cls(response)

Exceptions

Type Description

begin_delete

Deletes the server key with the given name.

async begin_delete(resource_group_name: str, server_name: str, key_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required.

server_name
Required
str

The name of the server. Required.

key_name
Required
str

The name of the server key to be deleted. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

get

Gets a server key.

async get(resource_group_name: str, server_name: str, key_name: str, **kwargs: Any) -> ServerKey

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required.

server_name
Required
str

The name of the server. Required.

key_name
Required
str

The name of the server key to be retrieved. Required.

Returns

Type Description

ServerKey or the result of cls(response)

Exceptions

Type Description

list_by_server

Gets a list of server keys.

list_by_server(resource_group_name: str, server_name: str, **kwargs: Any) -> AsyncItemPaged[ServerKey]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required.

server_name
Required
str

The name of the server. Required.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.sql.models' from 'C:\\ToolCache\\Python\\3.12.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv268\\Lib\\site-packages\\azure\\mgmt\\sql\\models\\__init__.py'>