GalleryApplicationVersionArgs

data class GalleryApplicationVersionArgs(val galleryApplicationName: Output<String>? = null, val galleryApplicationVersionName: Output<String>? = null, val galleryName: Output<String>? = null, val location: Output<String>? = null, val publishingProfile: Output<GalleryApplicationVersionPublishingProfileArgs>? = null, val resourceGroupName: Output<String>? = null, val safetyProfile: Output<GalleryApplicationVersionSafetyProfileArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<GalleryApplicationVersionArgs>

Specifies information about the gallery Application Version that you want to create or update. Uses Azure REST API version 2022-03-03. In version 1.x of the Azure Native provider, it used API version 2020-09-30. Other available API versions: 2022-08-03, 2023-07-03, 2024-03-03.

Example Usage

Create or update a simple gallery Application Version.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryApplicationVersion = new AzureNative.Compute.GalleryApplicationVersion("galleryApplicationVersion", new()
{
GalleryApplicationName = "myGalleryApplicationName",
GalleryApplicationVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryApplicationVersionPublishingProfileArgs
{
CustomActions = new[]
{
new AzureNative.Compute.Inputs.GalleryApplicationCustomActionArgs
{
Description = "This is the custom action description.",
Name = "myCustomAction",
Parameters = new[]
{
new AzureNative.Compute.Inputs.GalleryApplicationCustomActionParameterArgs
{
DefaultValue = "default value of parameter.",
Description = "This is the description of the parameter",
Name = "myCustomActionParameter",
Required = false,
Type = AzureNative.Compute.GalleryApplicationCustomActionParameterType.String,
},
},
Script = "myCustomActionScript",
},
},
EndOfLifeDate = "2019-07-01T07:00:00Z",
ManageActions = new AzureNative.Compute.Inputs.UserArtifactManageArgs
{
Install = "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"",
Remove = "del C:\\package ",
},
ReplicaCount = 1,
Source = new AzureNative.Compute.Inputs.UserArtifactSourceArgs
{
MediaLink = "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}",
},
StorageAccountType = AzureNative.Compute.StorageAccountType.Standard_LRS,
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
ExcludeFromLatest = false,
Name = "West US",
RegionalReplicaCount = 1,
StorageAccountType = AzureNative.Compute.StorageAccountType.Standard_LRS,
},
},
},
ResourceGroupName = "myResourceGroup",
SafetyProfile = new AzureNative.Compute.Inputs.GalleryApplicationVersionSafetyProfileArgs
{
AllowDeletionOfReplicatedLocations = false,
},
});
});
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.NewGalleryApplicationVersion(ctx, "galleryApplicationVersion", &compute.GalleryApplicationVersionArgs{
GalleryApplicationName: pulumi.String("myGalleryApplicationName"),
GalleryApplicationVersionName: pulumi.String("1.0.0"),
GalleryName: pulumi.String("myGalleryName"),
Location: pulumi.String("West US"),
PublishingProfile: &compute.GalleryApplicationVersionPublishingProfileArgs{
CustomActions: compute.GalleryApplicationCustomActionArray{
&compute.GalleryApplicationCustomActionArgs{
Description: pulumi.String("This is the custom action description."),
Name: pulumi.String("myCustomAction"),
Parameters: compute.GalleryApplicationCustomActionParameterArray{
&compute.GalleryApplicationCustomActionParameterArgs{
DefaultValue: pulumi.String("default value of parameter."),
Description: pulumi.String("This is the description of the parameter"),
Name: pulumi.String("myCustomActionParameter"),
Required: pulumi.Bool(false),
Type: compute.GalleryApplicationCustomActionParameterTypeString,
},
},
Script: pulumi.String("myCustomActionScript"),
},
},
EndOfLifeDate: pulumi.String("2019-07-01T07:00:00Z"),
ManageActions: &compute.UserArtifactManageArgs{
Install: pulumi.String("powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\""),
Remove: pulumi.String("del C:\\package "),
},
ReplicaCount: pulumi.Int(1),
Source: &compute.UserArtifactSourceArgs{
MediaLink: pulumi.String("https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"),
},
StorageAccountType: pulumi.String(compute.StorageAccountType_Standard_LRS),
TargetRegions: compute.TargetRegionArray{
&compute.TargetRegionArgs{
ExcludeFromLatest: pulumi.Bool(false),
Name: pulumi.String("West US"),
RegionalReplicaCount: pulumi.Int(1),
StorageAccountType: pulumi.String(compute.StorageAccountType_Standard_LRS),
},
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
SafetyProfile: &compute.GalleryApplicationVersionSafetyProfileArgs{
AllowDeletionOfReplicatedLocations: pulumi.Bool(false),
},
})
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.GalleryApplicationVersion;
import com.pulumi.azurenative.compute.GalleryApplicationVersionArgs;
import com.pulumi.azurenative.compute.inputs.GalleryApplicationVersionPublishingProfileArgs;
import com.pulumi.azurenative.compute.inputs.UserArtifactManageArgs;
import com.pulumi.azurenative.compute.inputs.UserArtifactSourceArgs;
import com.pulumi.azurenative.compute.inputs.GalleryApplicationVersionSafetyProfileArgs;
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 galleryApplicationVersion = new GalleryApplicationVersion("galleryApplicationVersion", GalleryApplicationVersionArgs.builder()
.galleryApplicationName("myGalleryApplicationName")
.galleryApplicationVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(GalleryApplicationVersionPublishingProfileArgs.builder()
.customActions(GalleryApplicationCustomActionArgs.builder()
.description("This is the custom action description.")
.name("myCustomAction")
.parameters(GalleryApplicationCustomActionParameterArgs.builder()
.defaultValue("default value of parameter.")
.description("This is the description of the parameter")
.name("myCustomActionParameter")
.required(false)
.type("String")
.build())
.script("myCustomActionScript")
.build())
.endOfLifeDate("2019-07-01T07:00:00Z")
.manageActions(UserArtifactManageArgs.builder()
.install("powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"")
.remove("del C:\\package ")
.build())
.replicaCount(1)
.source(UserArtifactSourceArgs.builder()
.mediaLink("https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}")
.build())
.storageAccountType("Standard_LRS")
.targetRegions(TargetRegionArgs.builder()
.excludeFromLatest(false)
.name("West US")
.regionalReplicaCount(1)
.storageAccountType("Standard_LRS")
.build())
.build())
.resourceGroupName("myResourceGroup")
.safetyProfile(GalleryApplicationVersionSafetyProfileArgs.builder()
.allowDeletionOfReplicatedLocations(false)
.build())
.build());
}
}

Import

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

$ pulumi import azure-native:compute:GalleryApplicationVersion 1.0.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}

Constructors

Link copied to clipboard
constructor(galleryApplicationName: Output<String>? = null, galleryApplicationVersionName: Output<String>? = null, galleryName: Output<String>? = null, location: Output<String>? = null, publishingProfile: Output<GalleryApplicationVersionPublishingProfileArgs>? = null, resourceGroupName: Output<String>? = null, safetyProfile: Output<GalleryApplicationVersionSafetyProfileArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The name of the gallery Application Definition in which the Application Version is to be created.

Link copied to clipboard

The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..

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

The name of the Shared Application Gallery in which the Application Definition resides.

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

Resource location

Link copied to clipboard

The publishing profile of a gallery image version.

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

The name of the resource group.

Link copied to clipboard

The safety profile of the Gallery Application Version.

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

Resource tags

Functions

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