com.pulumi.aws.ebs.FastSnapshotRestore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
The 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.aws.ebs;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.ebs.FastSnapshotRestoreArgs;
import com.pulumi.aws.ebs.inputs.FastSnapshotRestoreState;
import com.pulumi.aws.ebs.outputs.FastSnapshotRestoreTimeouts;
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.Optional;
import javax.annotation.Nullable;
/**
* Resource for managing an EBS (Elastic Block Storage) Fast Snapshot Restore.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ebs.FastSnapshotRestore;
* import com.pulumi.aws.ebs.FastSnapshotRestoreArgs;
* 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 example = new FastSnapshotRestore("example", FastSnapshotRestoreArgs.builder()
* .availabilityZone("us-west-2a")
* .snapshotId(exampleAwsEbsSnapshot.id())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import EC2 (Elastic Compute Cloud) EBS Fast Snapshot Restore using the `id`. For example:
*
* ```sh
* $ pulumi import aws:ebs/fastSnapshotRestore:FastSnapshotRestore example us-west-2a,snap-abcdef123456
* ```
*
*/
@ResourceType(type="aws:ebs/fastSnapshotRestore:FastSnapshotRestore")
public class FastSnapshotRestore extends com.pulumi.resources.CustomResource {
/**
* Availability zone in which to enable fast snapshot restores.
*
*/
@Export(name="availabilityZone", refs={String.class}, tree="[0]")
private Output availabilityZone;
/**
* @return Availability zone in which to enable fast snapshot restores.
*
*/
public Output availabilityZone() {
return this.availabilityZone;
}
/**
* ID of the snapshot.
*
*/
@Export(name="snapshotId", refs={String.class}, tree="[0]")
private Output snapshotId;
/**
* @return ID of the snapshot.
*
*/
public Output snapshotId() {
return this.snapshotId;
}
/**
* State of fast snapshot restores. Valid values are `enabling`, `optimizing`, `enabled`, `disabling`, `disabled`.
*
*/
@Export(name="state", refs={String.class}, tree="[0]")
private Output state;
/**
* @return State of fast snapshot restores. Valid values are `enabling`, `optimizing`, `enabled`, `disabling`, `disabled`.
*
*/
public Output state() {
return this.state;
}
@Export(name="timeouts", refs={FastSnapshotRestoreTimeouts.class}, tree="[0]")
private Output* @Nullable */ FastSnapshotRestoreTimeouts> timeouts;
public Output> timeouts() {
return Codegen.optional(this.timeouts);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public FastSnapshotRestore(java.lang.String name) {
this(name, FastSnapshotRestoreArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public FastSnapshotRestore(java.lang.String name, FastSnapshotRestoreArgs 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 FastSnapshotRestore(java.lang.String name, FastSnapshotRestoreArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:ebs/fastSnapshotRestore:FastSnapshotRestore", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private FastSnapshotRestore(java.lang.String name, Output id, @Nullable FastSnapshotRestoreState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:ebs/fastSnapshotRestore:FastSnapshotRestore", name, state, makeResourceOptions(options, id), false);
}
private static FastSnapshotRestoreArgs makeArgs(FastSnapshotRestoreArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? FastSnapshotRestoreArgs.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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static FastSnapshotRestore get(java.lang.String name, Output id, @Nullable FastSnapshotRestoreState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new FastSnapshotRestore(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy