Share via


ImageTemplateInner Class

public final class ImageTemplateInner
extends Resource

Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.

Constructor Summary

Constructor Description
ImageTemplateInner()

Creates an instance of ImageTemplateInner class.

Method Summary

Modifier and Type Method and Description
ImageTemplateAutoRun autoRun()

Get the autoRun property: Indicates whether or not to automatically run the image template build on template creation or update.

Integer buildTimeoutInMinutes()

Get the buildTimeoutInMinutes property: Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions).

List<ImageTemplateCustomizer> customize()

Get the customize property: Specifies the properties used to describe the customization steps of the image, like Image source etc.

List<ImageTemplateDistributor> distribute()

Get the distribute property: The distribution targets where the image output needs to go to.

ImageTemplatePropertiesErrorHandling errorHandling()

Get the errorHandling property: Error handling options upon a build failure.

String exactStagingResourceGroup()

Get the exactStagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image.

static ImageTemplateInner fromJson(JsonReader jsonReader)

Reads an instance of ImageTemplateInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

ImageTemplateIdentity identity()

Get the identity property: The identity of the image template, if configured.

ImageTemplateLastRunStatus lastRunStatus()

Get the lastRunStatus property: State of 'run' that is currently executing or was last executed.

Map<String,String> managedResourceTags()

Get the managedResourceTags property: Tags that will be applied to the resource group and/or resources created by the service.

String name()

Get the name property: The name of the resource.

ImageTemplatePropertiesOptimize optimize()

Get the optimize property: Specifies optimization to be performed on image.

ProvisioningError provisioningError()

Get the provisioningError property: Provisioning error, if any.

ProvisioningState provisioningState()

Get the provisioningState property: Provisioning state of the resource.

ImageTemplateSource source()

Get the source property: Specifies the properties used to describe the source image.

String stagingResourceGroup()

Get the stagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

ImageTemplatePropertiesValidate validation()

Get the validation property: Configuration options and list of validations to be performed on the resulting image.

ImageTemplateVmProfile vmProfile()

Get the vmProfile property: Describes how virtual machine is set up to build images.

ImageTemplateInner withAutoRun(ImageTemplateAutoRun autoRun)

Set the autoRun property: Indicates whether or not to automatically run the image template build on template creation or update.

ImageTemplateInner withBuildTimeoutInMinutes(Integer buildTimeoutInMinutes)

Set the buildTimeoutInMinutes property: Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions).

ImageTemplateInner withCustomize(List<ImageTemplateCustomizer> customize)

Set the customize property: Specifies the properties used to describe the customization steps of the image, like Image source etc.

ImageTemplateInner withDistribute(List<ImageTemplateDistributor> distribute)

Set the distribute property: The distribution targets where the image output needs to go to.

ImageTemplateInner withErrorHandling(ImageTemplatePropertiesErrorHandling errorHandling)

Set the errorHandling property: Error handling options upon a build failure.

ImageTemplateInner withIdentity(ImageTemplateIdentity identity)

Set the identity property: The identity of the image template, if configured.

ImageTemplateInner withLocation(String location)
ImageTemplateInner withManagedResourceTags(Map<String,String> managedResourceTags)

Set the managedResourceTags property: Tags that will be applied to the resource group and/or resources created by the service.

ImageTemplateInner withOptimize(ImageTemplatePropertiesOptimize optimize)

Set the optimize property: Specifies optimization to be performed on image.

ImageTemplateInner withSource(ImageTemplateSource source)

Set the source property: Specifies the properties used to describe the source image.

ImageTemplateInner withStagingResourceGroup(String stagingResourceGroup)

Set the stagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image.

ImageTemplateInner withTags(Map<String,String> tags)
ImageTemplateInner withValidation(ImageTemplatePropertiesValidate validation)

Set the validation property: Configuration options and list of validations to be performed on the resulting image.

ImageTemplateInner withVmProfile(ImageTemplateVmProfile vmProfile)

Set the vmProfile property: Describes how virtual machine is set up to build images.

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

ImageTemplateInner

public ImageTemplateInner()

Creates an instance of ImageTemplateInner class.

Method Details

autoRun

public ImageTemplateAutoRun autoRun()

Get the autoRun property: Indicates whether or not to automatically run the image template build on template creation or update.

Returns:

the autoRun value.

buildTimeoutInMinutes

public Integer buildTimeoutInMinutes()

Get the buildTimeoutInMinutes property: Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions). Omit or specify 0 to use the default (4 hours).

Returns:

the buildTimeoutInMinutes value.

customize

public List<ImageTemplateCustomizer> customize()

Get the customize property: Specifies the properties used to describe the customization steps of the image, like Image source etc.

Returns:

the customize value.

distribute

public List<ImageTemplateDistributor> distribute()

Get the distribute property: The distribution targets where the image output needs to go to.

Returns:

the distribute value.

errorHandling

public ImageTemplatePropertiesErrorHandling errorHandling()

Get the errorHandling property: Error handling options upon a build failure.

Returns:

the errorHandling value.

exactStagingResourceGroup

public String exactStagingResourceGroup()

Get the exactStagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image. This read-only field differs from 'stagingResourceGroup' only if the value specified in the 'stagingResourceGroup' field is empty.

Returns:

the exactStagingResourceGroup value.

fromJson

public static ImageTemplateInner fromJson(JsonReader jsonReader)

Reads an instance of ImageTemplateInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ImageTemplateInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

