Gallery Image Args
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
Properties
Optional. Must be set to true if the gallery image features are being updated.
The architecture of the image. Applicable to OS disks only.
The description of this gallery image definition resource. This property is updatable.
Describes the disallowed disk types.
The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
A list of gallery image features.
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.
The name of the Shared Image Gallery in which the Image Definition is to be created.
The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
This is the gallery image definition identifier.
This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.
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.
The privacy statement uri.
Describes the gallery image definition purchase plan. This is used by marketplace images.
The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
The release note uri.
The name of the resource group.