Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR sdk/cosmos/mgmt-v2020_03_01] [CosmosDB] Migration support of existing containers/databases to autoscale #3021

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,28 @@ public interface CassandraResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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.
*
Expand All @@ -111,6 +133,30 @@ public interface CassandraResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateCassandraTableToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName);

/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,28 @@ public interface GremlinResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateGremlinDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);

/**
* Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
*
Expand All @@ -111,6 +133,30 @@ public interface GremlinResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateGremlinGraphToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

/**
* Gets the Gremlin graph under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,28 @@ public interface MongoDBResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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.
*
Expand All @@ -111,6 +133,30 @@ public interface MongoDBResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateMongoDBCollectionToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String collectionName);

/**
* Gets the MongoDB collection under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,28 @@ public interface SqlResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateSqlDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);

/**
* Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account.
*
Expand All @@ -135,6 +157,30 @@ public interface SqlResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateSqlContainerToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String containerName);

/**
* Gets the SQL container under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,26 @@ public interface TableResources {
*/
Observable<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> 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<ThroughputSettingsGetResults> migrateTableToManualThroughputAsync(String resourceGroupName, String accountName, String tableName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,30 @@ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner
});
}

@Override
public Observable<ThroughputSettingsGetResults> migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName) {
CassandraResourcesInner client = this.inner();
return client.migrateCassandraKeyspaceToAutoscaleAsync(resourceGroupName, accountName, keyspaceName)
.map(new Func1<ThroughputSettingsGetResultsInner, ThroughputSettingsGetResults>() {
@Override
public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
return new ThroughputSettingsGetResultsImpl(inner, manager());
}
});
}

@Override
public Observable<ThroughputSettingsGetResults> migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName) {
CassandraResourcesInner client = this.inner();
return client.migrateCassandraKeyspaceToManualThroughputAsync(resourceGroupName, accountName, keyspaceName)
.map(new Func1<ThroughputSettingsGetResultsInner, ThroughputSettingsGetResults>() {
@Override
public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
return new ThroughputSettingsGetResultsImpl(inner, manager());
}
});
}

@Override
public Observable<ThroughputSettingsGetResults> getCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
Expand All @@ -163,6 +187,30 @@ public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner
});
}

@Override
public Observable<ThroughputSettingsGetResults> migrateCassandraTableToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
return client.migrateCassandraTableToAutoscaleAsync(resourceGroupName, accountName, keyspaceName, tableName)
.map(new Func1<ThroughputSettingsGetResultsInner, ThroughputSettingsGetResults>() {
@Override
public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
return new ThroughputSettingsGetResultsImpl(inner, manager());
}
});
}

@Override
public Observable<ThroughputSettingsGetResults> migrateCassandraTableToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
return client.migrateCassandraTableToManualThroughputAsync(resourceGroupName, accountName, keyspaceName, tableName)
.map(new Func1<ThroughputSettingsGetResultsInner, ThroughputSettingsGetResults>() {
@Override
public ThroughputSettingsGetResults call(ThroughputSettingsGetResultsInner inner) {
return new ThroughputSettingsGetResultsImpl(inner, manager());
}
});
}

@Override
public Observable<CassandraTableGetResults> getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
CassandraResourcesInner client = this.inner();
Expand Down
Loading