SqlResourcesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

CosmosDBManagementClient's

<xref:sql_resources> attribute.

Inheritance
builtins.object
SqlResourcesOperations

Constructor

SqlResourcesOperations(*args, **kwargs)

Methods

begin_create_update_client_encryption_key

Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly).

begin_create_update_sql_container

Create or update an Azure Cosmos DB SQL container.

begin_create_update_sql_database

Create or update an Azure Cosmos DB SQL database.

begin_create_update_sql_role_assignment

Creates or updates an Azure Cosmos DB SQL Role Assignment.

begin_create_update_sql_role_definition

Creates or updates an Azure Cosmos DB SQL Role Definition.

begin_create_update_sql_stored_procedure

Create or update an Azure Cosmos DB SQL storedProcedure.

begin_create_update_sql_trigger

Create or update an Azure Cosmos DB SQL trigger.

begin_create_update_sql_user_defined_function

Create or update an Azure Cosmos DB SQL userDefinedFunction.

begin_delete_sql_container

Deletes an existing Azure Cosmos DB SQL container.

begin_delete_sql_database

Deletes an existing Azure Cosmos DB SQL database.

begin_delete_sql_role_assignment

Deletes an existing Azure Cosmos DB SQL Role Assignment.

begin_delete_sql_role_definition

Deletes an existing Azure Cosmos DB SQL Role Definition.

begin_delete_sql_stored_procedure

Deletes an existing Azure Cosmos DB SQL storedProcedure.

begin_delete_sql_trigger

Deletes an existing Azure Cosmos DB SQL trigger.

begin_delete_sql_user_defined_function

Deletes an existing Azure Cosmos DB SQL userDefinedFunction.

begin_migrate_sql_container_to_autoscale

Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale.

begin_migrate_sql_container_to_manual_throughput

Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput.

begin_migrate_sql_database_to_autoscale

Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale.

begin_migrate_sql_database_to_manual_throughput

Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput.

begin_retrieve_continuous_backup_information

Retrieves continuous backup information for a container resource.

begin_update_sql_container_throughput

Update RUs per second of an Azure Cosmos DB SQL container.

begin_update_sql_database_throughput

Update RUs per second of an Azure Cosmos DB SQL database.

get_client_encryption_key

Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database.

get_sql_container

Gets the SQL container under an existing Azure Cosmos DB database account.

get_sql_container_throughput

Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account.

get_sql_database

Gets the SQL database under an existing Azure Cosmos DB database account with the provided name.

get_sql_database_throughput

Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name.

get_sql_role_assignment

Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id.

get_sql_role_definition

Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id.

get_sql_stored_procedure

Gets the SQL storedProcedure under an existing Azure Cosmos DB database account.

get_sql_trigger

Gets the SQL trigger under an existing Azure Cosmos DB database account.

get_sql_user_defined_function

Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account.

list_client_encryption_keys

Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database.

list_sql_containers

Lists the SQL container under an existing Azure Cosmos DB database account.

list_sql_databases

Lists the SQL databases under an existing Azure Cosmos DB database account.

list_sql_role_assignments

Retrieves the list of all Azure Cosmos DB SQL Role Assignments.

list_sql_role_definitions

Retrieves the list of all Azure Cosmos DB SQL Role Definitions.

list_sql_stored_procedures

Lists the SQL storedProcedure under an existing Azure Cosmos DB database account.

list_sql_triggers

Lists the SQL trigger under an existing Azure Cosmos DB database account.

list_sql_user_defined_functions

Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account.

begin_create_update_client_encryption_key

Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly).

