Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. */
package com.microsoft.azure.management.resources; import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangMethodDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.azure.management.resources.fluentcore.arm.Context; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.HasId; import com.microsoft.azure.management.resources.fluentcore.arm.models.HasManager; import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.HasInner; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; import com.microsoft.azure.management.resources.fluentcore.model.Updatable; import com.microsoft.azure.management.resources.implementation.DeploymentExtendedInner; import com.microsoft.azure.management.resources.implementation.ResourceManager; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import org.joda.time.DateTime; import rx.Completable; import rx.Observable; import java.io.IOException; import java.util.List;
An immutable client-side representation of an Azure deployment.
/** * An immutable client-side representation of an Azure deployment. */
@Fluent public interface Deployment extends Indexable, Refreshable<Deployment>, Updatable<Deployment.Update>, HasInner<DeploymentExtendedInner>, HasManager<ResourceManager>, HasName, HasId {
Returns:the name of this deployment's resource group
/** * @return the name of this deployment's resource group */
String resourceGroupName();
Returns:the state of the provisioning process of the resources being deployed
/** * @return the state of the provisioning process of the resources being deployed */
String provisioningState();
Returns:the correlation ID of the deployment
/** * @return the correlation ID of the deployment */
String correlationId();
Returns:the timestamp of the template deployment
/** * @return the timestamp of the template deployment */
DateTime timestamp();
Returns:key/value pairs that represent deployment output
/** * @return key/value pairs that represent deployment output */
Object outputs();
Returns:the list of resource providers needed for the deployment
/** * @return the list of resource providers needed for the deployment */
List<Provider> providers();
Returns:the list of deployment dependencies
/** * @return the list of deployment dependencies */
List<Dependency> dependencies();
Returns:the hash produced for the template
/** * @return the hash produced for the template */
String templateHash();
Returns:the URI referencing the template
/** * @return the URI referencing the template */
TemplateLink templateLink();
Returns:the deployment parameters
/** * @return the deployment parameters */
Object parameters();
Returns:the URI referencing the parameters
/** * @return the URI referencing the parameters */
ParametersLink parametersLink();
Returns:the deployment mode. Possible values include: 'Incremental', 'Complete'.
/** * @return the deployment mode. Possible values include: * 'Incremental', 'Complete'. */
DeploymentMode mode();
Get array of provisioned resources.
Returns:the outputResources value
/** * Get array of provisioned resources. * * @return the outputResources value */
List<ResourceReference> outputResources();
Returns:the operations related to this deployment
/** * @return the operations related to this deployment */
@LangMethodDefinition(AsType = LangMethodType.Property) DeploymentOperations deploymentOperations();
Cancel a currently running template deployment.
/** * Cancel a currently running template deployment. */
@Method void cancel();
Cancel a currently running template deployment asynchronously.
Returns:a representation of the deferred computation of this call
/** * Cancel a currently running template deployment asynchronously. * @return a representation of the deferred computation of this call */
@Method Completable cancelAsync();
Cancel a currently running template deployment asynchronously.
Params:
  • callback – the callback to call on success or failure
Returns:a handle to cancel the request
/** * Cancel a currently running template deployment asynchronously. * * @param callback the callback to call on success or failure * @return a handle to cancel the request */
@Method ServiceFuture<Void> cancelAsync(ServiceCallback<Void> callback);
Exports a deployment template.
Returns:the export result
/** * Exports a deployment template. * * @return the export result */
@Method DeploymentExportResult exportTemplate();
Exports a deployment template asynchronously.
Returns:a representation of the deferred computation of this call returning the export result
/** * Exports a deployment template asynchronously. * * @return a representation of the deferred computation of this call returning the export result */
@Method Observable<DeploymentExportResult> exportTemplateAsync();
Exports a deployment template asynchronously.
Params:
  • callback – the callback to call on success or failure with export result as parameter
Returns:a handle to cancel the request
/** * Exports a deployment template asynchronously. * * @param callback the callback to call on success or failure with export result as parameter * @return a handle to cancel the request */
@Method ServiceFuture<DeploymentExportResult> exportTemplateAsync(ServiceCallback<DeploymentExportResult> callback);
Prepares a What-if operation.
Returns:the What-if execution.
/** * Prepares a What-if operation. * * @return the What-if execution. */
@Method Execution prepareWhatIf();
Container interface for all the deployment definitions.
/** * Container interface for all the deployment definitions. */
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithTemplate, DefinitionStages.WithParameters, DefinitionStages.WithMode, DefinitionStages.WithCreate { }
Grouping of all the deployment definition stages.
/** * Grouping of all the deployment definition stages. */
interface DefinitionStages {
The first stage of deployment definition.
/** * The first stage of deployment definition. */
interface Blank extends DefinitionStages.WithGroup { }
A deployment definition allowing resource group to be specified.
/** * A deployment definition allowing resource group to be specified. */
interface WithGroup extends GroupableResource.DefinitionStages.WithExistingResourceGroup<WithTemplate> {
Creates a new resource group to put the deployment in.
Params:
  • name – the name of the new group
  • region – the region to create the resource group in
Returns:the next stage of the definition
/** * Creates a new resource group to put the deployment in. * @param name the name of the new group * @param region the region to create the resource group in * @return the next stage of the definition */
WithTemplate withNewResourceGroup(String name, Region region);
Creates a new resource group to put the resource in, based on the definition specified.
Params:
  • groupDefinition – a creatable definition for a new resource group
Returns:the next stage of the definition
/** * Creates a new resource group to put the resource in, based on the definition specified. * @param groupDefinition a creatable definition for a new resource group * @return the next stage of the definition */
WithTemplate withNewResourceGroup(Creatable<ResourceGroup> groupDefinition); }
A deployment definition allowing the template to be specified.
/** * A deployment definition allowing the template to be specified. */
interface WithTemplate {
Specifies the template as a Java object.
Params:
  • template – the Java object
Returns:the next stage of the definition
/** * Specifies the template as a Java object. * * @param template the Java object * @return the next stage of the definition */
WithParameters withTemplate(Object template);
Specifies the template as a JSON string.
Params:
  • templateJson – the JSON string
Throws:
  • IOException – exception thrown from serialization/deserialization
Returns:the next stage of the definition
/** * Specifies the template as a JSON string. * * @param templateJson the JSON string * @return the next stage of the definition * @throws IOException exception thrown from serialization/deserialization */
WithParameters withTemplate(String templateJson) throws IOException;
Specifies the template as a URL.
Params:
  • uri – the location of the remote template file
  • contentVersion – the version of the template file
Returns:the next stage of the definition
/** * Specifies the template as a URL. * * @param uri the location of the remote template file * @param contentVersion the version of the template file * @return the next stage of the definition */
WithParameters withTemplateLink(String uri, String contentVersion); }
A deployment definition allowing the parameters to be specified.
/** * A deployment definition allowing the parameters to be specified. */
interface WithParameters {
Specifies the parameters as a Java object.
Params:
  • parameters – the Java object
Returns:the next stage of the definition
/** * Specifies the parameters as a Java object. * * @param parameters the Java object * @return the next stage of the definition */
WithMode withParameters(Object parameters);
Specifies the parameters as a JSON string.
Params:
  • parametersJson – the JSON string
Throws:
  • IOException – exception thrown from serialization/deserialization
Returns:the next stage of the definition
/** * Specifies the parameters as a JSON string. * @param parametersJson the JSON string * @return the next stage of the definition * @throws IOException exception thrown from serialization/deserialization */
WithMode withParameters(String parametersJson) throws IOException;
Specifies the parameters as a URL.
Params:
  • uri – the location of the remote parameters file
  • contentVersion – the version of the parameters file
Returns:the next stage of the definition
/** * Specifies the parameters as a URL. * * @param uri the location of the remote parameters file * @param contentVersion the version of the parameters file * @return the next stage of the definition */
WithMode withParametersLink(String uri, String contentVersion); }
A deployment definition allowing the deployment mode to be specified.
/** * A deployment definition allowing the deployment mode to be specified. */
interface WithMode {
Specifies the deployment mode.
Params:
  • mode – the mode of the deployment
Returns:the next stage of the definition
/** * Specifies the deployment mode. * * @param mode the mode of the deployment * @return the next stage of the definition */
WithCreate withMode(DeploymentMode mode); }
A deployment definition with sufficient inputs to create a new deployment in the cloud, but exposing additional optional inputs to specify.
/** * A deployment definition with sufficient inputs to create a new * deployment in the cloud, but exposing additional optional inputs to specify. */
interface WithCreate extends Creatable<Deployment> {
Begin executing the create request.
Returns:the resource in creating
/** * Begin executing the create request. * * @return the resource in creating */
@Method Deployment beginCreate();
Puts the request into the queue and allow the HTTP client to begin execute it when system resources are available.
Returns:an observable of the request
/** * Puts the request into the queue and allow the HTTP client to begin execute * it when system resources are available. * * @return an observable of the request */
@Method Observable<Deployment> beginCreateAsync();
Begin executing the create request.
Params:
  • context – the context for the request
Returns:the resource in creating
/** * Begin executing the create request. * * @param context the context for the request * @return the resource in creating */
@Method Deployment beginCreate(Context context);
Puts the request into the queue and allow the HTTP client to begin execute it when system resources are available.
Params:
  • context – the context for the request
Returns:an observable of the request
/** * Puts the request into the queue and allow the HTTP client to begin execute * it when system resources are available. * * @param context the context for the request * @return an observable of the request */
@Method Observable<Deployment> beginCreateAsync(Context context);
Execute the create request.
Params:
  • context – the context for the request
Returns:the create resource
/** * Execute the create request. * * @param context the context for the request * @return the create resource */
@Method Deployment create(Context context);
Puts the request into the queue and allow the HTTP client to execute it when system resources are available.
Params:
  • context – the context for the request
Returns:an observable of the request
/** * Puts the request into the queue and allow the HTTP client to execute * it when system resources are available. * * @param context the context for the request * @return an observable of the request */
@Method Observable<Indexable> createAsync(Context context); } }
Grouping of all the deployment updates stages.
/** * Grouping of all the deployment updates stages. */
interface UpdateStages {
A deployment update allowing to change the deployment mode.
/** * A deployment update allowing to change the deployment mode. */
interface WithMode {
Specifies the deployment mode.
Params:
  • mode – the mode of the deployment
Returns:the next stage of the deployment update
/** * Specifies the deployment mode. * * @param mode the mode of the deployment * @return the next stage of the deployment update */
Update withMode(DeploymentMode mode); }
A deployment update allowing to change the template.
/** * A deployment update allowing to change the template. */
interface WithTemplate {
Specifies the template as a Java object.
Params:
  • template – the Java object
Returns:the next stage of the deployment update
/** * Specifies the template as a Java object. * * @param template the Java object * @return the next stage of the deployment update */
Update withTemplate(Object template);
Specifies the template as a JSON string.
Params:
  • templateJson – the JSON string
Throws:
  • IOException – exception thrown from serialization/deserialization
Returns:the next stage of the deployment update
/** * Specifies the template as a JSON string. * * @param templateJson the JSON string * @return the next stage of the deployment update * @throws IOException exception thrown from serialization/deserialization */
Update withTemplate(String templateJson) throws IOException;
Specifies the template as a URL.
Params:
  • uri – the location of the remote template file
  • contentVersion – the version of the template file
Returns:the next stage of the deployment update
/** * Specifies the template as a URL. * * @param uri the location of the remote template file * @param contentVersion the version of the template file * @return the next stage of the deployment update */
Update withTemplateLink(String uri, String contentVersion); }
A deployment update allowing to change the parameters.
/** * A deployment update allowing to change the parameters. */
interface WithParameters {
Specifies the parameters as a Java object.
Params:
  • parameters – the Java object
Returns:the next stage of the deployment update
/** * Specifies the parameters as a Java object. * * @param parameters the Java object * @return the next stage of the deployment update */
Update withParameters(Object parameters);
Specifies the parameters as a JSON string.
Params:
  • parametersJson – the JSON string
Throws:
  • IOException – exception thrown from serialization/deserialization
Returns:the next stage of the deployment update
/** * Specifies the parameters as a JSON string. * * @param parametersJson the JSON string * @return the next stage of the deployment update * @throws IOException exception thrown from serialization/deserialization */
Update withParameters(String parametersJson) throws IOException;
Specifies the parameters as a URL.
Params:
  • uri – the location of the remote parameters file
  • contentVersion – the version of the parameters file
Returns:the next stage of the deployment update
/** * Specifies the parameters as a URL. * * @param uri the location of the remote parameters file * @param contentVersion the version of the parameters file * @return the next stage of the deployment update */
Update withParametersLink(String uri, String contentVersion); } }
The template for a deployment update operation, containing all the settings that can be modified.

Call Appliable<Deployment>.apply() to apply the changes to the deployment in Azure.

/** * The template for a deployment update operation, containing all the settings that * can be modified. * <p> * Call {@link Update#apply()} to apply the changes to the deployment in Azure. */
interface Update extends Appliable<Deployment>, UpdateStages.WithTemplate, UpdateStages.WithParameters, UpdateStages.WithMode { }
Container interface for all the deployment execution.
/** * Container interface for all the deployment execution. */
interface Execution extends ExecutionStages.Blank, ExecutionStages.WithExecute, ExecutionStages.WithWhatIf, ExecutionStages.WithWhatIfDeploymentMode, ExecutionStages.WithWhatIfLocation, ExecutionStages.WithWhatIfOnErrorDeploymentType, ExecutionStages.WithWhatIfParameter, ExecutionStages.WithWhatIfResultFormat, ExecutionStages.WithWhatIfTemplate { }
Grouping of all the deployment execution stages.
/** * Grouping of all the deployment execution stages. */
interface ExecutionStages {
The first stage of deployment execution.
/** * The first stage of deployment execution. */
interface Blank { }
A deployment execution allowing What-if parameters to be specified.
/** * A deployment execution allowing What-if parameters to be specified. */
interface WithWhatIf extends WithExecute, WithWhatIfDeploymentMode, WithWhatIfLocation, WithWhatIfOnErrorDeploymentType, WithWhatIfParameter, WithWhatIfResultFormat, WithWhatIfTemplate {
Specifies the type of information to log for debugging.
Params:
  • detailedLevel – the detailed value to set.
Returns:the next stage of the execution.
/** * Specifies the type of information to log for debugging. * * @param detailedLevel the detailed value to set. * @return the next stage of the execution. */
WithWhatIf withDetailedLevel(String detailedLevel);
Specifies the deployment name to be used on error cases.
Params:
  • deploymentName – the deployment name to set.
Returns:the next stage of the execution.
/** * Specifies the deployment name to be used on error cases. * * @param deploymentName the deployment name to set. * @return the next stage of the execution. */
WithWhatIf withDeploymentName(String deploymentName); }
A deployment execution allowing data storage location to be specified.
/** * A deployment execution allowing data storage location to be specified. */
interface WithWhatIfLocation {
Specifies the location to store the deployment data.
Params:
  • location – the location value to set.
Returns:the next stage of the execution.
/** * Specifies the location to store the deployment data. * * @param location the location value to set. * @return the next stage of the execution. */
WithWhatIf withLocation(String location); }
A deployment execution allowing deployment mode to be specified.
/** * A deployment execution allowing deployment mode to be specified. */
interface WithWhatIfDeploymentMode {
Specifies the mode with value of 'INCREMENTAL' in deployment properties.
Returns:the next stage of the execution.
/** * Specifies the mode with value of 'INCREMENTAL' in deployment properties. * * @return the next stage of the execution. */
WithWhatIf withIncrementalMode();
Specifies the mode with value of 'COMPLETE' in deployment properties.
Returns:the next stage of the execution.
/** * Specifies the mode with value of 'COMPLETE' in deployment properties. * * @return the next stage of the execution. */
WithWhatIf withCompleteMode(); }
A deployment execution allowing result format to be specified.
/** * A deployment execution allowing result format to be specified. */
interface WithWhatIfResultFormat {
Specifies the result format with value of 'FULL_RESOURCE_PAYLOADS' in What-if settings of deployment properties.
Returns:the next stage of the execution.
/** * Specifies the result format with value of 'FULL_RESOURCE_PAYLOADS' in What-if settings of deployment properties. * * @return the next stage of the execution. */
WithWhatIf withFullResourcePayloadsResultFormat();
Specifies the result format with value of 'RESOURCE_ID_ONLY' in What-if settings of deployment properties.
Returns:the next stage of the execution.
/** * Specifies the result format with value of 'RESOURCE_ID_ONLY' in What-if settings of deployment properties. * * @return the next stage of the execution. */
WithWhatIf withResourceIdOnlyResultFormat(); }
A deployment execution allowing template to be specified.
/** * A deployment execution allowing template to be specified. */
interface WithWhatIfTemplate {
Specifies the template content.
Params:
  • template – the template value to set.
Returns:the next stage of the execution.
/** * Specifies the template content. * * @param template the template value to set. * @return the next stage of the execution. */
WithWhatIf withWhatIfTemplate(Object template);
Specifies the uri and content version of template.
Params:
  • uri – the uri value to set.
  • contentVersion – the content version value to set.
Returns:the next stage of the execution.
/** * Specifies the uri and content version of template. * * @param uri the uri value to set. * @param contentVersion the content version value to set. * @return the next stage of the execution. */
WithWhatIf withWhatIfTemplateLink(String uri, String contentVersion); }
A deployment execution allowing parameter to be specified.
/** * A deployment execution allowing parameter to be specified. */
interface WithWhatIfParameter {
Specifies the name and value pairs that define the deployment parameters for the template.
Params:
  • parameters – the parameters value to set.
Returns:the next stage of the execution.
/** * Specifies the name and value pairs that define the deployment parameters for the template. * * @param parameters the parameters value to set. * @return the next stage of the execution. */
WithWhatIf withWhatIfParameters(Object parameters);
Specifies the uri and content version of parameters file.
Params:
  • uri – the uri value to set.
  • contentVersion – the content version value to set.
Returns:the next stage of the execution.
/** * Specifies the uri and content version of parameters file. * * @param uri the uri value to set. * @param contentVersion the content version value to set. * @return the next stage of the execution. */
WithWhatIf withWhatIfParametersLink(String uri, String contentVersion); }
A deployment execution allowing on error deployment type to be specified.
/** * A deployment execution allowing on error deployment type to be specified. */
interface WithWhatIfOnErrorDeploymentType {
Specifies the What-if deployment on error behavior type with value of 'LAST_SUCCESSFUL'.
Returns:the next stage of the execution.
/** * Specifies the What-if deployment on error behavior type with value of 'LAST_SUCCESSFUL'. * * @return the next stage of the execution. */
WithWhatIf withLastSuccessfulOnErrorDeployment();
Specifies the What-if deployment on error behavior type with value of 'SPECIFIC_DEPLOYMENT'.
Returns:the next stage of the execution.
/** * Specifies the What-if deployment on error behavior type with value of 'SPECIFIC_DEPLOYMENT'. * * @return the next stage of the execution. */
WithWhatIf withSpecialDeploymentOnErrorDeployment(); } interface WithExecute {
Gets changes that will be made by the deployment if executed at the scope of the resource group.
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the resource group. * * @return the next stage of the execution. */
@Method WhatIfOperationResult whatIf();
Gets changes that will be made by the deployment if executed at the scope of the resource group asynchronously.
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the resource group asynchronously. * * @return the next stage of the execution. */
@Method Observable<WhatIfOperationResult> whatIfAsync();
Gets changes that will be made by the deployment if executed at the scope of the resource group asynchronously.
Params:
  • callback – the callback to call on success or failure with export result as parameter
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the resource group asynchronously. * * @param callback the callback to call on success or failure with export result as parameter * @return the next stage of the execution. */
@Method ServiceFuture<WhatIfOperationResult> whatIfAsync(ServiceCallback<WhatIfOperationResult> callback);
Gets changes that will be made by the deployment if executed at the scope of the subscription.
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the subscription. * * @return the next stage of the execution. */
@Method WhatIfOperationResult whatIfAtSubscriptionScope();
Gets changes that will be made by the deployment if executed at the scope of the subscription asynchronously.
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the subscription asynchronously. * * @return the next stage of the execution. */
@Method Observable<WhatIfOperationResult> whatIfAtSubscriptionScopeAsync();
Gets changes that will be made by the deployment if executed at the scope of the subscription asynchronously.
Params:
  • callback – the callback to call on success or failure with export result as parameter
Returns:the next stage of the execution.
/** * Gets changes that will be made by the deployment if executed at the scope of the subscription asynchronously. * * @param callback the callback to call on success or failure with export result as parameter * @return the next stage of the execution. */
@Method ServiceFuture<WhatIfOperationResult> whatIfAtSubscriptionScopeAsync(ServiceCallback<WhatIfOperationResult> callback); } } }