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.
/**
* 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.implementation;
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.management.cosmosdb.CassandraKeyspaceCreateUpdateParameters;
import com.microsoft.azure.management.cosmosdb.CassandraTableCreateUpdateParameters;
import com.microsoft.azure.management.cosmosdb.ThroughputSettingsUpdateParameters;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.Path;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
An instance of this class provides access to all the operations defined
in CassandraResources.
/**
* An instance of this class provides access to all the operations defined
* in CassandraResources.
*/
public class CassandraResourcesInner {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private CassandraResourcesService service;
The service client containing this operation class. /** The service client containing this operation class. */
private CosmosDBImpl client;
Initializes an instance of CassandraResourcesInner.
Params: - retrofit – the Retrofit instance built from a Retrofit Builder.
- client – the instance of the service client containing this operation class.
/**
* Initializes an instance of CassandraResourcesInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public CassandraResourcesInner(Retrofit retrofit, CosmosDBImpl client) {
this.service = retrofit.create(CassandraResourcesService.class);
this.client = client;
}
The interface defining all the services for CassandraResources to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for CassandraResources to be
* used by Retrofit to perform actually REST calls.
*/
interface CassandraResourcesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.CassandraResources listCassandraKeyspaces" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces")
Observable<Response<ResponseBody>> listCassandraKeyspaces(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @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.CassandraResources getCassandraKeyspace" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}")
Observable<Response<ResponseBody>> getCassandraKeyspace(@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.CassandraResources createUpdateCassandraKeyspace" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}")
Observable<Response<ResponseBody>> createUpdateCassandraKeyspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Body CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters, @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.CassandraResources beginCreateUpdateCassandraKeyspace" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}")
Observable<Response<ResponseBody>> beginCreateUpdateCassandraKeyspace(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("keyspaceName") String keyspaceName, @Query("api-version") String apiVersion, @Body CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters, @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.CassandraResources deleteCassandraKeyspace" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> deleteCassandraKeyspace(@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.CassandraResources beginDeleteCassandraKeyspace" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDeleteCassandraKeyspace(@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.CassandraResources getCassandraKeyspaceThroughput" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default")
Observable<Response<ResponseBody>> getCassandraKeyspaceThroughput(@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.CassandraResources updateCassandraKeyspaceThroughput" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default")
Observable<Response<ResponseBody>> updateCassandraKeyspaceThroughput(@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.CassandraResources beginUpdateCassandraKeyspaceThroughput" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default")
Observable<Response<ResponseBody>> 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.CassandraResources listCassandraTables" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables")
Observable<Response<ResponseBody>> 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);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.CassandraResources getCassandraTable" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}")
Observable<Response<ResponseBody>> getCassandraTable(@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.CassandraResources createUpdateCassandraTable" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}")
Observable<Response<ResponseBody>> createUpdateCassandraTable(@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 CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, @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.CassandraResources beginCreateUpdateCassandraTable" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}")
Observable<Response<ResponseBody>> beginCreateUpdateCassandraTable(@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 CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, @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.CassandraResources deleteCassandraTable" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> deleteCassandraTable(@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.CassandraResources beginDeleteCassandraTable" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDeleteCassandraTable(@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.CassandraResources getCassandraTableThroughput" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default")
Observable<Response<ResponseBody>> getCassandraTableThroughput(@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.CassandraResources updateCassandraTableThroughput" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default")
Observable<Response<ResponseBody>> updateCassandraTableThroughput(@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.CassandraResources beginUpdateCassandraTableThroughput" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default")
Observable<Response<ResponseBody>> 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);
}
Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the List<CassandraKeyspaceGetResultsInner> object if successful.
/**
* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account 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<CassandraKeyspaceGetResultsInner> object if successful.
*/
public List<CassandraKeyspaceGetResultsInner> listCassandraKeyspaces(String resourceGroupName, String accountName) {
return listCassandraKeyspacesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body();
}
Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account 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<List<CassandraKeyspaceGetResultsInner>> listCassandraKeyspacesAsync(String resourceGroupName, String accountName, final ServiceCallback<List<CassandraKeyspaceGetResultsInner>> serviceCallback) {
return ServiceFuture.fromResponse(listCassandraKeyspacesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback);
}
Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the List<CassandraKeyspaceGetResultsInner> object
/**
* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List<CassandraKeyspaceGetResultsInner> object
*/
public Observable<List<CassandraKeyspaceGetResultsInner>> listCassandraKeyspacesAsync(String resourceGroupName, String accountName) {
return listCassandraKeyspacesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<List<CassandraKeyspaceGetResultsInner>>, List<CassandraKeyspaceGetResultsInner>>() {
@Override
public List<CassandraKeyspaceGetResultsInner> call(ServiceResponse<List<CassandraKeyspaceGetResultsInner>> response) {
return response.body();
}
});
}
Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the List<CassandraKeyspaceGetResultsInner> object
/**
* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List<CassandraKeyspaceGetResultsInner> object
*/
public Observable<ServiceResponse<List<CassandraKeyspaceGetResultsInner>>> listCassandraKeyspacesWithServiceResponseAsync(String resourceGroupName, String accountName) {
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.");
}
final String apiVersion = "2019-08-01";
return service.listCassandraKeyspaces(this.client.subscriptionId(), resourceGroupName, accountName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<CassandraKeyspaceGetResultsInner>>>>() {
@Override
public Observable<ServiceResponse<List<CassandraKeyspaceGetResultsInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<CassandraKeyspaceGetResultsInner>> result = listCassandraKeyspacesDelegate(response);
List<CassandraKeyspaceGetResultsInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<CassandraKeyspaceGetResultsInner>> clientResponse = new ServiceResponse<List<CassandraKeyspaceGetResultsInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<CassandraKeyspaceGetResultsInner>> listCassandraKeyspacesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<CassandraKeyspaceGetResultsInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<CassandraKeyspaceGetResultsInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraKeyspaceGetResultsInner object if successful.
/**
* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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 CassandraKeyspaceGetResultsInner object if successful.
*/
public CassandraKeyspaceGetResultsInner getCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName) {
return getCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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<CassandraKeyspaceGetResultsInner> getCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback<CassandraKeyspaceGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(getCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraKeyspaceGetResultsInner object
/**
* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 CassandraKeyspaceGetResultsInner object
*/
public Observable<CassandraKeyspaceGetResultsInner> getCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName) {
return getCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1<ServiceResponse<CassandraKeyspaceGetResultsInner>, CassandraKeyspaceGetResultsInner>() {
@Override
public CassandraKeyspaceGetResultsInner call(ServiceResponse<CassandraKeyspaceGetResultsInner> response) {
return response.body();
}
});
}
Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraKeyspaceGetResultsInner object
/**
* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 CassandraKeyspaceGetResultsInner object
*/
public Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>> getCassandraKeyspaceWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
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.");
}
final String apiVersion = "2019-08-01";
return service.getCassandraKeyspace(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CassandraKeyspaceGetResultsInner> clientResponse = getCassandraKeyspaceDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<CassandraKeyspaceGetResultsInner> getCassandraKeyspaceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<CassandraKeyspaceGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<CassandraKeyspaceGetResultsInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraKeyspaceGetResultsInner object if successful.
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @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 CassandraKeyspaceGetResultsInner object if successful.
*/
public CassandraKeyspaceGetResultsInner createUpdateCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
return createUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters).toBlocking().last().body();
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @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<CassandraKeyspaceGetResultsInner> createUpdateCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters, final ServiceCallback<CassandraKeyspaceGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(createUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters), serviceCallback);
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<CassandraKeyspaceGetResultsInner> createUpdateCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
return createUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters).map(new Func1<ServiceResponse<CassandraKeyspaceGetResultsInner>, CassandraKeyspaceGetResultsInner>() {
@Override
public CassandraKeyspaceGetResultsInner call(ServiceResponse<CassandraKeyspaceGetResultsInner> response) {
return response.body();
}
});
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>> createUpdateCassandraKeyspaceWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
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 (createUpdateCassandraKeyspaceParameters == null) {
throw new IllegalArgumentException("Parameter createUpdateCassandraKeyspaceParameters is required and cannot be null.");
}
Validator.validate(createUpdateCassandraKeyspaceParameters);
final String apiVersion = "2019-08-01";
Observable<Response<ResponseBody>> observable = service.createUpdateCassandraKeyspace(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, createUpdateCassandraKeyspaceParameters, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<CassandraKeyspaceGetResultsInner>() { }.getType());
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraKeyspaceGetResultsInner object if successful.
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @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 CassandraKeyspaceGetResultsInner object if successful.
*/
public CassandraKeyspaceGetResultsInner beginCreateUpdateCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
return beginCreateUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters).toBlocking().single().body();
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @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<CassandraKeyspaceGetResultsInner> beginCreateUpdateCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters, final ServiceCallback<CassandraKeyspaceGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters), serviceCallback);
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraKeyspaceGetResultsInner object
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CassandraKeyspaceGetResultsInner object
*/
public Observable<CassandraKeyspaceGetResultsInner> beginCreateUpdateCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
return beginCreateUpdateCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters).map(new Func1<ServiceResponse<CassandraKeyspaceGetResultsInner>, CassandraKeyspaceGetResultsInner>() {
@Override
public CassandraKeyspaceGetResultsInner call(ServiceResponse<CassandraKeyspaceGetResultsInner> response) {
return response.body();
}
});
}
Create or update an Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters – The parameters to provide for the current Cassandra keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraKeyspaceGetResultsInner object
/**
* Create or update an Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CassandraKeyspaceGetResultsInner object
*/
public Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>> beginCreateUpdateCassandraKeyspaceWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters) {
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 (createUpdateCassandraKeyspaceParameters == null) {
throw new IllegalArgumentException("Parameter createUpdateCassandraKeyspaceParameters is required and cannot be null.");
}
Validator.validate(createUpdateCassandraKeyspaceParameters);
final String apiVersion = "2019-08-01";
return service.beginCreateUpdateCassandraKeyspace(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, createUpdateCassandraKeyspaceParameters, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<CassandraKeyspaceGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CassandraKeyspaceGetResultsInner> clientResponse = beginCreateUpdateCassandraKeyspaceDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<CassandraKeyspaceGetResultsInner> beginCreateUpdateCassandraKeyspaceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<CassandraKeyspaceGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<CassandraKeyspaceGetResultsInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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
*/
public void deleteCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName) {
deleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().last().body();
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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<Void> deleteCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<Void> deleteCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName) {
return deleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<ServiceResponse<Void>> deleteCassandraKeyspaceWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
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.");
}
final String apiVersion = "2019-08-01";
Observable<Response<ResponseBody>> observable = service.deleteCassandraKeyspace(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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
*/
public void beginDeleteCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName) {
beginDeleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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<Void> beginDeleteCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteCassandraKeyspaceAsync(String resourceGroupName, String accountName, String keyspaceName) {
return beginDeleteCassandraKeyspaceWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing Azure Cosmos DB Cassandra keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing Azure Cosmos DB Cassandra keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteCassandraKeyspaceWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
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.");
}
final String apiVersion = "2019-08-01";
return service.beginDeleteCassandraKeyspace(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = beginDeleteCassandraKeyspaceDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<Void> beginDeleteCassandraKeyspaceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(202, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner getCassandraKeyspaceThroughput(String resourceGroupName, String accountName, String keyspaceName) {
return getCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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<ThroughputSettingsGetResultsInner> getCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(getCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 ThroughputSettingsGetResultsInner object
*/
public Observable<ThroughputSettingsGetResultsInner> getCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName) {
return getCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 ThroughputSettingsGetResultsInner object
*/
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> getCassandraKeyspaceThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName) {
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.");
}
final String apiVersion = "2019-08-01";
return service.getCassandraKeyspaceThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ThroughputSettingsGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ThroughputSettingsGetResultsInner> clientResponse = getCassandraKeyspaceThroughputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ThroughputSettingsGetResultsInner> getCassandraKeyspaceThroughputDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ThroughputSettingsGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner updateCassandraKeyspaceThroughput(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return updateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters).toBlocking().last().body();
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @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<ThroughputSettingsGetResultsInner> updateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(updateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters), serviceCallback);
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ThroughputSettingsGetResultsInner> updateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return updateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> updateCassandraKeyspaceThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
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 (updateThroughputParameters == null) {
throw new IllegalArgumentException("Parameter updateThroughputParameters is required and cannot be null.");
}
Validator.validate(updateThroughputParameters);
final String apiVersion = "2019-08-01";
Observable<Response<ResponseBody>> observable = service.updateCassandraKeyspaceThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, updateThroughputParameters, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType());
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner beginUpdateCassandraKeyspaceThroughput(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return beginUpdateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters).toBlocking().single().body();
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @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<ThroughputSettingsGetResultsInner> beginUpdateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters), serviceCallback);
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ThroughputSettingsGetResultsInner object
*/
public Observable<ThroughputSettingsGetResultsInner> beginUpdateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return beginUpdateCassandraKeyspaceThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, updateThroughputParameters).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra Keyspace.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra Keyspace.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ThroughputSettingsGetResultsInner object
*/
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> beginUpdateCassandraKeyspaceThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
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 (updateThroughputParameters == null) {
throw new IllegalArgumentException("Parameter updateThroughputParameters is required and cannot be null.");
}
Validator.validate(updateThroughputParameters);
final String apiVersion = "2019-08-01";
return service.beginUpdateCassandraKeyspaceThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, updateThroughputParameters, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ThroughputSettingsGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ThroughputSettingsGetResultsInner> clientResponse = beginUpdateCassandraKeyspaceThroughputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ThroughputSettingsGetResultsInner> beginUpdateCassandraKeyspaceThroughputDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ThroughputSettingsGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Lists the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the List<CassandraTableGetResultsInner> object if successful.
/**
* Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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 List<CassandraTableGetResultsInner> listCassandraTables(String resourceGroupName, String accountName, String keyspaceName) {
return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).toBlocking().single().body();
}
Lists the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace 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<List<CassandraTableGetResultsInner>> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName, final ServiceCallback<List<CassandraTableGetResultsInner>> serviceCallback) {
return ServiceFuture.fromResponse(listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName), serviceCallback);
}
Lists the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the List<CassandraTableGetResultsInner> object
/**
* Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<List<CassandraTableGetResultsInner>> listCassandraTablesAsync(String resourceGroupName, String accountName, String keyspaceName) {
return listCassandraTablesWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName).map(new Func1<ServiceResponse<List<CassandraTableGetResultsInner>>, List<CassandraTableGetResultsInner>>() {
@Override
public List<CassandraTableGetResultsInner> call(ServiceResponse<List<CassandraTableGetResultsInner>> response) {
return response.body();
}
});
}
Lists the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the List<CassandraTableGetResultsInner> object
/**
* Lists the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<ServiceResponse<List<CassandraTableGetResultsInner>>> 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.");
}
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.");
}
final String apiVersion = "2019-08-01";
return service.listCassandraTables(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<CassandraTableGetResultsInner>>>>() {
@Override
public Observable<ServiceResponse<List<CassandraTableGetResultsInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<CassandraTableGetResultsInner>> result = listCassandraTablesDelegate(response);
List<CassandraTableGetResultsInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<CassandraTableGetResultsInner>> clientResponse = new ServiceResponse<List<CassandraTableGetResultsInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<CassandraTableGetResultsInner>> listCassandraTablesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<CassandraTableGetResultsInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<CassandraTableGetResultsInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraTableGetResultsInner object if successful.
/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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.
*/
public CassandraTableGetResultsInner getCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
}
Gets the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<CassandraTableGetResultsInner> getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback<CassandraTableGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
}
Gets the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraTableGetResultsInner object
/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<CassandraTableGetResultsInner> getCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return getCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1<ServiceResponse<CassandraTableGetResultsInner>, CassandraTableGetResultsInner>() {
@Override
public CassandraTableGetResultsInner call(ServiceResponse<CassandraTableGetResultsInner> response) {
return response.body();
}
});
}
Gets the Cassandra table under an existing Azure Cosmos DB database account.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraTableGetResultsInner object
/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<ServiceResponse<CassandraTableGetResultsInner>> 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 = "2019-08-01";
return service.getCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CassandraTableGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<CassandraTableGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CassandraTableGetResultsInner> clientResponse = getCassandraTableDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<CassandraTableGetResultsInner> getCassandraTableDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<CassandraTableGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<CassandraTableGetResultsInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraTableGetResultsInner object if successful.
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<CassandraTableGetResultsInner> createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback<CassandraTableGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<CassandraTableGetResultsInner> createUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
return createUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1<ServiceResponse<CassandraTableGetResultsInner>, CassandraTableGetResultsInner>() {
@Override
public CassandraTableGetResultsInner call(ServiceResponse<CassandraTableGetResultsInner> response) {
return response.body();
}
});
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<ServiceResponse<CassandraTableGetResultsInner>> 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 = "2019-08-01";
Observable<Response<ResponseBody>> 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<CassandraTableGetResultsInner>() { }.getType());
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CassandraTableGetResultsInner object if successful.
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<CassandraTableGetResultsInner> beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters, final ServiceCallback<CassandraTableGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters), serviceCallback);
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraTableGetResultsInner object
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<CassandraTableGetResultsInner> beginCreateUpdateCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters) {
return beginCreateUpdateCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters).map(new Func1<ServiceResponse<CassandraTableGetResultsInner>, CassandraTableGetResultsInner>() {
@Override
public CassandraTableGetResultsInner call(ServiceResponse<CassandraTableGetResultsInner> response) {
return response.body();
}
});
}
Create or update an Azure Cosmos DB Cassandra Table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- createUpdateCassandraTableParameters – The parameters to provide for the current Cassandra Table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CassandraTableGetResultsInner object
/**
* Create or update an Azure Cosmos DB Cassandra Table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<ServiceResponse<CassandraTableGetResultsInner>> 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 = "2019-08-01";
return service.beginCreateUpdateCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, createUpdateCassandraTableParameters, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CassandraTableGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<CassandraTableGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CassandraTableGetResultsInner> clientResponse = beginCreateUpdateCassandraTableDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<CassandraTableGetResultsInner> beginCreateUpdateCassandraTableDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<CassandraTableGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<CassandraTableGetResultsInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public void deleteCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().last().body();
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<Void> deleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<Void> deleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return deleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public Observable<ServiceResponse<Void>> deleteCassandraTableWithServiceResponseAsync(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 = "2019-08-01";
Observable<Response<ResponseBody>> observable = service.deleteCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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
*/
public void beginDeleteCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<Void> beginDeleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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.
*/
public Observable<Void> beginDeleteCassandraTableAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return beginDeleteCassandraTableWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @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.
*/
public Observable<ServiceResponse<Void>> beginDeleteCassandraTableWithServiceResponseAsync(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 = "2019-08-01";
return service.beginDeleteCassandraTable(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = beginDeleteCassandraTableDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<Void> beginDeleteCassandraTableDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(202, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner getCassandraTableThroughput(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return getCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).toBlocking().single().body();
}
Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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<ThroughputSettingsGetResultsInner> getCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(getCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName), serviceCallback);
}
Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 ThroughputSettingsGetResultsInner object
*/
public Observable<ThroughputSettingsGetResultsInner> getCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName) {
return getCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
* @param resourceGroupName Name of an Azure resource group.
* @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 ThroughputSettingsGetResultsInner object
*/
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> getCassandraTableThroughputWithServiceResponseAsync(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 = "2019-08-01";
return service.getCassandraTableThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ThroughputSettingsGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ThroughputSettingsGetResultsInner> clientResponse = getCassandraTableThroughputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ThroughputSettingsGetResultsInner> getCassandraTableThroughputDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ThroughputSettingsGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner updateCassandraTableThroughput(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return updateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters).toBlocking().last().body();
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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<ThroughputSettingsGetResultsInner> updateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(updateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters), serviceCallback);
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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<ThroughputSettingsGetResultsInner> updateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return updateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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<ServiceResponse<ThroughputSettingsGetResultsInner>> updateCassandraTableThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
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 (updateThroughputParameters == null) {
throw new IllegalArgumentException("Parameter updateThroughputParameters is required and cannot be null.");
}
Validator.validate(updateThroughputParameters);
final String apiVersion = "2019-08-01";
Observable<Response<ResponseBody>> observable = service.updateCassandraTableThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, updateThroughputParameters, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType());
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ThroughputSettingsGetResultsInner object if successful.
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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 ThroughputSettingsGetResultsInner object if successful.
*/
public ThroughputSettingsGetResultsInner beginUpdateCassandraTableThroughput(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return beginUpdateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters).toBlocking().single().body();
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of 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<ThroughputSettingsGetResultsInner> beginUpdateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters, final ServiceCallback<ThroughputSettingsGetResultsInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters), serviceCallback);
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ThroughputSettingsGetResultsInner object
*/
public Observable<ThroughputSettingsGetResultsInner> beginUpdateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
return beginUpdateCassandraTableThroughputWithServiceResponseAsync(resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters).map(new Func1<ServiceResponse<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>() {
@Override
public ThroughputSettingsGetResultsInner call(ServiceResponse<ThroughputSettingsGetResultsInner> response) {
return response.body();
}
});
}
Update RUs per second of an Azure Cosmos DB Cassandra table.
Params: - resourceGroupName – Name of an Azure resource group.
- accountName – Cosmos DB database account name.
- keyspaceName – Cosmos DB keyspace name.
- tableName – Cosmos DB table name.
- updateThroughputParameters – The RUs per second of the parameters to provide for the current Cassandra table.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ThroughputSettingsGetResultsInner object
/**
* Update RUs per second of an Azure Cosmos DB Cassandra table.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra table.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ThroughputSettingsGetResultsInner object
*/
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> beginUpdateCassandraTableThroughputWithServiceResponseAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters) {
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 (updateThroughputParameters == null) {
throw new IllegalArgumentException("Parameter updateThroughputParameters is required and cannot be null.");
}
Validator.validate(updateThroughputParameters);
final String apiVersion = "2019-08-01";
return service.beginUpdateCassandraTableThroughput(this.client.subscriptionId(), resourceGroupName, accountName, keyspaceName, tableName, apiVersion, updateThroughputParameters, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ThroughputSettingsGetResultsInner>>>() {
@Override
public Observable<ServiceResponse<ThroughputSettingsGetResultsInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ThroughputSettingsGetResultsInner> clientResponse = beginUpdateCassandraTableThroughputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ThroughputSettingsGetResultsInner> beginUpdateCassandraTableThroughputDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ThroughputSettingsGetResultsInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ThroughputSettingsGetResultsInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
}