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.compute; import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.ComputeManager; import com.microsoft.azure.management.compute.implementation.GalleryImageVersionInner; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.models.HasManager; 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 org.joda.time.DateTime; import java.util.List; import java.util.Map;
An immutable client-side representation of an Azure gallery image version.
/** * An immutable client-side representation of an Azure gallery image version. */
@Fluent public interface GalleryImageVersion extends HasInner<GalleryImageVersionInner>, Indexable, Refreshable<GalleryImageVersion>, Updatable<GalleryImageVersion.Update>, HasManager<ComputeManager> {
Returns:the ARM id of the image version.
/** * @return the ARM id of the image version. */
String id();
Returns:the default location of the image version.
/** * @return the default location of the image version. */
String location();
Returns:the image version name.
/** * @return the image version name. */
String name();
Returns:the provisioningState of image version resource.
/** * @return the provisioningState of image version resource. */
String provisioningState();
Returns:the publishingProfile configuration of the image version.
/** * @return the publishingProfile configuration of the image version. */
GalleryImageVersionPublishingProfile publishingProfile();
Returns:the regions in which the image version is available.
/** * @return the regions in which the image version is available. */
List<TargetRegion> availableRegions();
Returns:the date indicating image version's end of life.
/** * @return the date indicating image version's end of life. */
DateTime endOfLifeDate();
Returns:true if the image version is excluded from considering as a candidate when VM is created with 'latest' image version, false otherwise.
/** * @return true if the image version is excluded from considering as a * candidate when VM is created with 'latest' image version, false otherwise. */
Boolean isExcludedFromLatest();
Returns:the replicationStatus of image version in published regions.
/** * @return the replicationStatus of image version in published regions. */
ReplicationStatus replicationStatus();
Returns:the image version storageProfile describing OS and data disks.
/** * @return the image version storageProfile describing OS and data disks. */
GalleryImageVersionStorageProfile storageProfile();
Returns:the tags associated with the image version.
/** * @return the tags associated with the image version. */
Map<String, String> tags();
Returns:the type.
/** * @return the type. */
String type();
The entirety of the gallery image version definition.
/** * The entirety of the gallery image version definition. */
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithImage, DefinitionStages.WithLocation, DefinitionStages.WithSource, DefinitionStages.WithCreate { }
Grouping of gallery image version definition stages.
/** * Grouping of gallery image version definition stages. */
interface DefinitionStages {
The first stage of a gallery image version definition.
/** * The first stage of a gallery image version definition. */
interface Blank extends WithImage { }
The stage of the gallery image version definition allowing to specify parent image.
/** * The stage of the gallery image version definition allowing to specify parent image. */
interface WithImage {
Specifies the image container to hold this image version.
Params:
  • resourceGroupName – the name of the resource group
  • galleryName – the name of the gallery
  • galleryImageName – the name of the gallery image
Returns:the next definition stage
/** * Specifies the image container to hold this image version. * * @param resourceGroupName the name of the resource group * @param galleryName the name of the gallery * @param galleryImageName the name of the gallery image * @return the next definition stage */
WithLocation withExistingImage(String resourceGroupName, String galleryName, String galleryImageName); }
The stage of the gallery image version definition allowing to specify location.
/** * The stage of the gallery image version definition allowing to specify location. */
interface WithLocation {
Specifies the default location for the image version.
Params:
  • location – resource location
Returns:the next definition stage
/** * Specifies the default location for the image version. * * @param location resource location * @return the next definition stage */
WithSource withLocation(String location);
Specifies location.
Params:
  • location – resource location
Returns:the next definition stage
/** * Specifies location. * * @param location resource location * @return the next definition stage */
WithSource withLocation(Region location); }
The stage of the image version definition allowing to specify the source.
/** * The stage of the image version definition allowing to specify the source. */
interface WithSource {
Specifies that the provided custom image needs to be used as source of the image version.
Params:
  • customImageId – the ARM id of the custom image
Returns:the next definition stage
/** * Specifies that the provided custom image needs to be used as source of the image version. * * @param customImageId the ARM id of the custom image * @return the next definition stage */
WithCreate withSourceCustomImage(String customImageId);
Specifies that the provided custom image needs to be used as source of the image version.
Params:
  • customImage – the custom image
Returns:the next definition stage
/** * Specifies that the provided custom image needs to be used as source of the image version. * * @param customImage the custom image * @return the next definition stage */
WithCreate withSourceCustomImage(VirtualMachineCustomImage customImage); }
The stage of image version definition allowing to specify the regions in which the image version has to be available.
/** * The stage of image version definition allowing to specify the regions in which the image version * has to be available. */
interface WithAvailableRegion {
Specifies a region in which image version needs to be available.
Params:
  • region – the region
  • replicaCount – the replica count
Returns:the next definition stage
/** * Specifies a region in which image version needs to be available. * * @param region the region * @param replicaCount the replica count * @return the next definition stage */
WithCreate withRegionAvailability(Region region, int replicaCount);
Specifies list of regions in which image version needs to be available.
Params:
  • regions – the region list
Returns:the next definition stage
/** * Specifies list of regions in which image version needs to be available. * * @param regions the region list * @return the next definition stage */
WithCreate withRegionAvailability(List<TargetRegion> regions); }
The stage of the gallery image version definition allowing to specify end of life of the version.
/** * The stage of the gallery image version definition allowing to specify end of life of the version. */
interface WithEndOfLifeDate {
Specifies end of life date of the image version.
Params:
  • endOfLifeDate – The end of life date
Returns:the next definition stage
/** * Specifies end of life date of the image version. * * @param endOfLifeDate The end of life date * @return the next definition stage */
WithCreate withEndOfLifeDate(DateTime endOfLifeDate); }
The stage of the gallery image version definition allowing to specify that the version should not be considered as a candidate version when VM is deployed with 'latest' as version of the image.
/** * The stage of the gallery image version definition allowing to specify that the version * should not be considered as a candidate version when VM is deployed with 'latest' as version * of the image. */
interface WithExcludeFromLatest {
Specifies that this version is not a candidate to consider as latest.
Returns:the next definition stage
/** * Specifies that this version is not a candidate to consider as latest. * * @return the next definition stage */
WithCreate withExcludedFromLatest(); }
The stage of the gallery image version definition allowing to specify Tags.
/** * The stage of the gallery image version definition allowing to specify Tags. */
interface WithTags {
Specifies tags.
Params:
  • tags – the resource tags
Returns:the next definition stage
/** * Specifies tags. * * @param tags the resource tags * @return the next definition stage */
WithCreate withTags(Map<String, String> tags); }
The stage of the definition which contains all the minimum required inputs for the resource to be created (via Creatable<GalleryImageVersion>.create()), but also allows for any other optional settings to be specified.
/** * The stage of the definition which contains all the minimum required inputs for * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */
interface WithCreate extends Creatable<GalleryImageVersion>, DefinitionStages.WithAvailableRegion, DefinitionStages.WithEndOfLifeDate, DefinitionStages.WithExcludeFromLatest, DefinitionStages.WithTags { } }
The template for a gallery image version update operation, containing all the settings that can be modified.
/** * The template for a gallery image version update operation, containing all the settings that can be modified. */
interface Update extends Appliable<GalleryImageVersion>, UpdateStages.WithAvailableRegion, UpdateStages.WithEndOfLifeDate, UpdateStages.WithExcludeFromLatest, UpdateStages.WithTags { }
Grouping of gallery image version update stages.
/** * Grouping of gallery image version update stages. */
interface UpdateStages {
The stage of image version update allowing to specify the regions in which the image version has to be available.
/** * The stage of image version update allowing to specify the regions in which the image version * has to be available. */
interface WithAvailableRegion {
Specifies a region in which image version needs to be available.
Params:
  • region – the region
  • replicaCount – the replica count
Returns:the next update stage
/** * Specifies a region in which image version needs to be available. * * @param region the region * @param replicaCount the replica count * @return the next update stage */
Update withRegionAvailability(Region region, int replicaCount);
Specifies list of regions in which image version needs to be available.
Params:
  • regions – the region list
Returns:the next update stage
/** * Specifies list of regions in which image version needs to be available. * * @param regions the region list * @return the next update stage */
Update withRegionAvailability(List<TargetRegion> regions);
Specifies that an image version should be removed from an existing region serving it.
Params:
  • region – the region
Returns:the next update stage
/** * Specifies that an image version should be removed from an existing region serving it. * * @param region the region * @return the next update stage */
Update withoutRegionAvailability(Region region); }
The stage of the gallery image version update allowing to specify end of life of the version.
/** * The stage of the gallery image version update allowing to specify end of life of the version. */
interface WithEndOfLifeDate {
Specifies end of life date of the image version.
Params:
  • endOfLifeDate – The end of life of this gallery image
Returns:the next update stage
/** * Specifies end of life date of the image version. * * @param endOfLifeDate The end of life of this gallery image * @return the next update stage */
Update withEndOfLifeDate(DateTime endOfLifeDate); }
The stage of the gallery image version definition allowing to specify whether this version should be a candidate version to be considered when VM is deployed with 'latest' as version of the image.
/** * The stage of the gallery image version definition allowing to specify whether this * version should be a candidate version to be considered when VM is deployed with 'latest' * as version of the image. */
interface WithExcludeFromLatest {
Specifies that this version is not a candidate to consider as latest.
Returns:the next update stage
/** * Specifies that this version is not a candidate to consider as latest. * * @return the next update stage */
Update withExcludedFromLatest();
Specifies that this version is a candidate to consider as latest.
Returns:the next update stage
/** * Specifies that this version is a candidate to consider as latest. * * @return the next update stage */
Update withoutExcludedFromLatest(); }
The stage of the gallery image version update allowing to specify Tags.
/** * The stage of the gallery image version update allowing to specify Tags. */
interface WithTags {
Specifies tags.
Params:
  • tags – resource tags
Returns:the next update stage
/** * Specifies tags. * * @param tags resource tags * @return the next update stage */
Update withTags(Map<String, String> tags); } } }