Package com.pulumi.aws.ebs
Class VolumeCopy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ebs.VolumeCopy
-
public class VolumeCopy extends com.pulumi.resources.CustomResourceCreates a copy of an existing Amazon EBS volume. ## Example Usage
## Import ### Identity Schema #### Required * `id` (String) Volume ID. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import an EBS Volume Copy using the volume ID. For example: ```sh $ pulumi import aws:ebs/volumeCopy:VolumeCopy example vol-049df61146c4d7901 ```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.VolumeCopy; import com.pulumi.aws.ebs.VolumeCopyArgs; import java.util.ArrayList; import java.util.Arrays; 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 source = new Volume("source", VolumeArgs.builder() .availabilityZone("us-west-2a") .size(8) .build()); var example = new VolumeCopy("example", VolumeCopyArgs.builder() .sourceVolumeId(source.id()) .volumeType("gp3") .size(20) .iops(3000) .throughput(125) .tags(Map.of("Name", "example-copy")) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description VolumeCopy(java.lang.String name)VolumeCopy(java.lang.String name, VolumeCopyArgs args)VolumeCopy(java.lang.String name, VolumeCopyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>availabilityZone()static VolumeCopyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VolumeCopyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.Integer>iops()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.Integer>size()com.pulumi.core.Output<java.lang.String>sourceVolumeId()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.Integer>throughput()com.pulumi.core.Output<java.util.Optional<VolumeCopyTimeouts>>timeouts()com.pulumi.core.Output<java.lang.String>volumeType()
-
-
-
Constructor Detail
-
VolumeCopy
public VolumeCopy(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
VolumeCopy
public VolumeCopy(java.lang.String name, VolumeCopyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
VolumeCopy
public VolumeCopy(java.lang.String name, VolumeCopyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the copied EBS volume.
-
availabilityZone
public com.pulumi.core.Output<java.lang.String> availabilityZone()
- Returns:
- Availability Zone for the copied volume.
-
iops
public com.pulumi.core.Output<java.lang.Integer> iops()
- Returns:
- Provisioned IOPS for the copied volume. Use only with volume types that support provisioned IOPS, such as `gp3`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. This must match the Region of the source EBS volume referenced by `sourceVolumeId`.
-
size
public com.pulumi.core.Output<java.lang.Integer> size()
- Returns:
- Size of the copied volume, in GiB.
-
sourceVolumeId
public com.pulumi.core.Output<java.lang.String> sourceVolumeId()
- Returns:
- ID of the source EBS volume to copy. Changing this value forces replacement of the resource.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the copied volume. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
throughput
public com.pulumi.core.Output<java.lang.Integer> throughput()
- Returns:
- Throughput for the copied volume, in MiB/s. Valid only when `volumeType` is `gp3`.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<VolumeCopyTimeouts>> timeouts()
-
volumeType
public com.pulumi.core.Output<java.lang.String> volumeType()
- Returns:
- Type of the copied EBS volume. Valid values include `gp2`, `gp3`, `io1`, `io2`, `sc1`, `st1`, and `standard`. > **NOTE:** When changing the `size`, `iops` or `type` of a volume, there are [considerations](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html) to be aware of.
-
get
public static VolumeCopy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VolumeCopyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-