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.storage.implementation; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.storage.AccountSasParameters; import com.microsoft.azure.management.storage.BlobRestoreParameters; import com.microsoft.azure.management.storage.BlobRestoreRange; import com.microsoft.azure.management.storage.ListKeyExpand; import com.microsoft.azure.management.storage.ServiceSasParameters; import com.microsoft.azure.management.storage.StorageAccountCheckNameAvailabilityParameters; import com.microsoft.azure.management.storage.StorageAccountCreateParameters; import com.microsoft.azure.management.storage.StorageAccountExpand; import com.microsoft.azure.management.storage.StorageAccountRegenerateKeyParameters; import com.microsoft.azure.management.storage.StorageAccountUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; 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 org.joda.time.DateTime; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions;
An instance of this class provides access to all the operations defined in StorageAccounts.
/** * An instance of this class provides access to all the operations defined * in StorageAccounts. */
public class StorageAccountsInner implements InnerSupportsGet<StorageAccountInner>, InnerSupportsDelete<Void>, InnerSupportsListing<StorageAccountInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private StorageAccountsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private StorageManagementClientImpl client;
Initializes an instance of StorageAccountsInner.
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 StorageAccountsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public StorageAccountsInner(Retrofit retrofit, StorageManagementClientImpl client) { this.service = retrofit.create(StorageAccountsService.class); this.client = client; }
The interface defining all the services for StorageAccounts to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for StorageAccounts to be * used by Retrofit to perform actually REST calls. */
interface StorageAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts checkNameAvailability" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability") Observable<Response<ResponseBody>> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountCheckNameAvailabilityParameters accountName, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters parameters, @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.storage.StorageAccounts beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters parameters, @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.storage.StorageAccounts delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") StorageAccountExpand expand, @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.storage.StorageAccounts update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountUpdateParameters parameters, @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.storage.StorageAccounts list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts") Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts listKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys") Observable<Response<ResponseBody>> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") ListKeyExpand expand, @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.storage.StorageAccounts regenerateKey" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey") Observable<Response<ResponseBody>> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body StorageAccountRegenerateKeyParameters regenerateKey, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts listAccountSAS" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas") Observable<Response<ResponseBody>> listAccountSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body AccountSasParameters parameters, @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.storage.StorageAccounts listServiceSAS" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas") Observable<Response<ResponseBody>> listServiceSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body ServiceSasParameters parameters, @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.storage.StorageAccounts failover" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover") Observable<Response<ResponseBody>> failover(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts beginFailover" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover") Observable<Response<ResponseBody>> beginFailover(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts restoreBlobRanges" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges") Observable<Response<ResponseBody>> restoreBlobRanges(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BlobRestoreParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts beginRestoreBlobRanges" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges") Observable<Response<ResponseBody>> beginRestoreBlobRanges(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BlobRestoreParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts revokeUserDelegationKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys") Observable<Response<ResponseBody>> revokeUserDelegationKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @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.storage.StorageAccounts listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Checks that the storage account name is valid and is not already in use.
Params:
  • name – The storage account name.
Throws:
Returns:the CheckNameAvailabilityResultInner object if successful.
/** * Checks that the storage account name is valid and is not already in use. * * @param name The storage 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 CheckNameAvailabilityResultInner object if successful. */
public CheckNameAvailabilityResultInner checkNameAvailability(String name) { return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); }
Checks that the storage account name is valid and is not already in use.
Params:
  • name – The storage account name.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Checks that the storage account name is valid and is not already in use. * * @param name The storage 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<CheckNameAvailabilityResultInner> checkNameAvailabilityAsync(String name, final ServiceCallback<CheckNameAvailabilityResultInner> serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); }
Checks that the storage account name is valid and is not already in use.
Params:
  • name – The storage account name.
Throws:
Returns:the observable to the CheckNameAvailabilityResultInner object
/** * Checks that the storage account name is valid and is not already in use. * * @param name The storage account name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CheckNameAvailabilityResultInner object */
public Observable<CheckNameAvailabilityResultInner> checkNameAvailabilityAsync(String name) { return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1<ServiceResponse<CheckNameAvailabilityResultInner>, CheckNameAvailabilityResultInner>() { @Override public CheckNameAvailabilityResultInner call(ServiceResponse<CheckNameAvailabilityResultInner> response) { return response.body(); } }); }
Checks that the storage account name is valid and is not already in use.
Params:
  • name – The storage account name.
