GalleryArgs

data class GalleryArgs(val description: Output<String>? = null, val galleryName: Output<String>? = null, val identity: Output<GalleryIdentityArgs>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sharingProfile: Output<SharingProfileArgs>? = null, val softDeletePolicy: Output<SoftDeletePolicyArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<GalleryArgs>

Specifies information about the Shared Image Gallery 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 a community gallery.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gallery = new AzureNative.Compute.Gallery("gallery", new()
{
Description = "This is the gallery description.",
GalleryName = "myGalleryName",
Location = "West US",
ResourceGroupName = "myResourceGroup",
SharingProfile = new AzureNative.Compute.Inputs.SharingProfileArgs
{
CommunityGalleryInfo = new AzureNative.Compute.Inputs.CommunityGalleryInfoArgs
{
Eula = "eula",
PublicNamePrefix = "PirPublic",
PublisherContact = "pir@microsoft.com",
PublisherUri = "uri",
},
Permissions = AzureNative.Compute.GallerySharingPermissionTypes.Community,
},
});
});
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.NewGallery(ctx, "gallery", &compute.GalleryArgs{
Description: pulumi.String("This is the gallery description."),
GalleryName: pulumi.String("myGalleryName"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SharingProfile: &compute.SharingProfileArgs{
CommunityGalleryInfo: &compute.CommunityGalleryInfoArgs{
Eula: pulumi.String("eula"),
PublicNamePrefix: pulumi.String("PirPublic"),
PublisherContact: pulumi.String("pir@microsoft.com"),
PublisherUri: pulumi.String("uri"),
},
Permissions: pulumi.String(compute.GallerySharingPermissionTypesCommunity),
},
})
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.Gallery;
import com.pulumi.azurenative.compute.GalleryArgs;
import com.pulumi.azurenative.compute.inputs.SharingProfileArgs;
import com.pulumi.azurenative.compute.inputs.CommunityGalleryInfoArgs;
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 gallery = new Gallery("gallery", GalleryArgs.builder()
.description("This is the gallery description.")
.galleryName("myGalleryName")
.location("West US")
.resourceGroupName("myResourceGroup")
.sharingProfile(SharingProfileArgs.builder()
.communityGalleryInfo(CommunityGalleryInfoArgs.builder()
.eula("eula")
.publicNamePrefix("PirPublic")
.publisherContact("pir@microsoft.com")
.publisherUri("uri")
.build())
.permissions("Community")
.build())
.build());
}
}

Create or update a simple gallery with sharing profile.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gallery = new AzureNative.Compute.Gallery("gallery", new()
{
Description = "This is the gallery description.",
GalleryName = "myGalleryName",
Location = "West US",
ResourceGroupName = "myResourceGroup",
SharingProfile = new AzureNative.Compute.Inputs.SharingProfileArgs
{
Permissions = AzureNative.Compute.GallerySharingPermissionTypes.Groups,
},
});
});
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.NewGallery(ctx, "gallery", &compute.GalleryArgs{
Description: pulumi.String("This is the gallery description."),
GalleryName: pulumi.String("myGalleryName"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SharingProfile: &compute.SharingProfileArgs{
Permissions: pulumi.String(compute.GallerySharingPermissionTypesGroups),
},
})
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.Gallery;
import com.pulumi.azurenative.compute.GalleryArgs;
import com.pulumi.azurenative.compute.inputs.SharingProfileArgs;
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 gallery = new Gallery("gallery", GalleryArgs.builder()
.description("This is the gallery description.")
.galleryName("myGalleryName")
.location("West US")
.resourceGroupName("myResourceGroup")
.sharingProfile(SharingProfileArgs.builder()
.permissions("Groups")
.build())
.build());
}
}

Create or update a simple gallery with soft deletion enabled.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gallery = new AzureNative.Compute.Gallery("gallery", new()
{
Description = "This is the gallery description.",
GalleryName = "myGalleryName",
Location = "West US",
ResourceGroupName = "myResourceGroup",
SoftDeletePolicy = new AzureNative.Compute.Inputs.SoftDeletePolicyArgs
{
IsSoftDeleteEnabled = true,
},
});
});
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.NewGallery(ctx, "gallery", &compute.GalleryArgs{
Description: pulumi.String("This is the gallery description."),
GalleryName: pulumi.String("myGalleryName"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SoftDeletePolicy: &compute.SoftDeletePolicyArgs{
IsSoftDeleteEnabled: pulumi.Bool(true),
},
})
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.Gallery;
import com.pulumi.azurenative.compute.GalleryArgs;
import com.pulumi.azurenative.compute.inputs.SoftDeletePolicyArgs;
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 gallery = new Gallery("gallery", GalleryArgs.builder()
.description("This is the gallery description.")
.galleryName("myGalleryName")
.location("West US")
.resourceGroupName("myResourceGroup")
.softDeletePolicy(SoftDeletePolicyArgs.builder()
.isSoftDeleteEnabled(true)
.build())
.build());
}
}

Create or update a simple gallery.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gallery = new AzureNative.Compute.Gallery("gallery", new()
{
Description = "This is the gallery description.",
GalleryName = "myGalleryName",
Location = "West US",
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.NewGallery(ctx, "gallery", &compute.GalleryArgs{
Description: pulumi.String("This is the gallery description."),
GalleryName: pulumi.String("myGalleryName"),
Location: pulumi.String("West US"),
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.Gallery;
import com.pulumi.azurenative.compute.GalleryArgs;
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 gallery = new Gallery("gallery", GalleryArgs.builder()
.description("This is the gallery description.")
.galleryName("myGalleryName")
.location("West US")
.resourceGroupName("myResourceGroup")
.build());
}
}

Import

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

$ pulumi import azure-native:compute:Gallery myGalleryName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, galleryName: Output<String>? = null, identity: Output<GalleryIdentityArgs>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, sharingProfile: Output<SharingProfileArgs>? = null, softDeletePolicy: Output<SoftDeletePolicyArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The description of this Shared Image Gallery resource. This property is updatable.

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

The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters.

Link copied to clipboard
val identity: Output<GalleryIdentityArgs>? = null

The identity of the gallery, if configured.

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

Resource location

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

The name of the resource group.

Link copied to clipboard
val sharingProfile: Output<SharingProfileArgs>? = null

Profile for gallery sharing to subscription or tenant

Link copied to clipboard

Contains information about the soft deletion policy of the gallery.

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

Resource tags

Functions

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