Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ model MongoClusterProperties {
/** The authentication configuration for the cluster. */
@added(Versions.v2025_04_01_preview)
authConfig?: AuthConfigProperties;

/** The encryption configuration for the cluster. Depends on identity being configured. */
@added(Versions.v2025_05_01_preview)
@visibility(Lifecycle.Read, Lifecycle.Create)
encryption?: EncryptionProperties;
}

/** The mode that the Mongo Cluster is created with. */
Expand Down Expand Up @@ -553,3 +558,69 @@ union AuthenticationMode {
/** Microsoft Entra ID authentication mode using Entra users assigned to the cluster and auth mechanism 'MONGODB-OIDC'. */
"MicrosoftEntraID",
}

/** Managed service identity (user assigned identities only for this version) */
@added(Versions.v2025_05_01_preview)
model ManagedServiceIdentity {
/** Type of managed service identity. 'UserAssigned' or 'None' are supported. */
type: ManagedServiceIdentityType;
/**
* The set of user assigned identities associated with the resource.
* If type is 'None', this property must not be present.
* This is a dictionary where each key is a resourceId and value is a UserAssignedIdentity.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "ARM identity dictionaries require dynamic keys."
userAssignedIdentities?: Record<UserAssignedIdentity>;
}

/** User assigned identity request/response (with principalId and clientId). */
@added(Versions.v2025_05_01_preview)
model UserAssignedIdentity {
/** The principal ID of the user assigned identity. */
principalId?: string;
/** The client ID of the user assigned identity. */
clientId?: string;
}

/** Type of managed service identity. 'UserAssigned' or 'None' are supported. */
@added(Versions.v2025_05_01_preview)
union ManagedServiceIdentityType {
string,
/** No managed identity. */
None: "None",
/** User assigned managed identity. */
UserAssigned: "UserAssigned",
}

/** The type of identity for key encryption key. */
@added(Versions.v2025_05_01_preview)
union KeyEncryptionKeyIdentityType {
string,
/** User assigned identity. */
UserAssignedIdentity: "UserAssignedIdentity",
}

/** The encryption configuration for the mongo cluster. */
@added(Versions.v2025_05_01_preview)
model EncryptionProperties {
/** Customer managed key encryption settings. */
customerManagedKeyEncryption?: CustomerManagedKeyEncryptionProperties;
}

/** Customer managed key encryption settings. */
@added(Versions.v2025_05_01_preview)
model CustomerManagedKeyEncryptionProperties {
/** The identity used to access the key encryption key. */
keyEncryptionKeyIdentity: KeyEncryptionKeyIdentity;
/** The URI of the key vault key used for encryption. */
keyEncryptionKeyUrl: string;
}

/** The identity used for key encryption key. */
@added(Versions.v2025_05_01_preview)
model KeyEncryptionKeyIdentity {
/** The type of identity. Only 'UserAssignedIdentity' is supported. */
identityType: KeyEncryptionKeyIdentityType;
/** The user assigned identity resource id. */
userAssignedIdentityResourceId: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"operationId": "MongoClusters_CreateOrUpdate",
"title": "Creates a new Mongo Cluster resource.",
"parameters": {
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "TestResourceGroup",
"mongoClusterName": "myMongoCluster",
"api-version": "2025-05-01-preview",
"resource": {
"location": "westus2",
"properties": {
"administrator": {
"userName": "mongoAdmin",
"password": "password"
},
"authConfig": {
"allowedModes": [
"NativeAuth"
]
},
"serverVersion": "5.0",
"storage": {
"sizeGb": 128
},
"compute": {
"tier": "M30"
},
"sharding": {
"shardCount": 1
},
"highAvailability": {
"targetMode": "ZoneRedundantPreferred"
}
}
}
},
"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",
"administrator": {
"userName": "mongoAdmin"
},
"authConfig": {
"allowedModes": [
"NativeAuth"
]
},
"serverVersion": "5.0",
"storage": {
"sizeGb": 128,
"type": "PremiumSSD"
},
"compute": {
"tier": "M30"
},
"sharding": {
"shardCount": 1
},
"highAvailability": {
"targetMode": "SameZone"
},
"backup": {
"earliestRestoreTime": "2023-01-13T20:07:35Z"
},
"previewFeatures": [],
"infrastructureVersion": "2.0",
"publicNetworkAccess": "Enabled",
"connectionString": "mongodb+srv://<user>:<password>@myMongoCluster.mongocluster.cosmos.azure.com",
"replica": {
"role": "Primary"
},
"dataApi": {
"mode": "Disabled"
}
},
"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",
"administrator": {
"userName": "mongoAdmin"
},
"authConfig": {
"allowedModes": [
"NativeAuth"
]
},
"serverVersion": "5.0",
"storage": {
"sizeGb": 128,
"type": "PremiumSSD"
},
"compute": {
"tier": "M30"
},
"sharding": {
"shardCount": 1
},
"highAvailability": {
"targetMode": "SameZone"
},
"backup": {
"earliestRestoreTime": "2023-01-13T20:07:35Z"
},
"previewFeatures": [],
"infrastructureVersion": "2.0",
"publicNetworkAccess": "Enabled",
"connectionString": "mongodb+srv://<user>:<password>@myMongoCluster.mongocluster.cosmos.azure.com",
"replica": {
"role": "Primary"
},
"dataApi": {
"mode": "Disabled"
}
},
"location": "westus2"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"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": "2025-05-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",
"administrator": {
"userName": "mongoAdmin"
},
"authConfig": {
"allowedModes": [
"NativeAuth"
]
},
"serverVersion": "5.0",
"storage": {
"sizeGb": 128,
"type": "PremiumSSD"
},
"compute": {
"tier": "M30"
},
"sharding": {
"shardCount": 3
},
"highAvailability": {
"targetMode": "SameZone"
},
"backup": {
"earliestRestoreTime": "2023-01-13T20:07:35Z"
},
"previewFeatures": [
"GeoReplicas"
],
"infrastructureVersion": "2.0",
"publicNetworkAccess": "Enabled",
"connectionString": "mongodb+srv://<user>:<password>@myReplicaMongoCluster.mongocluster.cosmos.azure.com",
"replica": {
"role": "GeoAsyncReplica",
"sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster",
"replicationState": "Provisioning"
},
"dataApi": {
"mode": "Disabled"
}
},
"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",
"administrator": {
"userName": "mongoAdmin"
},
"authConfig": {
"allowedModes": [
"NativeAuth"
]
},
"serverVersion": "5.0",
"storage": {
"sizeGb": 128,
"type": "PremiumSSD"
},
"compute": {
"tier": "M30"
},
"sharding": {
"shardCount": 1
},
"highAvailability": {
"targetMode": "SameZone"
},
"backup": {
"earliestRestoreTime": "2023-01-13T20:07:35Z"
},
"previewFeatures": [
"GeoReplicas"
],
"infrastructureVersion": "2.0",
"publicNetworkAccess": "Enabled",
"connectionString": "mongodb+srv://<user>:<password>@myReplicaMongoCluster.mongocluster.cosmos.azure.com",
"replica": {
"role": "GeoAsyncReplica",
"sourceResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/mySourceMongoCluster",
"replicationState": "Provisioning"
},
"dataApi": {
"mode": "Disabled"
}
},
"location": "centralus"
}
}
}
}
Loading
Loading