com.pulumi.azurenative.compute.GalleryImageVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.compute;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import com.pulumi.azurenative.compute.outputs.GalleryImageVersionPublishingProfileResponse;
import com.pulumi.azurenative.compute.outputs.GalleryImageVersionSafetyProfileResponse;
import com.pulumi.azurenative.compute.outputs.GalleryImageVersionStorageProfileResponse;
import com.pulumi.azurenative.compute.outputs.ReplicationStatusResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Specifies information about the gallery image version that you want to create or update.
* Azure REST API version: 2022-03-03. Prior API version in Azure Native 1.x: 2020-09-30.
*
* Other available API versions: 2019-03-01, 2022-08-03, 2023-07-03.
*
* ## Example Usage
* ### Create or update a simple Gallery Image Version using VM as source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(2)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using community gallery image as source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .communityGalleryImageId("/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using managed image as source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using mix of disks and snapshots as a source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryOSDiskImageArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryDiskImageSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .dataDiskImages(GalleryDataDiskImageArgs.builder()
* .hostCaching("None")
* .lun(1)
* .source(GalleryDiskImageSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}")
* .build())
* .build())
* .osDiskImage(GalleryOSDiskImageArgs.builder()
* .hostCaching("ReadOnly")
* .source(GalleryDiskImageSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}")
* .build())
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using shallow replication mode.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .replicationMode("Shallow")
* .targetRegions(TargetRegionArgs.builder()
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using shared image as source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple Gallery Image Version using vhd as a source.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryOSDiskImageArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryDiskImageSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .dataDiskImages(GalleryDataDiskImageArgs.builder()
* .hostCaching("None")
* .lun(1)
* .source(GalleryDiskImageSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}")
* .uri("https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd")
* .build())
* .build())
* .osDiskImage(GalleryOSDiskImageArgs.builder()
* .hostCaching("ReadOnly")
* .source(GalleryDiskImageSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}")
* .uri("https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd")
* .build())
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
* ### Create or update a simple gallery image version with target extended locations specified.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImageVersion;
* import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionPublishingProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionSafetyProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageVersionStorageProfileArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryArtifactVersionFullSourceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryImageVersionName("1.0.0")
* .galleryName("myGalleryName")
* .location("West US")
* .publishingProfile(GalleryImageVersionPublishingProfileArgs.builder()
* .targetRegions(
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("West US")
* .regionalReplicaCount(1)
* .build(),
* TargetRegionArgs.builder()
* .encryption(EncryptionImagesArgs.builder()
* .dataDiskImages(
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet")
* .lun(0)
* .build(),
* DataDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .lun(1)
* .build())
* .osDiskImage(OSDiskImageEncryptionArgs.builder()
* .diskEncryptionSetId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet")
* .build())
* .build())
* .excludeFromLatest(false)
* .name("East US")
* .regionalReplicaCount(2)
* .storageAccountType("Standard_ZRS")
* .build())
* .build())
* .resourceGroupName("myResourceGroup")
* .safetyProfile(GalleryImageVersionSafetyProfileArgs.builder()
* .allowDeletionOfReplicatedLocations(false)
* .build())
* .storageProfile(GalleryImageVersionStorageProfileArgs.builder()
* .source(GalleryArtifactVersionFullSourceArgs.builder()
* .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:compute:GalleryImageVersion 1.0.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}
* ```
*
*/
@ResourceType(type="azure-native:compute:GalleryImageVersion")
public class GalleryImageVersion extends com.pulumi.resources.CustomResource {
/**
* Resource location
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Resource location
*
*/
public Output location() {
return this.location;
}
/**
* Resource name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name
*
*/
public Output name() {
return this.name;
}
/**
* The provisioning state, which only appears in the response.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state, which only appears in the response.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The publishing profile of a gallery image Version.
*
*/
@Export(name="publishingProfile", refs={GalleryImageVersionPublishingProfileResponse.class}, tree="[0]")
private Output* @Nullable */ GalleryImageVersionPublishingProfileResponse> publishingProfile;
/**
* @return The publishing profile of a gallery image Version.
*
*/
public Output> publishingProfile() {
return Codegen.optional(this.publishingProfile);
}
/**
* This is the replication status of the gallery image version.
*
*/
@Export(name="replicationStatus", refs={ReplicationStatusResponse.class}, tree="[0]")
private Output replicationStatus;
/**
* @return This is the replication status of the gallery image version.
*
*/
public Output replicationStatus() {
return this.replicationStatus;
}
/**
* This is the safety profile of the Gallery Image Version.
*
*/
@Export(name="safetyProfile", refs={GalleryImageVersionSafetyProfileResponse.class}, tree="[0]")
private Output* @Nullable */ GalleryImageVersionSafetyProfileResponse> safetyProfile;
/**
* @return This is the safety profile of the Gallery Image Version.
*
*/
public Output> safetyProfile() {
return Codegen.optional(this.safetyProfile);
}
/**
* This is the storage profile of a Gallery Image Version.
*
*/
@Export(name="storageProfile", refs={GalleryImageVersionStorageProfileResponse.class}, tree="[0]")
private Output storageProfile;
/**
* @return This is the storage profile of a Gallery Image Version.
*
*/
public Output storageProfile() {
return this.storageProfile;
}
/**
* Resource tags
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Resource type
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public GalleryImageVersion(java.lang.String name) {
this(name, GalleryImageVersionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GalleryImageVersion(java.lang.String name, GalleryImageVersionArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public GalleryImageVersion(java.lang.String name, GalleryImageVersionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:compute:GalleryImageVersion", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GalleryImageVersion(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:compute:GalleryImageVersion", name, null, makeResourceOptions(options, id), false);
}
private static GalleryImageVersionArgs makeArgs(GalleryImageVersionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GalleryImageVersionArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:compute/v20180601:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20190301:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20190701:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20191201:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20200930:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20210701:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20211001:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220103:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220303:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220803:GalleryImageVersion").build()),
Output.of(Alias.builder().type("azure-native:compute/v20230703:GalleryImageVersion").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static GalleryImageVersion get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GalleryImageVersion(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy