-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MongoCluster Microsoft.DocumentDb 2024-06-01-preview (#29330)
* Initial 2024-06-01-preview changes * Match breaking change fixes * remove redundant file * Compile changes * style/linter fixes * Add replica promotion and geo-replica scenario * Linter/style fixes * Fixes * Fix: Spellcheck, ModelValidation, Advocado * Fix promote async action, fix promote example, add reset password example. * Add examples * Fix examples * Fix more examples * prettier fixes * Fix LintDiff warnings * Fixes * Fix example * Update npm and redo tsv * Changes * address comments * update scenario file * Finalize basic scenario * Add suppression for Azure/azure-openapi-validator#722 * Fix supression * Fix typespec validations * Override go SDK for MongoClusterStatus * Convert to new AutoRest suppressions format. * Update readme.md --------- Co-authored-by: Roopesh Manda <[email protected]>
- Loading branch information
1 parent
c1d839d
commit 4b847aa
Showing
59 changed files
with
5,126 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
specification/mongocluster/DocumentDB.MongoCluster.Management/Replica.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<MongoClusterProperties> { | ||
/** 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<Replica>; | ||
} |
99 changes: 99 additions & 0 deletions
99
.../DocumentDB.MongoCluster.Management/examples/2024-06-01-preview/MongoClusters_Create.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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://<user>:<password>@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://<user>:<password>@myMongoCluster.mongocluster.cosmos.azure.com", | ||
"earliestRestoreTime": "2023-01-13T20:07:35Z" | ||
}, | ||
"location": "westus2" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.