Marketplace Gallery Image
The marketplace gallery image resource definition. Azure REST API version: 2022-12-15-preview. Other available API versions: 2023-07-01-preview, 2023-09-01-preview.
Example Usage
PutMarketplaceGalleryImage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var marketplaceGalleryImage = new AzureNative.AzureStackHCI.MarketplaceGalleryImage("marketplaceGalleryImage", new()
{
CloudInitDataSource = "Azure",
ContainerName = "Default_Container",
ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
Type = "CustomLocation",
},
HyperVGeneration = "V1",
Identifier = new AzureNative.AzureStackHCI.Inputs.GalleryImageIdentifierArgs
{
Offer = "myOfferName",
Publisher = "myPublisherName",
Sku = "mySkuName",
},
Location = "West US2",
MarketplaceGalleryImageName = "test-marketplace-gallery-image",
OsType = AzureNative.AzureStackHCI.OperatingSystemTypes.Windows,
ResourceGroupName = "test-rg",
Version = new AzureNative.AzureStackHCI.Inputs.GalleryImageVersionArgs
{
Name = "1.0.0",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azurestackhci.NewMarketplaceGalleryImage(ctx, "marketplaceGalleryImage", &azurestackhci.MarketplaceGalleryImageArgs{
CloudInitDataSource: pulumi.String("Azure"),
ContainerName: pulumi.String("Default_Container"),
ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
Type: pulumi.String("CustomLocation"),
},
HyperVGeneration: pulumi.String("V1"),
Identifier: &azurestackhci.GalleryImageIdentifierArgs{
Offer: pulumi.String("myOfferName"),
Publisher: pulumi.String("myPublisherName"),
Sku: pulumi.String("mySkuName"),
},
Location: pulumi.String("West US2"),
MarketplaceGalleryImageName: pulumi.String("test-marketplace-gallery-image"),
OsType: azurestackhci.OperatingSystemTypesWindows,
ResourceGroupName: pulumi.String("test-rg"),
Version: &azurestackhci.GalleryImageVersionArgs{
Name: pulumi.String("1.0.0"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.azurestackhci.MarketplaceGalleryImage;
import com.pulumi.azurenative.azurestackhci.MarketplaceGalleryImageArgs;
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 marketplaceGalleryImage = new MarketplaceGalleryImage("marketplaceGalleryImage", MarketplaceGalleryImageArgs.builder()
.cloudInitDataSource("Azure")
.containerName("Default_Container")
.extendedLocation(Map.ofEntries(
Map.entry("name", "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
Map.entry("type", "CustomLocation")
))
.hyperVGeneration("V1")
.identifier(Map.ofEntries(
Map.entry("offer", "myOfferName"),
Map.entry("publisher", "myPublisherName"),
Map.entry("sku", "mySkuName")
))
.location("West US2")
.marketplaceGalleryImageName("test-marketplace-gallery-image")
.osType("Windows")
.resourceGroupName("test-rg")
.version(Map.of("name", "1.0.0"))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:azurestackhci:MarketplaceGalleryImage test-marketplace-gallery-image /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}
Content copied to clipboard