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
- vw_mongo_clusters
- mongo_clusters
Name | Datatype | Description |
---|---|---|
administrator | text | field from the properties object |
backup | text | field from the properties object |
cluster_status | text | field from the properties object |
compute | text | field from the properties object |
connection_string | text | field from the properties object |
create_mode | text | field from the properties object |
high_availability | text | field from the properties object |
infrastructure_version | text | field from the properties object |
location | text | The geo-location where the resource lives |
mongoClusterName | text | field from the properties object |
preview_features | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_network_access | text | field from the properties object |
replica | text | field from the properties object |
replica_parameters | text | field from the properties object |
resourceGroupName | text | field from the properties object |
restore_parameters | text | field from the properties object |
server_version | text | field from the properties object |
sharding | text | field from the properties object |
storage | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | The properties of a mongo cluster. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | mongoClusterName, resourceGroupName, subscriptionId | Gets information about a mongo cluster. |
list | SELECT | subscriptionId | List all the mongo clusters in a given subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List all the mongo clusters in a given resource group. |
create_or_update | INSERT | mongoClusterName, resourceGroupName, subscriptionId | Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. |
delete | DELETE | mongoClusterName, resourceGroupName, subscriptionId | Deletes a mongo cluster. |
update | UPDATE | mongoClusterName, resourceGroupName, subscriptionId | Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. |
check_name_availability | EXEC | location, subscriptionId | Check if mongo cluster name is available for use. |
promote | EXEC | mongoClusterName, resourceGroupName, subscriptionId, data__promoteOption | Promotes a replica mongo cluster to a primary role. |
SELECT
examples
List all the mongo clusters in a given subscription.
- vw_mongo_clusters
- mongo_clusters
SELECT
administrator,
backup,
cluster_status,
compute,
connection_string,
create_mode,
high_availability,
infrastructure_version,
location,
mongoClusterName,
preview_features,
private_endpoint_connections,
provisioning_state,
public_network_access,
replica,
replica_parameters,
resourceGroupName,
restore_parameters,
server_version,
sharding,
storage,
subscriptionId,
tags
FROM azure_isv.mongo_db.vw_mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties,
tags
FROM azure_isv.mongo_db.mongo_clusters
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new mongo_clusters
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure_isv.mongo_db.mongo_clusters (
mongoClusterName,
resourceGroupName,
subscriptionId,
properties,
tags,
location
)
SELECT
'{{ mongoClusterName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: createMode
value: []
- name: restoreParameters
value:
- name: pointInTimeUTC
value: string
- name: sourceResourceId
value: []
- name: replicaParameters
value:
- name: sourceLocation
value: []
- name: administrator
value:
- name: userName
value: string
- name: password
value: string
- name: serverVersion
value: string
- name: connectionString
value: string
- name: provisioningState
value: []
- name: clusterStatus
value: []
- name: publicNetworkAccess
value: []
- name: highAvailability
value:
- name: targetMode
value: []
- name: storage
value:
- name: sizeGb
value: integer
- name: sharding
value:
- name: shardCount
value: integer
- name: compute
value:
- name: tier
value: string
- name: backup
value:
- name: earliestRestoreTime
value: string
- name: privateEndpointConnections
value:
- - name: properties
value:
- name: groupIds
value:
- string
- name: privateEndpoint
value:
- name: id
value: string
- name: privateLinkServiceConnectionState
value:
- name: status
value: []
- name: description
value: string
- name: actionsRequired
value: string
- name: provisioningState
value: []
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: previewFeatures
value:
- []
- name: replica
value:
- name: role
value: []
- name: replicationState
value: []
- name: infrastructureVersion
value: string
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a mongo_clusters
resource.
/*+ update */
UPDATE azure_isv.mongo_db.mongo_clusters
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
mongoClusterName = '{{ mongoClusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified mongo_clusters
resource.
/*+ delete */
DELETE FROM azure_isv.mongo_db.mongo_clusters
WHERE mongoClusterName = '{{ mongoClusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';