Skip to main content

mongo_db_resources

Creates, updates, deletes, gets or lists a mongo_db_resources resource.

Overview

Namemongo_db_resources
TypeResource
Idazure.cosmosdb.mongo_db_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
identityobjectIdentity for the resource.
locationstringThe location of the resource group to which the resource belongs.
resourceobject:vartype resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectTags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_mongo_db_collection_throughputselectresource_group_name, account_name, database_name, collection_name, subscription_idGets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name.
list_mongo_db_collectionsselectresource_group_name, account_name, database_name, subscription_idLists the MongoDB collection under an existing Azure Cosmos DB database account.
get_mongo_role_definitionselectmongo_role_definition_id, resource_group_name, account_name, subscription_idRetrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id.
get_mongo_user_definitionselectmongo_user_definition_id, resource_group_name, account_name, subscription_idRetrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id.
list_mongo_db_databasesselectresource_group_name, account_name, subscription_idLists the MongoDB databases under an existing Azure Cosmos DB database account.
list_mongo_role_definitionsexecresource_group_name, account_name, subscription_idRetrieves the list of all Azure Cosmos DB Mongo Role Definitions.
list_mongo_user_definitionsexecresource_group_name, account_name, subscription_idRetrieves the list of all Azure Cosmos DB Mongo User Definition.
get_mongo_db_database_throughputexecresource_group_name, account_name, database_name, subscription_idGets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name.
update_mongo_db_database_throughputexecresource_group_name, account_name, database_name, subscription_id, propertiesUpdate RUs per second of the an Azure Cosmos DB MongoDB database.
update_mongo_db_collection_throughputexecresource_group_name, account_name, database_name, collection_name, subscription_id, propertiesUpdate the RUs per second of an Azure Cosmos DB MongoDB collection.
get_mongo_db_databaseexecresource_group_name, account_name, database_name, subscription_idGets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name.
create_update_mongo_db_databaseexecresource_group_name, account_name, database_name, subscription_id, propertiesCreate or updates Azure Cosmos DB MongoDB database.
delete_mongo_db_databaseexecresource_group_name, account_name, database_name, subscription_idDeletes an existing Azure Cosmos DB MongoDB database.
get_mongo_db_collectionexecresource_group_name, account_name, database_name, collection_name, subscription_idGets the MongoDB collection under an existing Azure Cosmos DB database account.
create_update_mongo_db_collectionexecresource_group_name, account_name, database_name, collection_name, subscription_id, propertiesCreate or update an Azure Cosmos DB MongoDB Collection.
delete_mongo_db_collectionexecresource_group_name, account_name, database_name, collection_name, subscription_idDeletes an existing Azure Cosmos DB MongoDB Collection.
create_update_mongo_role_definitionexecmongo_role_definition_id, resource_group_name, account_name, subscription_idCreates or updates an Azure Cosmos DB Mongo Role Definition.
delete_mongo_role_definitionexecmongo_role_definition_id, resource_group_name, account_name, subscription_idDeletes an existing Azure Cosmos DB Mongo Role Definition.
create_update_mongo_user_definitionexecmongo_user_definition_id, resource_group_name, account_name, subscription_idCreates or updates an Azure Cosmos DB Mongo User Definition.
delete_mongo_user_definitionexecmongo_user_definition_id, resource_group_name, account_name, subscription_idDeletes an existing Azure Cosmos DB Mongo User Definition.
migrate_mongo_db_database_to_autoscaleexecresource_group_name, account_name, database_name, subscription_idMigrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
migrate_mongo_db_database_to_manual_throughputexecresource_group_name, account_name, database_name, subscription_idMigrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
migrate_mongo_db_collection_to_autoscaleexecresource_group_name, account_name, database_name, collection_name, subscription_idMigrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale.
migrate_mongo_db_collection_to_manual_throughputexecresource_group_name, account_name, database_name, collection_name, subscription_idMigrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput.
retrieve_continuous_backup_informationexecresource_group_name, account_name, database_name, collection_name, subscription_idRetrieves continuous backup information for a Mongodb collection.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_namestringCosmos DB database account name. Required.
collection_namestringCosmos DB collection name. Required.
database_namestringCosmos DB database name. Required.
mongo_role_definition_idstringThe ID for the Role Definition {dbName.roleName}. Required.
mongo_user_definition_idstringThe ID for the User Definition {dbName.userName}. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
identity,
location,
resource,
systemData,
tags,
type
FROM azure.cosmosdb.mongo_db_resources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND collection_name = '{{ collection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

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

EXEC azure.cosmosdb.mongo_db_resources.list_mongo_role_definitions 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;