Skip to main content

mongo_mi_resources

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

Overview

Namemongo_mi_resources
TypeResource
Idazure.cosmosdb.mongo_mi_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.
assignableScopesarrayA set of fully qualified Scopes at or below which MongoMI Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
permissionsarrayThe set of operations allowed through this Role Definition.
roleNamestringA user-friendly name for the Role Definition. Must be unique for the database account.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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_mi_role_definitionselectresource_group_name, account_name, role_definition_id, subscription_idRetrieves the properties of an existing Azure Cosmos DB MongoMI Role Definition with the given Id.
get_mongo_mi_role_assignmentselectresource_group_name, account_name, role_assignment_id, subscription_idRetrieves the properties of an existing Azure Cosmos DB MongoMI Role Assignment with the given Id.
list_mongo_mi_role_definitionsselectresource_group_name, account_name, subscription_idRetrieves the list of all Azure Cosmos DB MongoMI Role Definitions.
list_mongo_mi_role_assignmentsexecresource_group_name, account_name, subscription_idRetrieves the list of all Azure Cosmos DB MongoMI Role Assignments.
create_update_mongo_mi_role_definitionexecresource_group_name, account_name, role_definition_id, subscription_idCreates or updates an Azure Cosmos DB MongoMI Role Definition.
delete_mongo_mi_role_definitionexecresource_group_name, account_name, role_definition_id, subscription_idDeletes an existing Azure Cosmos DB MongoMI Role Definition.
create_update_mongo_mi_role_assignmentexecresource_group_name, account_name, role_assignment_id, subscription_idCreates or updates an Azure Cosmos DB MongoMI Role Assignment.
delete_mongo_mi_role_assignmentexecresource_group_name, account_name, role_assignment_id, subscription_idDeletes an existing Azure Cosmos DB MongoMI Role Assignment.

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.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
role_assignment_idstringThe GUID for the Role Assignment. Required.
role_definition_idstringThe GUID for the Role Definition. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
assignableScopes,
permissions,
roleName,
systemData,
type
FROM azure.cosmosdb.mongo_mi_resources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND role_definition_id = '{{ role_definition_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

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

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