diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/FirewallRule.tsp b/specification/mongocluster/DocumentDB.MongoCluster.Management/FirewallRule.tsp index 441a21449bfe..1d6698de39bf 100644 --- a/specification/mongocluster/DocumentDB.MongoCluster.Management/FirewallRule.tsp +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/FirewallRule.tsp @@ -3,6 +3,7 @@ using Azure.ResourceManager; using TypeSpec.Http; namespace Microsoft.DocumentDB; + /** Represents a mongo cluster firewall rule. */ @parentResource(MongoCluster) model FirewallRule is ProxyResource { diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/MongoCluster.tsp b/specification/mongocluster/DocumentDB.MongoCluster.Management/MongoCluster.tsp index 36958d551ef4..4878bd845b69 100644 --- a/specification/mongocluster/DocumentDB.MongoCluster.Management/MongoCluster.tsp +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/MongoCluster.tsp @@ -3,6 +3,7 @@ import "@azure-tools/typespec-client-generator-core"; using TypeSpec.Http; using TypeSpec.OpenAPI; using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager; using Azure.ResourceManager.Private; using Azure.ClientGenerator.Core; @@ -55,8 +56,23 @@ interface MongoClusters { /** Check if mongo cluster name is available for use. */ @action("checkMongoClusterNameAvailability") checkNameAvailability is checkLocalNameAvailability; + /** Promotes a replica mongo cluster to a primary role. */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + promote is ArmResourceActionNoResponseContentAsync< + MongoCluster, + PromoteReplicaRequest + >; } +/** Identifier for a mongo cluster resource. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +scalar MongoClusterResourceId + extends Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.DocumentDB/mongoClusters", + } + ]>; + /** The properties of a mongo cluster. */ model MongoClusterProperties { /** The mode to create a mongo cluster. */ @@ -67,6 +83,11 @@ model MongoClusterProperties { @visibility("create") restoreParameters?: MongoClusterRestoreParameters; + /** The parameters to create a replica mongo cluster. */ + @visibility("create") + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + replicaParameters?: MongoClusterReplicaParameters; + /** The administrator's login for the mongo cluster. */ @visibility("read", "create", "update") administratorLogin?: string; @@ -105,6 +126,20 @@ model MongoClusterProperties { /** List of private endpoint connections. */ @visibility("read") privateEndpointConnections?: PrivateEndpointConnection[]; + + /** List of private endpoint connections. */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + previewFeatures?: PreviewFeature[]; + + /** The replication properties for the mongo cluster */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + @visibility("read") + replica?: ReplicationProperties; + + /** The infrastructure version the cluster is provisioned on. */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + @visibility("read") + infrastructureVersion?: string; } /** The mode that the Mongo Cluster is created with. */ @@ -116,6 +151,14 @@ union CreateMode { /** Create a mongo cluster from a restore point-in-time. */ "PointInTimeRestore", + + /** Create a replica cluster in distinct geographic region from the source cluster. */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + "GeoReplica", + + /** Create a replica cluster in the same geographic region as the source cluster. */ + @added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) + "Replica", } /** The kind of the node on the cluster. */ @@ -133,7 +176,8 @@ model MongoClusterRestoreParameters { pointInTimeUTC?: utcDateTime; /** Resource ID to locate the source cluster to restore */ - sourceResourceId?: string; + @typeChangedFrom(Microsoft.DocumentDB.Versions.v2024_06_01_preview, string) + sourceResourceId?: MongoClusterResourceId; } /** Specification for a node group. */ @@ -180,6 +224,7 @@ model ConnectionString { } /** The status of the Mongo cluster resource. */ +@clientName("MongoClusterStatus", "go") union MongoClusterStatus { string, @@ -215,3 +260,105 @@ union PublicNetworkAccess { /** If set, the private endpoints are the exclusive access method. */ "Disabled", } + +/** Preview features that can be enabled on a mongo cluster. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +union PreviewFeature { + string, + + /** Enables geo replicas preview feature. The feature must be set at create-time on new cluster to enable linking a geo-replica cluster to it. */ + "GeoReplicas", +} + +/** Parameters used for replica operations. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +model MongoClusterReplicaParameters { + /** The id of the replication source cluster. */ + sourceResourceId: MongoClusterResourceId; + + /** The location of the source cluster */ + sourceLocation: Azure.Core.azureLocation; +} + +/** Promote replica request properties. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +model PromoteReplicaRequest { + /** The promote option to apply to the operation. */ + promoteOption: PromoteOption; + + /** The mode to apply to the promote operation. Value is optional and default value is 'Switchover'. */ + mode?: PromoteMode; +} + +/** The option to apply to a promote operation. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +union PromoteOption { + string, + + /** Promote option forces the promotion without waiting for the replica to be caught up to the primary. This can result in data-loss so should only be used during disaster recovery scenarios. */ + "Forced", +} + +/** The mode to apply to a promote operation. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +union PromoteMode { + string, + + /** Promotion will switch the current replica cluster to the primary role and the original primary will be switched to a replica role, maintaining the replication link. */ + "Switchover", +} + +/** Replica properties of the mongo cluster. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +model ReplicationProperties { + /** The resource id the source cluster for the replica cluster. */ + @visibility("read") + sourceResourceId?: MongoClusterResourceId; + + /** The replication role of the cluster */ + @visibility("read") + role?: ReplicationRole; + + /** The replication link state of the replica cluster. */ + @visibility("read") + replicationState?: ReplicationState; +} + +/** Replication role of the mongo cluster. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +union ReplicationRole { + string, + + /** The cluster is a primary replica. */ + "Primary", + + /** The cluster is a local asynchronous replica. */ + "AsyncReplica", + + /** The cluster is a geo-asynchronous replica. */ + "GeoAsyncReplica", +} + +/** The state of the replication link between the replica and source cluster. */ +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +union ReplicationState { + string, + + /** Replication link is active. */ + "Active", + + /** Replica is catching-up with the primary. This can occur after the replica is created or after a promotion is triggered. */ + "Catchup", + + /** Replica and replication link to the primary is being created. */ + "Provisioning", + + /** Replication link is being updated due to a change on the replica or an upgrade. */ + "Updating", + + /** Replication link is broken and the replica may need to be recreated. */ + "Broken", + + /** Replication link is re-configuring due to a promotion event. */ + "Reconfiguring", +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/Replica.tsp b/specification/mongocluster/DocumentDB.MongoCluster.Management/Replica.tsp new file mode 100644 index 000000000000..065daec358d1 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/Replica.tsp @@ -0,0 +1,28 @@ +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager; + +namespace Microsoft.DocumentDB; + +/** Represents a mongo cluster replica. */ +@parentResource(MongoCluster) +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +model Replica is ProxyResource { + /** The name of the mongo cluster firewall rule. */ + @maxLength(40) + @minLength(3) + @pattern("^[a-z0-9]+(-[a-z0-9]+)*") + @key("replicaName") + @segment("replicas") + @visibility("read") + @path + name: string; +} + +@armResourceOperations +@added(Microsoft.DocumentDB.Versions.v2024_06_01_preview) +interface Replicas { + /** List all the replicas for the mongo cluster. */ + listByParent is ArmResourceListByParent; +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Create.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Create.json new file mode 100644 index 000000000000..3ac651d3246d --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Create.json @@ -0,0 +1,99 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a new Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "westus2", + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 1 + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "InProgress", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreateGeoReplica.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreateGeoReplica.json new file mode 100644 index 000000000000..9a7d105e310e --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreateGeoReplica.json @@ -0,0 +1,90 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a replica Mongo Cluster resource from a source resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myReplicaMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "centralus", + "properties": { + "createMode": "GeoReplica", + "replicaParameters": { + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "sourceLocation": "eastus" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [ + "GeoReplicas" + ], + "infrastructureVersion": "2.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myReplicaMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z", + "replica": { + "role": "GeoAsyncReplica", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "replicationState": "Provisioning" + } + }, + "location": "centralus" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [ + "GeoReplicas" + ], + "infrastructureVersion": "2.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myReplicaMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z", + "replica": { + "role": "GeoAsyncReplica", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "replicationState": "Provisioning" + } + }, + "location": "centralus" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreatePITR.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreatePITR.json new file mode 100644 index 000000000000..a5d0c043bed1 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_CreatePITR.json @@ -0,0 +1,76 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a Mongo Cluster resource from a point in time restore", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "westus2", + "properties": { + "createMode": "PointInTimeRestore", + "restoreParameters": { + "pointInTimeUTC": "2023-01-13T20:07:35Z", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Delete.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Delete.json new file mode 100644 index 000000000000..fc6c4de551b7 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "MongoClusters_Delete", + "title": "Deletes a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleCreate.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleCreate.json new file mode 100644 index 000000000000..993a50833c89 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleCreate.json @@ -0,0 +1,65 @@ +{ + "operationId": "FirewallRules_CreateOrUpdate", + "title": "Creates a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview", + "resource": { + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "InProgress", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleDelete.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleDelete.json new file mode 100644 index 000000000000..b22061322e4f --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleDelete.json @@ -0,0 +1,20 @@ +{ + "operationId": "FirewallRules_Delete", + "title": "Deletes a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleGet.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleGet.json new file mode 100644 index 000000000000..63fecdfa3ee1 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleGet.json @@ -0,0 +1,33 @@ +{ + "operationId": "FirewallRules_Get", + "title": "Gets a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleList.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleList.json new file mode 100644 index 000000000000..a98aaafbd703 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_FirewallRuleList.json @@ -0,0 +1,54 @@ +{ + "operationId": "FirewallRules_ListByMongoCluster", + "title": "List the firewall rules on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule2", + "name": "rule2", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "1.0.0.0", + "endIpAddress": "255.0.0.0" + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ForcePromoteReplica.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ForcePromoteReplica.json new file mode 100644 index 000000000000..45c0bbf8a387 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ForcePromoteReplica.json @@ -0,0 +1,22 @@ +{ + "operationId": "MongoClusters_Promote", + "title": "Promotes a replica Mongo Cluster resource to a primary role.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "body": { + "promoteOption": "Forced", + "mode": "Switchover" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Get.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Get.json new file mode 100644 index 000000000000..1ba5465c8b31 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Get.json @@ -0,0 +1,52 @@ +{ + "operationId": "MongoClusters_Get", + "title": "Gets a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_List.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_List.json new file mode 100644 index 000000000000..e29c1d638b91 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_List.json @@ -0,0 +1,90 @@ +{ + "operationId": "MongoClusters_List", + "title": "Lists the Mongo Cluster resources in a subscription.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2", + "name": "myMongoCluster2", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string" + }, + "systemData": { + "createdBy": "user2", + "createdByType": "User", + "createdAt": "2020-02-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M40", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 2 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-10T20:07:35Z" + }, + "location": "eastus" + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListByResourceGroup.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListByResourceGroup.json new file mode 100644 index 000000000000..a853310e259e --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListByResourceGroup.json @@ -0,0 +1,91 @@ +{ + "operationId": "MongoClusters_ListByResourceGroup", + "title": "Lists the Mongo Cluster resources in a resource group.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2", + "name": "myMongoCluster2", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string" + }, + "systemData": { + "createdBy": "user2", + "createdByType": "User", + "createdAt": "2020-02-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M40", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 2 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster2.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-10T20:07:35Z" + }, + "location": "eastus" + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListConnectionStrings.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListConnectionStrings.json new file mode 100644 index 000000000000..e77fae747965 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ListConnectionStrings.json @@ -0,0 +1,22 @@ +{ + "operationId": "MongoClusters_ListConnectionStrings", + "title": "List the available connection strings for the Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "connectionStrings": [ + { + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "description": "default connection string" + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability.json new file mode 100644 index 000000000000..691607a45ca0 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability.json @@ -0,0 +1,21 @@ +{ + "operationId": "MongoClusters_CheckNameAvailability", + "title": "Checks and confirms the Mongo Cluster name is availability for use.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "location": "westus2", + "api-version": "2024-06-01-preview", + "body": { + "name": "newmongocluster", + "type": "Microsoft.DocumentDB/mongoClusters" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability_AlreadyExists.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability_AlreadyExists.json new file mode 100644 index 000000000000..d0249c23291b --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_NameAvailability_AlreadyExists.json @@ -0,0 +1,23 @@ +{ + "operationId": "MongoClusters_CheckNameAvailability", + "title": "Checks and returns that the Mongo Cluster name is already in-use.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "location": "westus2", + "api-version": "2024-06-01-preview", + "body": { + "name": "existingmongocluster", + "type": "Microsoft.DocumentDB/mongoClusters" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Cluster name 'existingmongocluster' is already in use." + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchDiskSize.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchDiskSize.json new file mode 100644 index 000000000000..0e109fafec2c --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchDiskSize.json @@ -0,0 +1,62 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Updates the disk size on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "nodeGroupSpecs": [ + { + "kind": "Shard", + "diskSizeGB": 256 + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchPrivateNetworkAccess.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchPrivateNetworkAccess.json new file mode 100644 index 000000000000..51d15fd15d79 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PatchPrivateNetworkAccess.json @@ -0,0 +1,83 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Disables public network access on a Mongo Cluster resource with a private endpoint connection.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "publicNetworkAccess": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "privateEndpointConnections": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/mymongocluster-pe.ffffffff-ffff-ffff-ffff-ffffffffffff", + "systemData": { + "createdAt": "2024-02-06T04:00:25.0509765Z", + "createdBy": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "createdByType": "Application", + "lastModifiedAt": "2024-02-06T04:00:25.0509765Z", + "lastModifiedBy": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "lastModifiedByType": "Application" + }, + "properties": { + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateEndpoints/mymongocluster-pe" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Disabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..7bab0acd15ee --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json @@ -0,0 +1,19 @@ +{ + "operationId": "PrivateEndpointConnections_Delete", + "title": "Delete a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "privateEndpointConnectionName": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionGet.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..1c1e9c973e58 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionGet.json @@ -0,0 +1,42 @@ +{ + "operationId": "PrivateEndpointConnections_Get", + "title": "Get a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "privateEndpointConnectionName": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionList.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionList.json new file mode 100644 index 000000000000..2a0e86b98164 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionList.json @@ -0,0 +1,45 @@ +{ + "operationId": "PrivateEndpointConnections_ListByMongoCluster", + "title": "Lists the private endpoint connection resources on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionPut.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionPut.json new file mode 100644 index 000000000000..4c6fef6a6863 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateEndpointConnectionPut.json @@ -0,0 +1,85 @@ +{ + "operationId": "PrivateEndpointConnections_Create", + "title": "Approves a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "privateEndpointConnectionName": "pecTest", + "resource": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by admin", + "actionsRequired": "None" + } + } + } + }, + "201": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by admin", + "actionsRequired": "None" + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateLinkResourceList.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateLinkResourceList.json new file mode 100644 index 000000000000..fbe661bd4b08 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_PrivateLinkResourceList.json @@ -0,0 +1,32 @@ +{ + "operationId": "PrivateLinks_ListByMongoCluster", + "title": "Lists the private link resources available on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateLinkResources/MongoCluster", + "name": "MongoCluster", + "type": "Microsoft.DocumentDB/mongoClusters/privateLinkResources", + "properties": { + "groupId": "MongoCluster", + "requiredMembers": [ + "c.p7ex3v2euquypn" + ], + "requiredZoneNames": [ + "privatelink.mongocluster.cosmos.azure.com" + ] + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ReplicaList.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ReplicaList.json new file mode 100644 index 000000000000..b29e21a9338b --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ReplicaList.json @@ -0,0 +1,24 @@ +{ + "operationId": "Replicas_ListByParent", + "title": "List the replicas linked to a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ResetPassword.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ResetPassword.json new file mode 100644 index 000000000000..7225d6b61538 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_ResetPassword.json @@ -0,0 +1,58 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Resets the administrator login password.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Update.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Update.json new file mode 100644 index 000000000000..993526e8497d --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Update.json @@ -0,0 +1,70 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Updates a Mongo Cluster resource", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M50", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 1 + } + ], + "publicNetworkAccess": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M50", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/Operations_List.json b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/Operations_List.json new file mode 100644 index 000000000000..13632dd6b2a6 --- /dev/null +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/Operations_List.json @@ -0,0 +1,35 @@ +{ + "operationId": "Operations_List", + "title": "Operations_List", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "Microsoft.DocumentDB/mongoClusters/read", + "display": { + "provider": "Microsoft.DocumentDB", + "resource": "Mongo Cluster", + "operation": "Read Mongo Clusters", + "description": "Reads a Mongo Cluster or list all Mongo Clusters." + } + }, + { + "name": "Microsoft.DocumentDB/mongoClusters/write", + "display": { + "provider": "Microsoft.DocumentDB", + "resource": "Mongo Cluster", + "operation": "Create or Update Mongo Cluster", + "description": "Create or Update the properties or tags of the specified Mongo Cluster." + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/DocumentDB.MongoCluster.Management/main.tsp b/specification/mongocluster/DocumentDB.MongoCluster.Management/main.tsp index 3966f7278fcd..2745ffc60356 100644 --- a/specification/mongocluster/DocumentDB.MongoCluster.Management/main.tsp +++ b/specification/mongocluster/DocumentDB.MongoCluster.Management/main.tsp @@ -7,6 +7,7 @@ import "./common.tsp"; import "./MongoCluster.tsp"; import "./FirewallRule.tsp"; import "./PrivateEndpointConnection.tsp"; +import "./Replica.tsp"; using TypeSpec.Versioning; using Azure.ResourceManager; @@ -28,4 +29,9 @@ enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2024_03_01_preview: "2024-03-01-preview", + + /** Azure Cosmos DB for Mongo vCore clusters api version2024-06-01-preview. */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2024_06_01_preview: "2024-06-01-preview", } diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Create.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Create.json new file mode 100644 index 000000000000..3ac651d3246d --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Create.json @@ -0,0 +1,99 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a new Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "westus2", + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 1 + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "InProgress", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreateGeoReplica.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreateGeoReplica.json new file mode 100644 index 000000000000..9a7d105e310e --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreateGeoReplica.json @@ -0,0 +1,90 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a replica Mongo Cluster resource from a source resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myReplicaMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "centralus", + "properties": { + "createMode": "GeoReplica", + "replicaParameters": { + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "sourceLocation": "eastus" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [ + "GeoReplicas" + ], + "infrastructureVersion": "2.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myReplicaMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z", + "replica": { + "role": "GeoAsyncReplica", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "replicationState": "Provisioning" + } + }, + "location": "centralus" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [ + "GeoReplicas" + ], + "infrastructureVersion": "2.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myReplicaMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z", + "replica": { + "role": "GeoAsyncReplica", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster", + "replicationState": "Provisioning" + } + }, + "location": "centralus" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreatePITR.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreatePITR.json new file mode 100644 index 000000000000..a5d0c043bed1 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_CreatePITR.json @@ -0,0 +1,76 @@ +{ + "operationId": "MongoClusters_CreateOrUpdate", + "title": "Creates a Mongo Cluster resource from a point in time restore", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "resource": { + "location": "westus2", + "properties": { + "createMode": "PointInTimeRestore", + "restoreParameters": { + "pointInTimeUTC": "2023-01-13T20:07:35Z", + "sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 3 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Delete.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Delete.json new file mode 100644 index 000000000000..fc6c4de551b7 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "MongoClusters_Delete", + "title": "Deletes a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleCreate.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleCreate.json new file mode 100644 index 000000000000..993a50833c89 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleCreate.json @@ -0,0 +1,65 @@ +{ + "operationId": "FirewallRules_CreateOrUpdate", + "title": "Creates a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview", + "resource": { + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "InProgress", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleDelete.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleDelete.json new file mode 100644 index 000000000000..b22061322e4f --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleDelete.json @@ -0,0 +1,20 @@ +{ + "operationId": "FirewallRules_Delete", + "title": "Deletes a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleGet.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleGet.json new file mode 100644 index 000000000000..63fecdfa3ee1 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleGet.json @@ -0,0 +1,33 @@ +{ + "operationId": "FirewallRules_Get", + "title": "Gets a firewall rule on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "firewallRuleName": "rule1", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleList.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleList.json new file mode 100644 index 000000000000..a98aaafbd703 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_FirewallRuleList.json @@ -0,0 +1,54 @@ +{ + "operationId": "FirewallRules_ListByMongoCluster", + "title": "List the firewall rules on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule1", + "name": "rule1", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/firewallRules/rule2", + "name": "rule2", + "type": "/Microsoft.DocumentDB/mongoClusters/firewallRules", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startIpAddress": "1.0.0.0", + "endIpAddress": "255.0.0.0" + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ForcePromoteReplica.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ForcePromoteReplica.json new file mode 100644 index 000000000000..45c0bbf8a387 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ForcePromoteReplica.json @@ -0,0 +1,22 @@ +{ + "operationId": "MongoClusters_Promote", + "title": "Promotes a replica Mongo Cluster resource to a primary role.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "body": { + "promoteOption": "Forced", + "mode": "Switchover" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Get.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Get.json new file mode 100644 index 000000000000..1ba5465c8b31 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Get.json @@ -0,0 +1,52 @@ +{ + "operationId": "MongoClusters_Get", + "title": "Gets a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_List.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_List.json new file mode 100644 index 000000000000..e29c1d638b91 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_List.json @@ -0,0 +1,90 @@ +{ + "operationId": "MongoClusters_List", + "title": "Lists the Mongo Cluster resources in a subscription.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2", + "name": "myMongoCluster2", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string" + }, + "systemData": { + "createdBy": "user2", + "createdByType": "User", + "createdAt": "2020-02-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M40", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 2 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-10T20:07:35Z" + }, + "location": "eastus" + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListByResourceGroup.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListByResourceGroup.json new file mode 100644 index 000000000000..a853310e259e --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListByResourceGroup.json @@ -0,0 +1,91 @@ +{ + "operationId": "MongoClusters_ListByResourceGroup", + "title": "Lists the Mongo Cluster resources in a resource group.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 128, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster2", + "name": "myMongoCluster2", + "type": "/Microsoft.DocumentDB/mongoClusters", + "tags": { + "additionalProp1": "string" + }, + "systemData": { + "createdBy": "user2", + "createdByType": "User", + "createdAt": "2020-02-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M40", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 2 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster2.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-10T20:07:35Z" + }, + "location": "eastus" + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListConnectionStrings.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListConnectionStrings.json new file mode 100644 index 000000000000..e77fae747965 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ListConnectionStrings.json @@ -0,0 +1,22 @@ +{ + "operationId": "MongoClusters_ListConnectionStrings", + "title": "List the available connection strings for the Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "connectionStrings": [ + { + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "description": "default connection string" + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability.json new file mode 100644 index 000000000000..691607a45ca0 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability.json @@ -0,0 +1,21 @@ +{ + "operationId": "MongoClusters_CheckNameAvailability", + "title": "Checks and confirms the Mongo Cluster name is availability for use.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "location": "westus2", + "api-version": "2024-06-01-preview", + "body": { + "name": "newmongocluster", + "type": "Microsoft.DocumentDB/mongoClusters" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability_AlreadyExists.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability_AlreadyExists.json new file mode 100644 index 000000000000..d0249c23291b --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_NameAvailability_AlreadyExists.json @@ -0,0 +1,23 @@ +{ + "operationId": "MongoClusters_CheckNameAvailability", + "title": "Checks and returns that the Mongo Cluster name is already in-use.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "location": "westus2", + "api-version": "2024-06-01-preview", + "body": { + "name": "existingmongocluster", + "type": "Microsoft.DocumentDB/mongoClusters" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Cluster name 'existingmongocluster' is already in use." + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchDiskSize.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchDiskSize.json new file mode 100644 index 000000000000..0e109fafec2c --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchDiskSize.json @@ -0,0 +1,62 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Updates the disk size on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "nodeGroupSpecs": [ + { + "kind": "Shard", + "diskSizeGB": 256 + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchPrivateNetworkAccess.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchPrivateNetworkAccess.json new file mode 100644 index 000000000000..51d15fd15d79 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PatchPrivateNetworkAccess.json @@ -0,0 +1,83 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Disables public network access on a Mongo Cluster resource with a private endpoint connection.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "publicNetworkAccess": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "privateEndpointConnections": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/mymongocluster-pe.ffffffff-ffff-ffff-ffff-ffffffffffff", + "systemData": { + "createdAt": "2024-02-06T04:00:25.0509765Z", + "createdBy": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "createdByType": "Application", + "lastModifiedAt": "2024-02-06T04:00:25.0509765Z", + "lastModifiedBy": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "lastModifiedByType": "Application" + }, + "properties": { + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateEndpoints/mymongocluster-pe" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Disabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionDelete.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..7bab0acd15ee --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionDelete.json @@ -0,0 +1,19 @@ +{ + "operationId": "PrivateEndpointConnections_Delete", + "title": "Delete a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "privateEndpointConnectionName": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "api-version": "2024-06-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionGet.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..1c1e9c973e58 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionGet.json @@ -0,0 +1,42 @@ +{ + "operationId": "PrivateEndpointConnections_Get", + "title": "Get a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "privateEndpointConnectionName": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionList.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionList.json new file mode 100644 index 000000000000..2a0e86b98164 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionList.json @@ -0,0 +1,45 @@ +{ + "operationId": "PrivateEndpointConnections_ListByMongoCluster", + "title": "Lists the private endpoint connection resources on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionPut.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionPut.json new file mode 100644 index 000000000000..4c6fef6a6863 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateEndpointConnectionPut.json @@ -0,0 +1,85 @@ +{ + "operationId": "PrivateEndpointConnections_Create", + "title": "Approves a private endpoint connection on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "privateEndpointConnectionName": "pecTest", + "resource": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by admin", + "actionsRequired": "None" + } + } + } + }, + "201": { + "body": { + "name": "pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateEndpointConnections/pecTest.5d393f64-ef64-46d0-9959-308321c44ac0", + "type": "Microsoft.DocumentDB/mongoClusters/privateEndpointConnections", + "systemData": { + "createdAt": "2024-02-09T05:51:31.1386869Z", + "createdBy": "2df9eb86-36b5-49dc-86ae-9a63135bfa8c", + "createdByType": "Application", + "lastModifiedAt": "2024-02-09T05:51:31.1386869Z", + "lastModifiedBy": "2ff9eb86-36b5-49dc-86ae-9a63135bfa8c", + "lastModifiedByType": "Application" + }, + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/privateEndpoints/pecTest" + }, + "groupIds": [ + "MongoCluster" + ], + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by admin", + "actionsRequired": "None" + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateLinkResourceList.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateLinkResourceList.json new file mode 100644 index 000000000000..fbe661bd4b08 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_PrivateLinkResourceList.json @@ -0,0 +1,32 @@ +{ + "operationId": "PrivateLinks_ListByMongoCluster", + "title": "Lists the private link resources available on a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster/privateLinkResources/MongoCluster", + "name": "MongoCluster", + "type": "Microsoft.DocumentDB/mongoClusters/privateLinkResources", + "properties": { + "groupId": "MongoCluster", + "requiredMembers": [ + "c.p7ex3v2euquypn" + ], + "requiredZoneNames": [ + "privatelink.mongocluster.cosmos.azure.com" + ] + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ReplicaList.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ReplicaList.json new file mode 100644 index 000000000000..b29e21a9338b --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ReplicaList.json @@ -0,0 +1,24 @@ +{ + "operationId": "Replicas_ListByParent", + "title": "List the replicas linked to a Mongo Cluster resource.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myReplicaMongoCluster", + "name": "myReplicaMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ResetPassword.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ResetPassword.json new file mode 100644 index 000000000000..7225d6b61538 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_ResetPassword.json @@ -0,0 +1,58 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Resets the administrator login password.", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M30", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Update.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Update.json new file mode 100644 index 000000000000..993526e8497d --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/MongoClusters_Update.json @@ -0,0 +1,70 @@ +{ + "operationId": "MongoClusters_Update", + "title": "Updates a Mongo Cluster resource", + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "mongoClusterName": "myMongoCluster", + "api-version": "2024-06-01-preview", + "properties": { + "properties": { + "administratorLogin": "mongoAdmin", + "administratorLoginPassword": "password", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M50", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 1 + } + ], + "publicNetworkAccess": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster", + "name": "myMongoCluster", + "type": "/Microsoft.DocumentDB/mongoClusters", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "administratorLogin": "mongoAdmin", + "serverVersion": "5.0", + "nodeGroupSpecs": [ + { + "kind": "Shard", + "sku": "M50", + "diskSizeGB": 256, + "enableHa": true, + "nodeCount": 4 + } + ], + "previewFeatures": [], + "infrastructureVersion": "1.0", + "publicNetworkAccess": "Enabled", + "connectionString": "mongodb+srv://:@myMongoCluster.mongocluster.cosmos.azure.com", + "earliestRestoreTime": "2023-01-13T20:07:35Z" + }, + "location": "westus2" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterOperationResults/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DocumentDB/locations/westus2/mongoClusterAzureAsyncOperation/f6a27306-3ee3-4e6b-997d-3ba2024b85e6?api-version=2024-06-01-preview" + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/Operations_List.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/Operations_List.json new file mode 100644 index 000000000000..13632dd6b2a6 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/examples/Operations_List.json @@ -0,0 +1,35 @@ +{ + "operationId": "Operations_List", + "title": "Operations_List", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2024-06-01-preview" + }, + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "Microsoft.DocumentDB/mongoClusters/read", + "display": { + "provider": "Microsoft.DocumentDB", + "resource": "Mongo Cluster", + "operation": "Read Mongo Clusters", + "description": "Reads a Mongo Cluster or list all Mongo Clusters." + } + }, + { + "name": "Microsoft.DocumentDB/mongoClusters/write", + "display": { + "provider": "Microsoft.DocumentDB", + "resource": "Mongo Cluster", + "operation": "Create or Update Mongo Cluster", + "description": "Create or Update the properties or tags of the specified Mongo Cluster." + } + } + ] + } + } + } +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/mongoCluster.json b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/mongoCluster.json new file mode 100644 index 000000000000..b16f4cb69d17 --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/mongoCluster.json @@ -0,0 +1,2116 @@ +{ + "swagger": "2.0", + "info": { + "title": "MongoClusterManagementClient", + "version": "2024-06-01-preview", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "MongoClusters" + }, + { + "name": "FirewallRules" + }, + { + "name": "PrivateEndpointConnections" + }, + { + "name": "PrivateLinks" + }, + { + "name": "Replicas" + } + ], + "paths": { + "/providers/Microsoft.DocumentDB/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/checkMongoClusterNameAvailability": { + "post": { + "operationId": "MongoClusters_CheckNameAvailability", + "tags": [ + "MongoClusters" + ], + "description": "Check if mongo cluster name is available for use.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "name": "body", + "in": "body", + "description": "The CheckAvailability request", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Checks and confirms the Mongo Cluster name is availability for use.": { + "$ref": "./examples/MongoClusters_NameAvailability.json" + }, + "Checks and returns that the Mongo Cluster name is already in-use.": { + "$ref": "./examples/MongoClusters_NameAvailability_AlreadyExists.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/mongoClusters": { + "get": { + "operationId": "MongoClusters_List", + "tags": [ + "MongoClusters" + ], + "description": "List all the mongo clusters in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MongoClusterListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Lists the Mongo Cluster resources in a subscription.": { + "$ref": "./examples/MongoClusters_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters": { + "get": { + "operationId": "MongoClusters_ListByResourceGroup", + "tags": [ + "MongoClusters" + ], + "description": "List all the mongo clusters in a given resource group.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MongoClusterListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Lists the Mongo Cluster resources in a resource group.": { + "$ref": "./examples/MongoClusters_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}": { + "get": { + "operationId": "MongoClusters_Get", + "tags": [ + "MongoClusters" + ], + "description": "Gets information about a mongo cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MongoCluster" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_Get.json" + } + } + }, + "put": { + "operationId": "MongoClusters_CreateOrUpdate", + "tags": [ + "MongoClusters" + ], + "description": "Create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/MongoCluster" + } + } + ], + "responses": { + "200": { + "description": "Resource 'MongoCluster' update operation succeeded", + "schema": { + "$ref": "#/definitions/MongoCluster" + } + }, + "201": { + "description": "Resource 'MongoCluster' create operation succeeded", + "schema": { + "$ref": "#/definitions/MongoCluster" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creates a Mongo Cluster resource from a point in time restore": { + "$ref": "./examples/MongoClusters_CreatePITR.json" + }, + "Creates a new Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_Create.json" + }, + "Creates a replica Mongo Cluster resource from a source resource.": { + "$ref": "./examples/MongoClusters_CreateGeoReplica.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "MongoClusters_Update", + "tags": [ + "MongoClusters" + ], + "description": "Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/MongoClusterUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MongoCluster" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Disables public network access on a Mongo Cluster resource with a private endpoint connection.": { + "$ref": "./examples/MongoClusters_PatchPrivateNetworkAccess.json" + }, + "Resets the administrator login password.": { + "$ref": "./examples/MongoClusters_ResetPassword.json" + }, + "Updates a Mongo Cluster resource": { + "$ref": "./examples/MongoClusters_Update.json" + }, + "Updates the disk size on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PatchDiskSize.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "MongoClusters_Delete", + "tags": [ + "MongoClusters" + ], + "description": "Deletes a mongo cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deletes a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules": { + "get": { + "operationId": "FirewallRules_ListByMongoCluster", + "tags": [ + "FirewallRules" + ], + "description": "List all the firewall rules in a given mongo cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FirewallRuleListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List the firewall rules on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_FirewallRuleList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/firewallRules/{firewallRuleName}": { + "get": { + "operationId": "FirewallRules_Get", + "tags": [ + "FirewallRules" + ], + "description": "Gets information about a mongo cluster firewall rule.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the mongo cluster firewall rule.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-zA-Z0-9][-_.a-zA-Z0-9]*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets a firewall rule on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_FirewallRuleGet.json" + } + } + }, + "put": { + "operationId": "FirewallRules_CreateOrUpdate", + "tags": [ + "FirewallRules" + ], + "description": "Creates a new firewall rule or updates an existing firewall rule on a mongo cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the mongo cluster firewall rule.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-zA-Z0-9][-_.a-zA-Z0-9]*" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + } + } + ], + "responses": { + "200": { + "description": "Resource 'FirewallRule' update operation succeeded", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "201": { + "description": "Resource 'FirewallRule' create operation succeeded", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creates a firewall rule on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_FirewallRuleCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "FirewallRules_Delete", + "tags": [ + "FirewallRules" + ], + "description": "Deletes a mongo cluster firewall rule.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the mongo cluster firewall rule.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 80, + "pattern": "^[a-zA-Z0-9][-_.a-zA-Z0-9]*" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deletes a firewall rule on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_FirewallRuleDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/listConnectionStrings": { + "post": { + "operationId": "MongoClusters_ListConnectionStrings", + "tags": [ + "MongoClusters" + ], + "description": "List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ListConnectionStringsResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List the available connection strings for the Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_ListConnectionStrings.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/privateEndpointConnections": { + "get": { + "operationId": "PrivateEndpointConnections_ListByMongoCluster", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "List existing private connections", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Lists the private endpoint connection resources on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PrivateEndpointConnectionList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "operationId": "PrivateEndpointConnections_Get", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Get a specific private connection", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/parameters/PrivateEndpointConnectionName" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a private endpoint connection on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "operationId": "PrivateEndpointConnections_Create", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Create a Private endpoint connection", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/parameters/PrivateEndpointConnectionName" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionResource" + } + } + ], + "responses": { + "200": { + "description": "Resource 'PrivateEndpointConnectionResource' update operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionResource" + } + }, + "201": { + "description": "Resource 'PrivateEndpointConnectionResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionResource" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Approves a private endpoint connection on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PrivateEndpointConnectionPut.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "PrivateEndpointConnections_Delete", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Delete the private endpoint connection", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/parameters/PrivateEndpointConnectionName" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete a private endpoint connection on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PrivateEndpointConnectionDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/privateLinkResources": { + "get": { + "operationId": "PrivateLinks_ListByMongoCluster", + "tags": [ + "PrivateLinks" + ], + "description": "list private links on the given resource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Lists the private link resources available on a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_PrivateLinkResourceList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/promote": { + "post": { + "operationId": "MongoClusters_Promote", + "tags": [ + "MongoClusters" + ], + "description": "Promotes a replica mongo cluster to a primary role.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/PromoteReplicaRequest" + } + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Promotes a replica Mongo Cluster resource to a primary role.": { + "$ref": "./examples/MongoClusters_ForcePromoteReplica.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}/replicas": { + "get": { + "operationId": "Replicas_ListByParent", + "tags": [ + "Replicas" + ], + "description": "List all the replicas for the mongo cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "mongoClusterName", + "in": "path", + "description": "The name of the mongo cluster.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 40, + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ReplicaListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List the replicas linked to a Mongo Cluster resource.": { + "$ref": "./examples/MongoClusters_ReplicaList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Azure.Core.azureLocation": { + "type": "string", + "description": "Represents an Azure geography region where supported resource providers live." + }, + "ConnectionString": { + "type": "object", + "description": "Connection string for the mongo cluster", + "properties": { + "connectionString": { + "type": "string", + "description": "Value of the connection string", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Description of the connection string", + "readOnly": true + } + } + }, + "CreateMode": { + "type": "string", + "description": "The mode that the Mongo Cluster is created with.", + "enum": [ + "Default", + "PointInTimeRestore", + "GeoReplica", + "Replica" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true, + "values": [ + { + "name": "Default", + "value": "Default", + "description": "Create a new mongo cluster." + }, + { + "name": "PointInTimeRestore", + "value": "PointInTimeRestore", + "description": "Create a mongo cluster from a restore point-in-time." + }, + { + "name": "GeoReplica", + "value": "GeoReplica", + "description": "Create a replica cluster in distinct geographic region from the source cluster." + }, + { + "name": "Replica", + "value": "Replica", + "description": "Create a replica cluster in the same geographic region as the source cluster." + } + ] + } + }, + "FirewallRule": { + "type": "object", + "description": "Represents a mongo cluster firewall rule.", + "properties": { + "properties": { + "$ref": "#/definitions/FirewallRuleProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "FirewallRuleListResult": { + "type": "object", + "description": "The response of a FirewallRule list operation.", + "properties": { + "value": { + "type": "array", + "description": "The FirewallRule items on this page", + "items": { + "$ref": "#/definitions/FirewallRule" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "FirewallRuleProperties": { + "type": "object", + "description": "The properties of a mongo cluster firewall rule.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the firewall rule.", + "readOnly": true + }, + "startIpAddress": { + "type": "string", + "description": "The start IP address of the mongo cluster firewall rule. Must be IPv4 format.", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + }, + "endIpAddress": { + "type": "string", + "description": "The end IP address of the mongo cluster firewall rule. Must be IPv4 format.", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + } + }, + "required": [ + "startIpAddress", + "endIpAddress" + ] + }, + "ListConnectionStringsResult": { + "type": "object", + "description": "The connection strings for the given mongo cluster.", + "properties": { + "connectionStrings": { + "type": "array", + "description": "An array that contains the connection strings for a mongo cluster.", + "items": { + "$ref": "#/definitions/ConnectionString" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "MongoCluster": { + "type": "object", + "description": "Represents a mongo cluster resource.", + "properties": { + "properties": { + "$ref": "#/definitions/MongoClusterProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ] + }, + "MongoClusterListResult": { + "type": "object", + "description": "The response of a MongoCluster list operation.", + "properties": { + "value": { + "type": "array", + "description": "The MongoCluster items on this page", + "items": { + "$ref": "#/definitions/MongoCluster" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "MongoClusterProperties": { + "type": "object", + "description": "The properties of a mongo cluster.", + "properties": { + "createMode": { + "$ref": "#/definitions/CreateMode", + "description": "The mode to create a mongo cluster.", + "x-ms-mutability": [ + "create" + ] + }, + "restoreParameters": { + "$ref": "#/definitions/MongoClusterRestoreParameters", + "description": "The parameters to create a point-in-time restore mongo cluster.", + "x-ms-mutability": [ + "create" + ] + }, + "replicaParameters": { + "$ref": "#/definitions/MongoClusterReplicaParameters", + "description": "The parameters to create a replica mongo cluster.", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "type": "string", + "description": "The administrator's login for the mongo cluster.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "administratorLoginPassword": { + "type": "string", + "format": "password", + "description": "The password of the administrator login.", + "x-ms-mutability": [ + "update", + "create" + ], + "x-ms-secret": true + }, + "serverVersion": { + "type": "string", + "description": "The Mongo DB server version. Defaults to the latest available version if not specified." + }, + "connectionString": { + "type": "string", + "description": "The default mongo connection string for the cluster.", + "readOnly": true + }, + "earliestRestoreTime": { + "type": "string", + "description": "Earliest restore timestamp in UTC ISO8601 format.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the mongo cluster.", + "readOnly": true + }, + "clusterStatus": { + "$ref": "#/definitions/MongoClusterStatus", + "description": "The status of the mongo cluster.", + "readOnly": true + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Whether or not public endpoint access is allowed for this mongo cluster." + }, + "nodeGroupSpecs": { + "type": "array", + "description": "The list of node group specs in the cluster.", + "items": { + "$ref": "#/definitions/NodeGroupSpec" + }, + "x-ms-identifiers": [] + }, + "privateEndpointConnections": { + "type": "array", + "description": "List of private endpoint connections.", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "previewFeatures": { + "type": "array", + "description": "List of private endpoint connections.", + "items": { + "$ref": "#/definitions/PreviewFeature" + } + }, + "replica": { + "$ref": "#/definitions/ReplicationProperties", + "description": "The replication properties for the mongo cluster", + "readOnly": true + }, + "infrastructureVersion": { + "type": "string", + "description": "The infrastructure version the cluster is provisioned on.", + "readOnly": true + } + } + }, + "MongoClusterReplicaParameters": { + "type": "object", + "description": "Parameters used for replica operations.", + "properties": { + "sourceResourceId": { + "$ref": "#/definitions/MongoClusterResourceId", + "description": "The id of the replication source cluster." + }, + "sourceLocation": { + "$ref": "#/definitions/Azure.Core.azureLocation", + "description": "The location of the source cluster" + } + }, + "required": [ + "sourceResourceId", + "sourceLocation" + ] + }, + "MongoClusterResourceId": { + "type": "string", + "format": "arm-id", + "description": "Identifier for a mongo cluster resource.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.DocumentDB/mongoClusters" + } + ] + } + }, + "MongoClusterRestoreParameters": { + "type": "object", + "description": "Parameters used for restore operations", + "properties": { + "pointInTimeUTC": { + "type": "string", + "format": "date-time", + "description": "UTC point in time to restore a mongo cluster" + }, + "sourceResourceId": { + "$ref": "#/definitions/MongoClusterResourceId", + "description": "Resource ID to locate the source cluster to restore" + } + } + }, + "MongoClusterStatus": { + "type": "string", + "description": "The status of the Mongo cluster resource.", + "enum": [ + "Ready", + "Provisioning", + "Updating", + "Starting", + "Stopping", + "Stopped", + "Dropping" + ], + "x-ms-enum": { + "name": "MongoClusterStatus", + "modelAsString": true, + "values": [ + { + "name": "Ready", + "value": "Ready", + "description": "The mongo cluster resource is ready for use." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The mongo cluster resource is being provisioned." + }, + { + "name": "Updating", + "value": "Updating", + "description": "The mongo cluster resource is being updated." + }, + { + "name": "Starting", + "value": "Starting", + "description": "The mongo cluster resource is being started." + }, + { + "name": "Stopping", + "value": "Stopping", + "description": "The mongo cluster resource is being stopped." + }, + { + "name": "Stopped", + "value": "Stopped", + "description": "The mongo cluster resource is stopped." + }, + { + "name": "Dropping", + "value": "Dropping", + "description": "The mongo cluster resource is being dropped." + } + ] + } + }, + "MongoClusterUpdate": { + "type": "object", + "description": "The type used for update operations of the MongoCluster.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/MongoClusterUpdateProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + } + }, + "MongoClusterUpdateProperties": { + "type": "object", + "description": "The updatable properties of the MongoCluster.", + "properties": { + "administratorLogin": { + "type": "string", + "description": "The administrator's login for the mongo cluster.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "administratorLoginPassword": { + "type": "string", + "format": "password", + "description": "The password of the administrator login.", + "x-ms-mutability": [ + "update", + "create" + ], + "x-ms-secret": true + }, + "serverVersion": { + "type": "string", + "description": "The Mongo DB server version. Defaults to the latest available version if not specified." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Whether or not public endpoint access is allowed for this mongo cluster." + }, + "nodeGroupSpecs": { + "type": "array", + "description": "The list of node group specs in the cluster.", + "items": { + "$ref": "#/definitions/NodeGroupSpec" + }, + "x-ms-identifiers": [] + }, + "previewFeatures": { + "type": "array", + "description": "List of private endpoint connections.", + "items": { + "$ref": "#/definitions/PreviewFeature" + } + } + } + }, + "NodeGroupProperties": { + "type": "object", + "description": "The properties of the node group on a cluster.", + "properties": { + "sku": { + "type": "string", + "description": "The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'." + }, + "diskSizeGB": { + "type": "integer", + "format": "int64", + "description": "The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024." + }, + "enableHa": { + "type": "boolean", + "description": "Whether high availability is enabled on the node group." + } + } + }, + "NodeGroupSpec": { + "type": "object", + "description": "Specification for a node group.", + "properties": { + "sku": { + "type": "string", + "description": "The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'." + }, + "diskSizeGB": { + "type": "integer", + "format": "int64", + "description": "The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024." + }, + "enableHa": { + "type": "boolean", + "description": "Whether high availability is enabled on the node group." + }, + "kind": { + "$ref": "#/definitions/NodeKind", + "description": "The node type deployed in the node group." + }, + "nodeCount": { + "type": "integer", + "format": "int32", + "description": "The number of nodes in the node group." + } + } + }, + "NodeKind": { + "type": "string", + "description": "The kind of the node on the cluster.", + "enum": [ + "Shard" + ], + "x-ms-enum": { + "name": "NodeKind", + "modelAsString": true, + "values": [ + { + "name": "Shard", + "value": "Shard", + "description": "The node is a shard kind." + } + ] + } + }, + "PreviewFeature": { + "type": "string", + "description": "Preview features that can be enabled on a mongo cluster.", + "enum": [ + "GeoReplicas" + ], + "x-ms-enum": { + "name": "PreviewFeature", + "modelAsString": true, + "values": [ + { + "name": "GeoReplicas", + "value": "GeoReplicas", + "description": "Enables geo replicas preview feature. The feature must be set at create-time on new cluster to enable linking a geo-replica cluster to it." + } + ] + } + }, + "PrivateEndpointConnectionResource": { + "type": "object", + "description": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", + "properties": { + "properties": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnectionProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateEndpointConnectionResourceListResult": { + "type": "object", + "description": "The response of a PrivateEndpointConnectionResource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateEndpointConnectionResource items on this page", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionResource" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PrivateLinkResource": { + "type": "object", + "description": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", + "properties": { + "properties": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateLinkResourceProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateLinkResourceListResult": { + "type": "object", + "description": "The response of a PrivateLinkResource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateLinkResource items on this page", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PromoteMode": { + "type": "string", + "description": "The mode to apply to a promote operation.", + "enum": [ + "Switchover" + ], + "x-ms-enum": { + "name": "PromoteMode", + "modelAsString": true, + "values": [ + { + "name": "Switchover", + "value": "Switchover", + "description": "Promotion will switch the current replica cluster to the primary role and the original primary will be switched to a replica role, maintaining the replication link." + } + ] + } + }, + "PromoteOption": { + "type": "string", + "description": "The option to apply to a promote operation.", + "enum": [ + "Forced" + ], + "x-ms-enum": { + "name": "PromoteOption", + "modelAsString": true, + "values": [ + { + "name": "Forced", + "value": "Forced", + "description": "Promote option forces the promotion without waiting for the replica to be caught up to the primary. This can result in data-loss so should only be used during disaster recovery scenarios." + } + ] + } + }, + "PromoteReplicaRequest": { + "type": "object", + "description": "Promote replica request properties.", + "properties": { + "promoteOption": { + "$ref": "#/definitions/PromoteOption", + "description": "The promote option to apply to the operation." + }, + "mode": { + "$ref": "#/definitions/PromoteMode", + "description": "The mode to apply to the promote operation. Value is optional and default value is 'Switchover'." + } + }, + "required": [ + "promoteOption" + ] + }, + "ProvisioningState": { + "type": "string", + "description": "The provisioning state of the last accepted operation.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress", + "Updating", + "Dropping" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "InProgress", + "value": "InProgress", + "description": "An operation is in-progress on the resource." + }, + { + "name": "Updating", + "value": "Updating", + "description": "An update operation is in-progress on the resource." + }, + { + "name": "Dropping", + "value": "Dropping", + "description": "A drop operation is in-progress on the resource." + } + ] + }, + "readOnly": true + }, + "PublicNetworkAccess": { + "type": "string", + "description": "Whether or not public endpoint access is allowed for this Mongo cluster. Value is optional and default value is 'Enabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "If set, mongo cluster can be accessed through private and public methods." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "If set, the private endpoints are the exclusive access method." + } + ] + } + }, + "Replica": { + "type": "object", + "description": "Represents a mongo cluster replica.", + "properties": { + "properties": { + "$ref": "#/definitions/MongoClusterProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "ReplicaListResult": { + "type": "object", + "description": "The response of a Replica list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Replica items on this page", + "items": { + "$ref": "#/definitions/Replica" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ReplicationProperties": { + "type": "object", + "description": "Replica properties of the mongo cluster.", + "properties": { + "sourceResourceId": { + "$ref": "#/definitions/MongoClusterResourceId", + "description": "The resource id the source cluster for the replica cluster.", + "readOnly": true + }, + "role": { + "$ref": "#/definitions/ReplicationRole", + "description": "The replication role of the cluster", + "readOnly": true + }, + "replicationState": { + "$ref": "#/definitions/ReplicationState", + "description": "The replication link state of the replica cluster.", + "readOnly": true + } + } + }, + "ReplicationRole": { + "type": "string", + "description": "Replication role of the mongo cluster.", + "enum": [ + "Primary", + "AsyncReplica", + "GeoAsyncReplica" + ], + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": true, + "values": [ + { + "name": "Primary", + "value": "Primary", + "description": "The cluster is a primary replica." + }, + { + "name": "AsyncReplica", + "value": "AsyncReplica", + "description": "The cluster is a local asynchronous replica." + }, + { + "name": "GeoAsyncReplica", + "value": "GeoAsyncReplica", + "description": "The cluster is a geo-asynchronous replica." + } + ] + } + }, + "ReplicationState": { + "type": "string", + "description": "The state of the replication link between the replica and source cluster.", + "enum": [ + "Active", + "Catchup", + "Provisioning", + "Updating", + "Broken", + "Reconfiguring" + ], + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "Replication link is active." + }, + { + "name": "Catchup", + "value": "Catchup", + "description": "Replica is catching-up with the primary. This can occur after the replica is created or after a promotion is triggered." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "Replica and replication link to the primary is being created." + }, + { + "name": "Updating", + "value": "Updating", + "description": "Replication link is being updated due to a change on the replica or an upgrade." + }, + { + "name": "Broken", + "value": "Broken", + "description": "Replication link is broken and the replica may need to be recreated." + }, + { + "name": "Reconfiguring", + "value": "Reconfiguring", + "description": "Replication link is re-configuring due to a promotion event." + } + ] + } + } + }, + "parameters": {} +} diff --git a/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/scenarios/basic.yaml b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/scenarios/basic.yaml new file mode 100644 index 000000000000..7266e9a8474b --- /dev/null +++ b/specification/mongocluster/resource-manager/Microsoft.DocumentDB/preview/2024-06-01-preview/scenarios/basic.yaml @@ -0,0 +1,141 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json +scope: ResourceGroup +variables: + primaryClusterName: + type: string + prefix: mongoclu + primaryRegion: + type: string + value: westus + replicaClusterName: + type: string + prefix: replicaclu + replicaRegion: + type: string + value: westus3 + administratorLoginPassword: + type: secureString + administratorLoginPassword2: + type: secureString + firewallRuleName: + type: string + prefix: firewall +scenarios: + - scenario: basic + description: Basic scenario for creating, reading and deleting a Mongo Cluster. + steps: + - step: Check_NameAvailability + exampleFile: ../examples/MongoClusters_NameAvailability.json + requestUpdate: + - replace: /body/name + value: $(primaryClusterName) + - step: MongoClusters_CreateOrUpdate + variables: + location: $(primaryRegion) + exampleFile: ../examples/MongoClusters_Create.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - replace: /resource/location + value: $(primaryRegion) + - replace: /resource/properties/administratorLoginPassword + value: $(administratorLoginPassword) + - add: /resource/properties/previewFeatures + value: + - GeoReplicas + - step: MongoClusters_ListByResourceGroup + exampleFile: ../examples/MongoClusters_ListByResourceGroup.json + - step: MongoClusters_Get + exampleFile: ../examples/MongoClusters_Get.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + outputVariables: + sourceResourceId: + type: string + fromResponse: /id + - step: FirewallRules_CreateOrUpdate + exampleFile: ../examples/MongoClusters_FirewallRuleCreate.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: FirewallRules_ListByMongoCluster + exampleFile: ../examples/MongoClusters_FirewallRuleList.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: FirewallRules_Get + exampleFile: ../examples/MongoClusters_FirewallRuleGet.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_ListConnectionStrings + exampleFile: ../examples/MongoClusters_ListConnectionStrings.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_UpdateDiskSize + exampleFile: ../examples/MongoClusters_PatchDiskSize.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: FirewallRules_Delete + exampleFile: ../examples/MongoClusters_FirewallRuleDelete.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_ResetPassword + exampleFile: ../examples/MongoClusters_ResetPassword.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - replace: /properties/properties/administratorLoginPassword + value: $(administratorLoginPassword2) + - step: Check_Replica_NameAvailability + exampleFile: ../examples/MongoClusters_NameAvailability.json + requestUpdate: + - replace: /body/name + value: $(replicaClusterName) + - step: MongoClusters_CreateGeoReplica + variables: + location: $(replicaRegion) + exampleFile: ../examples/MongoClusters_CreateGeoReplica.json + requestUpdate: + - replace: /mongoClusterName + value: $(replicaClusterName) + - replace: /resource/location + value: $(replicaRegion) + - replace: /resource/properties/replicaParameters/sourceResourceId + value: $(sourceResourceId) + - replace: /resource/properties/replicaParameters/sourceLocation + value: $(primaryRegion) + - step: MongoClusters_ReplicaList + exampleFile: ../examples/MongoClusters_ReplicaList.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_ForcePromoteReplica + exampleFile: ../examples/MongoClusters_ForcePromoteReplica.json + requestUpdate: + - replace: /mongoClusterName + value: $(replicaClusterName) + - step: MongoClusters_ReplicaList_PostPromote + exampleFile: ../examples/MongoClusters_ReplicaList.json + requestUpdate: + - replace: /mongoClusterName + value: $(replicaClusterName) + - step: MongoClusters_ForcePromoteReplica_2 + exampleFile: ../examples/MongoClusters_ForcePromoteReplica.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_ReplicaList_PostPromote_2 + exampleFile: ../examples/MongoClusters_ReplicaList.json + requestUpdate: + - replace: /mongoClusterName + value: $(primaryClusterName) + - step: MongoClusters_Delete_Replica + exampleFile: ../examples/MongoClusters_Delete.json + requestUpdate: + - replace: /mongoClusterName + value: $(replicaClusterName) \ No newline at end of file diff --git a/specification/mongocluster/resource-manager/readme.md b/specification/mongocluster/resource-manager/readme.md index 37341dec4f7e..fce757d9bc0a 100644 --- a/specification/mongocluster/resource-manager/readme.md +++ b/specification/mongocluster/resource-manager/readme.md @@ -26,9 +26,19 @@ These are the global settings for the mongocluster. ```yaml openapi-type: arm -tag: package-2024-03-01-preview +tag: package-2024-06-01-preview ``` +### Tag: package-2024-06-01-preview + +These settings apply only when `--tag=package-2024-06-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2024-06-01-preview' +input-file: + - Microsoft.DocumentDB/preview/2024-06-01-preview/mongoCluster.json +``` + + ### Tag: package-2024-03-01-preview These settings apply only when `--tag=package-2024-03-01-preview` is specified on the command line. @@ -51,6 +61,7 @@ This is not used by Autorest itself. swagger-to-sdk: - repo: azure-sdk-for-python - repo: azure-sdk-for-java + - repo: azure-sdk-for-go - repo: azure-sdk-for-js - repo: azure-resource-manager-schemas - repo: azure-cli-extensions @@ -75,3 +86,13 @@ See configuration in [readme.typescript.md](./readme.typescript.md) ## CSharp See configuration in [readme.csharp.md](./readme.csharp.md) + +## Suppression + +```yaml +suppressions: + - code: BodyTopLevelProperties + from: mongoCluster.json + reason: https://github.com/Azure/azure-openapi-validator/issues/722 + where: $.definitions.ReplicaListResult +```