/** * Deploys resources to a resource group. * You can provide the template and parameters directly in the request or link to JSON files. * * @param resourceGroupName The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist. * @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<DeploymentExtendedInner> beginCreateOrUpdateAsync(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).map(new Func1<ServiceResponse<DeploymentExtendedInner>, DeploymentExtendedInner>() { @Override public DeploymentExtendedInner call(ServiceResponse<DeploymentExtendedInner> 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. Deleting a template deployment does not affect the state of the resource group. 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 resourceGroupName The name of the resource group with the deployment to delete. The name is case insensitive. * @param deploymentName The name of the deployment to delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ public Observable<Void> beginDeleteAsync(String resourceGroupName, String deploymentName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> 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 resource group partially deployed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ public Observable<Void> cancelAsync(String resourceGroupName, String deploymentName) { return cancelWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
/** * Checks whether the deployment exists. * * @param resourceGroupName The name of the resource group with the deployment to check. The name is case insensitive. * @param deploymentName The name of the deployment to check. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Boolean object */ public Observable<Boolean> checkExistenceAsync(String resourceGroupName, String deploymentName) { return checkExistenceWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Boolean>, Boolean>() { @Override public Boolean call(ServiceResponse<Boolean> response) { return response.body(); } }); }
/** * Deploys resources to a resource group. * You can provide the template and parameters directly in the request or link to JSON files. * * @param resourceGroupName The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist. * @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<DeploymentExtendedInner> createOrUpdateAsync(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).map(new Func1<ServiceResponse<DeploymentExtendedInner>, DeploymentExtendedInner>() { @Override public DeploymentExtendedInner call(ServiceResponse<DeploymentExtendedInner> response) { return response.body(); } }); }
@Override public DeploymentImpl beginCreate() { if (this.creatableResourceGroup != null) { this.creatableResourceGroup.create(); } setInner(this.manager().inner().deployments().beginCreateOrUpdate(resourceGroupName(), name(), createRequestFromInner())); return this; }
@Override public Observable<Deployment> createResourceAsync() { return this.manager().inner().deployments().createOrUpdateAsync(resourceGroupName(), name(), createRequestFromInner()) .map(innerToFluentMap(this)); }
@Override public boolean checkExistence(String resourceGroupName, String deploymentName) { return this.manager().inner().deployments().checkExistence(resourceGroupName, deploymentName); }
protected void initialize() { this.apiVersion = "2017-05-10"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.deployments = new DeploymentsInner(restClient().retrofit(), this); this.providers = new ProvidersInner(restClient().retrofit(), this); this.resources = new ResourcesInner(restClient().retrofit(), this); this.resourceGroups = new ResourceGroupsInner(restClient().retrofit(), this); this.tags = new TagsInner(restClient().retrofit(), this); this.deploymentOperations = new DeploymentOperationsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); }
@Override public Completable cancelAsync() { return this.manager().inner().deployments().cancelAsync(resourceGroupName, name()).toCompletable(); }
/** * Checks whether the deployment exists. * * @param resourceGroupName The name of the resource group with the deployment to check. The name is case insensitive. * @param deploymentName The name of the deployment to check. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Boolean object */ public Observable<Boolean> checkExistenceAsync(String resourceGroupName, String deploymentName) { return checkExistenceWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Boolean>, Boolean>() { @Override public Boolean call(ServiceResponse<Boolean> response) { return response.body(); } }); }
/** * Deploys resources to a resource group. * You can provide the template and parameters directly in the request or link to JSON files. * * @param resourceGroupName The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist. * @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<DeploymentExtendedInner> createOrUpdateAsync(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).map(new Func1<ServiceResponse<DeploymentExtendedInner>, DeploymentExtendedInner>() { @Override public DeploymentExtendedInner call(ServiceResponse<DeploymentExtendedInner> response) { return response.body(); } }); }
@Override public DeploymentImpl beginCreate() { if (this.creatableResourceGroup != null) { this.creatableResourceGroup.create(); } setInner(this.manager().inner().deployments().beginCreateOrUpdate(resourceGroupName(), name(), createRequestFromInner())); return this; }
@Override public Observable<Deployment> createResourceAsync() { return this.manager().inner().deployments().createOrUpdateAsync(resourceGroupName(), name(), createRequestFromInner()) .map(innerToFluentMap(this)); }
@Override public boolean checkExistence(String resourceGroupName, String deploymentName) { return this.manager().inner().deployments().checkExistence(resourceGroupName, deploymentName); }
protected void initialize() { this.apiVersion = "2017-05-10"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.deployments = new DeploymentsInner(restClient().retrofit(), this); this.providers = new ProvidersInner(restClient().retrofit(), this); this.resources = new ResourcesInner(restClient().retrofit(), this); this.resourceGroups = new ResourceGroupsInner(restClient().retrofit(), this); this.tags = new TagsInner(restClient().retrofit(), this); this.deploymentOperations = new DeploymentOperationsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); }
@Override public Completable cancelAsync() { return this.manager().inner().deployments().cancelAsync(resourceGroupName, name()).toCompletable(); }
/** * Checks whether the deployment exists. * * @param resourceGroupName The name of the resource group with the deployment to check. The name is case insensitive. * @param deploymentName The name of the deployment to check. * @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<Boolean> checkExistenceAsync(String resourceGroupName, String deploymentName, final ServiceCallback<Boolean> serviceCallback) { return ServiceFuture.fromResponse(checkExistenceWithServiceResponseAsync(resourceGroupName, 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. Deleting a template deployment does not affect the state of the resource group. 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 resourceGroupName The name of the resource group with the deployment to delete. The name is case insensitive. * @param deploymentName The name of the deployment to delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ public Observable<Void> beginDeleteAsync(String resourceGroupName, String deploymentName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> 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 resource group partially deployed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ public Observable<Void> cancelAsync(String resourceGroupName, String deploymentName) { return cancelWithServiceResponseAsync(resourceGroupName, deploymentName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }