com.pulumi.azurenative.compute.GalleryImage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.GalleryImageArgs;
import com.pulumi.azurenative.compute.outputs.DisallowedResponse;
import com.pulumi.azurenative.compute.outputs.GalleryImageFeatureResponse;
import com.pulumi.azurenative.compute.outputs.GalleryImageIdentifierResponse;
import com.pulumi.azurenative.compute.outputs.ImagePurchasePlanResponse;
import com.pulumi.azurenative.compute.outputs.RecommendedMachineConfigurationResponse;
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 image definition 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 image.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.compute.GalleryImage;
* import com.pulumi.azurenative.compute.GalleryImageArgs;
* import com.pulumi.azurenative.compute.inputs.GalleryImageIdentifierArgs;
* 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 galleryImage = new GalleryImage("galleryImage", GalleryImageArgs.builder()
* .galleryImageName("myGalleryImageName")
* .galleryName("myGalleryName")
* .hyperVGeneration("V1")
* .identifier(GalleryImageIdentifierArgs.builder()
* .offer("myOfferName")
* .publisher("myPublisherName")
* .sku("mySkuName")
* .build())
* .location("West US")
* .osState("Generalized")
* .osType("Windows")
* .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:GalleryImage myGalleryImageName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}
* ```
*
*/
@ResourceType(type="azure-native:compute:GalleryImage")
public class GalleryImage extends com.pulumi.resources.CustomResource {
/**
* The architecture of the image. Applicable to OS disks only.
*
*/
@Export(name="architecture", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> architecture;
/**
* @return The architecture of the image. Applicable to OS disks only.
*
*/
public Output> architecture() {
return Codegen.optional(this.architecture);
}
/**
* The description of this gallery image definition resource. This property is updatable.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of this gallery image definition resource. This property is updatable.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Describes the disallowed disk types.
*
*/
@Export(name="disallowed", refs={DisallowedResponse.class}, tree="[0]")
private Output* @Nullable */ DisallowedResponse> disallowed;
/**
* @return Describes the disallowed disk types.
*
*/
public Output> disallowed() {
return Codegen.optional(this.disallowed);
}
/**
* The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
*
*/
@Export(name="endOfLifeDate", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> endOfLifeDate;
/**
* @return The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
*
*/
public Output> endOfLifeDate() {
return Codegen.optional(this.endOfLifeDate);
}
/**
* The Eula agreement for the gallery image definition.
*
*/
@Export(name="eula", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> eula;
/**
* @return The Eula agreement for the gallery image definition.
*
*/
public Output> eula() {
return Codegen.optional(this.eula);
}
/**
* A list of gallery image features.
*
*/
@Export(name="features", refs={List.class,GalleryImageFeatureResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> features;
/**
* @return A list of gallery image features.
*
*/
public Output>> features() {
return Codegen.optional(this.features);
}
/**
* The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*
*/
@Export(name="hyperVGeneration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> hyperVGeneration;
/**
* @return The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*
*/
public Output> hyperVGeneration() {
return Codegen.optional(this.hyperVGeneration);
}
/**
* This is the gallery image definition identifier.
*
*/
@Export(name="identifier", refs={GalleryImageIdentifierResponse.class}, tree="[0]")
private Output identifier;
/**
* @return This is the gallery image definition identifier.
*
*/
public Output identifier() {
return 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;
}
/**
* This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.
*
*/
@Export(name="osState", refs={String.class}, tree="[0]")
private Output osState;
/**
* @return This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.
*
*/
public Output osState() {
return this.osState;
}
/**
* This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**
*
*/
@Export(name="osType", refs={String.class}, tree="[0]")
private Output osType;
/**
* @return This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**
*
*/
public Output osType() {
return this.osType;
}
/**
* The privacy statement uri.
*
*/
@Export(name="privacyStatementUri", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> privacyStatementUri;
/**
* @return The privacy statement uri.
*
*/
public Output> privacyStatementUri() {
return Codegen.optional(this.privacyStatementUri);
}
/**
* 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;
}
/**
* Describes the gallery image definition purchase plan. This is used by marketplace images.
*
*/
@Export(name="purchasePlan", refs={ImagePurchasePlanResponse.class}, tree="[0]")
private Output* @Nullable */ ImagePurchasePlanResponse> purchasePlan;
/**
* @return Describes the gallery image definition purchase plan. This is used by marketplace images.
*
*/
public Output> purchasePlan() {
return Codegen.optional(this.purchasePlan);
}
/**
* The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
*
*/
@Export(name="recommended", refs={RecommendedMachineConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ RecommendedMachineConfigurationResponse> recommended;
/**
* @return The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
*
*/
public Output> recommended() {
return Codegen.optional(this.recommended);
}
/**
* The release note uri.
*
*/
@Export(name="releaseNoteUri", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> releaseNoteUri;
/**
* @return The release note uri.
*
*/
public Output> releaseNoteUri() {
return Codegen.optional(this.releaseNoteUri);
}
/**
* Resource tags
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> 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 GalleryImage(java.lang.String name) {
this(name, GalleryImageArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GalleryImage(java.lang.String name, GalleryImageArgs 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 GalleryImage(java.lang.String name, GalleryImageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:compute:GalleryImage", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GalleryImage(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:compute:GalleryImage", name, null, makeResourceOptions(options, id), false);
}
private static GalleryImageArgs makeArgs(GalleryImageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GalleryImageArgs.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:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20190301:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20190701:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20191201:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20200930:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20210701:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20211001:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220103:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220303:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20220803:GalleryImage").build()),
Output.of(Alias.builder().type("azure-native:compute/v20230703:GalleryImage").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 GalleryImage get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GalleryImage(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy