MongoDBResourcesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

CosmosDBManagementClient's

<xref:mongo_db_resources> attribute.

Inheritance
builtins.object
MongoDBResourcesOperations

Constructor

MongoDBResourcesOperations(*args, **kwargs)

Methods

begin_create_update_mongo_db_collection

Create or update an Azure Cosmos DB MongoDB Collection.

begin_create_update_mongo_db_database

Create or updates Azure Cosmos DB MongoDB database.

begin_delete_mongo_db_collection

Deletes an existing Azure Cosmos DB MongoDB Collection.

begin_delete_mongo_db_database

Deletes an existing Azure Cosmos DB MongoDB database.

begin_migrate_mongo_db_collection_to_autoscale

Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale.

begin_migrate_mongo_db_collection_to_manual_throughput

Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput.

begin_migrate_mongo_db_database_to_autoscale

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

begin_migrate_mongo_db_database_to_manual_throughput

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

begin_retrieve_continuous_backup_information

Retrieves continuous backup information for a Mongodb collection.

begin_update_mongo_db_collection_throughput

Update the RUs per second of an Azure Cosmos DB MongoDB collection.

begin_update_mongo_db_database_throughput

Update RUs per second of the an Azure Cosmos DB MongoDB database.

get_mongo_db_collection

Gets the MongoDB collection under an existing Azure Cosmos DB database account.

get_mongo_db_collection_throughput

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

get_mongo_db_database

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

get_mongo_db_database_throughput

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

list_mongo_db_collections

Lists the MongoDB collection under an existing Azure Cosmos DB database account.

list_mongo_db_databases

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

begin_create_update_mongo_db_collection

Create or update an Azure Cosmos DB MongoDB Collection.

begin_create_update_mongo_db_collection(resource_group_name: str, account_name: str, database_name: str, collection_name: str, create_update_mongo_db_collection_parameters: azure.mgmt.cosmosdb.models._models_py3.MongoDBCollectionCreateUpdateParameters, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.MongoDBCollectionGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

create_update_mongo_db_collection_parameters
MongoDBCollectionCreateUpdateParameters
Required

The parameters to provide for the current MongoDB Collection.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either MongoDBCollectionGetResults or the result of cls(response)

Return type

Exceptions

begin_create_update_mongo_db_database

Create or updates Azure Cosmos DB MongoDB database.

begin_create_update_mongo_db_database(resource_group_name: str, account_name: str, database_name: str, create_update_mongo_db_database_parameters: azure.mgmt.cosmosdb.models._models_py3.MongoDBDatabaseCreateUpdateParameters, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.MongoDBDatabaseGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

create_update_mongo_db_database_parameters
MongoDBDatabaseCreateUpdateParameters
Required

The parameters to provide for the current MongoDB database.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either MongoDBDatabaseGetResults or the result of cls(response)

Return type

Exceptions

begin_delete_mongo_db_collection

Deletes an existing Azure Cosmos DB MongoDB Collection.

begin_delete_mongo_db_collection(resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[None]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_delete_mongo_db_database

Deletes an existing Azure Cosmos DB MongoDB database.

begin_delete_mongo_db_database(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[None]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_migrate_mongo_db_collection_to_autoscale

Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale.

begin_migrate_mongo_db_collection_to_autoscale(resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_migrate_mongo_db_collection_to_manual_throughput

Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput.

begin_migrate_mongo_db_collection_to_manual_throughput(resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_migrate_mongo_db_database_to_autoscale

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

begin_migrate_mongo_db_database_to_autoscale(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_migrate_mongo_db_database_to_manual_throughput

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

begin_migrate_mongo_db_database_to_manual_throughput(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_retrieve_continuous_backup_information

Retrieves continuous backup information for a Mongodb collection.

begin_retrieve_continuous_backup_information(resource_group_name: str, account_name: str, database_name: str, collection_name: str, location: azure.mgmt.cosmosdb.models._models_py3.ContinuousBackupRestoreLocation, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.BackupInformation]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

location
ContinuousBackupRestoreLocation
Required

The name of the continuous backup restore location.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_update_mongo_db_collection_throughput

Update the RUs per second of an Azure Cosmos DB MongoDB collection.

begin_update_mongo_db_collection_throughput(resource_group_name: str, account_name: str, database_name: str, collection_name: str, update_throughput_parameters: azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsUpdateParameters, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

update_throughput_parameters
ThroughputSettingsUpdateParameters
Required

The RUs per second of the parameters to provide for the current MongoDB collection.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

begin_update_mongo_db_database_throughput

Update RUs per second of the an Azure Cosmos DB MongoDB database.

begin_update_mongo_db_database_throughput(resource_group_name: str, account_name: str, database_name: str, update_throughput_parameters: azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsUpdateParameters, **kwargs: Any) -> azure.core.polling._poller.LROPoller[azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

update_throughput_parameters
ThroughputSettingsUpdateParameters
Required

The RUs per second of the parameters to provide for the current MongoDB database.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

get_mongo_db_collection

Gets the MongoDB collection under an existing Azure Cosmos DB database account.

get_mongo_db_collection(resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any) -> azure.mgmt.cosmosdb.models._models_py3.MongoDBCollectionGetResults

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

cls
callable

A custom type or function that will be passed the direct response

Returns

MongoDBCollectionGetResults, or the result of cls(response)

Return type

Exceptions

get_mongo_db_collection_throughput

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

get_mongo_db_collection_throughput(resource_group_name: str, account_name: str, database_name: str, collection_name: str, **kwargs: Any) -> azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

collection_name
str
Required

Cosmos DB collection name.

cls
callable

A custom type or function that will be passed the direct response

Returns

ThroughputSettingsGetResults, or the result of cls(response)

Return type

Exceptions

get_mongo_db_database

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

get_mongo_db_database(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> azure.mgmt.cosmosdb.models._models_py3.MongoDBDatabaseGetResults

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

Returns

MongoDBDatabaseGetResults, or the result of cls(response)

Return type

Exceptions

get_mongo_db_database_throughput

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

get_mongo_db_database_throughput(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> azure.mgmt.cosmosdb.models._models_py3.ThroughputSettingsGetResults

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

Returns

ThroughputSettingsGetResults, or the result of cls(response)

Return type

Exceptions

list_mongo_db_collections

Lists the MongoDB collection under an existing Azure Cosmos DB database account.

list_mongo_db_collections(resource_group_name: str, account_name: str, database_name: str, **kwargs: Any) -> Iterable[azure.mgmt.cosmosdb.models._models_py3.MongoDBCollectionListResult]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

database_name
str
Required

Cosmos DB database name.

cls
callable

A custom type or function that will be passed the direct response

Returns

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

Return type

Exceptions

list_mongo_db_databases

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

list_mongo_db_databases(resource_group_name: str, account_name: str, **kwargs: Any) -> Iterable[azure.mgmt.cosmosdb.models._models_py3.MongoDBDatabaseListResult]

Parameters

resource_group_name
str
Required

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

account_name
str
Required

Cosmos DB database account name.

cls
callable

A custom type or function that will be passed the direct response

Returns

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

Return type

Exceptions

Attributes

models

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