ImageTemplateInner.id()

Returns:

the id value.

identity

public ImageTemplateIdentity identity()

Get the identity property: The identity of the image template, if configured.

Returns:

the identity value.

lastRunStatus

public ImageTemplateLastRunStatus lastRunStatus()

Get the lastRunStatus property: State of 'run' that is currently executing or was last executed.

Returns:

the lastRunStatus value.

managedResourceTags

public Map<String,String> managedResourceTags()

Get the managedResourceTags property: Tags that will be applied to the resource group and/or resources created by the service.

Returns:

the managedResourceTags value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

ImageTemplateInner.name()

Returns:

the name value.

optimize

public ImageTemplatePropertiesOptimize optimize()

Get the optimize property: Specifies optimization to be performed on image.

Returns:

the optimize value.

provisioningError

public ProvisioningError provisioningError()

Get the provisioningError property: Provisioning error, if any.

Returns:

the provisioningError value.

provisioningState

public ProvisioningState provisioningState()

Get the provisioningState property: Provisioning state of the resource.

Returns:

the provisioningState value.

source

public ImageTemplateSource source()

Get the source property: Specifies the properties used to describe the source image.

Returns:

the source value.

stagingResourceGroup

public String stagingResourceGroup()

Get the stagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain.

Returns:

the stagingResourceGroup value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ImageTemplateInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

ImageTemplateInner.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

validation

public ImageTemplatePropertiesValidate validation()

Get the validation property: Configuration options and list of validations to be performed on the resulting image.

Returns:

the validation value.

vmProfile

public ImageTemplateVmProfile vmProfile()

Get the vmProfile property: Describes how virtual machine is set up to build images.

Returns:

the vmProfile value.

withAutoRun

public ImageTemplateInner withAutoRun(ImageTemplateAutoRun autoRun)

Set the autoRun property: Indicates whether or not to automatically run the image template build on template creation or update.

Parameters:

autoRun - the autoRun value to set.

Returns:

the ImageTemplateInner object itself.

withBuildTimeoutInMinutes

public ImageTemplateInner withBuildTimeoutInMinutes(Integer buildTimeoutInMinutes)

Set the buildTimeoutInMinutes property: Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions). Omit or specify 0 to use the default (4 hours).

Parameters:

buildTimeoutInMinutes - the buildTimeoutInMinutes value to set.

Returns:

the ImageTemplateInner object itself.

withCustomize

public ImageTemplateInner withCustomize(List<ImageTemplateCustomizer> customize)

Set the customize property: Specifies the properties used to describe the customization steps of the image, like Image source etc.

Parameters:

customize - the customize value to set.

Returns:

the ImageTemplateInner object itself.

withDistribute

public ImageTemplateInner withDistribute(List<ImageTemplateDistributor> distribute)

Set the distribute property: The distribution targets where the image output needs to go to.

Parameters:

distribute - the distribute value to set.

Returns:

the ImageTemplateInner object itself.

withErrorHandling

public ImageTemplateInner withErrorHandling(ImageTemplatePropertiesErrorHandling errorHandling)

Set the errorHandling property: Error handling options upon a build failure.

Parameters:

errorHandling - the errorHandling value to set.

Returns:

the ImageTemplateInner object itself.

withIdentity

public ImageTemplateInner withIdentity(ImageTemplateIdentity identity)

Set the identity property: The identity of the image template, if configured.

Parameters:

identity - the identity value to set.

Returns:

the ImageTemplateInner object itself.

withLocation

public ImageTemplateInner withLocation(String location)

Overrides:

ImageTemplateInner.withLocation(String location)

Parameters:

location

withManagedResourceTags

public ImageTemplateInner withManagedResourceTags(Map<String,String> managedResourceTags)

Set the managedResourceTags property: Tags that will be applied to the resource group and/or resources created by the service.

Parameters:

managedResourceTags - the managedResourceTags value to set.

Returns:

the ImageTemplateInner object itself.

withOptimize

public ImageTemplateInner withOptimize(ImageTemplatePropertiesOptimize optimize)

Set the optimize property: Specifies optimization to be performed on image.

Parameters:

optimize - the optimize value to set.

Returns:

the ImageTemplateInner object itself.

withSource

public ImageTemplateInner withSource(ImageTemplateSource source)

Set the source property: Specifies the properties used to describe the source image.

Parameters:

source - the source value to set.

Returns:

the ImageTemplateInner object itself.

withStagingResourceGroup

public ImageTemplateInner withStagingResourceGroup(String stagingResourceGroup)

Set the stagingResourceGroup property: The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain.

Parameters:

stagingResourceGroup - the stagingResourceGroup value to set.

Returns:

the ImageTemplateInner object itself.

withTags

public ImageTemplateInner withTags(Map<String,String> tags)

Overrides:

ImageTemplateInner.withTags(Map<String,String> tags)

Parameters:

tags

withValidation

public ImageTemplateInner withValidation(ImageTemplatePropertiesValidate validation)

Set the validation property: Configuration options and list of validations to be performed on the resulting image.

Parameters:

validation - the validation value to set.

Returns:

the ImageTemplateInner object itself.

withVmProfile

public ImageTemplateInner withVmProfile(ImageTemplateVmProfile vmProfile)

Set the vmProfile property: Describes how virtual machine is set up to build images.

Parameters:

vmProfile - the vmProfile value to set.

Returns:

the ImageTemplateInner object itself.

Applies to