mongo_clusters
Creates, updates, deletes, gets or lists a mongo_clusters
resource.
Overview
Name | mongo_clusters |
Type | Resource |
Id | azure_isv.mongo_db.mongo_clusters |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Azure operation completed successfully.
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | The resource-specific properties for this resource. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , mongoClusterName | Gets information about a mongo cluster. | |
list_by_resource_group | select | subscriptionId , resourceGroupName | List all the mongo clusters in a given resource group. | |
list | select | subscriptionId | List all the mongo clusters in a given subscription. | |
create_or_update | insert | subscriptionId , resourceGroupName , mongoClusterName | Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. | |
update | update | subscriptionId , resourceGroupName , mongoClusterName | Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. | |
delete | delete | subscriptionId , resourceGroupName , mongoClusterName | Deletes a mongo cluster. | |
check_name_availability | exec | subscriptionId , location | Check if mongo cluster name is available for use. | |
promote | exec | subscriptionId , resourceGroupName , mongoClusterName , promoteOption | Promotes a replica mongo cluster to a primary role. |
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 |
---|---|---|
location | string | The name of the Azure region. |
mongoClusterName | string | The name of the mongo cluster. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets information about a mongo cluster.
SELECT
location,
properties,
tags
FROM azure_isv.mongo_db.mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND mongoClusterName = '{{ mongoClusterName }}' -- required
;
List all the mongo clusters in a given resource group.
SELECT
location,
properties,
tags
FROM azure_isv.mongo_db.mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
List all the mongo clusters in a given subscription.
SELECT
location,
properties,
tags
FROM azure_isv.mongo_db.mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.
INSERT INTO azure_isv.mongo_db.mongo_clusters (
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
mongoClusterName
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ mongoClusterName }}'
RETURNING
location,
properties,
tags
;
# Description fields are for documentation purposes
- name: mongo_clusters
props:
- name: subscriptionId
value: string (uuid)
description: Required parameter for the mongo_clusters resource.
- name: resourceGroupName
value: string
description: Required parameter for the mongo_clusters resource.
- name: mongoClusterName
value: string
description: Required parameter for the mongo_clusters resource.
- name: properties
value: object
description: |
The resource-specific properties for this resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition.
UPDATE azure_isv.mongo_db.mongo_clusters
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND mongoClusterName = '{{ mongoClusterName }}' --required
RETURNING
location,
properties,
tags;
DELETE
examples
- delete
Deletes a mongo cluster.
DELETE FROM azure_isv.mongo_db.mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND mongoClusterName = '{{ mongoClusterName }}' --required
;
Lifecycle Methods
- check_name_availability
- promote
Check if mongo cluster name is available for use.
EXEC azure_isv.mongo_db.mongo_clusters.check_name_availability
@subscriptionId='{{ subscriptionId }}' --required,
@location='{{ location }}' --required
@@json=
'{
"name": "{{ name }}",
"type": "{{ type }}"
}'
;
Promotes a replica mongo cluster to a primary role.
EXEC azure_isv.mongo_db.mongo_clusters.promote
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@mongoClusterName='{{ mongoClusterName }}' --required
@@json=
'{
"promoteOption": "{{ promoteOption }}",
"mode": "{{ mode }}"
}'
;