com.microsoft.azure.management.resources.implementation.DeploymentsInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-mgmt-resources Show documentation
Show all versions of azure-mgmt-resources Show documentation
This package contains Microsoft Azure Resource Management SDK.
/**
* 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.resources.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.resources.DeploymentsWhatIfAtManagementGroupScopeHeaders;
import com.microsoft.azure.management.resources.DeploymentsWhatIfAtSubscriptionScopeHeaders;
import com.microsoft.azure.management.resources.DeploymentsWhatIfAtTenantScopeHeaders;
import com.microsoft.azure.management.resources.DeploymentsWhatIfHeaders;
import com.microsoft.azure.management.resources.DeploymentWhatIf;
import com.microsoft.azure.management.resources.ScopedDeployment;
import com.microsoft.azure.management.resources.ScopedDeploymentWhatIf;
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.ServiceResponseWithHeaders;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.HEAD;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.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 Deployments.
*/
public class DeploymentsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing {
/** The Retrofit service to perform REST calls. */
private DeploymentsService service;
/** The service client containing this operation class. */
private ResourceManagementClientImpl client;
/**
* Initializes an instance of DeploymentsInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public DeploymentsInner(Retrofit retrofit, ResourceManagementClientImpl client) {
this.service = retrofit.create(DeploymentsService.class);
this.client = client;
}
/**
* The interface defining all the services for Deployments to be
* used by Retrofit to perform actually REST calls.
*/
interface DeploymentsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Deployments deleteAtScope" })
@HTTP(path = "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> deleteAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments beginDeleteAtScope" })
@HTTP(path = "{scope}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> beginDeleteAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments checkExistenceAtScope" })
@HEAD("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> checkExistenceAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments createOrUpdateAtScope" })
@PUT("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> createOrUpdateAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @Body DeploymentInner 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.resources.Deployments beginCreateOrUpdateAtScope" })
@PUT("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> beginCreateOrUpdateAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @Body DeploymentInner 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.resources.Deployments getAtScope" })
@GET("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> getAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments cancelAtScope" })
@POST("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel")
Observable> cancelAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments validateAtScope" })
@POST("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> validateAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @Body DeploymentInner 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.resources.Deployments beginValidateAtScope" })
@POST("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> beginValidateAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @Body DeploymentInner 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.resources.Deployments exportTemplateAtScope" })
@POST("{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate")
Observable> exportTemplateAtScope(@Path(value = "scope", encoded = true) String scope, @Path("deploymentName") String deploymentName, @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.resources.Deployments listAtScope" })
@GET("{scope}/providers/Microsoft.Resources/deployments/")
Observable> listAtScope(@Path(value = "scope", encoded = true) String scope, @Query("$filter") String filter, @Query("$top") Integer top, @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.resources.Deployments deleteAtTenantScope" })
@HTTP(path = "providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> deleteAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments beginDeleteAtTenantScope" })
@HTTP(path = "providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> beginDeleteAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments checkExistenceAtTenantScope" })
@HEAD("providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> checkExistenceAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments createOrUpdateAtTenantScope" })
@PUT("providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> createOrUpdateAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments beginCreateOrUpdateAtTenantScope" })
@PUT("providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> beginCreateOrUpdateAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments getAtTenantScope" })
@GET("providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> getAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments cancelAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/cancel")
Observable> cancelAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments validateAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> validateAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments beginValidateAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> beginValidateAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments whatIfAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> whatIfAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeploymentWhatIf 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.resources.Deployments beginWhatIfAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> beginWhatIfAtTenantScope(@Path("deploymentName") String deploymentName, @Body ScopedDeploymentWhatIf 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.resources.Deployments exportTemplateAtTenantScope" })
@POST("providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate")
Observable> exportTemplateAtTenantScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments listAtTenantScope" })
@GET("providers/Microsoft.Resources/deployments/")
Observable> listAtTenantScope(@Query("$filter") String filter, @Query("$top") Integer top, @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.resources.Deployments deleteAtManagementGroupScope" })
@HTTP(path = "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> deleteAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments beginDeleteAtManagementGroupScope" })
@HTTP(path = "providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> beginDeleteAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments checkExistenceAtManagementGroupScope" })
@HEAD("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> checkExistenceAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments createOrUpdateAtManagementGroupScope" })
@PUT("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> createOrUpdateAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments beginCreateOrUpdateAtManagementGroupScope" })
@PUT("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> beginCreateOrUpdateAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments getAtManagementGroupScope" })
@GET("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> getAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments cancelAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel")
Observable> cancelAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments validateAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> validateAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments beginValidateAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> beginValidateAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeployment 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.resources.Deployments whatIfAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> whatIfAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeploymentWhatIf 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.resources.Deployments beginWhatIfAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> beginWhatIfAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @Body ScopedDeploymentWhatIf 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.resources.Deployments exportTemplateAtManagementGroupScope" })
@POST("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate")
Observable> exportTemplateAtManagementGroupScope(@Path("groupId") String groupId, @Path("deploymentName") String deploymentName, @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.resources.Deployments listAtManagementGroupScope" })
@GET("providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/")
Observable> listAtManagementGroupScope(@Path("groupId") String groupId, @Query("$filter") String filter, @Query("$top") Integer top, @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.resources.Deployments deleteAtSubscriptionScope" })
@HTTP(path = "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> deleteAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments beginDeleteAtSubscriptionScope" })
@HTTP(path = "subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> beginDeleteAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments checkExistenceAtSubscriptionScope" })
@HEAD("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> checkExistenceAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments createOrUpdateAtSubscriptionScope" })
@PUT("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> createOrUpdateAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments beginCreateOrUpdateAtSubscriptionScope" })
@PUT("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> beginCreateOrUpdateAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments getAtSubscriptionScope" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> getAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments cancelAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel")
Observable> cancelAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments validateAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> validateAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments beginValidateAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> beginValidateAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments whatIfAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> whatIfAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentWhatIf 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.resources.Deployments beginWhatIfAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> beginWhatIfAtSubscriptionScope(@Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentWhatIf 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.resources.Deployments exportTemplateAtSubscriptionScope" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate")
Observable> exportTemplateAtSubscriptionScope(@Path("deploymentName") String deploymentName, @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.resources.Deployments list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/")
Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @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.resources.Deployments delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", method = "DELETE", hasBody = true)
Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments checkExistence" })
@HEAD("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> checkExistence(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}")
Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments cancel" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel")
Observable> cancel(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments validate" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> validate(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments beginValidate" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate")
Observable> beginValidate(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner 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.resources.Deployments whatIf" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> whatIf(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentWhatIf 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.resources.Deployments beginWhatIf" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/whatIf")
Observable> beginWhatIf(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @Path("subscriptionId") String subscriptionId, @Body DeploymentWhatIf 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.resources.Deployments exportTemplate" })
@POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate")
Observable> exportTemplate(@Path("resourceGroupName") String resourceGroupName, @Path("deploymentName") String deploymentName, @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.resources.Deployments listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/")
Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @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.resources.Deployments calculateTemplateHash" })
@POST("providers/Microsoft.Resources/calculateTemplateHash")
Observable> calculateTemplateHash(@Query("api-version") String apiVersion, @Body Object template, @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.resources.Deployments listAtScopeNext" })
@GET
Observable> listAtScopeNext(@Url String nextUrl, @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.resources.Deployments listAtTenantScopeNext" })
@GET
Observable> listAtTenantScopeNext(@Url String nextUrl, @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.resources.Deployments listAtManagementGroupScopeNext" })
@GET
Observable> listAtManagementGroupScopeNext(@Url String nextUrl, @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.resources.Deployments listNext" })
@GET
Observable> listNext(@Url String nextUrl, @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.resources.Deployments listByResourceGroupNext" })
@GET
Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 deleteAtScope(String scope, String deploymentName) {
deleteAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().last().body();
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 deleteAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(deleteAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable deleteAtScopeAsync(String scope, String deploymentName) {
return deleteAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, Void>() {
@Override
public Void call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable> deleteAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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> observable = service.deleteAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 beginDeleteAtScope(String scope, String deploymentName) {
beginDeleteAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().single().body();
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 beginDeleteAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable beginDeleteAtScopeAsync(String scope, String deploymentName) {
return beginDeleteAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, Void>() {
@Override
public Void call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable> beginDeleteAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.beginDeleteAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = beginDeleteAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse beginDeleteAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(202, new TypeToken() { }.getType())
.register(204, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Checks whether the deployment exists.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 boolean object if successful.
*/
public boolean checkExistenceAtScope(String scope, String deploymentName) {
return checkExistenceAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().single().body();
}
/**
* Checks whether the deployment exists.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 checkExistenceAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(checkExistenceAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Checks whether the deployment exists.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Boolean object
*/
public Observable checkExistenceAtScopeAsync(String scope, String deploymentName) {
return checkExistenceAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, Boolean>() {
@Override
public Boolean call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Checks whether the deployment exists.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Boolean object
*/
public Observable> checkExistenceAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.checkExistenceAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = checkExistenceAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse checkExistenceAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(204, new TypeToken() { }.getType())
.register(404, new TypeToken() { }.getType())
.registerError(CloudException.class)
.buildEmpty(response);
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the 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 DeploymentExtendedInner object if successful.
*/
public DeploymentExtendedInner createOrUpdateAtScope(String scope, String deploymentName, DeploymentInner parameters) {
return createOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).toBlocking().last().body();
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @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 createOrUpdateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters), serviceCallback);
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable createOrUpdateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters) {
return createOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).map(new Func1, DeploymentExtendedInner>() {
@Override
public DeploymentExtendedInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable> createOrUpdateAtScopeWithServiceResponseAsync(String scope, String deploymentName, DeploymentInner parameters) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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> observable = service.createOrUpdateAtScope(scope, deploymentName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the 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 DeploymentExtendedInner object if successful.
*/
public DeploymentExtendedInner beginCreateOrUpdateAtScope(String scope, String deploymentName, DeploymentInner parameters) {
return beginCreateOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).toBlocking().single().body();
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @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 beginCreateOrUpdateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters), serviceCallback);
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExtendedInner object
*/
public Observable beginCreateOrUpdateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters) {
return beginCreateOrUpdateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).map(new Func1, DeploymentExtendedInner>() {
@Override
public DeploymentExtendedInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Deploys resources at a given scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExtendedInner object
*/
public Observable> beginCreateOrUpdateAtScopeWithServiceResponseAsync(String scope, String deploymentName, DeploymentInner parameters) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.beginCreateOrUpdateAtScope(scope, deploymentName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = beginCreateOrUpdateAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse beginCreateOrUpdateAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(201, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Gets a deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 DeploymentExtendedInner object if successful.
*/
public DeploymentExtendedInner getAtScope(String scope, String deploymentName) {
return getAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().single().body();
}
/**
* Gets a deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 getAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(getAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Gets a deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExtendedInner object
*/
public Observable getAtScopeAsync(String scope, String deploymentName) {
return getAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, DeploymentExtendedInner>() {
@Override
public DeploymentExtendedInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Gets a deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExtendedInner object
*/
public Observable> getAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.getAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = getAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse getAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Cancels a currently running template deployment.
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 cancelAtScope(String scope, String deploymentName) {
cancelAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().single().body();
}
/**
* Cancels a currently running template deployment.
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 cancelAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(cancelAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Cancels a currently running template deployment.
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable cancelAtScopeAsync(String scope, String deploymentName) {
return cancelAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, Void>() {
@Override
public Void call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Cancels a currently running template deployment.
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable> cancelAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.cancelAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = cancelAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse cancelAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(204, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @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 DeploymentValidateResultInner object if successful.
*/
public DeploymentValidateResultInner validateAtScope(String scope, String deploymentName, DeploymentInner parameters) {
return validateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).toBlocking().last().body();
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @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 validateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(validateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters), serviceCallback);
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable validateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters) {
return validateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).map(new Func1, DeploymentValidateResultInner>() {
@Override
public DeploymentValidateResultInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable> validateAtScopeWithServiceResponseAsync(String scope, String deploymentName, DeploymentInner parameters) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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> observable = service.validateAtScope(scope, deploymentName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @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 DeploymentValidateResultInner object if successful.
*/
public DeploymentValidateResultInner beginValidateAtScope(String scope, String deploymentName, DeploymentInner parameters) {
return beginValidateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).toBlocking().single().body();
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @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 beginValidateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(beginValidateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters), serviceCallback);
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentValidateResultInner object
*/
public Observable beginValidateAtScopeAsync(String scope, String deploymentName, DeploymentInner parameters) {
return beginValidateAtScopeWithServiceResponseAsync(scope, deploymentName, parameters).map(new Func1, DeploymentValidateResultInner>() {
@Override
public DeploymentValidateResultInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager..
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentValidateResultInner object
*/
public Observable> beginValidateAtScopeWithServiceResponseAsync(String scope, String deploymentName, DeploymentInner parameters) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.beginValidateAtScope(scope, deploymentName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = beginValidateAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse beginValidateAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(202, new TypeToken() { }.getType())
.register(400, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Exports the template used for specified deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 DeploymentExportResultInner object if successful.
*/
public DeploymentExportResultInner exportTemplateAtScope(String scope, String deploymentName) {
return exportTemplateAtScopeWithServiceResponseAsync(scope, deploymentName).toBlocking().single().body();
}
/**
* Exports the template used for specified deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @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 exportTemplateAtScopeAsync(String scope, String deploymentName, final ServiceCallback serviceCallback) {
return ServiceFuture.fromResponse(exportTemplateAtScopeWithServiceResponseAsync(scope, deploymentName), serviceCallback);
}
/**
* Exports the template used for specified deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExportResultInner object
*/
public Observable exportTemplateAtScopeAsync(String scope, String deploymentName) {
return exportTemplateAtScopeWithServiceResponseAsync(scope, deploymentName).map(new Func1, DeploymentExportResultInner>() {
@Override
public DeploymentExportResultInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
* Exports the template used for specified deployment.
*
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeploymentExportResultInner object
*/
public Observable> exportTemplateAtScopeWithServiceResponseAsync(String scope, String deploymentName) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
if (deploymentName == null) {
throw new IllegalArgumentException("Parameter deploymentName 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.exportTemplateAtScope(scope, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
ServiceResponse clientResponse = exportTemplateAtScopeDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse exportTemplateAtScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @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<DeploymentExtendedInner> object if successful.
*/
public PagedList listAtScope(final String scope) {
ServiceResponse> response = listAtScopeSinglePageAsync(scope).toBlocking().single();
return new PagedList(response.body()) {
@Override
public Page nextPage(String nextPageLink) {
return listAtScopeNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @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> listAtScopeAsync(final String scope, final ListOperationCallback serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listAtScopeSinglePageAsync(scope),
new Func1>>>() {
@Override
public Observable>> call(String nextPageLink) {
return listAtScopeNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<DeploymentExtendedInner> object
*/
public Observable> listAtScopeAsync(final String scope) {
return listAtScopeWithServiceResponseAsync(scope)
.map(new Func1>, Page>() {
@Override
public Page call(ServiceResponse> response) {
return response.body();
}
});
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<DeploymentExtendedInner> object
*/
public Observable>> listAtScopeWithServiceResponseAsync(final String scope) {
return listAtScopeSinglePageAsync(scope)
.concatMap(new Func1>, Observable>>>() {
@Override
public Observable>> call(ServiceResponse> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listAtScopeNextWithServiceResponseAsync(nextPageLink));
}
});
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<DeploymentExtendedInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable>> listAtScopeSinglePageAsync(final String scope) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope 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 String filter = null;
final Integer top = null;
return service.listAtScope(scope, filter, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
try {
ServiceResponse> result = listAtScopeDelegate(response);
return Observable.just(new ServiceResponse>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @param filter The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'.
* @param top The number of results to get. If null is passed, returns all deployments.
* @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<DeploymentExtendedInner> object if successful.
*/
public PagedList listAtScope(final String scope, final String filter, final Integer top) {
ServiceResponse> response = listAtScopeSinglePageAsync(scope, filter, top).toBlocking().single();
return new PagedList(response.body()) {
@Override
public Page nextPage(String nextPageLink) {
return listAtScopeNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @param filter The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'.
* @param top The number of results to get. If null is passed, returns all deployments.
* @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> listAtScopeAsync(final String scope, final String filter, final Integer top, final ListOperationCallback serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listAtScopeSinglePageAsync(scope, filter, top),
new Func1>>>() {
@Override
public Observable>> call(String nextPageLink) {
return listAtScopeNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @param filter The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'.
* @param top The number of results to get. If null is passed, returns all deployments.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<DeploymentExtendedInner> object
*/
public Observable> listAtScopeAsync(final String scope, final String filter, final Integer top) {
return listAtScopeWithServiceResponseAsync(scope, filter, top)
.map(new Func1>, Page>() {
@Override
public Page call(ServiceResponse> response) {
return response.body();
}
});
}
/**
* Get all the deployments at the given scope.
*
* @param scope The resource scope.
* @param filter The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'.
* @param top The number of results to get. If null is passed, returns all deployments.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<DeploymentExtendedInner> object
*/
public Observable>> listAtScopeWithServiceResponseAsync(final String scope, final String filter, final Integer top) {
return listAtScopeSinglePageAsync(scope, filter, top)
.concatMap(new Func1>, Observable>>>() {
@Override
public Observable>> call(ServiceResponse> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listAtScopeNextWithServiceResponseAsync(nextPageLink));
}
});
}
/**
* Get all the deployments at the given scope.
*
ServiceResponse> * @param scope The resource scope.
ServiceResponse