mongo_mi_resources
Creates, updates, deletes, gets or lists a mongo_mi_resources resource.
Overview
| Name | mongo_mi_resources |
| Type | Resource |
| Id | azure.cosmosdb.mongo_mi_resources |
Fields
The following fields are returned by SELECT queries:
- get_mongo_mi_role_definition
- get_mongo_mi_role_assignment
- list_mongo_mi_role_definitions
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
assignableScopes | array | A 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. |
permissions | array | The set of operations allowed through this Role Definition. |
roleName | string | A user-friendly name for the Role Definition. Must be unique for the database account. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
principalId | string | The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this MongoMI Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. |
provisioningState | string | Provisioning state of the resource. |
roleDefinitionId | string | The unique identifier for the associated Role Definition. |
scope | string | The data plane resource path for which access is being granted through this MongoMI Role Assignment. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
assignableScopes | array | A 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. |
permissions | array | The set of operations allowed through this Role Definition. |
roleName | string | A user-friendly name for the Role Definition. Must be unique for the database account. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | Cosmos DB database account name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
role_assignment_id | string | The GUID for the Role Assignment. Required. |
role_definition_id | string | The GUID for the Role Definition. Required. |
subscription_id | string |
SELECT examples
- get_mongo_mi_role_definition
- get_mongo_mi_role_assignment
- list_mongo_mi_role_definitions
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
;
Retrieves the properties of an existing Azure Cosmos DB MongoMI Role Assignment with the given Id.
SELECT
id,
name,
principalId,
provisioningState,
roleDefinitionId,
scope,
systemData,
type
FROM azure.cosmosdb.mongo_mi_resources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND role_assignment_id = '{{ role_assignment_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Retrieves the list of all Azure Cosmos DB MongoMI Role Definitions.
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 subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- list_mongo_mi_role_assignments
- create_update_mongo_mi_role_definition
- delete_mongo_mi_role_definition
- create_update_mongo_mi_role_assignment
- delete_mongo_mi_role_assignment
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
;
Creates or updates an Azure Cosmos DB MongoMI Role Definition.
EXEC azure.cosmosdb.mongo_mi_resources.create_update_mongo_mi_role_definition
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@role_definition_id='{{ role_definition_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Deletes an existing Azure Cosmos DB MongoMI Role Definition.
EXEC azure.cosmosdb.mongo_mi_resources.delete_mongo_mi_role_definition
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@role_definition_id='{{ role_definition_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Creates or updates an Azure Cosmos DB MongoMI Role Assignment.
EXEC azure.cosmosdb.mongo_mi_resources.create_update_mongo_mi_role_assignment
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@role_assignment_id='{{ role_assignment_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Deletes an existing Azure Cosmos DB MongoMI Role Assignment.
EXEC azure.cosmosdb.mongo_mi_resources.delete_mongo_mi_role_assignment
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@role_assignment_id='{{ role_assignment_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;