com.pulumi.aws.ebs.SnapshotCopy 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.SnapshotCopyArgs;
import com.pulumi.aws.ebs.inputs.SnapshotCopyState;
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.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Creates a Snapshot of a snapshot.
*
* ## Example 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.Volume;
* import com.pulumi.aws.ebs.VolumeArgs;
* import com.pulumi.aws.ebs.Snapshot;
* import com.pulumi.aws.ebs.SnapshotArgs;
* import com.pulumi.aws.ebs.SnapshotCopy;
* import com.pulumi.aws.ebs.SnapshotCopyArgs;
* 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 Volume("example", VolumeArgs.builder()
* .availabilityZone("us-west-2a")
* .size(40)
* .tags(Map.of("Name", "HelloWorld"))
* .build());
*
* var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
* .volumeId(example.id())
* .tags(Map.of("Name", "HelloWorld_snap"))
* .build());
*
* var exampleCopy = new SnapshotCopy("exampleCopy", SnapshotCopyArgs.builder()
* .sourceSnapshotId(exampleSnapshot.id())
* .sourceRegion("us-west-2")
* .tags(Map.of("Name", "HelloWorld_copy_snap"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
@ResourceType(type="aws:ebs/snapshotCopy:SnapshotCopy")
public class SnapshotCopy extends com.pulumi.resources.CustomResource {
/**
* Amazon Resource Name (ARN) of the EBS Snapshot.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return Amazon Resource Name (ARN) of the EBS Snapshot.
*
*/
public Output arn() {
return this.arn;
}
/**
* The data encryption key identifier for the snapshot.
*
*/
@Export(name="dataEncryptionKeyId", refs={String.class}, tree="[0]")
private Output dataEncryptionKeyId;
/**
* @return The data encryption key identifier for the snapshot.
*
*/
public Output dataEncryptionKeyId() {
return this.dataEncryptionKeyId;
}
/**
* A description of what the snapshot is.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return A description of what the snapshot is.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Whether the snapshot is encrypted.
*
*/
@Export(name="encrypted", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> encrypted;
/**
* @return Whether the snapshot is encrypted.
*
*/
public Output> encrypted() {
return Codegen.optional(this.encrypted);
}
/**
* The ARN for the KMS encryption key.
*
*/
@Export(name="kmsKeyId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kmsKeyId;
/**
* @return The ARN for the KMS encryption key.
*
*/
public Output> kmsKeyId() {
return Codegen.optional(this.kmsKeyId);
}
@Export(name="outpostArn", refs={String.class}, tree="[0]")
private Output outpostArn;
public Output outpostArn() {
return this.outpostArn;
}
/**
* Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners.
*
*/
@Export(name="ownerAlias", refs={String.class}, tree="[0]")
private Output ownerAlias;
/**
* @return Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners.
*
*/
public Output ownerAlias() {
return this.ownerAlias;
}
/**
* The AWS account ID of the snapshot owner.
*
*/
@Export(name="ownerId", refs={String.class}, tree="[0]")
private Output ownerId;
/**
* @return The AWS account ID of the snapshot owner.
*
*/
public Output ownerId() {
return this.ownerId;
}
/**
* Indicates whether to permanently restore an archived snapshot.
*
*/
@Export(name="permanentRestore", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> permanentRestore;
/**
* @return Indicates whether to permanently restore an archived snapshot.
*
*/
public Output> permanentRestore() {
return Codegen.optional(this.permanentRestore);
}
/**
* The region of the source snapshot.
*
*/
@Export(name="sourceRegion", refs={String.class}, tree="[0]")
private Output sourceRegion;
/**
* @return The region of the source snapshot.
*
*/
public Output sourceRegion() {
return this.sourceRegion;
}
/**
* The ARN for the snapshot to be copied.
*
*/
@Export(name="sourceSnapshotId", refs={String.class}, tree="[0]")
private Output sourceSnapshotId;
/**
* @return The ARN for the snapshot to be copied.
*
*/
public Output sourceSnapshotId() {
return this.sourceSnapshotId;
}
/**
* The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
*
*/
@Export(name="storageTier", refs={String.class}, tree="[0]")
private Output storageTier;
/**
* @return The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
*
*/
public Output storageTier() {
return this.storageTier;
}
/**
* A map of tags for the snapshot.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A map of tags for the snapshot.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy