GalleryImageArgs

data class GalleryImageArgs(val allowUpdateImage: Output<Boolean>? = null, val architecture: Output<Either<String, Architecture>>? = null, val description: Output<String>? = null, val disallowed: Output<DisallowedArgs>? = null, val endOfLifeDate: Output<String>? = null, val eula: Output<String>? = null, val features: Output<List<GalleryImageFeatureArgs>>? = null, val galleryImageName: Output<String>? = null, val galleryName: Output<String>? = null, val hyperVGeneration: Output<Either<String, HyperVGeneration>>? = null, val identifier: Output<GalleryImageIdentifierArgs>? = null, val location: Output<String>? = null, val osState: Output<OperatingSystemStateTypes>? = null, val osType: Output<OperatingSystemTypes>? = null, val privacyStatementUri: Output<String>? = null, val purchasePlan: Output<ImagePurchasePlanArgs>? = null, val recommended: Output<RecommendedMachineConfigurationArgs>? = null, val releaseNoteUri: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<GalleryImageArgs>

Specifies information about the gallery image definition that you want to create or update. Uses Azure REST API version 2024-03-03. In version 2.x of the Azure Native provider, it used API version 2022-03-03. Other available API versions: 2022-03-03, 2022-08-03, 2023-07-03. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native compute [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or update a simple gallery image.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImage = new AzureNative.Compute.GalleryImage("galleryImage", new()
{
GalleryImageName = "myGalleryImageName",
GalleryName = "myGalleryName",
HyperVGeneration = AzureNative.Compute.HyperVGeneration.V1,
Identifier = new AzureNative.Compute.Inputs.GalleryImageIdentifierArgs
{
Offer = "myOfferName",
Publisher = "myPublisherName",
Sku = "mySkuName",
},
Location = "West US",
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Windows,
ResourceGroupName = "myResourceGroup",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewGalleryImage(ctx, "galleryImage", &compute.GalleryImageArgs{
GalleryImageName: pulumi.String("myGalleryImageName"),
GalleryName: pulumi.String("myGalleryName"),
HyperVGeneration: pulumi.String(compute.HyperVGenerationV1),
Identifier: &compute.GalleryImageIdentifierArgs{
Offer: pulumi.String("myOfferName"),
Publisher: pulumi.String("myPublisherName"),
Sku: pulumi.String("mySkuName"),
},
Location: pulumi.String("West US"),
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesWindows,
ResourceGroupName: pulumi.String("myResourceGroup"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImage;
import com.pulumi.azurenative.compute.GalleryImageArgs;
import com.pulumi.azurenative.compute.inputs.GalleryImageIdentifierArgs;
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 galleryImage = new GalleryImage("galleryImage", GalleryImageArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryName("myGalleryName")
.hyperVGeneration("V1")
.identifier(GalleryImageIdentifierArgs.builder()
.offer("myOfferName")
.publisher("myPublisherName")
.sku("mySkuName")
.build())
.location("West US")
.osState("Generalized")
.osType("Windows")
.resourceGroupName("myResourceGroup")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:compute:GalleryImage myGalleryImageName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}

Constructors

Link copied to clipboard
constructor(allowUpdateImage: Output<Boolean>? = null, architecture: Output<Either<String, Architecture>>? = null, description: Output<String>? = null, disallowed: Output<DisallowedArgs>? = null, endOfLifeDate: Output<String>? = null, eula: Output<String>? = null, features: Output<List<GalleryImageFeatureArgs>>? = null, galleryImageName: Output<String>? = null, galleryName: Output<String>? = null, hyperVGeneration: Output<Either<String, HyperVGeneration>>? = null, identifier: Output<GalleryImageIdentifierArgs>? = null, location: Output<String>? = null, osState: Output<OperatingSystemStateTypes>? = null, osType: Output<OperatingSystemTypes>? = null, privacyStatementUri: Output<String>? = null, purchasePlan: Output<ImagePurchasePlanArgs>? = null, recommended: Output<RecommendedMachineConfigurationArgs>? = null, releaseNoteUri: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val allowUpdateImage: Output<Boolean>? = null

Optional. Must be set to true if the gallery image features are being updated.

Link copied to clipboard
val architecture: Output<Either<String, Architecture>>? = null

The architecture of the image. Applicable to OS disks only.

Link copied to clipboard
val description: Output<String>? = null

The description of this gallery image definition resource. This property is updatable.

Link copied to clipboard
val disallowed: Output<DisallowedArgs>? = null

Describes the disallowed disk types.

Link copied to clipboard
val endOfLifeDate: Output<String>? = null

The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.

Link copied to clipboard
val eula: Output<String>? = null

The Eula agreement for the gallery image definition.

Link copied to clipboard
val features: Output<List<GalleryImageFeatureArgs>>? = null

A list of gallery image features.

Link copied to clipboard
val galleryImageName: Output<String>? = null

The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.

Link copied to clipboard
val galleryName: Output<String>? = null

The name of the Shared Image Gallery in which the Image Definition is to be created.

Link copied to clipboard
val hyperVGeneration: Output<Either<String, HyperVGeneration>>? = null

The hypervisor generation of the Virtual Machine. Applicable to OS disks only.

Link copied to clipboard

This is the gallery image definition identifier.

Link copied to clipboard
val location: Output<String>? = null

Resource location

Link copied to clipboard
val osState: Output<OperatingSystemStateTypes>? = null

This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.

Link copied to clipboard
val osType: Output<OperatingSystemTypes>? = null

This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: Windows, Linux.

Link copied to clipboard
val privacyStatementUri: Output<String>? = null

The privacy statement uri.

Link copied to clipboard
val purchasePlan: Output<ImagePurchasePlanArgs>? = null

Describes the gallery image definition purchase plan. This is used by marketplace images.

Link copied to clipboard

The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.

Link copied to clipboard
val releaseNoteUri: Output<String>? = null

The release note uri.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags

Functions

Link copied to clipboard
open override fun toJava(): GalleryImageArgs