Skip to content

Commit d7338d0

Browse files
carjackson-msftpjohari-mskshittiz7minhokang242
authored
Add CosmosDB RP API Version 2024-08-15 (#25800)
* update CosmosDB SDK * add custom property to include missing property and update cmdlet * Revert "add custom property to include missing property and update cmdlet" This reverts commit cb49e52. * update service to use SqlDedicatedGatewayServiceResourceCreateUpdateProperties * Correct change for CosmosDB Services * Fixed logic to check for deleted account instance * Introduce new parameter to restore command * add test recordings --------- Co-authored-by: Praful Johari <[email protected]> Co-authored-by: Kshittiz Kumar <[email protected]> Co-authored-by: Min Ho Kang <[email protected]>
1 parent 8f83bd3 commit d7338d0

File tree

98 files changed

+264404
-76053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+264404
-76053
lines changed

src/CosmosDB/CosmosDB.Management.Sdk/Generated/CosmosDBManagementClient.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ private void Initialize()
481481
this.RestorableTableResources = new RestorableTableResourcesOperations(this);
482482
this.Service = new ServiceOperations(this);
483483
this.BaseUri = new System.Uri("https://management.azure.com");
484-
this.ApiVersion = "2023-11-15";
484+
this.ApiVersion = "2024-08-15";
485485
this.AcceptLanguage = "en-US";
486486
this.LongRunningOperationRetryTimeout = 30;
487487
this.GenerateClientRequestId = true;
@@ -515,6 +515,8 @@ private void Initialize()
515515
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<BackupPolicy>("type"));
516516
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter<ServiceResourceProperties>("serviceType"));
517517
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<ServiceResourceProperties>("serviceType"));
518+
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter<ServiceResourceCreateUpdateProperties>("serviceType"));
519+
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter<ServiceResourceCreateUpdateProperties>("serviceType"));
518520
CustomInitialize();
519521
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
520522
DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/ApiProperties.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public ApiProperties()
2121
/// Initializes a new instance of the ApiProperties class.
2222
/// </summary>
2323

24-
/// <param name="serverVersion">Describes the ServerVersion of an a MongoDB account.
25-
/// Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;</param>
24+
/// <param name="serverVersion">Describes the version of the MongoDB account.
25+
/// Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;, &#39;5.0&#39;, &#39;6.0&#39;, &#39;7.0&#39;</param>
2626
public ApiProperties(string serverVersion = default(string))
2727

2828
{
@@ -37,7 +37,7 @@ public ApiProperties()
3737

3838

3939
/// <summary>
40-
/// Gets or sets describes the ServerVersion of an a MongoDB account. Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;
40+
/// Gets or sets describes the version of the MongoDB account. Possible values include: &#39;3.2&#39;, &#39;3.6&#39;, &#39;4.0&#39;, &#39;4.2&#39;, &#39;5.0&#39;, &#39;6.0&#39;, &#39;7.0&#39;
4141
/// </summary>
4242
[Newtonsoft.Json.JsonProperty(PropertyName = "serverVersion")]
4343
public string ServerVersion {get; set; }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.CosmosDB.Models
7+
{
8+
9+
/// <summary>
10+
/// Defines values for AzureConnectionType.
11+
/// </summary>
12+
13+
14+
public static class AzureConnectionType
15+
{
16+
public const string None = "None";
17+
public const string VPN = "VPN";
18+
}
19+
}

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/ClusterResourceProperties.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,14 @@ public ClusterResourceProperties()
107107

108108
/// <param name="provisionError">Error related to resource provisioning.
109109
/// </param>
110-
public ClusterResourceProperties(string provisioningState = default(string), string restoreFromBackupId = default(string), string delegatedManagementSubnetId = default(string), string cassandraVersion = default(string), string clusterNameOverride = default(string), string authenticationMethod = default(string), string initialCassandraAdminPassword = default(string), SeedNode prometheusEndpoint = default(SeedNode), bool? repairEnabled = default(bool?), System.Collections.Generic.IList<Certificate> clientCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<Certificate> externalGossipCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<Certificate> gossipCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<SeedNode> externalSeedNodes = default(System.Collections.Generic.IList<SeedNode>), System.Collections.Generic.IList<SeedNode> seedNodes = default(System.Collections.Generic.IList<SeedNode>), int? hoursBetweenBackups = default(int?), bool? deallocated = default(bool?), bool? cassandraAuditLoggingEnabled = default(bool?), CassandraError provisionError = default(CassandraError))
110+
111+
/// <param name="azureConnectionMethod">How to connect to the azure services needed for running the cluster
112+
/// Possible values include: &#39;None&#39;, &#39;VPN&#39;</param>
113+
114+
/// <param name="privateLinkResourceId">If the Connection Method is VPN, this is the Id of the private link
115+
/// resource that the datacenters need to connect to.
116+
/// </param>
117+
public ClusterResourceProperties(string provisioningState = default(string), string restoreFromBackupId = default(string), string delegatedManagementSubnetId = default(string), string cassandraVersion = default(string), string clusterNameOverride = default(string), string authenticationMethod = default(string), string initialCassandraAdminPassword = default(string), SeedNode prometheusEndpoint = default(SeedNode), bool? repairEnabled = default(bool?), System.Collections.Generic.IList<Certificate> clientCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<Certificate> externalGossipCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<Certificate> gossipCertificates = default(System.Collections.Generic.IList<Certificate>), System.Collections.Generic.IList<SeedNode> externalSeedNodes = default(System.Collections.Generic.IList<SeedNode>), System.Collections.Generic.IList<SeedNode> seedNodes = default(System.Collections.Generic.IList<SeedNode>), int? hoursBetweenBackups = default(int?), bool? deallocated = default(bool?), bool? cassandraAuditLoggingEnabled = default(bool?), CassandraError provisionError = default(CassandraError), string azureConnectionMethod = default(string), string privateLinkResourceId = default(string))
111118

112119
{
113120
this.ProvisioningState = provisioningState;
@@ -128,6 +135,8 @@ public ClusterResourceProperties()
128135
this.Deallocated = deallocated;
129136
this.CassandraAuditLoggingEnabled = cassandraAuditLoggingEnabled;
130137
this.ProvisionError = provisionError;
138+
this.AzureConnectionMethod = azureConnectionMethod;
139+
this.PrivateLinkResourceId = privateLinkResourceId;
131140
CustomInit();
132141
}
133142

@@ -279,5 +288,19 @@ public ClusterResourceProperties()
279288
/// </summary>
280289
[Newtonsoft.Json.JsonProperty(PropertyName = "provisionError")]
281290
public CassandraError ProvisionError {get; set; }
291+
292+
/// <summary>
293+
/// Gets or sets how to connect to the azure services needed for running the
294+
/// cluster Possible values include: &#39;None&#39;, &#39;VPN&#39;
295+
/// </summary>
296+
[Newtonsoft.Json.JsonProperty(PropertyName = "azureConnectionMethod")]
297+
public string AzureConnectionMethod {get; set; }
298+
299+
/// <summary>
300+
/// Gets if the Connection Method is VPN, this is the Id of the private link
301+
/// resource that the datacenters need to connect to.
302+
/// </summary>
303+
[Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkResourceId")]
304+
public string PrivateLinkResourceId {get; private set; }
282305
}
283306
}

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/DataCenterResourceProperties.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ public DataCenterResourceProperties()
8888

8989
/// <param name="provisionError">Error related to resource provisioning.
9090
/// </param>
91-
public DataCenterResourceProperties(string provisioningState = default(string), string dataCenterLocation = default(string), string delegatedSubnetId = default(string), int? nodeCount = default(int?), System.Collections.Generic.IList<SeedNode> seedNodes = default(System.Collections.Generic.IList<SeedNode>), string base64EncodedCassandraYamlFragment = default(string), string managedDiskCustomerKeyUri = default(string), string backupStorageCustomerKeyUri = default(string), string sku = default(string), string diskSku = default(string), int? diskCapacity = default(int?), bool? availabilityZone = default(bool?), AuthenticationMethodLdapProperties authenticationMethodLdapProperties = default(AuthenticationMethodLdapProperties), bool? deallocated = default(bool?), CassandraError provisionError = default(CassandraError))
91+
92+
/// <param name="privateEndpointIPAddress">Ip of the VPN Endpoint for this data center.
93+
/// </param>
94+
public DataCenterResourceProperties(string provisioningState = default(string), string dataCenterLocation = default(string), string delegatedSubnetId = default(string), int? nodeCount = default(int?), System.Collections.Generic.IList<SeedNode> seedNodes = default(System.Collections.Generic.IList<SeedNode>), string base64EncodedCassandraYamlFragment = default(string), string managedDiskCustomerKeyUri = default(string), string backupStorageCustomerKeyUri = default(string), string sku = default(string), string diskSku = default(string), int? diskCapacity = default(int?), bool? availabilityZone = default(bool?), AuthenticationMethodLdapProperties authenticationMethodLdapProperties = default(AuthenticationMethodLdapProperties), bool? deallocated = default(bool?), CassandraError provisionError = default(CassandraError), string privateEndpointIPAddress = default(string))
9295

9396
{
9497
this.ProvisioningState = provisioningState;
@@ -106,6 +109,7 @@ public DataCenterResourceProperties()
106109
this.AuthenticationMethodLdapProperties = authenticationMethodLdapProperties;
107110
this.Deallocated = deallocated;
108111
this.ProvisionError = provisionError;
112+
this.PrivateEndpointIPAddress = privateEndpointIPAddress;
109113
CustomInit();
110114
}
111115

@@ -227,5 +231,11 @@ public DataCenterResourceProperties()
227231
/// </summary>
228232
[Newtonsoft.Json.JsonProperty(PropertyName = "provisionError")]
229233
public CassandraError ProvisionError {get; set; }
234+
235+
/// <summary>
236+
/// Gets or sets ip of the VPN Endpoint for this data center.
237+
/// </summary>
238+
[Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointIpAddress")]
239+
public string PrivateEndpointIPAddress {get; set; }
230240
}
231241
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.CosmosDB.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Properties for Create or Update request for DataTransferServiceResource
12+
/// </summary>
13+
[Newtonsoft.Json.JsonObject("DataTransfer")]
14+
public partial class DataTransferServiceResourceCreateUpdateProperties : ServiceResourceCreateUpdateProperties
15+
{
16+
/// <summary>
17+
/// Initializes a new instance of the DataTransferServiceResourceCreateUpdateProperties class.
18+
/// </summary>
19+
public DataTransferServiceResourceCreateUpdateProperties()
20+
{
21+
CustomInit();
22+
}
23+
24+
/// <summary>
25+
/// Initializes a new instance of the DataTransferServiceResourceCreateUpdateProperties class.
26+
/// </summary>
27+
28+
/// <param name="instanceSize">Instance type for the service.
29+
/// Possible values include: &#39;Cosmos.D4s&#39;, &#39;Cosmos.D8s&#39;, &#39;Cosmos.D16s&#39;</param>
30+
31+
/// <param name="instanceCount">Instance count for the service.
32+
/// </param>
33+
public DataTransferServiceResourceCreateUpdateProperties(string instanceSize = default(string), int? instanceCount = default(int?))
34+
35+
: base(instanceSize, instanceCount)
36+
{
37+
CustomInit();
38+
}
39+
40+
/// <summary>
41+
/// An initialization method that performs custom operations like setting defaults
42+
/// </summary>
43+
partial void CustomInit();
44+
45+
/// <summary>
46+
/// Validate the object.
47+
/// </summary>
48+
/// <exception cref="Microsoft.Rest.ValidationException">
49+
/// Thrown if validation fails
50+
/// </exception>
51+
public override void Validate()
52+
{
53+
base.Validate();
54+
}
55+
}
56+
}

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/DatabaseAccountCreateUpdateParameters.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ public DatabaseAccountCreateUpdateParameters()
154154
/// Cassandra and Mongo APIs only work with Tls 1.2.
155155
/// Possible values include: &#39;Tls&#39;, &#39;Tls11&#39;, &#39;Tls12&#39;</param>
156156

