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

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

There is a newer version: 2.89.2
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.GalleryApplicationVersionArgs;
import com.pulumi.azurenative.compute.outputs.GalleryApplicationVersionPublishingProfileResponse;
import com.pulumi.azurenative.compute.outputs.GalleryApplicationVersionSafetyProfileResponse;
import com.pulumi.azurenative.compute.outputs.ReplicationStatusResponse;
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 gallery Application Version 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 or update a simple gallery Application Version.
 * 
 * 
 * {@code
 * 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. * * ```sh * $ pulumi import azure-native:compute:GalleryApplicationVersion 1.0.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName} * ``` * */ @ResourceType(type="azure-native:compute:GalleryApplicationVersion") public class GalleryApplicationVersion extends com.pulumi.resources.CustomResource { /** * 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; } /** * The publishing profile of a gallery image version. * */ @Export(name="publishingProfile", refs={GalleryApplicationVersionPublishingProfileResponse.class}, tree="[0]") private Output publishingProfile; /** * @return The publishing profile of a gallery image version. * */ public Output publishingProfile() { return this.publishingProfile; } /** * This is the replication status of the gallery image version. * */ @Export(name="replicationStatus", refs={ReplicationStatusResponse.class}, tree="[0]") private Output replicationStatus; /** * @return This is the replication status of the gallery image version. * */ public Output replicationStatus() { return this.replicationStatus; } /** * The safety profile of the Gallery Application Version. * */ @Export(name="safetyProfile", refs={GalleryApplicationVersionSafetyProfileResponse.class}, tree="[0]") private Output safetyProfile; /** * @return The safety profile of the Gallery Application Version. * */ public Output> safetyProfile() { return Codegen.optional(this.safetyProfile); } /** * 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 GalleryApplicationVersion(java.lang.String name) { this(name, GalleryApplicationVersionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public GalleryApplicationVersion(java.lang.String name, GalleryApplicationVersionArgs 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 GalleryApplicationVersion(java.lang.String name, GalleryApplicationVersionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:compute:GalleryApplicationVersion", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private GalleryApplicationVersion(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:compute:GalleryApplicationVersion", name, null, makeResourceOptions(options, id), false); } private static GalleryApplicationVersionArgs makeArgs(GalleryApplicationVersionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GalleryApplicationVersionArgs.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/v20190301:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20190701:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20191201:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20200930:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20210701:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20211001:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20220103:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20220303:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20220803:GalleryApplicationVersion").build()), Output.of(Alias.builder().type("azure-native:compute/v20230703:GalleryApplicationVersion").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 GalleryApplicationVersion get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new GalleryApplicationVersion(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy