com.pulumi.azurenative.containerservice.Snapshot 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.containerservice;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.containerservice.SnapshotArgs;
import com.pulumi.azurenative.containerservice.outputs.CreationDataResponse;
import com.pulumi.azurenative.containerservice.outputs.SystemDataResponse;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* A node pool snapshot resource.
* Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2021-08-01.
*
* Other available API versions: 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview, 2023-10-01, 2023-10-02-preview, 2023-11-01, 2023-11-02-preview, 2024-01-01, 2024-01-02-preview, 2024-02-01, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-01, 2024-05-02-preview, 2024-06-02-preview, 2024-07-01, 2024-07-02-preview, 2024-08-01, 2024-09-01, 2024-09-02-preview.
*
* ## Example Usage
* ### Create/Update Snapshot
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.containerservice.Snapshot;
* import com.pulumi.azurenative.containerservice.SnapshotArgs;
* import com.pulumi.azurenative.containerservice.inputs.CreationDataArgs;
* 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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
* .creationData(CreationDataArgs.builder()
* .sourceResourceId("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0")
* .build())
* .location("westus")
* .resourceGroupName("rg1")
* .resourceName("snapshot1")
* .tags(Map.ofEntries(
* Map.entry("key1", "val1"),
* Map.entry("key2", "val2")
* ))
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:containerservice:Snapshot snapshot1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}
* ```
*
*/
@ResourceType(type="azure-native:containerservice:Snapshot")
public class Snapshot extends com.pulumi.resources.CustomResource {
/**
* CreationData to be used to specify the source agent pool resource ID to create this snapshot.
*
*/
@Export(name="creationData", refs={CreationDataResponse.class}, tree="[0]")
private Output* @Nullable */ CreationDataResponse> creationData;
/**
* @return CreationData to be used to specify the source agent pool resource ID to create this snapshot.
*
*/
public Output> creationData() {
return Codegen.optional(this.creationData);
}
/**
* Whether to use a FIPS-enabled OS.
*
*/
@Export(name="enableFIPS", refs={Boolean.class}, tree="[0]")
private Output enableFIPS;
/**
* @return Whether to use a FIPS-enabled OS.
*
*/
public Output enableFIPS() {
return this.enableFIPS;
}
/**
* The version of Kubernetes.
*
*/
@Export(name="kubernetesVersion", refs={String.class}, tree="[0]")
private Output kubernetesVersion;
/**
* @return The version of Kubernetes.
*
*/
public Output kubernetesVersion() {
return this.kubernetesVersion;
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The geo-location where the resource lives
*
*/
public Output location() {
return this.location;
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* The version of node image.
*
*/
@Export(name="nodeImageVersion", refs={String.class}, tree="[0]")
private Output nodeImageVersion;
/**
* @return The version of node image.
*
*/
public Output nodeImageVersion() {
return this.nodeImageVersion;
}
/**
* Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
*
*/
@Export(name="osSku", refs={String.class}, tree="[0]")
private Output osSku;
/**
* @return Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
*
*/
public Output osSku() {
return this.osSku;
}
/**
* The operating system type. The default is Linux.
*
*/
@Export(name="osType", refs={String.class}, tree="[0]")
private Output osType;
/**
* @return The operating system type. The default is Linux.
*
*/
public Output osType() {
return this.osType;
}
/**
* The type of a snapshot. The default is NodePool.
*
*/
@Export(name="snapshotType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> snapshotType;
/**
* @return The type of a snapshot. The default is NodePool.
*
*/
public Output> snapshotType() {
return Codegen.optional(this.snapshotType);
}
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* 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);
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
* The size of the VM.
*
*/
@Export(name="vmSize", refs={String.class}, tree="[0]")
private Output vmSize;
/**
* @return The size of the VM.
*
*/
public Output vmSize() {
return this.vmSize;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Snapshot(java.lang.String name) {
this(name, SnapshotArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Snapshot(java.lang.String name, SnapshotArgs 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 Snapshot(java.lang.String name, SnapshotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:containerservice:Snapshot", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Snapshot(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:containerservice:Snapshot", name, null, makeResourceOptions(options, id), false);
}
private static SnapshotArgs makeArgs(SnapshotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SnapshotArgs.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:containerservice/v20210801:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20210901:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20211001:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20211101preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220101:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220102preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220201:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220202preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220301:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220302preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220401:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220402preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220502preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220601:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220602preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220701:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220702preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220802preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220803preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220901:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20220902preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20221002preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20221101:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20221102preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230101:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230102preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230201:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230202preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230301:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230302preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230401:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230402preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230501:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230502preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230601:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230602preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230701:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230702preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230801:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230802preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230901:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20230902preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20231001:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20231002preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20231101:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20231102preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240101:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240102preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240201:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240202preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240302preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240402preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240501:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240502preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240602preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240701:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240702preview:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240801:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240901:Snapshot").build()),
Output.of(Alias.builder().type("azure-native:containerservice/v20240902preview:Snapshot").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 Snapshot get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Snapshot(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy