diff --git a/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt b/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
index 620feb524c92..785512dfdae5 100644
--- a/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/cosmos-db_resource-manager.txt
@@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cosmos-db/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net2\sdk
-2020-08-12 00:38:38 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cosmos-db/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\Users\kristynh\azure-sdk-for-net\sdk
+2020-09-23 07:35:20 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: 5dae0ac8c8911eb47fca5730bfe4d5e2e68562a3
+Commit: 4e0c86991df0089597a58cf92823d57c2efa9d36
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
index f65ca9205eb7..b0faeafdc0e0 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/AzSdk.RP.props
@@ -1,7 +1,7 @@
- CosmosDB_2020-04-01
+ CosmosDB_2020-06-01-preview
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
index b044eb096457..6212f8be7998 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperations.cs
@@ -132,7 +132,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -371,7 +371,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -665,7 +665,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -846,58 +846,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Lists the Cassandra table under an existing Azure Cosmos DB database
/// account.
@@ -987,7 +935,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1235,7 +1183,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1544,7 +1492,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1730,64 +1678,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateCassandraTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateCassandraTableToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateCassandraTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateCassandraTableToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Create or update an Azure Cosmos DB Cassandra keyspace
///
@@ -1887,7 +1777,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
createUpdateCassandraKeyspaceParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2137,7 +2027,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2376,7 +2266,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
updateThroughputParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2541,8 +2431,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
+ /// Create or update an Azure Cosmos DB Cassandra Table
///
///
/// The name of the resource group. The name is case insensitive.
@@ -2553,6 +2442,12 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB keyspace name.
///
+ ///
+ /// Cosmos DB table name.
+ ///
+ ///
+ /// The parameters to provide for the current Cassandra Table.
+ ///
///
/// Headers that will be added to request.
///
@@ -2574,7 +2469,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginMigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginCreateUpdateCassandraTableWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2629,7 +2524,19 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ if (tableName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
+ }
+ if (createUpdateCassandraTableParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "createUpdateCassandraTableParameters");
+ }
+ if (createUpdateCassandraTableParameters != null)
+ {
+ createUpdateCassandraTableParameters.Validate();
+ }
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2640,17 +2547,20 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("keyspaceName", keyspaceName);
+ tracingParameters.Add("tableName", tableName);
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("createUpdateCassandraTableParameters", createUpdateCassandraTableParameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateCassandraKeyspaceToAutoscale", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateUpdateCassandraTable", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
_url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
+ _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -2663,7 +2573,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2694,6 +2604,12 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(createUpdateCassandraTableParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createUpdateCassandraTableParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -2754,7 +2670,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2767,7 +2683,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -2787,8 +2703,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
+ /// Deletes an existing Azure Cosmos DB Cassandra table.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -2799,6 +2714,9 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB keyspace name.
///
+ ///
+ /// Cosmos DB table name.
+ ///
///
/// Headers that will be added to request.
///
@@ -2808,9 +2726,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -2820,7 +2735,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginMigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteCassandraTableWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2875,7 +2790,11 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
}
- string apiVersion = "2020-04-01";
+ if (tableName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
+ }
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2886,17 +2805,19 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("keyspaceName", keyspaceName);
+ tracingParameters.Add("tableName", tableName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateCassandraKeyspaceToManualThroughput", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteCassandraTable", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
_url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
+ _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -2909,7 +2830,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2961,11 +2882,11 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
+ if (!((int)_statusCode != 202 && (int)_statusCode != 204))
{
_httpRequest.RequestUri = _originRequestUri;
}
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -3000,31 +2921,13 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -3033,7 +2936,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Create or update an Azure Cosmos DB Cassandra Table
+ /// Update RUs per second of an Azure Cosmos DB Cassandra table
///
///
/// The name of the resource group. The name is case insensitive.
@@ -3047,8 +2950,9 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB table name.
///
- ///
- /// The parameters to provide for the current Cassandra Table.
+ ///
+ /// The RUs per second of the parameters to provide for the current Cassandra
+ /// table.
///
///
/// Headers that will be added to request.
@@ -3071,7 +2975,7 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginCreateUpdateCassandraTableWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateCassandraTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -3130,15 +3034,15 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
}
- if (createUpdateCassandraTableParameters == null)
+ if (updateThroughputParameters == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "createUpdateCassandraTableParameters");
+ throw new ValidationException(ValidationRules.CannotBeNull, "updateThroughputParameters");
}
- if (createUpdateCassandraTableParameters != null)
+ if (updateThroughputParameters != null)
{
- createUpdateCassandraTableParameters.Validate();
+ updateThroughputParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3151,13 +3055,13 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("keyspaceName", keyspaceName);
tracingParameters.Add("tableName", tableName);
tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("createUpdateCassandraTableParameters", createUpdateCassandraTableParameters);
+ tracingParameters.Add("updateThroughputParameters", updateThroughputParameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateUpdateCassandraTable", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateCassandraTableThroughput", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
@@ -3206,9 +3110,9 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
// Serialize Request
string _requestContent = null;
- if(createUpdateCassandraTableParameters != null)
+ if(updateThroughputParameters != null)
{
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createUpdateCassandraTableParameters, Client.SerializationSettings);
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateThroughputParameters, Client.SerializationSettings);
_httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
@@ -3272,1024 +3176,6 @@ internal CassandraResourcesOperations(CosmosDBManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes an existing Azure Cosmos DB Cassandra table.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task BeginDeleteCassandraTableWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (keyspaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
- }
- if (tableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("keyspaceName", keyspaceName);
- tracingParameters.Add("tableName", tableName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteCassandraTable", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
- _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 202 && (int)_statusCode != 204))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 202 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Update RUs per second of an Azure Cosmos DB Cassandra table
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The RUs per second of the parameters to provide for the current Cassandra
- /// table.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginUpdateCassandraTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (keyspaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
- }
- if (tableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
- }
- if (updateThroughputParameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "updateThroughputParameters");
- }
- if (updateThroughputParameters != null)
- {
- updateThroughputParameters.Validate();
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("keyspaceName", keyspaceName);
- tracingParameters.Add("tableName", tableName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("updateThroughputParameters", updateThroughputParameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateCassandraTableThroughput", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
- _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(updateThroughputParameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateThroughputParameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
-
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginMigrateCassandraTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (keyspaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
- }
- if (tableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("keyspaceName", keyspaceName);
- tracingParameters.Add("tableName", tableName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateCassandraTableToAutoscale", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
- _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
-
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginMigrateCassandraTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (keyspaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "keyspaceName");
- }
- if (tableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "tableName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("keyspaceName", keyspaceName);
- tracingParameters.Add("tableName", tableName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateCassandraTableToManualThroughput", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{keyspaceName}", System.Uri.EscapeDataString(keyspaceName));
- _url = _url.Replace("{tableName}", System.Uri.EscapeDataString(tableName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperationsExtensions.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperationsExtensions.cs
index 12cbd8c8d565..e51876409a11 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperationsExtensions.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CassandraResourcesOperationsExtensions.cs
@@ -310,102 +310,6 @@ public static ThroughputSettingsGetResults UpdateCassandraKeyspaceThroughput(thi
}
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- public static ThroughputSettingsGetResults MigrateCassandraKeyspaceToAutoscale(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName)
- {
- return operations.MigrateCassandraKeyspaceToAutoscaleAsync(resourceGroupName, accountName, keyspaceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateCassandraKeyspaceToAutoscaleAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- public static ThroughputSettingsGetResults MigrateCassandraKeyspaceToManualThroughput(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName)
- {
- return operations.MigrateCassandraKeyspaceToManualThroughputAsync(resourceGroupName, accountName, keyspaceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateCassandraKeyspaceToManualThroughputAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Lists the Cassandra table under an existing Azure Cosmos DB database
/// account.
@@ -729,114 +633,6 @@ public static ThroughputSettingsGetResults UpdateCassandraTableThroughput(this I
}
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- public static ThroughputSettingsGetResults MigrateCassandraTableToAutoscale(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName)
- {
- return operations.MigrateCassandraTableToAutoscaleAsync(resourceGroupName, accountName, keyspaceName, tableName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateCassandraTableToAutoscaleAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateCassandraTableToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- public static ThroughputSettingsGetResults MigrateCassandraTableToManualThroughput(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName)
- {
- return operations.MigrateCassandraTableToManualThroughputAsync(resourceGroupName, accountName, keyspaceName, tableName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateCassandraTableToManualThroughputAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateCassandraTableToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Create or update an Azure Cosmos DB Cassandra keyspace
///
@@ -986,102 +782,6 @@ public static ThroughputSettingsGetResults BeginUpdateCassandraKeyspaceThroughpu
}
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateCassandraKeyspaceToAutoscale(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName)
- {
- return operations.BeginMigrateCassandraKeyspaceToAutoscaleAsync(resourceGroupName, accountName, keyspaceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateCassandraKeyspaceToAutoscaleAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateCassandraKeyspaceToManualThroughput(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName)
- {
- return operations.BeginMigrateCassandraKeyspaceToManualThroughputAsync(resourceGroupName, accountName, keyspaceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateCassandraKeyspaceToManualThroughputAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Create or update an Azure Cosmos DB Cassandra Table
///
@@ -1249,113 +949,5 @@ public static ThroughputSettingsGetResults BeginUpdateCassandraTableThroughput(t
}
}
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateCassandraTableToAutoscale(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName)
- {
- return operations.BeginMigrateCassandraTableToAutoscaleAsync(resourceGroupName, accountName, keyspaceName, tableName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateCassandraTableToAutoscaleAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateCassandraTableToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateCassandraTableToManualThroughput(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName)
- {
- return operations.BeginMigrateCassandraTableToManualThroughputAsync(resourceGroupName, accountName, keyspaceName, tableName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateCassandraTableToManualThroughputAsync(this ICassandraResourcesOperations operations, string resourceGroupName, string accountName, string keyspaceName, string tableName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateCassandraTableToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, keyspaceName, tableName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
index 2450dbffd2f9..57087390d6cb 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionOperations.cs
@@ -156,7 +156,7 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -415,7 +415,7 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "collectionRid");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -669,7 +669,7 @@ internal CollectionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "collectionRid");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
index ca6d1825652f..a4457dea8cdc 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionOperations.cs
@@ -156,7 +156,7 @@ internal CollectionPartitionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -416,7 +416,7 @@ internal CollectionPartitionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "collectionRid");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
index 953ecd238204..261d18a91165 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionPartitionRegionOperations.cs
@@ -163,7 +163,7 @@ internal CollectionPartitionRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
index d556a7902a6c..0e725e619d47 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CollectionRegionOperations.cs
@@ -163,7 +163,7 @@ internal CollectionRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
index c283720544fe..1b8252c11cae 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/CosmosDBManagementClient.cs
@@ -21,9 +21,6 @@ namespace Microsoft.Azure.Management.CosmosDB
using System.Net;
using System.Net.Http;
- ///
- /// Azure Cosmos DB Database Service Resource Provider REST API
- ///
public partial class CosmosDBManagementClient : ServiceClient, ICosmosDBManagementClient, IAzureClient
{
///
@@ -159,6 +156,11 @@ public partial class CosmosDBManagementClient : ServiceClient
public virtual IGremlinResourcesOperations GremlinResources { get; private set; }
+ ///
+ /// Gets the IRestorableDatabaseAccountsOperations.
+ ///
+ public virtual IRestorableDatabaseAccountsOperations RestorableDatabaseAccounts { get; private set; }
+
///
/// Gets the INotebookWorkspacesOperations.
///
@@ -433,6 +435,7 @@ private void Initialize()
TableResources = new TableResourcesOperations(this);
CassandraResources = new CassandraResourcesOperations(this);
GremlinResources = new GremlinResourcesOperations(this);
+ RestorableDatabaseAccounts = new RestorableDatabaseAccountsOperations(this);
NotebookWorkspaces = new NotebookWorkspacesOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
@@ -466,6 +469,10 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type"));
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("createMode"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("createMode"));
CustomInitialize();
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
index bd748c4f9c4b..3143fa44c320 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountRegionOperations.cs
@@ -149,7 +149,7 @@ internal DatabaseAccountRegionOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
index 5cf701c2a27e..c962c54a7de7 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseAccountsOperations.cs
@@ -131,7 +131,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -421,7 +421,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -627,7 +627,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -856,7 +856,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1088,7 +1088,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1372,7 +1372,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1604,7 +1604,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1827,7 +1827,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2049,7 +2049,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2290,7 +2290,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2526,7 +2526,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2764,7 +2764,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "updateParameters");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3014,7 +3014,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
createUpdateParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3249,7 +3249,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3474,7 +3474,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
failoverParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3703,7 +3703,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
regionParameterForOffline.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3927,7 +3927,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
regionParameterForOnline.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -4151,7 +4151,7 @@ internal DatabaseAccountsOperations(CosmosDBManagementClient client)
{
keyToRegenerate.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
index ed71d4b43b98..551e89e32169 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/DatabaseOperations.cs
@@ -149,7 +149,7 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "filter");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -399,7 +399,7 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseRid");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -644,7 +644,7 @@ internal DatabaseOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseRid");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
index c32027319e4d..f8789cb18544 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperations.cs
@@ -132,7 +132,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
}
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -371,7 +371,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -665,7 +665,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -846,58 +846,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Lists the Gremlin graph under an existing Azure Cosmos DB database account.
///
@@ -986,7 +934,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1233,7 +1181,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1542,7 +1490,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1728,64 +1676,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> MigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginMigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Create or update an Azure Cosmos DB Gremlin database
///
@@ -1885,7 +1775,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
createUpdateGremlinDatabaseParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2135,7 +2025,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2374,7 +2264,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
updateThroughputParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2539,8 +2429,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
+ /// Create or update an Azure Cosmos DB Gremlin graph
///
///
/// The name of the resource group. The name is case insensitive.
@@ -2551,6 +2440,12 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB database name.
///
+ ///
+ /// Cosmos DB graph name.
+ ///
+ ///
+ /// The parameters to provide for the current Gremlin graph.
+ ///
///
/// Headers that will be added to request.
///
@@ -2572,7 +2467,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginMigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginCreateUpdateGremlinGraphWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2627,7 +2522,19 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ if (graphName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
+ }
+ if (createUpdateGremlinGraphParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "createUpdateGremlinGraphParameters");
+ }
+ if (createUpdateGremlinGraphParameters != null)
+ {
+ createUpdateGremlinGraphParameters.Validate();
+ }
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2638,17 +2545,20 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("graphName", graphName);
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("createUpdateGremlinGraphParameters", createUpdateGremlinGraphParameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateGremlinDatabaseToAutoscale", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateUpdateGremlinGraph", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -2661,7 +2571,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2692,6 +2602,12 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(createUpdateGremlinGraphParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createUpdateGremlinGraphParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -2704,6 +2620,8 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
+ System.Uri _originRequestUri = _httpRequest.RequestUri;
+
_httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
@@ -2711,7 +2629,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
}
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
string _responseContent = null;
if (!((int)_statusCode != 200 && (int)_statusCode != 202))
{
@@ -2752,7 +2669,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2765,7 +2682,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -2785,8 +2702,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
+ /// Deletes an existing Azure Cosmos DB Gremlin graph.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -2797,6 +2713,9 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB database name.
///
+ ///
+ /// Cosmos DB graph name.
+ ///
///
/// Headers that will be added to request.
///
@@ -2806,9 +2725,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -2818,7 +2734,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginMigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteGremlinGraphWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2873,7 +2789,11 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
}
- string apiVersion = "2020-04-01";
+ if (graphName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
+ }
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2884,17 +2804,19 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("graphName", graphName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateGremlinDatabaseToManualThroughput", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteGremlinGraph", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -2907,7 +2829,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2959,11 +2881,11 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
+ if (!((int)_statusCode != 202 && (int)_statusCode != 204))
{
_httpRequest.RequestUri = _originRequestUri;
}
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -2998,31 +2920,13 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -3031,7 +2935,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
}
///
- /// Create or update an Azure Cosmos DB Gremlin graph
+ /// Update RUs per second of an Azure Cosmos DB Gremlin graph
///
///
/// The name of the resource group. The name is case insensitive.
@@ -3045,8 +2949,9 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// Cosmos DB graph name.
///
- ///
- /// The parameters to provide for the current Gremlin graph.
+ ///
+ /// The RUs per second of the parameters to provide for the current Gremlin
+ /// graph.
///
///
/// Headers that will be added to request.
@@ -3069,7 +2974,7 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginCreateUpdateGremlinGraphWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateGremlinGraphThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -3128,15 +3033,15 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
}
- if (createUpdateGremlinGraphParameters == null)
+ if (updateThroughputParameters == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "createUpdateGremlinGraphParameters");
+ throw new ValidationException(ValidationRules.CannotBeNull, "updateThroughputParameters");
}
- if (createUpdateGremlinGraphParameters != null)
+ if (updateThroughputParameters != null)
{
- createUpdateGremlinGraphParameters.Validate();
+ updateThroughputParameters.Validate();
}
- string apiVersion = "2020-04-01";
+ string apiVersion = "2020-06-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -3149,13 +3054,13 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("graphName", graphName);
tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("createUpdateGremlinGraphParameters", createUpdateGremlinGraphParameters);
+ tracingParameters.Add("updateThroughputParameters", updateThroughputParameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateUpdateGremlinGraph", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateGremlinGraphThroughput", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
@@ -3204,9 +3109,9 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
// Serialize Request
string _requestContent = null;
- if(createUpdateGremlinGraphParameters != null)
+ if(updateThroughputParameters != null)
{
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createUpdateGremlinGraphParameters, Client.SerializationSettings);
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateThroughputParameters, Client.SerializationSettings);
_httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
@@ -3224,1023 +3129,6 @@ internal GremlinResourcesOperations(CosmosDBManagementClient client)
cancellationToken.ThrowIfCancellationRequested();
System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes an existing Azure Cosmos DB Gremlin graph.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task BeginDeleteGremlinGraphWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (databaseName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
- }
- if (graphName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("graphName", graphName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteGremlinGraph", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 202 && (int)_statusCode != 204))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 202 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Update RUs per second of an Azure Cosmos DB Gremlin graph
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The RUs per second of the parameters to provide for the current Gremlin
- /// graph.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginUpdateGremlinGraphThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (databaseName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
- }
- if (graphName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
- }
- if (updateThroughputParameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "updateThroughputParameters");
- }
- if (updateThroughputParameters != null)
- {
- updateThroughputParameters.Validate();
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("graphName", graphName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("updateThroughputParameters", updateThroughputParameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateGremlinGraphThroughput", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(updateThroughputParameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateThroughputParameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginMigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (databaseName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
- }
- if (graphName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("graphName", graphName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateGremlinGraphToAutoscale", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if (!((int)_statusCode != 200 && (int)_statusCode != 202))
- {
- _httpRequest.RequestUri = _originRequestUri;
- }
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginMigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (accountName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
- }
- if (accountName != null)
- {
- if (accountName.Length > 50)
- {
- throw new ValidationException(ValidationRules.MaxLength, "accountName", 50);
- }
- if (accountName.Length < 3)
- {
- throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-z0-9]+(-[a-z0-9]+)*"))
- {
- throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-z0-9]+(-[a-z0-9]+)*");
- }
- }
- if (databaseName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
- }
- if (graphName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "graphName");
- }
- string apiVersion = "2020-04-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("accountName", accountName);
- tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("graphName", graphName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateGremlinGraphToManualThroughput", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
- _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{graphName}", System.Uri.EscapeDataString(graphName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- System.Uri _originRequestUri = _httpRequest.RequestUri;
-
_httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperationsExtensions.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperationsExtensions.cs
index ae1c2f74645f..1d13db52cb8d 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperationsExtensions.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/GremlinResourcesOperationsExtensions.cs
@@ -310,102 +310,6 @@ public static ThroughputSettingsGetResults UpdateGremlinDatabaseThroughput(this
}
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- public static ThroughputSettingsGetResults MigrateGremlinDatabaseToAutoscale(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
- {
- return operations.MigrateGremlinDatabaseToAutoscaleAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateGremlinDatabaseToAutoscaleAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- public static ThroughputSettingsGetResults MigrateGremlinDatabaseToManualThroughput(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
- {
- return operations.MigrateGremlinDatabaseToManualThroughputAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateGremlinDatabaseToManualThroughputAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Lists the Gremlin graph under an existing Azure Cosmos DB database account.
///
@@ -725,114 +629,6 @@ public static ThroughputSettingsGetResults UpdateGremlinGraphThroughput(this IGr
}
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- public static ThroughputSettingsGetResults MigrateGremlinGraphToAutoscale(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName)
- {
- return operations.MigrateGremlinGraphToAutoscaleAsync(resourceGroupName, accountName, databaseName, graphName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateGremlinGraphToAutoscaleAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- public static ThroughputSettingsGetResults MigrateGremlinGraphToManualThroughput(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName)
- {
- return operations.MigrateGremlinGraphToManualThroughputAsync(resourceGroupName, accountName, databaseName, graphName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task MigrateGremlinGraphToManualThroughputAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.MigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Create or update an Azure Cosmos DB Gremlin database
///
@@ -982,102 +778,6 @@ public static ThroughputSettingsGetResults BeginUpdateGremlinDatabaseThroughput(
}
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateGremlinDatabaseToAutoscale(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
- {
- return operations.BeginMigrateGremlinDatabaseToAutoscaleAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateGremlinDatabaseToAutoscaleAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateGremlinDatabaseToManualThroughput(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
- {
- return operations.BeginMigrateGremlinDatabaseToManualThroughputAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateGremlinDatabaseToManualThroughputAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Create or update an Azure Cosmos DB Gremlin graph
///
@@ -1245,113 +945,5 @@ public static ThroughputSettingsGetResults BeginUpdateGremlinGraphThroughput(thi
}
}
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateGremlinGraphToAutoscale(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName)
- {
- return operations.BeginMigrateGremlinGraphToAutoscaleAsync(resourceGroupName, accountName, databaseName, graphName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateGremlinGraphToAutoscaleAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- public static ThroughputSettingsGetResults BeginMigrateGremlinGraphToManualThroughput(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName)
- {
- return operations.BeginMigrateGremlinGraphToManualThroughputAsync(resourceGroupName, accountName, databaseName, graphName).GetAwaiter().GetResult();
- }
-
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginMigrateGremlinGraphToManualThroughputAsync(this IGremlinResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string graphName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginMigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, graphName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICassandraResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICassandraResourcesOperations.cs
index 4dc108720723..966b081c8321 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICassandraResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICassandraResourcesOperations.cs
@@ -196,64 +196,6 @@ public partial interface ICassandraResourcesOperations
///
Task> UpdateCassandraKeyspaceThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual
- /// throughput to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the Cassandra table under an existing Azure Cosmos DB
/// database account.
///
@@ -444,70 +386,6 @@ public partial interface ICassandraResourcesOperations
///
Task> UpdateCassandraTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateCassandraTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateCassandraTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB Cassandra keyspace
///
///
@@ -596,64 +474,6 @@ public partial interface ICassandraResourcesOperations
///
Task> BeginUpdateCassandraKeyspaceThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from manual
- /// throughput to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateCassandraKeyspaceToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateCassandraKeyspaceToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB Cassandra Table
///
///
@@ -750,69 +570,5 @@ public partial interface ICassandraResourcesOperations
/// Thrown when a required parameter is null
///
Task> BeginUpdateCassandraTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateCassandraTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Cassandra table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB keyspace name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateCassandraTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string keyspaceName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
index 3cfbcb064d18..94701fbae1e3 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ICosmosDBManagementClient.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.CosmosDB
using Newtonsoft.Json;
///
- /// Azure Cosmos DB Database Service Resource Provider REST API
///
public partial interface ICosmosDBManagementClient : System.IDisposable
{
@@ -154,6 +153,11 @@ public partial interface ICosmosDBManagementClient : System.IDisposable
///
IGremlinResourcesOperations GremlinResources { get; }
+ ///
+ /// Gets the IRestorableDatabaseAccountsOperations.
+ ///
+ IRestorableDatabaseAccountsOperations RestorableDatabaseAccounts { get; }
+
///
/// Gets the INotebookWorkspacesOperations.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IGremlinResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IGremlinResourcesOperations.cs
index e609973d2191..47ea75367fba 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IGremlinResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IGremlinResourcesOperations.cs
@@ -196,64 +196,6 @@ public partial interface IGremlinResourcesOperations
///
Task> UpdateGremlinDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the Gremlin graph under an existing Azure Cosmos DB database
/// account.
///
@@ -444,70 +386,6 @@ public partial interface IGremlinResourcesOperations
///
Task> UpdateGremlinGraphThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB Gremlin database
///
///
@@ -596,64 +474,6 @@ public partial interface IGremlinResourcesOperations
///
Task> BeginUpdateGremlinDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Gremlin database from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateGremlinDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Gremlin database from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateGremlinDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB Gremlin graph
///
///
@@ -750,69 +570,5 @@ public partial interface IGremlinResourcesOperations
/// Thrown when a required parameter is null
///
Task> BeginUpdateGremlinGraphThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateGremlinGraphToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB graph name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateGremlinGraphToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string graphName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IMongoDBResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IMongoDBResourcesOperations.cs
index bf7d8ece1659..9573f48a4752 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IMongoDBResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IMongoDBResourcesOperations.cs
@@ -196,64 +196,6 @@ public partial interface IMongoDBResourcesOperations
///
Task> UpdateMongoDBDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB MongoDB database from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateMongoDBDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB MongoDB database from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateMongoDBDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the MongoDB collection under an existing Azure Cosmos DB
/// database account.
///
@@ -444,70 +386,6 @@ public partial interface IMongoDBResourcesOperations
///
Task> UpdateMongoDBCollectionThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB MongoDB collection from manual
- /// throughput to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB collection name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateMongoDBCollectionToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB MongoDB collection from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB collection name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateMongoDBCollectionToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or updates Azure Cosmos DB MongoDB database
///
///
@@ -596,64 +474,6 @@ public partial interface IMongoDBResourcesOperations
///
Task> BeginUpdateMongoDBDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB MongoDB database from manual throughput
- /// to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateMongoDBDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB MongoDB database from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateMongoDBDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB MongoDB Collection
///
///
@@ -750,69 +570,5 @@ public partial interface IMongoDBResourcesOperations
/// Thrown when a required parameter is null
///
Task> BeginUpdateMongoDBCollectionThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB MongoDB collection from manual
- /// throughput to autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB collection name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateMongoDBCollectionToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB MongoDB collection from autoscale to
- /// manual throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB collection name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateMongoDBCollectionToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string collectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs
new file mode 100644
index 000000000000..01738b4bf5d6
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/IRestorableDatabaseAccountsOperations.cs
@@ -0,0 +1,98 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RestorableDatabaseAccountsOperations operations.
+ ///
+ public partial interface IRestorableDatabaseAccountsOperations
+ {
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts
+ /// available under the subscription and in a region.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByLocationWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the restorable Azure Cosmos DB database accounts
+ /// available under the subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves the properties of an existing Azure Cosmos DB restorable
+ /// database account.
+ ///
+ ///
+ /// Cosmos DB region, with spaces between words and each word
+ /// capitalized.
+ ///
+ ///
+ /// The instanceId GUID of a restorable database account.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetByLocationWithHttpMessagesAsync(string location, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
index e1819eb37d72..c24e1320974f 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ISqlResourcesOperations.cs
@@ -196,64 +196,6 @@ public partial interface ISqlResourcesOperations
///
Task> UpdateSqlDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL database from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateSqlDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB SQL database from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateSqlDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the SQL container under an existing Azure Cosmos DB database
/// account.
///
@@ -444,70 +386,6 @@ public partial interface ISqlResourcesOperations
///
Task> UpdateSqlContainerThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL container from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB container name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateSqlContainerToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB database name.
- ///
- ///
- /// Cosmos DB container name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateSqlContainerToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the SQL storedProcedure under an existing Azure Cosmos DB
/// database account.
///
@@ -913,19 +791,48 @@ public partial interface ISqlResourcesOperations
///
Task DeleteSqlTriggerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Create or update an Azure Cosmos DB SQL database
+ /// Retrieves the properties of an existing Azure Cosmos DB SQL Role
+ /// Definition with the given Id.
///
+ ///
+ /// The GUID for the Role Definition.
+ ///
///
/// The name of the resource group. The name is case insensitive.
///
///
/// Cosmos DB database account name.
///
- ///
- /// Cosmos DB database name.
+ ///
+ /// The headers that will be added to request.
///
- ///
- /// The parameters to provide for the current SQL database.
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetSqlRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates an Azure Cosmos DB SQL Role Definition.
+ ///
+ ///
+ /// The GUID for the Role Definition.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// The properties required to create or update a Role Definition.
///
///
/// The headers that will be added to request.
@@ -933,7 +840,7 @@ public partial interface ISqlResourcesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -942,34 +849,34 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginCreateUpdateSqlDatabaseWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateUpdateSqlRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes an existing Azure Cosmos DB SQL database.
+ /// Deletes an existing Azure Cosmos DB SQL Role Definition.
///
+ ///
+ /// The GUID for the Role Definition.
+ ///
///
/// The name of the resource group. The name is case insensitive.
///
///
/// Cosmos DB database account name.
///
- ///
- /// Cosmos DB database name.
- ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
/// Thrown when a required parameter is null
///
- Task BeginDeleteSqlDatabaseWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task DeleteSqlRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Update RUs per second of an Azure Cosmos DB SQL database
+ /// Retrieves the list of all Azure Cosmos DB SQL Role Definitions.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -977,12 +884,34 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB database account name.
///
- ///
- /// Cosmos DB database name.
+ ///
+ /// The headers that will be added to request.
///
- ///
- /// The parameters to provide for the RUs per second of the current SQL
- /// database.
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListSqlRoleDefinitionsWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves the properties of an existing Azure Cosmos DB SQL Role
+ /// Assignment with the given Id.
+ ///
+ ///
+ /// The GUID for the Role Assignment.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
///
///
/// The headers that will be added to request.
@@ -990,7 +919,7 @@ public partial interface ISqlResourcesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -999,19 +928,21 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpdateSqlDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL database from manual throughput to
- /// autoscale
+ /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
///
+ ///
+ /// The GUID for the Role Assignment.
+ ///
///
/// The name of the resource group. The name is case insensitive.
///
///
/// Cosmos DB database account name.
///
- ///
- /// Cosmos DB database name.
+ ///
+ /// The properties required to create or update a Role Assignment.
///
///
/// The headers that will be added to request.
@@ -1019,7 +950,7 @@ public partial interface ISqlResourcesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1028,19 +959,40 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginMigrateSqlDatabaseToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateUpdateSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL database from autoscale to manual
- /// throughput
+ /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
///
+ ///
+ /// The GUID for the Role Assignment.
+ ///
///
/// The name of the resource group. The name is case insensitive.
///
///
/// Cosmos DB database account name.
///
- ///
- /// Cosmos DB database name.
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves the list of all Azure Cosmos DB SQL Role Assignments.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
///
///
/// The headers that will be added to request.
@@ -1048,7 +1000,7 @@ public partial interface ISqlResourcesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1057,9 +1009,9 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginMigrateSqlDatabaseToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListSqlRoleAssignmentsWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Create or update an Azure Cosmos DB SQL container
+ /// Create or update an Azure Cosmos DB SQL database
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1070,11 +1022,8 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB database name.
///
- ///
- /// Cosmos DB container name.
- ///
- ///
- /// The parameters to provide for the current SQL container.
+ ///
+ /// The parameters to provide for the current SQL database.
///
///
/// The headers that will be added to request.
@@ -1091,9 +1040,9 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginCreateUpdateSqlContainerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginCreateUpdateSqlDatabaseWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes an existing Azure Cosmos DB SQL container.
+ /// Deletes an existing Azure Cosmos DB SQL database.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1104,9 +1053,6 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB database name.
///
- ///
- /// Cosmos DB container name.
- ///
///
/// The headers that will be added to request.
///
@@ -1119,9 +1065,9 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task BeginDeleteSqlContainerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginDeleteSqlDatabaseWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Update RUs per second of an Azure Cosmos DB SQL container
+ /// Update RUs per second of an Azure Cosmos DB SQL database
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1132,12 +1078,9 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB database name.
///
- ///
- /// Cosmos DB container name.
- ///
///
/// The parameters to provide for the RUs per second of the current SQL
- /// container.
+ /// database.
///
///
/// The headers that will be added to request.
@@ -1154,10 +1097,9 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpdateSqlContainerThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateSqlDatabaseThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL container from manual throughput to
- /// autoscale
+ /// Create or update an Azure Cosmos DB SQL container
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1171,6 +1113,9 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB container name.
///
+ ///
+ /// The parameters to provide for the current SQL container.
+ ///
///
/// The headers that will be added to request.
///
@@ -1186,10 +1131,37 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginMigrateSqlContainerToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginCreateUpdateSqlContainerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes an existing Azure Cosmos DB SQL container.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// Cosmos DB database name.
+ ///
+ ///
+ /// Cosmos DB container name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteSqlContainerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
- /// throughput
+ /// Update RUs per second of an Azure Cosmos DB SQL container
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1203,6 +1175,10 @@ public partial interface ISqlResourcesOperations
///
/// Cosmos DB container name.
///
+ ///
+ /// The parameters to provide for the RUs per second of the current SQL
+ /// container.
+ ///
///
/// The headers that will be added to request.
///
@@ -1218,7 +1194,7 @@ public partial interface ISqlResourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginMigrateSqlContainerToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateSqlContainerThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or update an Azure Cosmos DB SQL storedProcedure
///
@@ -1423,5 +1399,117 @@ public partial interface ISqlResourcesOperations
/// Thrown when a required parameter is null
///
Task BeginDeleteSqlTriggerWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates an Azure Cosmos DB SQL Role Definition.
+ ///
+ ///
+ /// The GUID for the Role Definition.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// The properties required to create or update a Role Definition.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateUpdateSqlRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes an existing Azure Cosmos DB SQL Role Definition.
+ ///
+ ///
+ /// The GUID for the Role Definition.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteSqlRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
+ ///
+ ///
+ /// The GUID for the Role Assignment.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// The properties required to create or update a Role Assignment.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateUpdateSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
+ ///
+ ///
+ /// The GUID for the Role Assignment.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Cosmos DB database account name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteSqlRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ITableResourcesOperations.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ITableResourcesOperations.cs
index 7766fa0ab69e..233c74e6f42c 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ITableResourcesOperations.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/ITableResourcesOperations.cs
@@ -196,64 +196,6 @@ public partial interface ITableResourcesOperations
///
Task> UpdateTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Migrate an Azure Cosmos DB Table from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> MigrateTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an Azure Cosmos DB Table
///
///
@@ -341,63 +283,5 @@ public partial interface ITableResourcesOperations
/// Thrown when a required parameter is null
///
Task> BeginUpdateTableThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Table from manual throughput to
- /// autoscale
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateTableToAutoscaleWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Migrate an Azure Cosmos DB Table from autoscale to manual
- /// throughput
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Cosmos DB database account name.
- ///
- ///
- /// Cosmos DB table name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginMigrateTableToManualThroughputWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ARMResourceProperties.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ARMResourceProperties.cs
index e1d99e84fc14..75af752f6d2f 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ARMResourceProperties.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ARMResourceProperties.cs
@@ -39,13 +39,14 @@ public ARMResourceProperties()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public ARMResourceProperties(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
+ public ARMResourceProperties(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
{
Id = id;
Name = name;
Type = type;
Location = location;
Tags = tags;
+ Identity = identity;
CustomInit();
}
@@ -84,5 +85,10 @@ public ARMResourceProperties()
[JsonProperty(PropertyName = "tags")]
public IDictionary Tags { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ManagedServiceIdentity Identity { get; set; }
+
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs
new file mode 100644
index 000000000000..5d2979eb561f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/BackupPolicy.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object representing the policy for taking backups on an account.
+ ///
+ [Newtonsoft.Json.JsonObject("BackupPolicy")]
+ public partial class BackupPolicy
+ {
+ ///
+ /// Initializes a new instance of the BackupPolicy class.
+ ///
+ public BackupPolicy()
+ {
+ CustomInit();
+ }
+
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateUpdateParameters.cs
index 83ad2fe9bae1..6ce5cc03a8a9 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public CassandraKeyspaceCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public CassandraKeyspaceCreateUpdateParameters(CassandraKeyspaceResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public CassandraKeyspaceCreateUpdateParameters(CassandraKeyspaceResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceGetResults.cs
index 34d756d6cd7d..0ff91a2b463a 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraKeyspaceGetResults.cs
@@ -42,8 +42,8 @@ public CassandraKeyspaceGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public CassandraKeyspaceGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), CassandraKeyspaceGetPropertiesResource resource = default(CassandraKeyspaceGetPropertiesResource), CassandraKeyspaceGetPropertiesOptions options = default(CassandraKeyspaceGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public CassandraKeyspaceGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), CassandraKeyspaceGetPropertiesResource resource = default(CassandraKeyspaceGetPropertiesResource), CassandraKeyspaceGetPropertiesOptions options = default(CassandraKeyspaceGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableCreateUpdateParameters.cs
index 0076d64c9d8f..02977f1181e7 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public CassandraTableCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public CassandraTableCreateUpdateParameters(CassandraTableResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public CassandraTableCreateUpdateParameters(CassandraTableResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableGetResults.cs
index bbe765553a15..70a7b1c95387 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CassandraTableGetResults.cs
@@ -40,8 +40,8 @@ public CassandraTableGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public CassandraTableGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), CassandraTableGetPropertiesResource resource = default(CassandraTableGetPropertiesResource), CassandraTableGetPropertiesOptions options = default(CassandraTableGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public CassandraTableGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), CassandraTableGetPropertiesResource resource = default(CassandraTableGetPropertiesResource), CassandraTableGetPropertiesOptions options = default(CassandraTableGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs
new file mode 100644
index 000000000000..0c4e775c04e5
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ContinuousModeBackupPolicy.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object representing continuous mode backup policy.
+ ///
+ [Newtonsoft.Json.JsonObject("Continuous")]
+ public partial class ContinuousModeBackupPolicy : BackupPolicy
+ {
+ ///
+ /// Initializes a new instance of the ContinuousModeBackupPolicy class.
+ ///
+ public ContinuousModeBackupPolicy()
+ {
+ CustomInit();
+ }
+
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs
new file mode 100644
index 000000000000..59efcacc2735
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreateMode.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for CreateMode.
+ ///
+ public static class CreateMode
+ {
+ public const string Default = "Default";
+ public const string Restore = "Restore";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..53a064c23e09
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
index d8f4235a86b8..3cda1cd3bfb7 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateParameters.cs
@@ -11,7 +11,6 @@
namespace Microsoft.Azure.Management.CosmosDB.Models
{
using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -20,7 +19,6 @@ namespace Microsoft.Azure.Management.CosmosDB.Models
///
/// Parameters to create and update Cosmos DB database accounts.
///
- [Rest.Serialization.JsonTransformation]
public partial class DatabaseAccountCreateUpdateParameters : ARMResourceProperties
{
///
@@ -29,6 +27,7 @@ public partial class DatabaseAccountCreateUpdateParameters : ARMResourceProperti
///
public DatabaseAccountCreateUpdateParameters()
{
+ Properties = new DatabaseAccountCreateUpdateProperties();
CustomInit();
}
@@ -36,8 +35,6 @@ public DatabaseAccountCreateUpdateParameters()
/// Initializes a new instance of the
/// DatabaseAccountCreateUpdateParameters class.
///
- /// An array that contains the georeplication
- /// locations enabled for the Cosmos DB account.
/// The unique resource identifier of the ARM
/// resource.
/// The name of the ARM resource.
@@ -47,72 +44,13 @@ public DatabaseAccountCreateUpdateParameters()
/// Indicates the type of database account. This can
/// only be set at database account creation. Possible values include:
/// 'GlobalDocumentDB', 'MongoDB', 'Parse'
- /// The consistency policy for the
- /// Cosmos DB account.
- /// List of IpRules.
- /// Flag to indicate
- /// whether to enable/disable Virtual Network ACL rules.
- /// Enables automatic failover of
- /// the write region in the rare event that the region is unavailable
- /// due to an outage. Automatic failover will result in a new write
- /// region for the account and is chosen based on the failover
- /// priorities configured for the account.
- /// List of Cosmos DB capabilities for the
- /// account
- /// List of Virtual Network ACL rules
- /// configured for the Cosmos DB account.
- /// Enables the account to
- /// write in multiple locations
- /// Enables the cassandra
- /// connector on the Cosmos DB C* account
- /// The cassandra connector offer type for
- /// the Cosmos DB database C* account. Possible values include:
- /// 'Small'
- /// Disable write
- /// operations on metadata resources (databases, containers,
- /// throughput) via account keys
- /// The URI of the key vault
- /// Whether requests from Public
- /// Network are allowed. Possible values include: 'Enabled',
- /// 'Disabled'
- /// Flag to indicate whether Free Tier is
- /// enabled.
- /// API specific properties. Currently,
- /// supported only for MongoDB API.
- /// Flag to indicate whether to
- /// enable storage analytics.
- /// The CORS policy for the Cosmos DB database
- /// account.
- public DatabaseAccountCreateUpdateParameters(IList locations, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), IList cors = default(IList))
- : base(id, name, type, location, tags)
+ public DatabaseAccountCreateUpdateParameters(DatabaseAccountCreateUpdateProperties properties, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string kind = default(string))
+ : base(id, name, type, location, tags, identity)
{
Kind = kind;
- ConsistencyPolicy = consistencyPolicy;
- Locations = locations;
- IpRules = ipRules;
- IsVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
- EnableAutomaticFailover = enableAutomaticFailover;
- Capabilities = capabilities;
- VirtualNetworkRules = virtualNetworkRules;
- EnableMultipleWriteLocations = enableMultipleWriteLocations;
- EnableCassandraConnector = enableCassandraConnector;
- ConnectorOffer = connectorOffer;
- DisableKeyBasedMetadataWriteAccess = disableKeyBasedMetadataWriteAccess;
- KeyVaultKeyUri = keyVaultKeyUri;
- PublicNetworkAccess = publicNetworkAccess;
- EnableFreeTier = enableFreeTier;
- ApiProperties = apiProperties;
- EnableAnalyticalStorage = enableAnalyticalStorage;
- Cors = cors;
+ Properties = properties;
CustomInit();
}
- ///
- /// Static constructor for DatabaseAccountCreateUpdateParameters class.
- ///
- static DatabaseAccountCreateUpdateParameters()
- {
- DatabaseAccountOfferType = "Standard";
- }
///
/// An initialization method that performs custom operations like setting defaults
@@ -128,124 +66,9 @@ static DatabaseAccountCreateUpdateParameters()
public string Kind { get; set; }
///
- /// Gets or sets the consistency policy for the Cosmos DB account.
- ///
- [JsonProperty(PropertyName = "properties.consistencyPolicy")]
- public ConsistencyPolicy ConsistencyPolicy { get; set; }
-
- ///
- /// Gets or sets an array that contains the georeplication locations
- /// enabled for the Cosmos DB account.
- ///
- [JsonProperty(PropertyName = "properties.locations")]
- public IList Locations { get; set; }
-
- ///
- /// Gets or sets list of IpRules.
- ///
- [JsonProperty(PropertyName = "properties.ipRules")]
- public IList IpRules { get; set; }
-
- ///
- /// Gets or sets flag to indicate whether to enable/disable Virtual
- /// Network ACL rules.
- ///
- [JsonProperty(PropertyName = "properties.isVirtualNetworkFilterEnabled")]
- public bool? IsVirtualNetworkFilterEnabled { get; set; }
-
- ///
- /// Gets or sets enables automatic failover of the write region in the
- /// rare event that the region is unavailable due to an outage.
- /// Automatic failover will result in a new write region for the
- /// account and is chosen based on the failover priorities configured
- /// for the account.
- ///
- [JsonProperty(PropertyName = "properties.enableAutomaticFailover")]
- public bool? EnableAutomaticFailover { get; set; }
-
- ///
- /// Gets or sets list of Cosmos DB capabilities for the account
///
- [JsonProperty(PropertyName = "properties.capabilities")]
- public IList Capabilities { get; set; }
-
- ///
- /// Gets or sets list of Virtual Network ACL rules configured for the
- /// Cosmos DB account.
- ///
- [JsonProperty(PropertyName = "properties.virtualNetworkRules")]
- public IList VirtualNetworkRules { get; set; }
-
- ///
- /// Gets or sets enables the account to write in multiple locations
- ///
- [JsonProperty(PropertyName = "properties.enableMultipleWriteLocations")]
- public bool? EnableMultipleWriteLocations { get; set; }
-
- ///
- /// Gets or sets enables the cassandra connector on the Cosmos DB C*
- /// account
- ///
- [JsonProperty(PropertyName = "properties.enableCassandraConnector")]
- public bool? EnableCassandraConnector { get; set; }
-
- ///
- /// Gets or sets the cassandra connector offer type for the Cosmos DB
- /// database C* account. Possible values include: 'Small'
- ///
- [JsonProperty(PropertyName = "properties.connectorOffer")]
- public string ConnectorOffer { get; set; }
-
- ///
- /// Gets or sets disable write operations on metadata resources
- /// (databases, containers, throughput) via account keys
- ///
- [JsonProperty(PropertyName = "properties.disableKeyBasedMetadataWriteAccess")]
- public bool? DisableKeyBasedMetadataWriteAccess { get; set; }
-
- ///
- /// Gets or sets the URI of the key vault
- ///
- [JsonProperty(PropertyName = "properties.keyVaultKeyUri")]
- public string KeyVaultKeyUri { get; set; }
-
- ///
- /// Gets or sets whether requests from Public Network are allowed.
- /// Possible values include: 'Enabled', 'Disabled'
- ///
- [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
- public string PublicNetworkAccess { get; set; }
-
- ///
- /// Gets or sets flag to indicate whether Free Tier is enabled.
- ///
- [JsonProperty(PropertyName = "properties.enableFreeTier")]
- public bool? EnableFreeTier { get; set; }
-
- ///
- /// Gets or sets API specific properties. Currently, supported only for
- /// MongoDB API.
- ///
- [JsonProperty(PropertyName = "properties.apiProperties")]
- public ApiProperties ApiProperties { get; set; }
-
- ///
- /// Gets or sets flag to indicate whether to enable storage analytics.
- ///
- [JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
- public bool? EnableAnalyticalStorage { get; set; }
-
- ///
- /// Gets or sets the CORS policy for the Cosmos DB database account.
- ///
- [JsonProperty(PropertyName = "properties.cors")]
- public IList Cors { get; set; }
-
- ///
- /// The offer type for the database
- ///
- [JsonProperty(PropertyName = "properties.databaseAccountOfferType")]
- public static string DatabaseAccountOfferType { get; private set; }
+ [JsonProperty(PropertyName = "properties")]
+ public DatabaseAccountCreateUpdateProperties Properties { get; set; }
///
/// Validate the object.
@@ -255,33 +78,13 @@ static DatabaseAccountCreateUpdateParameters()
///
public virtual void Validate()
{
- if (Locations == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Locations");
- }
- if (ConsistencyPolicy != null)
- {
- ConsistencyPolicy.Validate();
- }
- if (Locations != null)
+ if (Properties == null)
{
- foreach (var element in Locations)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
+ throw new ValidationException(ValidationRules.CannotBeNull, "Properties");
}
- if (Cors != null)
+ if (Properties != null)
{
- foreach (var element1 in Cors)
- {
- if (element1 != null)
- {
- element1.Validate();
- }
- }
+ Properties.Validate();
}
}
}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateProperties.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateProperties.cs
new file mode 100644
index 000000000000..65d1f20ea807
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountCreateUpdateProperties.cs
@@ -0,0 +1,278 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties to create and update Azure Cosmos DB database accounts.
+ ///
+ [Newtonsoft.Json.JsonObject("DatabaseAccountCreateUpdateProperties")]
+ public partial class DatabaseAccountCreateUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// DatabaseAccountCreateUpdateProperties class.
+ ///
+ public DatabaseAccountCreateUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// DatabaseAccountCreateUpdateProperties class.
+ ///
+ /// An array that contains the georeplication
+ /// locations enabled for the Cosmos DB account.
+ /// The consistency policy for the
+ /// Cosmos DB account.
+ /// List of IpRules.
+ /// Flag to indicate
+ /// whether to enable/disable Virtual Network ACL rules.
+ /// Enables automatic failover of
+ /// the write region in the rare event that the region is unavailable
+ /// due to an outage. Automatic failover will result in a new write
+ /// region for the account and is chosen based on the failover
+ /// priorities configured for the account.
+ /// List of Cosmos DB capabilities for the
+ /// account
+ /// List of Virtual Network ACL rules
+ /// configured for the Cosmos DB account.
+ /// Enables the account to
+ /// write in multiple locations
+ /// Enables the cassandra
+ /// connector on the Cosmos DB C* account
+ /// The cassandra connector offer type for
+ /// the Cosmos DB database C* account. Possible values include:
+ /// 'Small'
+ /// Disable write
+ /// operations on metadata resources (databases, containers,
+ /// throughput) via account keys
+ /// The URI of the key vault
+ /// Whether requests from Public
+ /// Network are allowed. Possible values include: 'Enabled',
+ /// 'Disabled'
+ /// Flag to indicate whether Free Tier is
+ /// enabled.
+ /// API specific properties. Currently,
+ /// supported only for MongoDB API.
+ /// Flag to indicate whether to
+ /// enable storage analytics.
+ /// The object representing the policy for
+ /// taking backups on an account.
+ /// The CORS policy for the Cosmos DB database
+ /// account.
+ public DatabaseAccountCreateUpdateProperties(IList locations, ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList))
+ {
+ ConsistencyPolicy = consistencyPolicy;
+ Locations = locations;
+ IpRules = ipRules;
+ IsVirtualNetworkFilterEnabled = isVirtualNetworkFilterEnabled;
+ EnableAutomaticFailover = enableAutomaticFailover;
+ Capabilities = capabilities;
+ VirtualNetworkRules = virtualNetworkRules;
+ EnableMultipleWriteLocations = enableMultipleWriteLocations;
+ EnableCassandraConnector = enableCassandraConnector;
+ ConnectorOffer = connectorOffer;
+ DisableKeyBasedMetadataWriteAccess = disableKeyBasedMetadataWriteAccess;
+ KeyVaultKeyUri = keyVaultKeyUri;
+ PublicNetworkAccess = publicNetworkAccess;
+ EnableFreeTier = enableFreeTier;
+ ApiProperties = apiProperties;
+ EnableAnalyticalStorage = enableAnalyticalStorage;
+ BackupPolicy = backupPolicy;
+ Cors = cors;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for DatabaseAccountCreateUpdateProperties class.
+ ///
+ static DatabaseAccountCreateUpdateProperties()
+ {
+ DatabaseAccountOfferType = "Standard";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the consistency policy for the Cosmos DB account.
+ ///
+ [JsonProperty(PropertyName = "consistencyPolicy")]
+ public ConsistencyPolicy ConsistencyPolicy { get; set; }
+
+ ///
+ /// Gets or sets an array that contains the georeplication locations
+ /// enabled for the Cosmos DB account.
+ ///
+ [JsonProperty(PropertyName = "locations")]
+ public IList Locations { get; set; }
+
+ ///
+ /// Gets or sets list of IpRules.
+ ///
+ [JsonProperty(PropertyName = "ipRules")]
+ public IList IpRules { get; set; }
+
+ ///
+ /// Gets or sets flag to indicate whether to enable/disable Virtual
+ /// Network ACL rules.
+ ///
+ [JsonProperty(PropertyName = "isVirtualNetworkFilterEnabled")]
+ public bool? IsVirtualNetworkFilterEnabled { get; set; }
+
+ ///
+ /// Gets or sets enables automatic failover of the write region in the
+ /// rare event that the region is unavailable due to an outage.
+ /// Automatic failover will result in a new write region for the
+ /// account and is chosen based on the failover priorities configured
+ /// for the account.
+ ///
+ [JsonProperty(PropertyName = "enableAutomaticFailover")]
+ public bool? EnableAutomaticFailover { get; set; }
+
+ ///
+ /// Gets or sets list of Cosmos DB capabilities for the account
+ ///
+ [JsonProperty(PropertyName = "capabilities")]
+ public IList Capabilities { get; set; }
+
+ ///
+ /// Gets or sets list of Virtual Network ACL rules configured for the
+ /// Cosmos DB account.
+ ///
+ [JsonProperty(PropertyName = "virtualNetworkRules")]
+ public IList VirtualNetworkRules { get; set; }
+
+ ///
+ /// Gets or sets enables the account to write in multiple locations
+ ///
+ [JsonProperty(PropertyName = "enableMultipleWriteLocations")]
+ public bool? EnableMultipleWriteLocations { get; set; }
+
+ ///
+ /// Gets or sets enables the cassandra connector on the Cosmos DB C*
+ /// account
+ ///
+ [JsonProperty(PropertyName = "enableCassandraConnector")]
+ public bool? EnableCassandraConnector { get; set; }
+
+ ///
+ /// Gets or sets the cassandra connector offer type for the Cosmos DB
+ /// database C* account. Possible values include: 'Small'
+ ///
+ [JsonProperty(PropertyName = "connectorOffer")]
+ public string ConnectorOffer { get; set; }
+
+ ///
+ /// Gets or sets disable write operations on metadata resources
+ /// (databases, containers, throughput) via account keys
+ ///
+ [JsonProperty(PropertyName = "disableKeyBasedMetadataWriteAccess")]
+ public bool? DisableKeyBasedMetadataWriteAccess { get; set; }
+
+ ///
+ /// Gets or sets the URI of the key vault
+ ///
+ [JsonProperty(PropertyName = "keyVaultKeyUri")]
+ public string KeyVaultKeyUri { get; set; }
+
+ ///
+ /// Gets or sets whether requests from Public Network are allowed.
+ /// Possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets flag to indicate whether Free Tier is enabled.
+ ///
+ [JsonProperty(PropertyName = "enableFreeTier")]
+ public bool? EnableFreeTier { get; set; }
+
+ ///
+ /// Gets or sets API specific properties. Currently, supported only for
+ /// MongoDB API.
+ ///
+ [JsonProperty(PropertyName = "apiProperties")]
+ public ApiProperties ApiProperties { get; set; }
+
+ ///
+ /// Gets or sets flag to indicate whether to enable storage analytics.
+ ///
+ [JsonProperty(PropertyName = "enableAnalyticalStorage")]
+ public bool? EnableAnalyticalStorage { get; set; }
+
+ ///
+ /// Gets or sets the object representing the policy for taking backups
+ /// on an account.
+ ///
+ [JsonProperty(PropertyName = "backupPolicy")]
+ public BackupPolicy BackupPolicy { get; set; }
+
+ ///
+ /// Gets or sets the CORS policy for the Cosmos DB database account.
+ ///
+ [JsonProperty(PropertyName = "cors")]
+ public IList Cors { get; set; }
+
+ ///
+ /// The offer type for the database
+ ///
+ [JsonProperty(PropertyName = "databaseAccountOfferType")]
+ public static string DatabaseAccountOfferType { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Locations == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Locations");
+ }
+ if (ConsistencyPolicy != null)
+ {
+ ConsistencyPolicy.Validate();
+ }
+ if (Locations != null)
+ {
+ foreach (var element in Locations)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ if (Cors != null)
+ {
+ foreach (var element1 in Cors)
+ {
+ if (element1 != null)
+ {
+ element1.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
index e22dd340dd60..6ea8c133b046 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountGetResults.cs
@@ -91,10 +91,20 @@ public DatabaseAccountGetResults()
/// API specific properties.
/// Flag to indicate whether to
/// enable storage analytics.
+ /// A unique identifier assigned to the
+ /// database account
+ /// Enum to indicate the mode of account
+ /// creation. Possible values include: 'Default', 'Restore'
+ /// Parameters to indicate the
+ /// information about the restore.
+ /// The object representing the policy for
+ /// taking backups on an account.
/// The CORS policy for the Cosmos DB database
/// account.
- public DatabaseAccountGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string kind = default(string), string provisioningState = default(string), string documentEndpoint = default(string), DatabaseAccountOfferType? databaseAccountOfferType = default(DatabaseAccountOfferType?), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList capabilities = default(IList), IList writeLocations = default(IList), IList readLocations = default(IList), IList locations = default(IList), IList failoverPolicies = default(IList), IList virtualNetworkRules = default(IList), IList privateEndpointConnections = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), IList cors = default(IList))
- : base(id, name, type, location, tags)
+ /// The system meta data relating to this
+ /// resource.
+ public DatabaseAccountGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string kind = default(string), string provisioningState = default(string), string documentEndpoint = default(string), DatabaseAccountOfferType? databaseAccountOfferType = default(DatabaseAccountOfferType?), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList capabilities = default(IList), IList writeLocations = default(IList), IList readLocations = default(IList), IList locations = default(IList), IList failoverPolicies = default(IList), IList virtualNetworkRules = default(IList), IList privateEndpointConnections = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), string instanceId = default(string), string createMode = default(string), RestoreParameters restoreParameters = default(RestoreParameters), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), SystemData systemData = default(SystemData))
+ : base(id, name, type, location, tags, identity)
{
Kind = kind;
ProvisioningState = provisioningState;
@@ -120,7 +130,12 @@ public DatabaseAccountGetResults()
EnableFreeTier = enableFreeTier;
ApiProperties = apiProperties;
EnableAnalyticalStorage = enableAnalyticalStorage;
+ InstanceId = instanceId;
+ CreateMode = createMode;
+ RestoreParameters = restoreParameters;
+ BackupPolicy = backupPolicy;
Cors = cors;
+ SystemData = systemData;
CustomInit();
}
@@ -291,12 +306,45 @@ public DatabaseAccountGetResults()
[JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
public bool? EnableAnalyticalStorage { get; set; }
+ ///
+ /// Gets a unique identifier assigned to the database account
+ ///
+ [JsonProperty(PropertyName = "properties.instanceId")]
+ public string InstanceId { get; private set; }
+
+ ///
+ /// Gets or sets enum to indicate the mode of account creation.
+ /// Possible values include: 'Default', 'Restore'
+ ///
+ [JsonProperty(PropertyName = "properties.createMode")]
+ public string CreateMode { get; set; }
+
+ ///
+ /// Gets or sets parameters to indicate the information about the
+ /// restore.
+ ///
+ [JsonProperty(PropertyName = "properties.restoreParameters")]
+ public RestoreParameters RestoreParameters { get; set; }
+
+ ///
+ /// Gets or sets the object representing the policy for taking backups
+ /// on an account.
+ ///
+ [JsonProperty(PropertyName = "properties.backupPolicy")]
+ public BackupPolicy BackupPolicy { get; set; }
+
///
/// Gets or sets the CORS policy for the Cosmos DB database account.
///
[JsonProperty(PropertyName = "properties.cors")]
public IList Cors { get; set; }
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
index 249e663ac9e0..255e6035278b 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseAccountUpdateParameters.cs
@@ -74,9 +74,11 @@ public DatabaseAccountUpdateParameters()
/// supported only for MongoDB API.
/// Flag to indicate whether to
/// enable storage analytics.
+ /// The object representing the policy for
+ /// taking backups on an account.
/// The CORS policy for the Cosmos DB database
/// account.
- public DatabaseAccountUpdateParameters(IDictionary tags = default(IDictionary), string location = default(string), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList locations = default(IList), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), IList cors = default(IList))
+ public DatabaseAccountUpdateParameters(IDictionary tags = default(IDictionary), string location = default(string), ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList locations = default(IList), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
{
Tags = tags;
Location = location;
@@ -96,7 +98,9 @@ public DatabaseAccountUpdateParameters()
EnableFreeTier = enableFreeTier;
ApiProperties = apiProperties;
EnableAnalyticalStorage = enableAnalyticalStorage;
+ BackupPolicy = backupPolicy;
Cors = cors;
+ Identity = identity;
CustomInit();
}
@@ -225,12 +229,24 @@ public DatabaseAccountUpdateParameters()
[JsonProperty(PropertyName = "properties.enableAnalyticalStorage")]
public bool? EnableAnalyticalStorage { get; set; }
+ ///
+ /// Gets or sets the object representing the policy for taking backups
+ /// on an account.
+ ///
+ [JsonProperty(PropertyName = "properties.backupPolicy")]
+ public BackupPolicy BackupPolicy { get; set; }
+
///
/// Gets or sets the CORS policy for the Cosmos DB database account.
///
[JsonProperty(PropertyName = "properties.cors")]
public IList Cors { get; set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ManagedServiceIdentity Identity { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs
new file mode 100644
index 000000000000..e31291ff050f
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DatabaseRestoreResource.cs
@@ -0,0 +1,63 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Specific Databases to restore.
+ ///
+ public partial class DatabaseRestoreResource
+ {
+ ///
+ /// Initializes a new instance of the DatabaseRestoreResource class.
+ ///
+ public DatabaseRestoreResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatabaseRestoreResource class.
+ ///
+ /// The name of the database to
+ /// restore.
+ /// The names of the collections to
+ /// restore.
+ public DatabaseRestoreResource(string databaseName = default(string), IList collectionNames = default(IList))
+ {
+ DatabaseName = databaseName;
+ CollectionNames = collectionNames;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the database to restore.
+ ///
+ [JsonProperty(PropertyName = "databaseName")]
+ public string DatabaseName { get; set; }
+
+ ///
+ /// Gets or sets the names of the collections to restore.
+ ///
+ [JsonProperty(PropertyName = "collectionNames")]
+ public IList CollectionNames { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponse.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponse.cs
new file mode 100644
index 000000000000..288c1673bf23
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponse.cs
@@ -0,0 +1,49 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An error response from the service.
+ ///
+ public partial class DefaultErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the DefaultErrorResponse class.
+ ///
+ public DefaultErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponse class.
+ ///
+ public DefaultErrorResponse(ErrorResponse error = default(ErrorResponse))
+ {
+ Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorResponse Error { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponseException.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponseException.cs
new file mode 100644
index 000000000000..cb869c9197c7
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with DefaultErrorResponse
+ /// information.
+ ///
+ public partial class DefaultErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public DefaultErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ public DefaultErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ public DefaultErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the DefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public DefaultErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultRequestDatabaseAccountCreateUpdateProperties.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultRequestDatabaseAccountCreateUpdateProperties.cs
new file mode 100644
index 000000000000..8945722424fb
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/DefaultRequestDatabaseAccountCreateUpdateProperties.cs
@@ -0,0 +1,99 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties for non-restore Azure Cosmos DB database account requests.
+ ///
+ [Newtonsoft.Json.JsonObject("Default")]
+ public partial class DefaultRequestDatabaseAccountCreateUpdateProperties : DatabaseAccountCreateUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// DefaultRequestDatabaseAccountCreateUpdateProperties class.
+ ///
+ public DefaultRequestDatabaseAccountCreateUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// DefaultRequestDatabaseAccountCreateUpdateProperties class.
+ ///
+ /// An array that contains the georeplication
+ /// locations enabled for the Cosmos DB account.
+ /// The consistency policy for the
+ /// Cosmos DB account.
+ /// List of IpRules.
+ /// Flag to indicate
+ /// whether to enable/disable Virtual Network ACL rules.
+ /// Enables automatic failover of
+ /// the write region in the rare event that the region is unavailable
+ /// due to an outage. Automatic failover will result in a new write
+ /// region for the account and is chosen based on the failover
+ /// priorities configured for the account.
+ /// List of Cosmos DB capabilities for the
+ /// account
+ /// List of Virtual Network ACL rules
+ /// configured for the Cosmos DB account.
+ /// Enables the account to
+ /// write in multiple locations
+ /// Enables the cassandra
+ /// connector on the Cosmos DB C* account
+ /// The cassandra connector offer type for
+ /// the Cosmos DB database C* account. Possible values include:
+ /// 'Small'
+ /// Disable write
+ /// operations on metadata resources (databases, containers,
+ /// throughput) via account keys
+ /// The URI of the key vault
+ /// Whether requests from Public
+ /// Network are allowed. Possible values include: 'Enabled',
+ /// 'Disabled'
+ /// Flag to indicate whether Free Tier is
+ /// enabled.
+ /// API specific properties. Currently,
+ /// supported only for MongoDB API.
+ /// Flag to indicate whether to
+ /// enable storage analytics.
+ /// The object representing the policy for
+ /// taking backups on an account.
+ /// The CORS policy for the Cosmos DB database
+ /// account.
+ public DefaultRequestDatabaseAccountCreateUpdateProperties(IList locations, ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList))
+ : base(locations, consistencyPolicy, ipRules, isVirtualNetworkFilterEnabled, enableAutomaticFailover, capabilities, virtualNetworkRules, enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, publicNetworkAccess, enableFreeTier, apiProperties, enableAnalyticalStorage, backupPolicy, cors)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseCreateUpdateParameters.cs
index d8844e6af44b..245bb964f060 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public GremlinDatabaseCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public GremlinDatabaseCreateUpdateParameters(GremlinDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public GremlinDatabaseCreateUpdateParameters(GremlinDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseGetResults.cs
index 9a89af0bd5ea..be3f82c1fa68 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinDatabaseGetResults.cs
@@ -40,8 +40,8 @@ public GremlinDatabaseGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public GremlinDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), GremlinDatabaseGetPropertiesResource resource = default(GremlinDatabaseGetPropertiesResource), GremlinDatabaseGetPropertiesOptions options = default(GremlinDatabaseGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public GremlinDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), GremlinDatabaseGetPropertiesResource resource = default(GremlinDatabaseGetPropertiesResource), GremlinDatabaseGetPropertiesOptions options = default(GremlinDatabaseGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphCreateUpdateParameters.cs
index 15a4bd807799..1985925d58f2 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public GremlinGraphCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public GremlinGraphCreateUpdateParameters(GremlinGraphResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public GremlinGraphCreateUpdateParameters(GremlinGraphResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphGetResults.cs
index a0736cbceec3..9c3326e51d2d 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/GremlinGraphGetResults.cs
@@ -40,8 +40,8 @@ public GremlinGraphGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public GremlinGraphGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), GremlinGraphGetPropertiesResource resource = default(GremlinGraphGetPropertiesResource), GremlinGraphGetPropertiesOptions options = default(GremlinGraphGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public GremlinGraphGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), GremlinGraphGetPropertiesResource resource = default(GremlinGraphGetPropertiesResource), GremlinGraphGetPropertiesOptions options = default(GremlinGraphGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentity.cs
new file mode 100644
index 000000000000..2939d1ed99db
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentity.cs
@@ -0,0 +1,99 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Identity for the resource.
+ ///
+ public partial class ManagedServiceIdentity
+ {
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ public ManagedServiceIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ManagedServiceIdentity class.
+ ///
+ /// The principal id of the system assigned
+ /// identity. This property will only be provided for a system assigned
+ /// identity.
+ /// The tenant id of the system assigned
+ /// identity. This property will only be provided for a system assigned
+ /// identity.
+ /// The type of identity used for the resource. The
+ /// type 'SystemAssigned,UserAssigned' includes both an implicitly
+ /// created identity and a set of user assigned identities. The type
+ /// 'None' will remove any identities from the service. Possible values
+ /// include: 'SystemAssigned', 'UserAssigned',
+ /// 'SystemAssigned,UserAssigned', 'None'
+ /// The list of user identities
+ /// associated with resource. The user identity dictionary key
+ /// references will be ARM resource ids in the form:
+ /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ public ManagedServiceIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ UserAssignedIdentities = userAssignedIdentities;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the principal id of the system assigned identity. This
+ /// property will only be provided for a system assigned identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets the tenant id of the system assigned identity. This property
+ /// will only be provided for a system assigned identity.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets or sets the type of identity used for the resource. The type
+ /// 'SystemAssigned,UserAssigned' includes both an implicitly created
+ /// identity and a set of user assigned identities. The type 'None'
+ /// will remove any identities from the service. Possible values
+ /// include: 'SystemAssigned', 'UserAssigned',
+ /// 'SystemAssigned,UserAssigned', 'None'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public ResourceIdentityType? Type { get; set; }
+
+ ///
+ /// Gets or sets the list of user identities associated with resource.
+ /// The user identity dictionary key references will be ARM resource
+ /// ids in the form:
+ /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ ///
+ [JsonProperty(PropertyName = "userAssignedIdentities")]
+ public IDictionary UserAssignedIdentities { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs
new file mode 100644
index 000000000000..5610d7993ead
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class ManagedServiceIdentityUserAssignedIdentitiesValue
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ManagedServiceIdentityUserAssignedIdentitiesValue class.
+ ///
+ public ManagedServiceIdentityUserAssignedIdentitiesValue()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ManagedServiceIdentityUserAssignedIdentitiesValue class.
+ ///
+ /// The principal id of user assigned
+ /// identity.
+ /// The client id of user assigned
+ /// identity.
+ public ManagedServiceIdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string))
+ {
+ PrincipalId = principalId;
+ ClientId = clientId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the principal id of user assigned identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets the client id of user assigned identity.
+ ///
+ [JsonProperty(PropertyName = "clientId")]
+ public string ClientId { get; private set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionCreateUpdateParameters.cs
index ec275b3847e9..35157e3e7b78 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public MongoDBCollectionCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public MongoDBCollectionCreateUpdateParameters(MongoDBCollectionResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public MongoDBCollectionCreateUpdateParameters(MongoDBCollectionResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionGetResults.cs
index 175756c84be5..2d4deffec4ac 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBCollectionGetResults.cs
@@ -42,8 +42,8 @@ public MongoDBCollectionGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public MongoDBCollectionGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), MongoDBCollectionGetPropertiesResource resource = default(MongoDBCollectionGetPropertiesResource), MongoDBCollectionGetPropertiesOptions options = default(MongoDBCollectionGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public MongoDBCollectionGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), MongoDBCollectionGetPropertiesResource resource = default(MongoDBCollectionGetPropertiesResource), MongoDBCollectionGetPropertiesOptions options = default(MongoDBCollectionGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateUpdateParameters.cs
index 72c3030b4ccf..fb195d1490c5 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public MongoDBDatabaseCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public MongoDBDatabaseCreateUpdateParameters(MongoDBDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public MongoDBDatabaseCreateUpdateParameters(MongoDBDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseGetResults.cs
index 1221e26766ac..9a1fc567a66f 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/MongoDBDatabaseGetResults.cs
@@ -40,8 +40,8 @@ public MongoDBDatabaseGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public MongoDBDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), MongoDBDatabaseGetPropertiesResource resource = default(MongoDBDatabaseGetPropertiesResource), MongoDBDatabaseGetPropertiesOptions options = default(MongoDBDatabaseGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public MongoDBDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), MongoDBDatabaseGetPropertiesResource resource = default(MongoDBDatabaseGetPropertiesResource), MongoDBDatabaseGetPropertiesOptions options = default(MongoDBDatabaseGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs
new file mode 100644
index 000000000000..5415b93fbf75
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeBackupPolicy.cs
@@ -0,0 +1,66 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object representing periodic mode backup policy.
+ ///
+ [Newtonsoft.Json.JsonObject("Periodic")]
+ public partial class PeriodicModeBackupPolicy : BackupPolicy
+ {
+ ///
+ /// Initializes a new instance of the PeriodicModeBackupPolicy class.
+ ///
+ public PeriodicModeBackupPolicy()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PeriodicModeBackupPolicy class.
+ ///
+ /// Configuration values for
+ /// periodic mode backup
+ public PeriodicModeBackupPolicy(PeriodicModeProperties periodicModeProperties = default(PeriodicModeProperties))
+ {
+ PeriodicModeProperties = periodicModeProperties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets configuration values for periodic mode backup
+ ///
+ [JsonProperty(PropertyName = "periodicModeProperties")]
+ public PeriodicModeProperties PeriodicModeProperties { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PeriodicModeProperties != null)
+ {
+ PeriodicModeProperties.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs
new file mode 100644
index 000000000000..7893d5036a95
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/PeriodicModeProperties.cs
@@ -0,0 +1,82 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Configuration values for periodic mode backup
+ ///
+ public partial class PeriodicModeProperties
+ {
+ ///
+ /// Initializes a new instance of the PeriodicModeProperties class.
+ ///
+ public PeriodicModeProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PeriodicModeProperties class.
+ ///
+ /// An integer representing the
+ /// interval in minutes between two backups
+ /// An integer
+ /// representing the time (in hours) that each backup is
+ /// retained
+ public PeriodicModeProperties(int? backupIntervalInMinutes = default(int?), int? backupRetentionIntervalInHours = default(int?))
+ {
+ BackupIntervalInMinutes = backupIntervalInMinutes;
+ BackupRetentionIntervalInHours = backupRetentionIntervalInHours;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets an integer representing the interval in minutes
+ /// between two backups
+ ///
+ [JsonProperty(PropertyName = "backupIntervalInMinutes")]
+ public int? BackupIntervalInMinutes { get; set; }
+
+ ///
+ /// Gets or sets an integer representing the time (in hours) that each
+ /// backup is retained
+ ///
+ [JsonProperty(PropertyName = "backupRetentionIntervalInHours")]
+ public int? BackupRetentionIntervalInHours { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (BackupIntervalInMinutes < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "BackupIntervalInMinutes", 0);
+ }
+ if (BackupRetentionIntervalInHours < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "BackupRetentionIntervalInHours", 0);
+ }
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/Permission.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/Permission.cs
new file mode 100644
index 000000000000..96ff386bfbe0
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/Permission.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The set of data plane operations permitted through this Role
+ /// Definition.
+ ///
+ public partial class Permission
+ {
+ ///
+ /// Initializes a new instance of the Permission class.
+ ///
+ public Permission()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Permission class.
+ ///
+ /// An array of data actions that are
+ /// allowed.
+ /// An array of data actions that are
+ /// denied.
+ public Permission(IList dataActions = default(IList), IList notDataActions = default(IList))
+ {
+ DataActions = dataActions;
+ NotDataActions = notDataActions;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets an array of data actions that are allowed.
+ ///
+ [JsonProperty(PropertyName = "dataActions")]
+ public IList DataActions { get; set; }
+
+ ///
+ /// Gets or sets an array of data actions that are denied.
+ ///
+ [JsonProperty(PropertyName = "notDataActions")]
+ public IList NotDataActions { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ResourceIdentityType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ResourceIdentityType.cs
new file mode 100644
index 000000000000..8355780a6815
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/ResourceIdentityType.cs
@@ -0,0 +1,72 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for ResourceIdentityType.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ResourceIdentityType
+ {
+ [EnumMember(Value = "SystemAssigned")]
+ SystemAssigned,
+ [EnumMember(Value = "UserAssigned")]
+ UserAssigned,
+ [EnumMember(Value = "SystemAssigned,UserAssigned")]
+ SystemAssignedUserAssigned,
+ [EnumMember(Value = "None")]
+ None
+ }
+ internal static class ResourceIdentityTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this ResourceIdentityType? value)
+ {
+ return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ResourceIdentityType value)
+ {
+ switch( value )
+ {
+ case ResourceIdentityType.SystemAssigned:
+ return "SystemAssigned";
+ case ResourceIdentityType.UserAssigned:
+ return "UserAssigned";
+ case ResourceIdentityType.SystemAssignedUserAssigned:
+ return "SystemAssigned,UserAssigned";
+ case ResourceIdentityType.None:
+ return "None";
+ }
+ return null;
+ }
+
+ internal static ResourceIdentityType? ParseResourceIdentityType(this string value)
+ {
+ switch( value )
+ {
+ case "SystemAssigned":
+ return ResourceIdentityType.SystemAssigned;
+ case "UserAssigned":
+ return ResourceIdentityType.UserAssigned;
+ case "SystemAssigned,UserAssigned":
+ return ResourceIdentityType.SystemAssignedUserAssigned;
+ case "None":
+ return ResourceIdentityType.None;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs
new file mode 100644
index 000000000000..0f4c7d3c4511
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestorableDatabaseAccountGetResult.cs
@@ -0,0 +1,86 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A Azure Cosmos DB restorable database account.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RestorableDatabaseAccountGetResult : ARMResourceProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestorableDatabaseAccountGetResult class.
+ ///
+ public RestorableDatabaseAccountGetResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestorableDatabaseAccountGetResult class.
+ ///
+ /// The unique resource identifier of the ARM
+ /// resource.
+ /// The name of the ARM resource.
+ /// The type of Azure resource.
+ /// The location of the resource group to which
+ /// the resource belongs.
+ /// The name of the global database
+ /// account
+ /// The creation time of the restorable
+ /// database account (ISO-8601 format).
+ /// The time at which the restorable
+ /// database account has been deleted (ISO-8601 format).
+ public RestorableDatabaseAccountGetResult(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string accountName = default(string), System.DateTime? creationTime = default(System.DateTime?), System.DateTime? deletionTime = default(System.DateTime?))
+ : base(id, name, type, location, tags, identity)
+ {
+ AccountName = accountName;
+ CreationTime = creationTime;
+ DeletionTime = deletionTime;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the global database account
+ ///
+ [JsonProperty(PropertyName = "properties.accountName")]
+ public string AccountName { get; set; }
+
+ ///
+ /// Gets or sets the creation time of the restorable database account
+ /// (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "properties.creationTime")]
+ public System.DateTime? CreationTime { get; set; }
+
+ ///
+ /// Gets or sets the time at which the restorable database account has
+ /// been deleted (ISO-8601 format).
+ ///
+ [JsonProperty(PropertyName = "properties.deletionTime")]
+ public System.DateTime? DeletionTime { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs
new file mode 100644
index 000000000000..347b1a4033f2
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreMode.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+
+ ///
+ /// Defines values for RestoreMode.
+ ///
+ public static class RestoreMode
+ {
+ public const string PointInTime = "PointInTime";
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs
new file mode 100644
index 000000000000..d3c1eda0c37d
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreParameters.cs
@@ -0,0 +1,84 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters to indicate the information about the restore.
+ ///
+ public partial class RestoreParameters
+ {
+ ///
+ /// Initializes a new instance of the RestoreParameters class.
+ ///
+ public RestoreParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestoreParameters class.
+ ///
+ /// Describes the mode of the restore.
+ /// Possible values include: 'PointInTime'
+ /// Path of the source account from which
+ /// the restore has to be initiated
+ /// Time to which the account has
+ /// to be restored (ISO-8601 format).
+ /// List of specific databases to
+ /// restore.
+ public RestoreParameters(string restoreMode = default(string), string restoreSource = default(string), System.DateTime? restoreTimestampInUtc = default(System.DateTime?), IList databasesToRestore = default(IList))
+ {
+ RestoreMode = restoreMode;
+ RestoreSource = restoreSource;
+ RestoreTimestampInUtc = restoreTimestampInUtc;
+ DatabasesToRestore = databasesToRestore;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets describes the mode of the restore. Possible values
+ /// include: 'PointInTime'
+ ///
+ [JsonProperty(PropertyName = "restoreMode")]
+ public string RestoreMode { get; set; }
+
+ ///
+ /// Gets or sets path of the source account from which the restore has
+ /// to be initiated
+ ///
+ [JsonProperty(PropertyName = "restoreSource")]
+ public string RestoreSource { get; set; }
+
+ ///
+ /// Gets or sets time to which the account has to be restored (ISO-8601
+ /// format).
+ ///
+ [JsonProperty(PropertyName = "restoreTimestampInUtc")]
+ public System.DateTime? RestoreTimestampInUtc { get; set; }
+
+ ///
+ /// Gets or sets list of specific databases to restore.
+ ///
+ [JsonProperty(PropertyName = "databasesToRestore")]
+ public IList DatabasesToRestore { get; set; }
+
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreReqeustDatabaseAccountCreateUpdateProperties.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreReqeustDatabaseAccountCreateUpdateProperties.cs
new file mode 100644
index 000000000000..e461bfe3e2a8
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RestoreReqeustDatabaseAccountCreateUpdateProperties.cs
@@ -0,0 +1,109 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties to restore Azure Cosmos DB database account.
+ ///
+ [Newtonsoft.Json.JsonObject("Restore")]
+ public partial class RestoreReqeustDatabaseAccountCreateUpdateProperties : DatabaseAccountCreateUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RestoreReqeustDatabaseAccountCreateUpdateProperties class.
+ ///
+ public RestoreReqeustDatabaseAccountCreateUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RestoreReqeustDatabaseAccountCreateUpdateProperties class.
+ ///
+ /// An array that contains the georeplication
+ /// locations enabled for the Cosmos DB account.
+ /// The consistency policy for the
+ /// Cosmos DB account.
+ /// List of IpRules.
+ /// Flag to indicate
+ /// whether to enable/disable Virtual Network ACL rules.
+ /// Enables automatic failover of
+ /// the write region in the rare event that the region is unavailable
+ /// due to an outage. Automatic failover will result in a new write
+ /// region for the account and is chosen based on the failover
+ /// priorities configured for the account.
+ /// List of Cosmos DB capabilities for the
+ /// account
+ /// List of Virtual Network ACL rules
+ /// configured for the Cosmos DB account.
+ /// Enables the account to
+ /// write in multiple locations
+ /// Enables the cassandra
+ /// connector on the Cosmos DB C* account
+ /// The cassandra connector offer type for
+ /// the Cosmos DB database C* account. Possible values include:
+ /// 'Small'
+ /// Disable write
+ /// operations on metadata resources (databases, containers,
+ /// throughput) via account keys
+ /// The URI of the key vault
+ /// Whether requests from Public
+ /// Network are allowed. Possible values include: 'Enabled',
+ /// 'Disabled'
+ /// Flag to indicate whether Free Tier is
+ /// enabled.
+ /// API specific properties. Currently,
+ /// supported only for MongoDB API.
+ /// Flag to indicate whether to
+ /// enable storage analytics.
+ /// The object representing the policy for
+ /// taking backups on an account.
+ /// The CORS policy for the Cosmos DB database
+ /// account.
+ /// Parameters to indicate the
+ /// information about the restore.
+ public RestoreReqeustDatabaseAccountCreateUpdateProperties(IList locations, ConsistencyPolicy consistencyPolicy = default(ConsistencyPolicy), IList ipRules = default(IList), bool? isVirtualNetworkFilterEnabled = default(bool?), bool? enableAutomaticFailover = default(bool?), IList capabilities = default(IList), IList virtualNetworkRules = default(IList), bool? enableMultipleWriteLocations = default(bool?), bool? enableCassandraConnector = default(bool?), string connectorOffer = default(string), bool? disableKeyBasedMetadataWriteAccess = default(bool?), string keyVaultKeyUri = default(string), string publicNetworkAccess = default(string), bool? enableFreeTier = default(bool?), ApiProperties apiProperties = default(ApiProperties), bool? enableAnalyticalStorage = default(bool?), BackupPolicy backupPolicy = default(BackupPolicy), IList cors = default(IList), RestoreParameters restoreParameters = default(RestoreParameters))
+ : base(locations, consistencyPolicy, ipRules, isVirtualNetworkFilterEnabled, enableAutomaticFailover, capabilities, virtualNetworkRules, enableMultipleWriteLocations, enableCassandraConnector, connectorOffer, disableKeyBasedMetadataWriteAccess, keyVaultKeyUri, publicNetworkAccess, enableFreeTier, apiProperties, enableAnalyticalStorage, backupPolicy, cors)
+ {
+ RestoreParameters = restoreParameters;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets parameters to indicate the information about the
+ /// restore.
+ ///
+ [JsonProperty(PropertyName = "restoreParameters")]
+ public RestoreParameters RestoreParameters { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RoleDefinitionType.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RoleDefinitionType.cs
new file mode 100644
index 000000000000..bd34f0031bf7
--- /dev/null
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/RoleDefinitionType.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.CosmosDB.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for RoleDefinitionType.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum RoleDefinitionType
+ {
+ [EnumMember(Value = "BuiltInRole")]
+ BuiltInRole,
+ [EnumMember(Value = "CustomRole")]
+ CustomRole
+ }
+ internal static class RoleDefinitionTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this RoleDefinitionType? value)
+ {
+ return value == null ? null : ((RoleDefinitionType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this RoleDefinitionType value)
+ {
+ switch( value )
+ {
+ case RoleDefinitionType.BuiltInRole:
+ return "BuiltInRole";
+ case RoleDefinitionType.CustomRole:
+ return "CustomRole";
+ }
+ return null;
+ }
+
+ internal static RoleDefinitionType? ParseRoleDefinitionType(this string value)
+ {
+ switch( value )
+ {
+ case "BuiltInRole":
+ return RoleDefinitionType.BuiltInRole;
+ case "CustomRole":
+ return RoleDefinitionType.CustomRole;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerCreateUpdateParameters.cs
index 76a123855aac..d1cfa67d1c81 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public SqlContainerCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public SqlContainerCreateUpdateParameters(SqlContainerResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public SqlContainerCreateUpdateParameters(SqlContainerResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetPropertiesResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetPropertiesResource.cs
index ab17dd72c47c..322898442de0 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetPropertiesResource.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetPropertiesResource.cs
@@ -41,14 +41,13 @@ public SqlContainerGetPropertiesResource()
/// collection in the Azure Cosmos DB service.
/// The conflict resolution
/// policy for the container.
- /// Analytical TTL.
/// A system generated property. A unique
/// identifier.
/// A system generated property that denotes the last
/// updated timestamp of the resource.
/// A system generated property representing the
/// resource etag required for optimistic concurrency control.
- public SqlContainerGetPropertiesResource(string id, IndexingPolicy indexingPolicy = default(IndexingPolicy), ContainerPartitionKey partitionKey = default(ContainerPartitionKey), int? defaultTtl = default(int?), UniqueKeyPolicy uniqueKeyPolicy = default(UniqueKeyPolicy), ConflictResolutionPolicy conflictResolutionPolicy = default(ConflictResolutionPolicy), long? analyticalStorageTtl = default(long?), string _rid = default(string), object _ts = default(object), string _etag = default(string))
+ public SqlContainerGetPropertiesResource(string id, IndexingPolicy indexingPolicy = default(IndexingPolicy), ContainerPartitionKey partitionKey = default(ContainerPartitionKey), int? defaultTtl = default(int?), UniqueKeyPolicy uniqueKeyPolicy = default(UniqueKeyPolicy), ConflictResolutionPolicy conflictResolutionPolicy = default(ConflictResolutionPolicy), string _rid = default(string), object _ts = default(object), string _etag = default(string))
{
Id = id;
IndexingPolicy = indexingPolicy;
@@ -56,7 +55,6 @@ public SqlContainerGetPropertiesResource()
DefaultTtl = defaultTtl;
UniqueKeyPolicy = uniqueKeyPolicy;
ConflictResolutionPolicy = conflictResolutionPolicy;
- AnalyticalStorageTtl = analyticalStorageTtl;
this._rid = _rid;
this._ts = _ts;
this._etag = _etag;
@@ -109,12 +107,6 @@ public SqlContainerGetPropertiesResource()
[JsonProperty(PropertyName = "conflictResolutionPolicy")]
public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; }
- ///
- /// Gets or sets analytical TTL.
- ///
- [JsonProperty(PropertyName = "analyticalStorageTtl")]
- public long? AnalyticalStorageTtl { get; set; }
-
///
/// Gets a system generated property. A unique identifier.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetResults.cs
index 241a58696957..56a61bad9df5 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerGetResults.cs
@@ -40,8 +40,8 @@ public SqlContainerGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public SqlContainerGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SqlContainerGetPropertiesResource resource = default(SqlContainerGetPropertiesResource), SqlContainerGetPropertiesOptions options = default(SqlContainerGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public SqlContainerGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity), SqlContainerGetPropertiesResource resource = default(SqlContainerGetPropertiesResource), SqlContainerGetPropertiesOptions options = default(SqlContainerGetPropertiesOptions))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerResource.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerResource.cs
index 734c0d412e7e..94620f871498 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerResource.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlContainerResource.cs
@@ -42,8 +42,7 @@ public SqlContainerResource()
/// collection in the Azure Cosmos DB service.
/// The conflict resolution
/// policy for the container.
- /// Analytical TTL.
- public SqlContainerResource(string id, IndexingPolicy indexingPolicy = default(IndexingPolicy), ContainerPartitionKey partitionKey = default(ContainerPartitionKey), int? defaultTtl = default(int?), UniqueKeyPolicy uniqueKeyPolicy = default(UniqueKeyPolicy), ConflictResolutionPolicy conflictResolutionPolicy = default(ConflictResolutionPolicy), long? analyticalStorageTtl = default(long?))
+ public SqlContainerResource(string id, IndexingPolicy indexingPolicy = default(IndexingPolicy), ContainerPartitionKey partitionKey = default(ContainerPartitionKey), int? defaultTtl = default(int?), UniqueKeyPolicy uniqueKeyPolicy = default(UniqueKeyPolicy), ConflictResolutionPolicy conflictResolutionPolicy = default(ConflictResolutionPolicy))
{
Id = id;
IndexingPolicy = indexingPolicy;
@@ -51,7 +50,6 @@ public SqlContainerResource()
DefaultTtl = defaultTtl;
UniqueKeyPolicy = uniqueKeyPolicy;
ConflictResolutionPolicy = conflictResolutionPolicy;
- AnalyticalStorageTtl = analyticalStorageTtl;
CustomInit();
}
@@ -101,12 +99,6 @@ public SqlContainerResource()
[JsonProperty(PropertyName = "conflictResolutionPolicy")]
public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; }
- ///
- /// Gets or sets analytical TTL.
- ///
- [JsonProperty(PropertyName = "analyticalStorageTtl")]
- public long? AnalyticalStorageTtl { get; set; }
-
///
/// Validate the object.
///
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseCreateUpdateParameters.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseCreateUpdateParameters.cs
index 64818739cc95..9a453e8c79f3 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseCreateUpdateParameters.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseCreateUpdateParameters.cs
@@ -47,8 +47,8 @@ public SqlDatabaseCreateUpdateParameters()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public SqlDatabaseCreateUpdateParameters(SqlDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary))
- : base(id, name, type, location, tags)
+ public SqlDatabaseCreateUpdateParameters(SqlDatabaseResource resource, CreateUpdateOptions options, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ : base(id, name, type, location, tags, identity)
{
Resource = resource;
Options = options;
diff --git a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseGetResults.cs b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseGetResults.cs
index 1a16ae9b45b2..24e5ec5c665a 100644
--- a/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseGetResults.cs
+++ b/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated/Models/SqlDatabaseGetResults.cs
@@ -40,8 +40,8 @@ public SqlDatabaseGetResults()
/// The type of Azure resource.
/// The location of the resource group to which
/// the resource belongs.
- public SqlDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SqlDatabaseGetPropertiesResource resource = default(SqlDatabaseGetPropertiesResource), SqlDatabaseGetPropertiesOptions options = default(SqlDatabaseGetPropertiesOptions))
- : base(id, name, type, location, tags)
+ public SqlDatabaseGetResults(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary