clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | azure_isv.mongodbatlas.clusters |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
backups | boolean | Whether backups are active for the cluster; null if undetermined. |
clusterName | string | Name of the MongoDB Atlas Cluster. |
clusterTier | string | Cluster tier (FREE, FLEX, M10, M30). Required. Known values are: "FREE", "FLEX", "M10", and "M30". (FREE, FLEX, M10, M30) |
mongoDbVersion | string | MongoDB version running on the cluster. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
regionName | string | Azure region where the cluster is deployed. Required. |
state | string | Current state of the cluster. |
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. |
backups | boolean | Whether backups are active for the cluster; null if undetermined. |
clusterName | string | Name of the MongoDB Atlas Cluster. |
clusterTier | string | Cluster tier (FREE, FLEX, M10, M30). Required. Known values are: "FREE", "FLEX", "M10", and "M30". (FREE, FLEX, M10, M30) |
mongoDbVersion | string | MongoDB version running on the cluster. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
regionName | string | Azure region where the cluster is deployed. Required. |
state | string | Current state of the cluster. |
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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, organization_name, project_name, cluster_name, subscription_id | Get a Cluster. | |
list | select | resource_group_name, organization_name, project_name, subscription_id | List Cluster resources by Project. | |
create_or_update | insert | resource_group_name, organization_name, project_name, cluster_name, subscription_id | Create a Cluster. | |
create_or_update | replace | resource_group_name, organization_name, project_name, cluster_name, subscription_id | Create a Cluster. | |
delete | delete | resource_group_name, organization_name, project_name, cluster_name, subscription_id | Delete a Cluster. |
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 |
|---|---|---|
cluster_name | string | Name of the MongoDB Atlas Cluster resource. Required. |
organization_name | string | Name of the Organization resource. Required. |
project_name | string | Name of the MongoDB Atlas Project resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get a Cluster.
SELECT
id,
name,
backups,
clusterName,
clusterTier,
mongoDbVersion,
provisioningState,
regionName,
state,
systemData,
type
FROM azure_isv.mongodbatlas.clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Cluster resources by Project.
SELECT
id,
name,
backups,
clusterName,
clusterTier,
mongoDbVersion,
provisioningState,
regionName,
state,
systemData,
type
FROM azure_isv.mongodbatlas.clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create a Cluster.
INSERT INTO azure_isv.mongodbatlas.clusters (
properties,
resource_group_name,
organization_name,
project_name,
cluster_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ organization_name }}',
'{{ project_name }}',
'{{ cluster_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the clusters resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the clusters resource.
- name: project_name
value: "{{ project_name }}"
description: Required parameter for the clusters resource.
- name: cluster_name
value: "{{ cluster_name }}"
description: Required parameter for the clusters resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the clusters resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
clusterName: "{{ clusterName }}"
clusterTier: "{{ clusterTier }}"
regionName: "{{ regionName }}"
mongoDbVersion: "{{ mongoDbVersion }}"
backups: {{ backups }}
state: "{{ state }}"
provisioningState: "{{ provisioningState }}"
REPLACE examples
- create_or_update
Create a Cluster.
REPLACE azure_isv.mongodbatlas.clusters
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND organization_name = '{{ organization_name }}' --required
AND project_name = '{{ project_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a Cluster.
DELETE FROM azure_isv.mongodbatlas.clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND organization_name = '{{ organization_name }}' --required
AND project_name = '{{ project_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;