Throws:
Returns:the observable to the CheckNameAvailabilityResultInner object
/** * Checks that the storage account name is valid and is not already in use. * * @param name The storage account name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CheckNameAvailabilityResultInner object */
public Observable<ServiceResponse<CheckNameAvailabilityResultInner>> checkNameAvailabilityWithServiceResponseAsync(String name) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } StorageAccountCheckNameAvailabilityParameters accountName = new StorageAccountCheckNameAvailabilityParameters(); accountName.withName(name); return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), accountName, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CheckNameAvailabilityResultInner>>>() { @Override public Observable<ServiceResponse<CheckNameAvailabilityResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<CheckNameAvailabilityResultInner> clientResponse = checkNameAvailabilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<CheckNameAvailabilityResultInner> checkNameAvailabilityDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<CheckNameAvailabilityResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<CheckNameAvailabilityResultInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the StorageAccountInner object if successful.
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @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 StorageAccountInner object if successful. */
public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @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<StorageAccountInner> createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback<StorageAccountInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the observable for the request
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<StorageAccountInner> createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse<StorageAccountInner> response) { return response.body(); } }); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the observable for the request
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<StorageAccountInner>> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<StorageAccountInner>() { }.getType()); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the StorageAccountInner object if successful.
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @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 StorageAccountInner object if successful. */
public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @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<StorageAccountInner> beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback<StorageAccountInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the observable to the StorageAccountInner object
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<StorageAccountInner> beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse<StorageAccountInner> response) { return response.body(); } }); }
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the created account.
Throws:
Returns:the observable to the StorageAccountInner object
/** * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<ServiceResponse<StorageAccountInner>> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.beginCreate(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountInner>>>() { @Override public Observable<ServiceResponse<StorageAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountInner> clientResponse = beginCreateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<StorageAccountInner> beginCreateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<StorageAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<StorageAccountInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes a storage account in Microsoft Azure.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
/** * Deletes a storage account in Microsoft Azure. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 delete(String resourceGroupName, String accountName) { deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Deletes a storage account in Microsoft Azure.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a storage account in Microsoft Azure. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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> deleteAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Deletes a storage account in Microsoft Azure.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a storage account in Microsoft Azure. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> deleteAsync(String resourceGroupName, String accountName) { return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a storage account in Microsoft Azure.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a storage account in Microsoft Azure. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.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 = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> deleteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the StorageAccountInner object if successful.
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 StorageAccountInner object if successful. */
public StorageAccountInner getByResourceGroup(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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<StorageAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback<StorageAccountInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable to the StorageAccountInner object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<StorageAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse<StorageAccountInner> response) { return response.body(); } }); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable to the StorageAccountInner object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<ServiceResponse<StorageAccountInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } final StorageAccountExpand expand = null; return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountInner>>>() { @Override public Observable<ServiceResponse<StorageAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus'
Throws:
Returns:the StorageAccountInner object if successful.
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus' * @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 StorageAccountInner object if successful. */
public StorageAccountInner getByResourceGroup(String resourceGroupName, String accountName, StorageAccountExpand expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand).toBlocking().single().body(); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus' * @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<StorageAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName, StorageAccountExpand expand, final ServiceCallback<StorageAccountInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand), serviceCallback); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus'
Throws:
Returns:the observable to the StorageAccountInner object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<StorageAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName, StorageAccountExpand expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName, expand).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse<StorageAccountInner> response) { return response.body(); } }); }
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus'
Throws:
Returns:the observable to the StorageAccountInner object
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. Possible values include: 'geoReplicationStats', 'blobRestoreStatus' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<ServiceResponse<StorageAccountInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountExpand expand) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountInner>>>() { @Override public Observable<ServiceResponse<StorageAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<StorageAccountInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<StorageAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<StorageAccountInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the updated account.
Throws:
Returns:the StorageAccountInner object if successful.
/** * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the updated account. * @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 StorageAccountInner object if successful. */
public StorageAccountInner update(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the updated account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the updated account. * @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<StorageAccountInner> updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters, final ServiceCallback<StorageAccountInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the updated account.
Throws:
Returns:the observable to the StorageAccountInner object
/** * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the updated account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<StorageAccountInner> updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse<StorageAccountInner> response) { return response.body(); } }); }
The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide for the updated account.
Throws:
Returns:the observable to the StorageAccountInner object
/** * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the updated account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */
public Observable<ServiceResponse<StorageAccountInner>> updateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.update(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountInner>>>() { @Override public Observable<ServiceResponse<StorageAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountInner> clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<StorageAccountInner> updateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<StorageAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<StorageAccountInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
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 PagedList<StorageAccountInner> object if successful.
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @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 PagedList&lt;StorageAccountInner&gt; object if successful. */
public PagedList<StorageAccountInner> list() { ServiceResponse<Page<StorageAccountInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<StorageAccountInner>(response.body()) { @Override public Page<StorageAccountInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @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<StorageAccountInner>> listAsync(final ListOperationCallback<StorageAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<StorageAccountInner> object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;StorageAccountInner&gt; object */
public Observable<Page<StorageAccountInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<StorageAccountInner>>, Page<StorageAccountInner>>() { @Override public Page<StorageAccountInner> call(ServiceResponse<Page<StorageAccountInner>> response) { return response.body(); } }); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<StorageAccountInner> object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;StorageAccountInner&gt; object */
public Observable<ServiceResponse<Page<StorageAccountInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<StorageAccountInner>>, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(ServiceResponse<Page<StorageAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<StorageAccountInner> object wrapped in ServiceResponse if successful.
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;StorageAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<StorageAccountInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<StorageAccountInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<StorageAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<StorageAccountInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<StorageAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<StorageAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
Returns:the PagedList object if successful.
/** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @return the PagedList<StorageAccountInner> object if successful. */
public PagedList<StorageAccountInner> listByResourceGroup(String resourceGroupName) { PageImpl<StorageAccountInner> page = new PageImpl<>(); page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); page.setNextPageLink(null); return new PagedList<StorageAccountInner>(page) { @Override public Page<StorageAccountInner> nextPage(String nextPageLink) { return null; } }; }
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Returns:the ServiceFuture object
/** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceFuture} object */
public ServiceFuture<List<StorageAccountInner>> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback<List<StorageAccountInner>> serviceCallback) { return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); }
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
Returns:the observable to the List<StorageAccountInner> object
/** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @return the observable to the List&lt;StorageAccountInner&gt; object */
public Observable<Page<StorageAccountInner>> listByResourceGroupAsync(String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<StorageAccountInner>>, Page<StorageAccountInner>>() { @Override public Page<StorageAccountInner> call(ServiceResponse<List<StorageAccountInner>> response) { PageImpl<StorageAccountInner> page = new PageImpl<>(); page.setItems(response.body()); return page; } }); }
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
Returns:the observable to the List<StorageAccountInner> object
/** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @return the observable to the List&lt;StorageAccountInner&gt; object */
public Observable<ServiceResponse<List<StorageAccountInner>>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<List<StorageAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<StorageAccountInner>> result = listByResourceGroupDelegate(response); List<StorageAccountInner> items = null; if (result.body() != null) { items = result.body().items(); } ServiceResponse<List<StorageAccountInner>> clientResponse = new ServiceResponse<List<StorageAccountInner>>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<StorageAccountInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<StorageAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<StorageAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the StorageAccountListKeysResultInner object if successful.
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 StorageAccountListKeysResultInner object if successful. */
public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<StorageAccountListKeysResultInner> serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysResultInner>() { @Override public StorageAccountListKeysResultInner call(ServiceResponse<StorageAccountListKeysResultInner> response) { return response.body(); } }); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<ServiceResponse<StorageAccountListKeysResultInner>> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } final ListKeyExpand expand = null; return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountListKeysResultInner>>>() { @Override public Observable<ServiceResponse<StorageAccountListKeysResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountListKeysResultInner> clientResponse = listKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb'
Throws:
Returns:the StorageAccountListKeysResultInner object if successful.
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' * @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 StorageAccountListKeysResultInner object if successful. */
public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName, ListKeyExpand expand) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).toBlocking().single().body(); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' * @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<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand, final ServiceCallback<StorageAccountListKeysResultInner> serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand), serviceCallback); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb'
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<StorageAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysResultInner>() { @Override public StorageAccountListKeysResultInner call(ServiceResponse<StorageAccountListKeysResultInner> response) { return response.body(); } }); }
Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • expand – Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb'
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<ServiceResponse<StorageAccountListKeysResultInner>> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountListKeysResultInner>>>() { @Override public Observable<ServiceResponse<StorageAccountListKeysResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountListKeysResultInner> clientResponse = listKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<StorageAccountListKeysResultInner> listKeysDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<StorageAccountListKeysResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<StorageAccountListKeysResultInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Regenerates one of the access keys or Kerberos keys for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • keyName – The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.
Throws:
Returns:the StorageAccountListKeysResultInner object if successful.
/** * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @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 StorageAccountListKeysResultInner object if successful. */
public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); }
Regenerates one of the access keys or Kerberos keys for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • keyName – The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @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<StorageAccountListKeysResultInner> regenerateKeyAsync(String resourceGroupName, String accountName, String keyName, final ServiceCallback<StorageAccountListKeysResultInner> serviceCallback) { return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); }
Regenerates one of the access keys or Kerberos keys for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • keyName – The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<StorageAccountListKeysResultInner> regenerateKeyAsync(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1<ServiceResponse<StorageAccountListKeysResultInner>, StorageAccountListKeysResultInner>() { @Override public StorageAccountListKeysResultInner call(ServiceResponse<StorageAccountListKeysResultInner> response) { return response.body(); } }); }
Regenerates one of the access keys or Kerberos keys for the specified storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • keyName – The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.
Throws:
Returns:the observable to the StorageAccountListKeysResultInner object
/** * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */
public Observable<ServiceResponse<StorageAccountListKeysResultInner>> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, String keyName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (keyName == null) { throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); } StorageAccountRegenerateKeyParameters regenerateKey = new StorageAccountRegenerateKeyParameters(); regenerateKey.withKeyName(keyName); return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), regenerateKey, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<StorageAccountListKeysResultInner>>>() { @Override public Observable<ServiceResponse<StorageAccountListKeysResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<StorageAccountListKeysResultInner> clientResponse = regenerateKeyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<StorageAccountListKeysResultInner> regenerateKeyDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<StorageAccountListKeysResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<StorageAccountListKeysResultInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
List SAS credentials of a storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list SAS credentials for the storage account.
Throws:
Returns:the ListAccountSasResponseInner object if successful.
/** * List SAS credentials of a storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list SAS credentials for the storage account. * @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 ListAccountSasResponseInner object if successful. */
public ListAccountSasResponseInner listAccountSAS(String resourceGroupName, String accountName, AccountSasParameters parameters) { return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
List SAS credentials of a storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list SAS credentials for the storage account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List SAS credentials of a storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list SAS credentials for the storage account. * @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<ListAccountSasResponseInner> listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters, final ServiceCallback<ListAccountSasResponseInner> serviceCallback) { return ServiceFuture.fromResponse(listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
List SAS credentials of a storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list SAS credentials for the storage account.
Throws:
Returns:the observable to the ListAccountSasResponseInner object
/** * List SAS credentials of a storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list SAS credentials for the storage account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListAccountSasResponseInner object */
public Observable<ListAccountSasResponseInner> listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<ListAccountSasResponseInner>, ListAccountSasResponseInner>() { @Override public ListAccountSasResponseInner call(ServiceResponse<ListAccountSasResponseInner> response) { return response.body(); } }); }
List SAS credentials of a storage account.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list SAS credentials for the storage account.
Throws:
Returns:the observable to the ListAccountSasResponseInner object
/** * List SAS credentials of a storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list SAS credentials for the storage account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListAccountSasResponseInner object */
public Observable<ServiceResponse<ListAccountSasResponseInner>> listAccountSASWithServiceResponseAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.listAccountSAS(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListAccountSasResponseInner>>>() { @Override public Observable<ServiceResponse<ListAccountSasResponseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ListAccountSasResponseInner> clientResponse = listAccountSASDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ListAccountSasResponseInner> listAccountSASDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ListAccountSasResponseInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ListAccountSasResponseInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
List service SAS credentials of a specific resource.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list service SAS credentials.
Throws:
Returns:the ListServiceSasResponseInner object if successful.
/** * List service SAS credentials of a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list service SAS credentials. * @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 ListServiceSasResponseInner object if successful. */
public ListServiceSasResponseInner listServiceSAS(String resourceGroupName, String accountName, ServiceSasParameters parameters) { return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
List service SAS credentials of a specific resource.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list service SAS credentials.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List service SAS credentials of a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list service SAS credentials. * @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<ListServiceSasResponseInner> listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters, final ServiceCallback<ListServiceSasResponseInner> serviceCallback) { return ServiceFuture.fromResponse(listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
List service SAS credentials of a specific resource.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list service SAS credentials.
Throws:
Returns:the observable to the ListServiceSasResponseInner object
/** * List service SAS credentials of a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list service SAS credentials. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListServiceSasResponseInner object */
public Observable<ListServiceSasResponseInner> listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<ListServiceSasResponseInner>, ListServiceSasResponseInner>() { @Override public ListServiceSasResponseInner call(ServiceResponse<ListServiceSasResponseInner> response) { return response.body(); } }); }
List service SAS credentials of a specific resource.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters – The parameters to provide to list service SAS credentials.
Throws:
Returns:the observable to the ListServiceSasResponseInner object
/** * List service SAS credentials of a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide to list service SAS credentials. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListServiceSasResponseInner object */
public Observable<ServiceResponse<ListServiceSasResponseInner>> listServiceSASWithServiceResponseAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.listServiceSAS(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListServiceSasResponseInner>>>() { @Override public Observable<ServiceResponse<ListServiceSasResponseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ListServiceSasResponseInner> clientResponse = listServiceSASDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ListServiceSasResponseInner> listServiceSASDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ListServiceSasResponseInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ListServiceSasResponseInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 failover(String resourceGroupName, String accountName) { failoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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> failoverAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(failoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable for the request
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> failoverAsync(String resourceGroupName, String accountName) { return failoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the observable for the request
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> failoverWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.failover(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<Void>() { }.getType()); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 beginFailover(String resourceGroupName, String accountName) { beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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> beginFailoverAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginFailoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginFailoverAsync(String resourceGroupName, String accountName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginFailoverWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.beginFailover(resourceGroupName, accountName, this.client.subscriptionId(), this.client.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 = beginFailoverDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginFailoverDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the BlobRestoreStatusInner object if successful.
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @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 BlobRestoreStatusInner object if successful. */
public BlobRestoreStatusInner restoreBlobRanges(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { return restoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges).toBlocking().last().body(); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @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<BlobRestoreStatusInner> restoreBlobRangesAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges, final ServiceCallback<BlobRestoreStatusInner> serviceCallback) { return ServiceFuture.fromResponse(restoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges), serviceCallback); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the observable for the request
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<BlobRestoreStatusInner> restoreBlobRangesAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { return restoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges).map(new Func1<ServiceResponse<BlobRestoreStatusInner>, BlobRestoreStatusInner>() { @Override public BlobRestoreStatusInner call(ServiceResponse<BlobRestoreStatusInner> response) { return response.body(); } }); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the observable for the request
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<BlobRestoreStatusInner>> restoreBlobRangesWithServiceResponseAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (timeToRestore == null) { throw new IllegalArgumentException("Parameter timeToRestore is required and cannot be null."); } if (blobRanges == null) { throw new IllegalArgumentException("Parameter blobRanges is required and cannot be null."); } Validator.validate(blobRanges); BlobRestoreParameters parameters = new BlobRestoreParameters(); parameters.withTimeToRestore(timeToRestore); parameters.withBlobRanges(blobRanges); Observable<Response<ResponseBody>> observable = service.restoreBlobRanges(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<BlobRestoreStatusInner>() { }.getType()); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the BlobRestoreStatusInner object if successful.
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @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 BlobRestoreStatusInner object if successful. */
public BlobRestoreStatusInner beginRestoreBlobRanges(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { return beginRestoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges).toBlocking().single().body(); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @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<BlobRestoreStatusInner> beginRestoreBlobRangesAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges, final ServiceCallback<BlobRestoreStatusInner> serviceCallback) { return ServiceFuture.fromResponse(beginRestoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges), serviceCallback); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the observable to the BlobRestoreStatusInner object
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BlobRestoreStatusInner object */
public Observable<BlobRestoreStatusInner> beginRestoreBlobRangesAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { return beginRestoreBlobRangesWithServiceResponseAsync(resourceGroupName, accountName, timeToRestore, blobRanges).map(new Func1<ServiceResponse<BlobRestoreStatusInner>, BlobRestoreStatusInner>() { @Override public BlobRestoreStatusInner call(ServiceResponse<BlobRestoreStatusInner> response) { return response.body(); } }); }
Restore blobs in the specified blob ranges.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • timeToRestore – Restore blob to the specified time.
  • blobRanges – Blob ranges to restore.
Throws:
Returns:the observable to the BlobRestoreStatusInner object
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param timeToRestore Restore blob to the specified time. * @param blobRanges Blob ranges to restore. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BlobRestoreStatusInner object */
public Observable<ServiceResponse<BlobRestoreStatusInner>> beginRestoreBlobRangesWithServiceResponseAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List<BlobRestoreRange> blobRanges) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (timeToRestore == null) { throw new IllegalArgumentException("Parameter timeToRestore is required and cannot be null."); } if (blobRanges == null) { throw new IllegalArgumentException("Parameter blobRanges is required and cannot be null."); } Validator.validate(blobRanges); BlobRestoreParameters parameters = new BlobRestoreParameters(); parameters.withTimeToRestore(timeToRestore); parameters.withBlobRanges(blobRanges); return service.beginRestoreBlobRanges(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BlobRestoreStatusInner>>>() { @Override public Observable<ServiceResponse<BlobRestoreStatusInner>> call(Response<ResponseBody> response) { try { ServiceResponse<BlobRestoreStatusInner> clientResponse = beginRestoreBlobRangesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<BlobRestoreStatusInner> beginRestoreBlobRangesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BlobRestoreStatusInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BlobRestoreStatusInner>() { }.getType()) .register(202, new TypeToken<BlobRestoreStatusInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Revoke user delegation keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
/** * Revoke user delegation keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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 revokeUserDelegationKeys(String resourceGroupName, String accountName) { revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Revoke user delegation keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Revoke user delegation keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @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> revokeUserDelegationKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Revoke user delegation keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Revoke user delegation keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> revokeUserDelegationKeysAsync(String resourceGroupName, String accountName) { return revokeUserDelegationKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Revoke user delegation keys.
Params:
  • resourceGroupName – The name of the resource group within the user's subscription. The name is case insensitive.
  • accountName – The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
Throws:
Returns:the ServiceResponse object if successful.
/** * Revoke user delegation keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> revokeUserDelegationKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { 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 (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.revokeUserDelegationKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.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 = revokeUserDelegationKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> revokeUserDelegationKeysDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<StorageAccountInner> object if successful.
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 PagedList&lt;StorageAccountInner&gt; object if successful. */
public PagedList<StorageAccountInner> listNext(final String nextPageLink) { ServiceResponse<Page<StorageAccountInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<StorageAccountInner>(response.body()) { @Override public Page<StorageAccountInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @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<StorageAccountInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<StorageAccountInner>> serviceFuture, final ListOperationCallback<StorageAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<StorageAccountInner> object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;StorageAccountInner&gt; object */
public Observable<Page<StorageAccountInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<StorageAccountInner>>, Page<StorageAccountInner>>() { @Override public Page<StorageAccountInner> call(ServiceResponse<Page<StorageAccountInner>> response) { return response.body(); } }); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<StorageAccountInner> object
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;StorageAccountInner&gt; object */
public Observable<ServiceResponse<Page<StorageAccountInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<StorageAccountInner>>, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(ServiceResponse<Page<StorageAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<StorageAccountInner> object wrapped in ServiceResponse if successful.
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * ServiceResponse<PageImpl1<StorageAccountInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;StorageAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<StorageAccountInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<StorageAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<StorageAccountInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<StorageAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<StorageAccountInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<StorageAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<StorageAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }