Skip to content

Commit 56f8769

Browse files
authored
MPG migration - mongocluster (Azure#39360)
1 parent af11f4f commit 56f8769

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster/client.tsp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ using Microsoft.DocumentDB;
4242
@@clientName(PreviewFeature, "MongoClusterPreviewFeature", "csharp");
4343
@@clientName(PromoteMode, "MongoClusterPromoteMode", "csharp");
4444
@@clientName(PromoteOption, "MongoClusterPromoteOption", "csharp");
45+
@@clientName(PromoteReplicaRequest, "PromoteReplicaContent", "csharp");
4546
@@clientName(ProvisioningState, "MongoClusterProvisioningState", "csharp");
4647
@@clientName(Replica, "MongoClusterReplica", "csharp");
4748
@@clientName(ReplicationProperties,
@@ -67,6 +68,8 @@ using Microsoft.DocumentDB;
6768
"MongoClusterFirewallRuleProperties",
6869
"csharp"
6970
);
71+
@@clientName(FirewallRuleProperties.startIpAddress, "startIPAddress");
72+
@@clientName(FirewallRuleProperties.endIpAddress, "endIPAddress");
7073
@@clientName(PrivateEndpointConnectionResource,
7174
"MongoClusterPrivateEndpointConnectionResource",
7275
"csharp"
@@ -75,6 +78,12 @@ using Microsoft.DocumentDB;
7578
"MongoClusterPrivateEndpointConnectionProperties",
7679
"csharp"
7780
);
81+
@@clientName(Microsoft.DocumentDB.PrivateLinkResource,
82+
"MongoClusterPrivateLinkResourceData",
83+
"csharp"
84+
);
85+
@@clientName(PrivateLinks.listByMongoCluster, "GetPrivateLinks", "csharp");
86+
@@clientName(Replicas.listByParent, "GetReplicasByParent", "csharp");
7887
@@clientName(ListConnectionStringsResult,
7988
"MongoClusterConnectionStringsResult",
8089
"csharp"
@@ -109,3 +118,17 @@ using Microsoft.DocumentDB;
109118
@@clientName(StorageProperties, "MongoClusterStorageProperties", "csharp");
110119
@@clientName(StorageType, "MongoClusterStorageType", "csharp");
111120
@@clientName(UserRole, "MongoClusterUserRole", "csharp");
121+
122+
// we add this model in this namespace in order to replace some models with this model via alternateType decorator
123+
namespace Azure.ResourceManager.Models {
124+
/** represents a reference to an existing resource by its id */
125+
model SubResource {
126+
/** the id */
127+
id?: Azure.Core.armResourceIdentifier;
128+
}
129+
}
130+
131+
@@alternateType(PrivateEndpointConnectionProperties.privateEndpoint,
132+
Azure.ResourceManager.Models.SubResource,
133+
"csharp"
134+
);

specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster/tspconfig.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ options:
3434
head-as-boolean: true
3535
inject-spans: true
3636
package-dir: armmongocluster
37-
"@azure-tools/typespec-csharp":
37+
"@azure-typespec/http-client-csharp-mgmt":
3838
emitter-output-dir: "{output-dir}/{service-dir}/{namespace}"
39-
flavor: azure
40-
clear-output-folder: true
4139
namespace: "Azure.ResourceManager.MongoCluster"
4240
"@azure-tools/typespec-ts":
4341
experimental-extensible-enums: true

0 commit comments

Comments
 (0)