diff --git a/eng/mgmt/api-specs.json b/eng/mgmt/api-specs.json
index 51ef794352846..5341d48ccfb1d 100644
--- a/eng/mgmt/api-specs.json
+++ b/eng/mgmt/api-specs.json
@@ -150,6 +150,10 @@
"source": "specification/hdinsight/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "hybridcompute/resource-manager": {
+ "source": "specification/hybridcompute/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"iotcentral/resource-manager": {
"source": "specification/iotcentral/resource-manager/readme.md",
"args": "--multiapi --fluent",
diff --git a/sdk/cosmos/mgmt-v2020_04_01/pom.xml b/sdk/cosmos/mgmt-v2020_04_01/pom.xml
index 2aa10161113fc..1a75964a2963a 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/pom.xml
+++ b/sdk/cosmos/mgmt-v2020_04_01/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.3.1
+ 1.3.2
../../parents/azure-arm-parent/pom.xml
azure-mgmt-cosmosdb
- 1.0.0-beta
+ 1.0.0-beta-1
jar
Microsoft Azure SDK for CosmosDB Management
This package contains Microsoft CosmosDB Management SDK.
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CassandraResources.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CassandraResources.java
index b57596baf3bc5..bdb0748991846 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CassandraResources.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CassandraResources.java
@@ -86,6 +86,28 @@ public interface CassandraResources {
*/
Observable updateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName);
+
/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
@@ -111,6 +133,30 @@ public interface CassandraResources {
*/
Observable updateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateCassandraTableToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateCassandraTableToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CorsPolicy.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CorsPolicy.java
new file mode 100644
index 0000000000000..1866c969b88ea
--- /dev/null
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/CorsPolicy.java
@@ -0,0 +1,152 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.cosmosdb.v2020_04_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The CORS policy for the Cosmos DB database account.
+ */
+public class CorsPolicy {
+ /**
+ * The origin domains that are permitted to make a request against the
+ * service via CORS.
+ */
+ @JsonProperty(value = "allowedOrigins", required = true)
+ private String allowedOrigins;
+
+ /**
+ * The methods (HTTP request verbs) that the origin domain may use for a
+ * CORS request.
+ */
+ @JsonProperty(value = "allowedMethods")
+ private String allowedMethods;
+
+ /**
+ * The request headers that the origin domain may specify on the CORS
+ * request.
+ */
+ @JsonProperty(value = "allowedHeaders")
+ private String allowedHeaders;
+
+ /**
+ * The response headers that may be sent in the response to the CORS
+ * request and exposed by the browser to the request issuer.
+ */
+ @JsonProperty(value = "exposedHeaders")
+ private String exposedHeaders;
+
+ /**
+ * The maximum amount time that a browser should cache the preflight
+ * OPTIONS request.
+ */
+ @JsonProperty(value = "maxAgeInSeconds")
+ private Long maxAgeInSeconds;
+
+ /**
+ * Get the origin domains that are permitted to make a request against the service via CORS.
+ *
+ * @return the allowedOrigins value
+ */
+ public String allowedOrigins() {
+ return this.allowedOrigins;
+ }
+
+ /**
+ * Set the origin domains that are permitted to make a request against the service via CORS.
+ *
+ * @param allowedOrigins the allowedOrigins value to set
+ * @return the CorsPolicy object itself.
+ */
+ public CorsPolicy withAllowedOrigins(String allowedOrigins) {
+ this.allowedOrigins = allowedOrigins;
+ return this;
+ }
+
+ /**
+ * Get the methods (HTTP request verbs) that the origin domain may use for a CORS request.
+ *
+ * @return the allowedMethods value
+ */
+ public String allowedMethods() {
+ return this.allowedMethods;
+ }
+
+ /**
+ * Set the methods (HTTP request verbs) that the origin domain may use for a CORS request.
+ *
+ * @param allowedMethods the allowedMethods value to set
+ * @return the CorsPolicy object itself.
+ */
+ public CorsPolicy withAllowedMethods(String allowedMethods) {
+ this.allowedMethods = allowedMethods;
+ return this;
+ }
+
+ /**
+ * Get the request headers that the origin domain may specify on the CORS request.
+ *
+ * @return the allowedHeaders value
+ */
+ public String allowedHeaders() {
+ return this.allowedHeaders;
+ }
+
+ /**
+ * Set the request headers that the origin domain may specify on the CORS request.
+ *
+ * @param allowedHeaders the allowedHeaders value to set
+ * @return the CorsPolicy object itself.
+ */
+ public CorsPolicy withAllowedHeaders(String allowedHeaders) {
+ this.allowedHeaders = allowedHeaders;
+ return this;
+ }
+
+ /**
+ * Get the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
+ *
+ * @return the exposedHeaders value
+ */
+ public String exposedHeaders() {
+ return this.exposedHeaders;
+ }
+
+ /**
+ * Set the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
+ *
+ * @param exposedHeaders the exposedHeaders value to set
+ * @return the CorsPolicy object itself.
+ */
+ public CorsPolicy withExposedHeaders(String exposedHeaders) {
+ this.exposedHeaders = exposedHeaders;
+ return this;
+ }
+
+ /**
+ * Get the maximum amount time that a browser should cache the preflight OPTIONS request.
+ *
+ * @return the maxAgeInSeconds value
+ */
+ public Long maxAgeInSeconds() {
+ return this.maxAgeInSeconds;
+ }
+
+ /**
+ * Set the maximum amount time that a browser should cache the preflight OPTIONS request.
+ *
+ * @param maxAgeInSeconds the maxAgeInSeconds value to set
+ * @return the CorsPolicy object itself.
+ */
+ public CorsPolicy withMaxAgeInSeconds(Long maxAgeInSeconds) {
+ this.maxAgeInSeconds = maxAgeInSeconds;
+ return this;
+ }
+
+}
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountCreateUpdateParameters.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountCreateUpdateParameters.java
index a1a62a59f65b0..558df78d3a46c 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountCreateUpdateParameters.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountCreateUpdateParameters.java
@@ -134,6 +134,12 @@ public class DatabaseAccountCreateUpdateParameters extends ARMResourceProperties
@JsonProperty(value = "properties.enableAnalyticalStorage")
private Boolean enableAnalyticalStorage;
+ /**
+ * The CORS policy for the Cosmos DB database account.
+ */
+ @JsonProperty(value = "properties.cors")
+ private List cors;
+
/**
* Creates an instance of DatabaseAccountCreateUpdateParameters class.
* @param locations an array that contains the georeplication locations enabled for the Cosmos DB account.
@@ -502,4 +508,24 @@ public DatabaseAccountCreateUpdateParameters withEnableAnalyticalStorage(Boolean
return this;
}
+ /**
+ * Get the CORS policy for the Cosmos DB database account.
+ *
+ * @return the cors value
+ */
+ public List cors() {
+ return this.cors;
+ }
+
+ /**
+ * Set the CORS policy for the Cosmos DB database account.
+ *
+ * @param cors the cors value to set
+ * @return the DatabaseAccountCreateUpdateParameters object itself.
+ */
+ public DatabaseAccountCreateUpdateParameters withCors(List cors) {
+ this.cors = cors;
+ return this;
+ }
+
}
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountGetResults.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountGetResults.java
index a97772fb66ae4..efbf2f519fba1 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountGetResults.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountGetResults.java
@@ -45,6 +45,11 @@ public interface DatabaseAccountGetResults extends HasInner cors();
+
/**
* @return the databaseAccountOfferType value.
*/
@@ -239,6 +244,18 @@ interface WithConsistencyPolicy {
WithCreate withConsistencyPolicy(ConsistencyPolicy consistencyPolicy);
}
+ /**
+ * The stage of the databaseaccountgetresults definition allowing to specify Cors.
+ */
+ interface WithCors {
+ /**
+ * Specifies cors.
+ * @param cors The CORS policy for the Cosmos DB database account
+ * @return the next definition stage
+ */
+ WithCreate withCors(List cors);
+ }
+
/**
* The stage of the databaseaccountgetresults definition allowing to specify DisableKeyBasedMetadataWriteAccess.
*/
@@ -388,13 +405,13 @@ interface WithVirtualNetworkRules {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
- interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithApiProperties, DefinitionStages.WithCapabilities, DefinitionStages.WithConnectorOffer, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithDisableKeyBasedMetadataWriteAccess, DefinitionStages.WithEnableAnalyticalStorage, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableCassandraConnector, DefinitionStages.WithEnableFreeTier, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRules, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKeyVaultKeyUri, DefinitionStages.WithKind, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithVirtualNetworkRules {
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithApiProperties, DefinitionStages.WithCapabilities, DefinitionStages.WithConnectorOffer, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithCors, DefinitionStages.WithDisableKeyBasedMetadataWriteAccess, DefinitionStages.WithEnableAnalyticalStorage, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableCassandraConnector, DefinitionStages.WithEnableFreeTier, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRules, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKeyVaultKeyUri, DefinitionStages.WithKind, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithVirtualNetworkRules {
}
}
/**
* The template for a DatabaseAccountGetResults update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithApiProperties, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithApiProperties, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithCors, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
}
/**
@@ -449,6 +466,18 @@ interface WithConsistencyPolicy {
Update withConsistencyPolicy(ConsistencyPolicy consistencyPolicy);
}
+ /**
+ * The stage of the databaseaccountgetresults update allowing to specify Cors.
+ */
+ interface WithCors {
+ /**
+ * Specifies cors.
+ * @param cors The CORS policy for the Cosmos DB database account
+ * @return the next update stage
+ */
+ Update withCors(List cors);
+ }
+
/**
* The stage of the databaseaccountgetresults update allowing to specify DisableKeyBasedMetadataWriteAccess.
*/
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountUpdateParameters.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountUpdateParameters.java
index 8efc3eb440ce6..86b143dcdac50 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountUpdateParameters.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/DatabaseAccountUpdateParameters.java
@@ -133,6 +133,12 @@ public class DatabaseAccountUpdateParameters {
@JsonProperty(value = "properties.enableAnalyticalStorage")
private Boolean enableAnalyticalStorage;
+ /**
+ * The CORS policy for the Cosmos DB database account.
+ */
+ @JsonProperty(value = "properties.cors")
+ private List cors;
+
/**
* Get the tags value.
*
@@ -493,4 +499,24 @@ public DatabaseAccountUpdateParameters withEnableAnalyticalStorage(Boolean enabl
return this;
}
+ /**
+ * Get the CORS policy for the Cosmos DB database account.
+ *
+ * @return the cors value
+ */
+ public List cors() {
+ return this.cors;
+ }
+
+ /**
+ * Set the CORS policy for the Cosmos DB database account.
+ *
+ * @param cors the cors value to set
+ * @return the DatabaseAccountUpdateParameters object itself.
+ */
+ public DatabaseAccountUpdateParameters withCors(List cors) {
+ this.cors = cors;
+ return this;
+ }
+
}
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/GremlinResources.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/GremlinResources.java
index 77259beec2592..de21aa345d6f9 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/GremlinResources.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/GremlinResources.java
@@ -86,6 +86,28 @@ public interface GremlinResources {
*/
Observable updateGremlinDatabaseThroughputAsync(String resourceGroupName, String accountName, String databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateGremlinDatabaseToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateGremlinDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);
+
/**
* Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
*
@@ -111,6 +133,30 @@ public interface GremlinResources {
*/
Observable updateGremlinGraphThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateGremlinGraphToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateGremlinGraphToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName);
+
/**
* Gets the Gremlin graph under an existing Azure Cosmos DB database account.
*
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/MongoDBResources.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/MongoDBResources.java
index e27707a4d6f1c..fd27ac118427e 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/MongoDBResources.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/MongoDBResources.java
@@ -86,6 +86,28 @@ public interface MongoDBResources {
*/
Observable updateMongoDBDatabaseThroughputAsync(String resourceGroupName, String accountName, String databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateMongoDBDatabaseToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateMongoDBDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);
+
/**
* Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name.
*
@@ -111,6 +133,30 @@ public interface MongoDBResources {
*/
Observable updateMongoDBCollectionThroughputAsync(String resourceGroupName, String accountName, String databaseName, String collectionName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateMongoDBCollectionToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName, String collectionName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateMongoDBCollectionToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String collectionName);
+
/**
* Gets the MongoDB collection under an existing Azure Cosmos DB database account.
*
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerGetPropertiesResource.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerGetPropertiesResource.java
index 863a154bc6860..353c846981219 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerGetPropertiesResource.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerGetPropertiesResource.java
@@ -54,6 +54,12 @@ public class SqlContainerGetPropertiesResource {
@JsonProperty(value = "conflictResolutionPolicy")
private ConflictResolutionPolicy conflictResolutionPolicy;
+ /**
+ * Analytical TTL.
+ */
+ @JsonProperty(value = "analyticalStorageTtl")
+ private Long analyticalStorageTtl;
+
/**
* A system generated property. A unique identifier.
*/
@@ -194,6 +200,26 @@ public SqlContainerGetPropertiesResource withConflictResolutionPolicy(ConflictRe
return this;
}
+ /**
+ * Get analytical TTL.
+ *
+ * @return the analyticalStorageTtl value
+ */
+ public Long analyticalStorageTtl() {
+ return this.analyticalStorageTtl;
+ }
+
+ /**
+ * Set analytical TTL.
+ *
+ * @param analyticalStorageTtl the analyticalStorageTtl value to set
+ * @return the SqlContainerGetPropertiesResource object itself.
+ */
+ public SqlContainerGetPropertiesResource withAnalyticalStorageTtl(Long analyticalStorageTtl) {
+ this.analyticalStorageTtl = analyticalStorageTtl;
+ return this;
+ }
+
/**
* Get a system generated property. A unique identifier.
*
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerResource.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerResource.java
index c45ef41f54bfc..ad94b195f2396 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerResource.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlContainerResource.java
@@ -54,6 +54,12 @@ public class SqlContainerResource {
@JsonProperty(value = "conflictResolutionPolicy")
private ConflictResolutionPolicy conflictResolutionPolicy;
+ /**
+ * Analytical TTL.
+ */
+ @JsonProperty(value = "analyticalStorageTtl")
+ private Long analyticalStorageTtl;
+
/**
* Get name of the Cosmos DB SQL container.
*
@@ -174,4 +180,24 @@ public SqlContainerResource withConflictResolutionPolicy(ConflictResolutionPolic
return this;
}
+ /**
+ * Get analytical TTL.
+ *
+ * @return the analyticalStorageTtl value
+ */
+ public Long analyticalStorageTtl() {
+ return this.analyticalStorageTtl;
+ }
+
+ /**
+ * Set analytical TTL.
+ *
+ * @param analyticalStorageTtl the analyticalStorageTtl value to set
+ * @return the SqlContainerResource object itself.
+ */
+ public SqlContainerResource withAnalyticalStorageTtl(Long analyticalStorageTtl) {
+ this.analyticalStorageTtl = analyticalStorageTtl;
+ return this;
+ }
+
}
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlResources.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlResources.java
index b97352057e875..86c03ec7d27a7 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlResources.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/SqlResources.java
@@ -110,6 +110,28 @@ public interface SqlResources {
*/
Observable updateSqlDatabaseThroughputAsync(String resourceGroupName, String accountName, String databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateSqlDatabaseToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateSqlDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);
+
/**
* Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account.
*
@@ -135,6 +157,30 @@ public interface SqlResources {
*/
Observable updateSqlContainerThroughputAsync(String resourceGroupName, String accountName, String databaseName, String containerName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param containerName Cosmos DB container name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateSqlContainerToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName, String containerName);
+
+ /**
+ * Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param containerName Cosmos DB container name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateSqlContainerToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String containerName);
+
/**
* Gets the SQL container under an existing Azure Cosmos DB database account.
*
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/TableResources.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/TableResources.java
index 34f5422e1f7ea..682390484b5f1 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/TableResources.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/TableResources.java
@@ -78,4 +78,26 @@ public interface TableResources {
*/
Observable updateTableThroughputAsync(String resourceGroupName, String accountName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters);
+ /**
+ * Migrate an Azure Cosmos DB Table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateTableToAutoscaleAsync(String resourceGroupName, String accountName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable migrateTableToManualThroughputAsync(String resourceGroupName, String accountName, String tableName);
+
}
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesImpl.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesImpl.java
index 49a109f57a823..c8f07d955bc58 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesImpl.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesImpl.java
@@ -139,6 +139,30 @@ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner
});
}
+ @Override
+ public Observable migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ CassandraResourcesInner client = this.inner();
+ return client.migrateCassandraKeyspaceToAutoscaleAsync(resourceGroupName, accountName, keyspaceName)
+ .map(new Func1() {
+ @Override
+ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
+ return new ThroughputSettingsGetResultsImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ CassandraResourcesInner client = this.inner();
+ return client.migrateCassandraKeyspaceToManualThroughputAsync(resourceGroupName, accountName, keyspaceName)
+ .map(new Func1() {
+ @Override
+ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
+ return new ThroughputSettingsGetResultsImpl(inner, manager());
+ }
+ });
+ }
+
@Override
public Observable getCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
@@ -163,6 +187,30 @@ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner
});
}
+ @Override
+ public Observable migrateCassandraTableToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ CassandraResourcesInner client = this.inner();
+ return client.migrateCassandraTableToAutoscaleAsync(resourceGroupName, accountName, keyspaceName, tableName)
+ .map(new Func1() {
+ @Override
+ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
+ return new ThroughputSettingsGetResultsImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable migrateCassandraTableToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ CassandraResourcesInner client = this.inner();
+ return client.migrateCassandraTableToManualThroughputAsync(resourceGroupName, accountName, keyspaceName, tableName)
+ .map(new Func1() {
+ @Override
+ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
+ return new ThroughputSettingsGetResultsImpl(inner, manager());
+ }
+ });
+ }
+
@Override
public Observable getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
diff --git a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesInner.java b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesInner.java
index b03a9f822b0e3..910a2aa9099c0 100644
--- a/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesInner.java
+++ b/sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/CassandraResourcesInner.java
@@ -27,6 +27,7 @@
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.Path;
+import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.Response;
@@ -95,6 +96,22 @@ interface CassandraResourcesService {
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default")
Observable> beginUpdateCassandraKeyspaceThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Body ThroughputSettingsUpdateParameters updateThroughputParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources migrateCassandraKeyspaceToAutoscale" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale")
+ Observable> migrateCassandraKeyspaceToAutoscale(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources beginMigrateCassandraKeyspaceToAutoscale" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale")
+ Observable> beginMigrateCassandraKeyspaceToAutoscale(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources migrateCassandraKeyspaceToManualThroughput" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput")
+ Observable> migrateCassandraKeyspaceToManualThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources beginMigrateCassandraKeyspaceToManualThroughput" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput")
+ Observable> beginMigrateCassandraKeyspaceToManualThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources listCassandraTables" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables")
Observable> listCassandraTables(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -131,6 +148,22 @@ interface CassandraResourcesService {
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default")
Observable> beginUpdateCassandraTableThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Body ThroughputSettingsUpdateParameters updateThroughputParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources migrateCassandraTableToAutoscale" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale")
+ Observable> migrateCassandraTableToAutoscale(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources beginMigrateCassandraTableToAutoscale" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale")
+ Observable> beginMigrateCassandraTableToAutoscale(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources migrateCassandraTableToManualThroughput" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput")
+ Observable> migrateCassandraTableToManualThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2020_04_01.CassandraResources beginMigrateCassandraTableToManualThroughput" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput")
+ Observable> beginMigrateCassandraTableToManualThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
}
/**
@@ -933,7 +966,7 @@ private ServiceResponse beginUpdateCassandraK
}
/**
- * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
@@ -941,14 +974,14 @@ private ServiceResponse beginUpdateCassandraK
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the List<CassandraTableGetResultsInner> object if successful.
+ * @return the ThroughputSettingsGetResultsInner object if successful.
*/
- public List listCassandraTables(String resourceGroupName, String accountName, String keyspaceName) {
- return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
+ public ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToAutoscale(String resourceGroupName, String accountName, String keyspaceName) {
+ return migrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().last().body();
}
/**
- * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
@@ -957,38 +990,38 @@ public List listCassandraTables(String resourceGr
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback> serviceCallback) {
- return ServiceFuture.fromResponse(listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
+ public ServiceFuture migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(migrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
/**
- * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the List<CassandraTableGetResultsInner> object
+ * @return the observable for the request
*/
- public Observable> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName) {
- return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1>, List>() {
+ public Observable migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ return migrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1, ThroughputSettingsGetResultsInner>() {
@Override
- public List call(ServiceResponse> response) {
+ public ThroughputSettingsGetResultsInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the List<CassandraTableGetResultsInner> object
+ * @return the observable for the request
*/
- public Observable>> listCassandraTablesWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ public Observable> migrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -1002,93 +1035,67 @@ public Observable>> listCass
throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
}
final String apiVersion = "2020-04-01";
- return service.listCassandraTables(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>>() {
- @Override
- public Observable>> call(Response response) {
- try {
- ServiceResponse> result = listCassandraTablesDelegate(response);
- List items = null;
- if (result.body() != null) {
- items = result.body().items();
- }
- ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponse> listCassandraTablesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken>() { }.getType())
- .registerError(CloudException.class)
- .build(response);
+ Observable> observable = service.migrateCassandraKeyspaceToAutoscale(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
}
/**
- * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the CassandraTableGetResultsInner object if successful.
+ * @return the ThroughputSettingsGetResultsInner object if successful.
*/
- public CassandraTableGetResultsInner getCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
+ public ThroughputSettingsGetResultsInner beginMigrateCassandraKeyspaceToAutoscale(String resourceGroupName, String accountName, String keyspaceName) {
+ return beginMigrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
/**
- * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
+ public ServiceFuture beginMigrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginMigrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
/**
- * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the CassandraTableGetResultsInner object
+ * @return the observable to the ThroughputSettingsGetResultsInner object
*/
- public Observable getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1, CassandraTableGetResultsInner>() {
+ public Observable beginMigrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ return beginMigrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1, ThroughputSettingsGetResultsInner>() {
@Override
- public CassandraTableGetResultsInner call(ServiceResponse response) {
+ public ThroughputSettingsGetResultsInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the CassandraTableGetResultsInner object
+ * @return the observable to the ThroughputSettingsGetResultsInner object
*/
- public Observable> getCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ public Observable> beginMigrateCassandraKeyspaceToAutoscaleWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -1101,16 +1108,13 @@ public Observable> getCassandraTa
if (keyspaceName == null) {
throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
}
- if (tableName == null) {
- throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
- }
final String apiVersion = "2020-04-01";
- return service.getCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.beginMigrateCassandraKeyspaceToAutoscale(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = getCassandraTableDelegate(response);
+ ServiceResponse clientResponse = beginMigrateCassandraKeyspaceToAutoscaleDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -1119,78 +1123,71 @@ public Observable> call(Response<
});
}
- private ServiceResponse getCassandraTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
+ private ServiceResponse beginMigrateCassandraKeyspaceToAutoscaleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the CassandraTableGetResultsInner object if successful.
+ * @return the ThroughputSettingsGetResultsInner object if successful.
*/
- public CassandraTableGetResultsInner createUpdateCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
- return createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).toBlocking().last().body();
+ public ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToManualThroughput(String resourceGroupName, String accountName, String keyspaceName) {
+ return migrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().last().body();
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
+ public ServiceFuture migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(migrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- public Observable createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
- return createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1, CassandraTableGetResultsInner>() {
+ public Observable migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ return migrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1, ThroughputSettingsGetResultsInner>() {
@Override
- public CassandraTableGetResultsInner call(ServiceResponse response) {
+ public ThroughputSettingsGetResultsInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- public Observable> createUpdateCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ public Observable> migrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -1203,83 +1200,68 @@ public Observable> createUpdateCa
if (keyspaceName == null) {
throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
}
- if (tableName == null) {
- throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
- }
- if (createUpdateCassandraTableParameters == null) {
- throw new IllegalArgumentException("Parameter createUpdateCassandraTableParameters is required and cannot be null.");
- }
- Validator.validate(createUpdateCassandraTableParameters);
final String apiVersion = "2020-04-01";
- Observable> observable = service.createUpdateCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, createUpdateCassandraTableParameters, this.client.acceptLanguage(), this.client.userAgent());
- return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ Observable> observable = service.migrateCassandraKeyspaceToManualThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the CassandraTableGetResultsInner object if successful.
+ * @return the ThroughputSettingsGetResultsInner object if successful.
*/
- public CassandraTableGetResultsInner beginCreateUpdateCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
- return beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).toBlocking().single().body();
+ public ThroughputSettingsGetResultsInner beginMigrateCassandraKeyspaceToManualThroughput(String resourceGroupName, String accountName, String keyspaceName) {
+ return beginMigrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
+ public ServiceFuture beginMigrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginMigrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the CassandraTableGetResultsInner object
+ * @return the observable to the ThroughputSettingsGetResultsInner object
*/
- public Observable beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
- return beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1, CassandraTableGetResultsInner>() {
+ public Observable beginMigrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ return beginMigrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1, ThroughputSettingsGetResultsInner>() {
@Override
- public CassandraTableGetResultsInner call(ServiceResponse response) {
+ public ThroughputSettingsGetResultsInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Create or update an Azure Cosmos DB Cassandra Table.
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
- * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the CassandraTableGetResultsInner object
+ * @return the observable to the ThroughputSettingsGetResultsInner object
*/
- public Observable> beginCreateUpdateCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ public Observable> beginMigrateCassandraKeyspaceToManualThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -1292,20 +1274,13 @@ public Observable> beginCreateUpd
if (keyspaceName == null) {
throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
}
- if (tableName == null) {
- throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
- }
- if (createUpdateCassandraTableParameters == null) {
- throw new IllegalArgumentException("Parameter createUpdateCassandraTableParameters is required and cannot be null.");
- }
- Validator.validate(createUpdateCassandraTableParameters);
final String apiVersion = "2020-04-01";
- return service.beginCreateUpdateCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, createUpdateCassandraTableParameters, this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.beginMigrateCassandraKeyspaceToManualThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = beginCreateUpdateCassandraTableDelegate(response);
+ ServiceResponse clientResponse = beginMigrateCassandraKeyspaceToManualThroughputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -1314,74 +1289,71 @@ public Observable> call(Response<
});
}
- private ServiceResponse beginCreateUpdateCassandraTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
+ private ServiceResponse beginMigrateCassandraKeyspaceToManualThroughputDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
.register(202, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<CassandraTableGetResultsInner> object if successful.
*/
- public void deleteCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().last().body();
+ public List listCassandraTables(String resourceGroupName, String accountName, String keyspaceName) {
+ return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture deleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
+ public ServiceFuture> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
+ * @return the observable to the List<CassandraTableGetResultsInner> object
*/
- public Observable deleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- return deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1, Void>() {
+ public Observable> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName) {
+ return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1>, List>() {
@Override
- public Void call(ServiceResponse response) {
+ public List call(ServiceResponse> response) {
return response.body();
}
});
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
- * @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
+ * @return the observable to the List<CassandraTableGetResultsInner> object
*/
- public Observable> deleteCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ public Observable>> listCassandraTablesWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -1394,16 +1366,35 @@ public Observable> deleteCassandraTableWithServiceResponse
if (keyspaceName == null) {
throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
}
- if (tableName == null) {
- throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
- }
final String apiVersion = "2020-04-01";
- Observable> observable = service.deleteCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
- return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ return service.listCassandraTables(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listCassandraTablesDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listCassandraTablesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
@@ -1412,13 +1403,14 @@ public Observable> deleteCassandraTableWithServiceResponse
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CassandraTableGetResultsInner object if successful.
*/
- public void beginDeleteCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
+ public CassandraTableGetResultsInner getCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
@@ -1428,40 +1420,614 @@ public void beginDeleteCassandraTable(String resourceGroupName, String accountNa
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture beginDeleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
+ public ServiceFuture getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponse} object if successful.
+ * @return the observable to the CassandraTableGetResultsInner object
*/
- public Observable beginDeleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
- return beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1, Void>() {
+ public Observable getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1, CassandraTableGetResultsInner>() {
@Override
- public Void call(ServiceResponse response) {
+ public CassandraTableGetResultsInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Deletes an existing Azure Cosmos DB Cassandra table.
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponse} object if successful.
+ * @return the observable to the CassandraTableGetResultsInner object
*/
- public Observable> beginDeleteCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ public Observable> getCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (keyspaceName == null) {
+ throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
+ }
+ if (tableName == null) {
+ throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
+ }
+ final String apiVersion = "2020-04-01";
+ return service.getCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getCassandraTableDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getCassandraTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CassandraTableGetResultsInner object if successful.
+ */
+ public CassandraTableGetResultsInner createUpdateCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ return createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ return createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1, CassandraTableGetResultsInner>() {
+ @Override
+ public CassandraTableGetResultsInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createUpdateCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (keyspaceName == null) {
+ throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
+ }
+ if (tableName == null) {
+ throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
+ }
+ if (createUpdateCassandraTableParameters == null) {
+ throw new IllegalArgumentException("Parameter createUpdateCassandraTableParameters is required and cannot be null.");
+ }
+ Validator.validate(createUpdateCassandraTableParameters);
+ final String apiVersion = "2020-04-01";
+ Observable> observable = service.createUpdateCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, createUpdateCassandraTableParameters, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CassandraTableGetResultsInner object if successful.
+ */
+ public CassandraTableGetResultsInner beginCreateUpdateCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ return beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CassandraTableGetResultsInner object
+ */
+ public Observable beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ return beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1, CassandraTableGetResultsInner>() {
+ @Override
+ public CassandraTableGetResultsInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CassandraTableGetResultsInner object
+ */
+ public Observable> beginCreateUpdateCassandraTableWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (keyspaceName == null) {
+ throw new IllegalArgumentException("Parameter keyspaceName is required and cannot be null.");
+ }
+ if (tableName == null) {
+ throw new IllegalArgumentException("Parameter tableName is required and cannot be null.");
+ }
+ if (createUpdateCassandraTableParameters == null) {
+ throw new IllegalArgumentException("Parameter createUpdateCassandraTableParameters is required and cannot be null.");
+ }
+ Validator.validate(createUpdateCassandraTableParameters);
+ final String apiVersion = "2020-04-01";
+ return service.beginCreateUpdateCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, createUpdateCassandraTableParameters, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateUpdateCassandraTableDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateUpdateCassandraTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().