All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.compute.Gallery Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.compute;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.compute.GalleryArgs;
import com.pulumi.azurenative.compute.outputs.GalleryIdentifierResponse;
import com.pulumi.azurenative.compute.outputs.SharingProfileResponse;
import com.pulumi.azurenative.compute.outputs.SharingStatusResponse;
import com.pulumi.azurenative.compute.outputs.SoftDeletePolicyResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Specifies information about the Shared Image Gallery that you want to create or update.
 * Azure REST API version: 2022-03-03. Prior API version in Azure Native 1.x: 2020-09-30.
 * 
 * Other available API versions: 2022-08-03, 2023-07-03.
 * 
 * ## Example Usage
 * ### Create a community gallery.
 * 
 * 
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         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}{@literal @}{@code microsoft.com")
 *                     .publisherUri("uri")
 *                     .build())
 *                 .permissions("Community")
 *                 .build())
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### Create or update a simple gallery with sharing profile. * *
 * {@code
 * 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. * *
 * {@code
 * 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. * *
 * {@code
 * 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. * * ```sh * $ pulumi import azure-native:compute:Gallery myGalleryName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName} * ``` * */ @ResourceType(type="azure-native:compute:Gallery") public class Gallery extends com.pulumi.resources.CustomResource { /** * The description of this Shared Image Gallery resource. This property is updatable. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of this Shared Image Gallery resource. This property is updatable. * */ public Output> description() { return Codegen.optional(this.description); } /** * Describes the gallery unique name. * */ @Export(name="identifier", refs={GalleryIdentifierResponse.class}, tree="[0]") private Output identifier; /** * @return Describes the gallery unique name. * */ public Output> identifier() { return Codegen.optional(this.identifier); } /** * Resource location * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location * */ public Output location() { return this.location; } /** * Resource name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name * */ public Output name() { return this.name; } /** * The provisioning state, which only appears in the response. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The provisioning state, which only appears in the response. * */ public Output provisioningState() { return this.provisioningState; } /** * Profile for gallery sharing to subscription or tenant * */ @Export(name="sharingProfile", refs={SharingProfileResponse.class}, tree="[0]") private Output sharingProfile; /** * @return Profile for gallery sharing to subscription or tenant * */ public Output> sharingProfile() { return Codegen.optional(this.sharingProfile); } /** * Sharing status of current gallery. * */ @Export(name="sharingStatus", refs={SharingStatusResponse.class}, tree="[0]") private Output sharingStatus; /** * @return Sharing status of current gallery. * */ public Output sharingStatus() { return this.sharingStatus; } /** * Contains information about the soft deletion policy of the gallery. * */ @Export(name="softDeletePolicy", refs={SoftDeletePolicyResponse.class}, tree="[0]") private Output softDeletePolicy; /** * @return Contains information about the soft deletion policy of the gallery. * */ public Output> softDeletePolicy() { return Codegen.optional(this.softDeletePolicy); } /** * Resource tags * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Resource type * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Gallery(java.lang.String name) { this(name, GalleryArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Gallery(java.lang.String name, GalleryArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Gallery(java.lang.String name, GalleryArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:compute:Gallery", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Gallery(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:compute:Gallery", name, null, makeResourceOptions(options, id), false); } private static GalleryArgs makeArgs(GalleryArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GalleryArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:compute/v20180601:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20190301:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20190701:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20191201:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20200930:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20210701:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20211001:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20220103:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20220303:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20220803:Gallery").build()), Output.of(Alias.builder().type("azure-native:compute/v20230703:Gallery").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static Gallery get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Gallery(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy