Skip to main content

mongo_clusters

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

Overview

Namemongo_clusters
TypeResource
Idazure_isv.mongo_db.mongo_clusters

Fields

NameDatatypeDescription
administratortextfield from the properties object
backuptextfield from the properties object
cluster_statustextfield from the properties object
computetextfield from the properties object
connection_stringtextfield from the properties object
create_modetextfield from the properties object
high_availabilitytextfield from the properties object
infrastructure_versiontextfield from the properties object
locationtextThe geo-location where the resource lives
mongoClusterNametextfield from the properties object
preview_featurestextfield from the properties object
private_endpoint_connectionstextfield from the properties object
provisioning_statetextfield from the properties object
public_network_accesstextfield from the properties object
replicatextfield from the properties object
replica_parameterstextfield from the properties object
resourceGroupNametextfield from the properties object
restore_parameterstextfield from the properties object
server_versiontextfield from the properties object
shardingtextfield from the properties object
storagetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTmongoClusterName, resourceGroupName, subscriptionIdGets information about a mongo cluster.
listSELECTsubscriptionIdList all the mongo clusters in a given subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList all the mongo clusters in a given resource group.
create_or_updateINSERTmongoClusterName, resourceGroupName, subscriptionIdCreate or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.
deleteDELETEmongoClusterName, resourceGroupName, subscriptionIdDeletes a mongo cluster.
updateUPDATEmongoClusterName, resourceGroupName, subscriptionIdUpdates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition.
check_name_availabilityEXEClocation, subscriptionIdCheck if mongo cluster name is available for use.
promoteEXECmongoClusterName, resourceGroupName, subscriptionId, data__promoteOptionPromotes a replica mongo cluster to a primary role.

SELECT examples

List all the mongo clusters in a given subscription.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new mongo_clusters resource.

/*+ create */
INSERT INTO azure_isv.mongo_db.mongo_clusters (
mongoClusterName,
resourceGroupName,
subscriptionId,
properties,
tags,
location
)
SELECT
'{{ mongoClusterName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

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 }}';