async begin_create_update_client_encryption_key(resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, create_update_client_encryption_key_parameters: _models.ClientEncryptionKeyCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.ClientEncryptionKeyGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

client_encryption_key_name
Required
str

Cosmos DB ClientEncryptionKey name. Required.

create_update_client_encryption_key_parameters
Required

The parameters to provide for the client encryption key. Is either a ClientEncryptionKeyCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_container

Create or update an Azure Cosmos DB SQL container.

async begin_create_update_sql_container(resource_group_name: str, account_name: str, database_name: str, container_name: str, create_update_sql_container_parameters: _models.SqlContainerCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlContainerGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

create_update_sql_container_parameters
Required

The parameters to provide for the current SQL container. Is either a SqlContainerCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_database

Create or update an Azure Cosmos DB SQL database.

async begin_create_update_sql_database(resource_group_name: str, account_name: str, database_name: str, create_update_sql_database_parameters: _models.SqlDatabaseCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlDatabaseGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

create_update_sql_database_parameters
Required

The parameters to provide for the current SQL database. Is either a SqlDatabaseCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_role_assignment

Creates or updates an Azure Cosmos DB SQL Role Assignment.

async begin_create_update_sql_role_assignment(role_assignment_id: str, resource_group_name: str, account_name: str, create_update_sql_role_assignment_parameters: _models.SqlRoleAssignmentCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlRoleAssignmentGetResults]

Parameters

Name Description
role_assignment_id
Required
str

The GUID for the Role Assignment. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

create_update_sql_role_assignment_parameters
Required

The properties required to create or update a Role Assignment. Is either a SqlRoleAssignmentCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_role_definition

Creates or updates an Azure Cosmos DB SQL Role Definition.

async begin_create_update_sql_role_definition(role_definition_id: str, resource_group_name: str, account_name: str, create_update_sql_role_definition_parameters: _models.SqlRoleDefinitionCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlRoleDefinitionGetResults]

Parameters

Name Description
role_definition_id
Required
str

The GUID for the Role Definition. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

create_update_sql_role_definition_parameters
Required

The properties required to create or update a Role Definition. Is either a SqlRoleDefinitionCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_stored_procedure

Create or update an Azure Cosmos DB SQL storedProcedure.

async begin_create_update_sql_stored_procedure(resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, create_update_sql_stored_procedure_parameters: _models.SqlStoredProcedureCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlStoredProcedureGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

stored_procedure_name
Required
str

Cosmos DB storedProcedure name. Required.

create_update_sql_stored_procedure_parameters
Required

The parameters to provide for the current SQL storedProcedure. Is either a SqlStoredProcedureCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_trigger

Create or update an Azure Cosmos DB SQL trigger.

async begin_create_update_sql_trigger(resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, create_update_sql_trigger_parameters: _models.SqlTriggerCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlTriggerGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

trigger_name
Required
str

Cosmos DB trigger name. Required.

create_update_sql_trigger_parameters
Required

The parameters to provide for the current SQL trigger. Is either a SqlTriggerCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_create_update_sql_user_defined_function

Create or update an Azure Cosmos DB SQL userDefinedFunction.

async begin_create_update_sql_user_defined_function(resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, create_update_sql_user_defined_function_parameters: _models.SqlUserDefinedFunctionCreateUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SqlUserDefinedFunctionGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

user_defined_function_name
Required
str

Cosmos DB userDefinedFunction name. Required.

create_update_sql_user_defined_function_parameters
Required

The parameters to provide for the current SQL userDefinedFunction. Is either a SqlUserDefinedFunctionCreateUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_container

Deletes an existing Azure Cosmos DB SQL container.

async begin_delete_sql_container(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_database

Deletes an existing Azure Cosmos DB SQL database.

async begin_delete_sql_database(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_role_assignment

Deletes an existing Azure Cosmos DB SQL Role Assignment.

async begin_delete_sql_role_assignment(role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_assignment_id
Required
str

The GUID for the Role Assignment. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_role_definition

Deletes an existing Azure Cosmos DB SQL Role Definition.

async begin_delete_sql_role_definition(role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_definition_id
Required
str

The GUID for the Role Definition. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_stored_procedure

Deletes an existing Azure Cosmos DB SQL storedProcedure.

async begin_delete_sql_stored_procedure(resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

stored_procedure_name
Required
str

Cosmos DB storedProcedure name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_trigger

Deletes an existing Azure Cosmos DB SQL trigger.

async begin_delete_sql_trigger(resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

trigger_name
Required
str

Cosmos DB trigger name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_delete_sql_user_defined_function

Deletes an existing Azure Cosmos DB SQL userDefinedFunction.

async begin_delete_sql_user_defined_function(resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

user_defined_function_name
Required
str

Cosmos DB userDefinedFunction name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_migrate_sql_container_to_autoscale

Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale.

async begin_migrate_sql_container_to_autoscale(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncLROPoller[ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_migrate_sql_container_to_manual_throughput

Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput.

async begin_migrate_sql_container_to_manual_throughput(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncLROPoller[ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_migrate_sql_database_to_autoscale

Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale.

async begin_migrate_sql_database_to_autoscale(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> AsyncLROPoller[ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_migrate_sql_database_to_manual_throughput

Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput.

async begin_migrate_sql_database_to_manual_throughput(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> AsyncLROPoller[ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_retrieve_continuous_backup_information

Retrieves continuous backup information for a container resource.

async begin_retrieve_continuous_backup_information(resource_group_name: str, account_name: str, database_name: str, container_name: str, location: _models.ContinuousBackupRestoreLocation, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.BackupInformation]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

location
Required

The name of the continuous backup restore location. Is either a ContinuousBackupRestoreLocation type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_update_sql_container_throughput

Update RUs per second of an Azure Cosmos DB SQL container.

async begin_update_sql_container_throughput(resource_group_name: str, account_name: str, database_name: str, container_name: str, update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

update_throughput_parameters
Required

The parameters to provide for the RUs per second of the current SQL container. Is either a ThroughputSettingsUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_update_sql_database_throughput

Update RUs per second of an Azure Cosmos DB SQL database.

async begin_update_sql_database_throughput(resource_group_name: str, account_name: str, database_name: str, update_throughput_parameters: _models.ThroughputSettingsUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.ThroughputSettingsGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

update_throughput_parameters
Required

The parameters to provide for the RUs per second of the current SQL database. Is either a ThroughputSettingsUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

get_client_encryption_key

Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database.

async get_client_encryption_key(resource_group_name: str, account_name: str, database_name: str, client_encryption_key_name: str, **kwargs: Any) -> ClientEncryptionKeyGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

client_encryption_key_name
Required
str

Cosmos DB ClientEncryptionKey name. Required.

Returns

Type Description

ClientEncryptionKeyGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_container

Gets the SQL container under an existing Azure Cosmos DB database account.

async get_sql_container(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> SqlContainerGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

SqlContainerGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_container_throughput

Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account.

async get_sql_container_throughput(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> ThroughputSettingsGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

ThroughputSettingsGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_database

Gets the SQL database under an existing Azure Cosmos DB database account with the provided name.

async get_sql_database(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> SqlDatabaseGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

SqlDatabaseGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_database_throughput

Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name.

async get_sql_database_throughput(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> ThroughputSettingsGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

ThroughputSettingsGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_role_assignment

Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id.

async get_sql_role_assignment(role_assignment_id: str, resource_group_name: str, account_name: str, **kwargs: Any) -> SqlRoleAssignmentGetResults

Parameters

Name Description
role_assignment_id
Required
str

The GUID for the Role Assignment. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

SqlRoleAssignmentGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_role_definition

Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id.

async get_sql_role_definition(role_definition_id: str, resource_group_name: str, account_name: str, **kwargs: Any) -> SqlRoleDefinitionGetResults

Parameters

Name Description
role_definition_id
Required
str

The GUID for the Role Definition. Required.

resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

SqlRoleDefinitionGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_stored_procedure

Gets the SQL storedProcedure under an existing Azure Cosmos DB database account.

async get_sql_stored_procedure(resource_group_name: str, account_name: str, database_name: str, container_name: str, stored_procedure_name: str, **kwargs: Any) -> SqlStoredProcedureGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

stored_procedure_name
Required
str

Cosmos DB storedProcedure name. Required.

Returns

Type Description

SqlStoredProcedureGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_trigger

Gets the SQL trigger under an existing Azure Cosmos DB database account.

async get_sql_trigger(resource_group_name: str, account_name: str, database_name: str, container_name: str, trigger_name: str, **kwargs: Any) -> SqlTriggerGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

trigger_name
Required
str

Cosmos DB trigger name. Required.

Returns

Type Description

SqlTriggerGetResults or the result of cls(response)

Exceptions

Type Description

get_sql_user_defined_function

Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account.

async get_sql_user_defined_function(resource_group_name: str, account_name: str, database_name: str, container_name: str, user_defined_function_name: str, **kwargs: Any) -> SqlUserDefinedFunctionGetResults

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

user_defined_function_name
Required
str

Cosmos DB userDefinedFunction name. Required.

Returns

Type Description

SqlUserDefinedFunctionGetResults or the result of cls(response)

Exceptions

Type Description

list_client_encryption_keys

Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database.

list_client_encryption_keys(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> AsyncIterable[ClientEncryptionKeyGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_containers

Lists the SQL container under an existing Azure Cosmos DB database account.

list_sql_containers(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> AsyncIterable[SqlContainerGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_databases

Lists the SQL databases under an existing Azure Cosmos DB database account.

list_sql_databases(resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterable[SqlDatabaseGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_role_assignments

Retrieves the list of all Azure Cosmos DB SQL Role Assignments.

list_sql_role_assignments(resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterable[SqlRoleAssignmentGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_role_definitions

Retrieves the list of all Azure Cosmos DB SQL Role Definitions.

list_sql_role_definitions(resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterable[SqlRoleDefinitionGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_stored_procedures

Lists the SQL storedProcedure under an existing Azure Cosmos DB database account.

list_sql_stored_procedures(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncIterable[SqlStoredProcedureGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_triggers

Lists the SQL trigger under an existing Azure Cosmos DB database account.

list_sql_triggers(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncIterable[SqlTriggerGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

list_sql_user_defined_functions

Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account.

list_sql_user_defined_functions(resource_group_name: str, account_name: str, database_name: str, container_name: str, **kwargs: Any) -> AsyncIterable[SqlUserDefinedFunctionGetResults]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

Cosmos DB database account name. Required.

database_name
Required
str

Cosmos DB database name. Required.

container_name
Required
str

Cosmos DB container name. Required.

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

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