157-
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity Preview feature on
158-
/// the account
157+
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity feature on the
158+
/// account
159159
/// </param>
160160

161161
/// <param name="customerManagedKeyStatus">Indicates the status of the Customer Managed Key feature on the account. In
@@ -422,8 +422,8 @@ static DatabaseAccountCreateUpdateParameters()
422422
public string MinimalTlsVersion {get; set; }
423423

424424
/// <summary>
425-
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity Preview
426-
/// feature on the account
425+
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity feature
426+
/// on the account
427427
/// </summary>
428428
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableBurstCapacity")]
429429
public bool? EnableBurstCapacity {get; set; }

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/DatabaseAccountCreateUpdateProperties.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ public DatabaseAccountCreateUpdateProperties()
125125
/// Cassandra and Mongo APIs only work with Tls 1.2.
126126
/// Possible values include: &#39;Tls&#39;, &#39;Tls11&#39;, &#39;Tls12&#39;</param>
127127

128-
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity Preview feature on
129-
/// the account
128+
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity feature on the
129+
/// account
130130
/// </param>
131131

132132
/// <param name="customerManagedKeyStatus">Indicates the status of the Customer Managed Key feature on the account. In
@@ -377,8 +377,8 @@ static DatabaseAccountCreateUpdateProperties()
377377
public string MinimalTlsVersion {get; set; }
378378

379379
/// <summary>
380-
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity Preview
381-
/// feature on the account
380+
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity feature
381+
/// on the account
382382
/// </summary>
383383
[Newtonsoft.Json.JsonProperty(PropertyName = "enableBurstCapacity")]
384384
public bool? EnableBurstCapacity {get; set; }

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/DatabaseAccountGetProperties.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ public DatabaseAccountGetProperties()
156156
/// Cassandra and Mongo APIs only work with Tls 1.2.
157157
/// Possible values include: &#39;Tls&#39;, &#39;Tls11&#39;, &#39;Tls12&#39;</param>
158158

159-
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity Preview feature on
160-
/// the account
159+
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity feature on the
160+
/// account
161161
/// </param>
162162

163163
/// <param name="customerManagedKeyStatus">Indicates the status of the Customer Managed Key feature on the account. In
@@ -466,8 +466,8 @@ public DatabaseAccountGetProperties()
466466
public string MinimalTlsVersion {get; set; }
467467

468468
/// <summary>
469-
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity Preview
470-
/// feature on the account
469+
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity feature
470+
/// on the account
471471
/// </summary>
472472
[Newtonsoft.Json.JsonProperty(PropertyName = "enableBurstCapacity")]
473473
public bool? EnableBurstCapacity {get; set; }

src/CosmosDB/CosmosDB.Management.Sdk/Generated/Models/DatabaseAccountGetResults.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ public DatabaseAccountGetResults()
188188
/// Cassandra and Mongo APIs only work with Tls 1.2.
189189
/// Possible values include: &#39;Tls&#39;, &#39;Tls11&#39;, &#39;Tls12&#39;</param>
190190

191-
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity Preview feature on
192-
/// the account
191+
/// <param name="enableBurstCapacity">Flag to indicate enabling/disabling of Burst Capacity feature on the
192+
/// account
193193
/// </param>
194194

195195
/// <param name="customerManagedKeyStatus">Indicates the status of the Customer Managed Key feature on the account. In
@@ -521,8 +521,8 @@ public DatabaseAccountGetResults()
521521
public string MinimalTlsVersion {get; set; }
522522

523523
/// <summary>
524-
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity Preview
525-
/// feature on the account
524+
/// Gets or sets flag to indicate enabling/disabling of Burst Capacity feature
525+
/// on the account
526526
/// </summary>
527527
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableBurstCapacity")]
528528
public bool? EnableBurstCapacity {get; set; }

0 commit comments

Comments
 (0)