Interface IVolume
- All Superinterfaces:
IConstruct
,software.constructs.IConstruct
,IDependable
,IResource
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IVolume.Jsii$Default
- All Known Implementing Classes:
IVolume.Jsii$Proxy
,Volume
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forIVolume
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionThe availability zone that the EBS Volume is contained within (ex: us-west-2a).default IKey
The customer-managed encryption key that is used to encrypt the Volume.The EBS Volume's ID.grantAttachVolume
(IGrantable grantee) Grants permission to attach this Volume to an instance.grantAttachVolume
(IGrantable grantee, List<IInstance> instances) Grants permission to attach this Volume to an instance.grantAttachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs) Grants permission to attach the Volume by a ResourceTag condition.grantAttachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs, String tagKeySuffix) Grants permission to attach the Volume by a ResourceTag condition.grantDetachVolume
(IGrantable grantee) Grants permission to detach this Volume from an instance CAUTION: Granting an instance permission to detach from itself using this method will lead to an unresolvable circular reference between the instance role and the instance.grantDetachVolume
(IGrantable grantee, List<IInstance> instances) Grants permission to detach this Volume from an instance CAUTION: Granting an instance permission to detach from itself using this method will lead to an unresolvable circular reference between the instance role and the instance.grantDetachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs) Grants permission to detach the Volume by a ResourceTag condition.grantDetachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs, String tagKeySuffix) Grants permission to detach the Volume by a ResourceTag condition.Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAvailabilityZone
The availability zone that the EBS Volume is contained within (ex: us-west-2a). -
getVolumeId
The EBS Volume's ID. -
getEncryptionKey
The customer-managed encryption key that is used to encrypt the Volume. -
grantAttachVolume
@Stability(Stable) @NotNull Grant grantAttachVolume(@NotNull IGrantable grantee, @Nullable List<IInstance> instances) Grants permission to attach this Volume to an instance.CAUTION: Granting an instance permission to attach to itself using this method will lead to an unresolvable circular reference between the instance role and the instance. Use
invalid @link
IVolume.grantAttachVolumeToSelf
- Parameters:
grantee
- the principal being granted permission. This parameter is required.instances
- the instances to which permission is being granted to attach this volume to.
-
grantAttachVolume
Grants permission to attach this Volume to an instance.CAUTION: Granting an instance permission to attach to itself using this method will lead to an unresolvable circular reference between the instance role and the instance. Use
invalid @link
IVolume.grantAttachVolumeToSelf
- Parameters:
grantee
- the principal being granted permission. This parameter is required.
-
grantAttachVolumeByResourceTag
@Stability(Stable) @NotNull Grant grantAttachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs, @Nullable String tagKeySuffix) Grants permission to attach the Volume by a ResourceTag condition.If you are looking to grant an Instance, AutoScalingGroup, EC2-Fleet, SpotFleet, ECS host, etc the ability to attach this volume to itself then this is the method you want to use.
This is implemented by adding a Tag with key
VolumeGrantAttach-<suffix>
to the given constructs and this Volume, and then conditioning the Grant such that the grantee is only given the ability to AttachVolume if both the Volume and the destination Instance have that tag applied to them.- Parameters:
grantee
- the principal being granted permission. This parameter is required.constructs
- The list of constructs that will have the generated resource tag applied to them. This parameter is required.tagKeySuffix
- A suffix to use on the generated Tag key in place of the generated hash value.
-
grantAttachVolumeByResourceTag
@Stability(Stable) @NotNull Grant grantAttachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs) Grants permission to attach the Volume by a ResourceTag condition.If you are looking to grant an Instance, AutoScalingGroup, EC2-Fleet, SpotFleet, ECS host, etc the ability to attach this volume to itself then this is the method you want to use.
This is implemented by adding a Tag with key
VolumeGrantAttach-<suffix>
to the given constructs and this Volume, and then conditioning the Grant such that the grantee is only given the ability to AttachVolume if both the Volume and the destination Instance have that tag applied to them.- Parameters:
grantee
- the principal being granted permission. This parameter is required.constructs
- The list of constructs that will have the generated resource tag applied to them. This parameter is required.
-
grantDetachVolume
@Stability(Stable) @NotNull Grant grantDetachVolume(@NotNull IGrantable grantee, @Nullable List<IInstance> instances) Grants permission to detach this Volume from an instance CAUTION: Granting an instance permission to detach from itself using this method will lead to an unresolvable circular reference between the instance role and the instance.Use
invalid @link
IVolume.grantDetachVolumeFromSelf
- Parameters:
grantee
- the principal being granted permission. This parameter is required.instances
- the instances to which permission is being granted to detach this volume from.
-
grantDetachVolume
Grants permission to detach this Volume from an instance CAUTION: Granting an instance permission to detach from itself using this method will lead to an unresolvable circular reference between the instance role and the instance.Use
invalid @link
IVolume.grantDetachVolumeFromSelf
- Parameters:
grantee
- the principal being granted permission. This parameter is required.
-
grantDetachVolumeByResourceTag
@Stability(Stable) @NotNull Grant grantDetachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs, @Nullable String tagKeySuffix) Grants permission to detach the Volume by a ResourceTag condition.This is implemented via the same mechanism as
invalid @link
IVolume.grantAttachVolumeByResourceTag
- Parameters:
grantee
- the principal being granted permission. This parameter is required.constructs
- The list of constructs that will have the generated resource tag applied to them. This parameter is required.tagKeySuffix
- A suffix to use on the generated Tag key in place of the generated hash value.
-
grantDetachVolumeByResourceTag
@Stability(Stable) @NotNull Grant grantDetachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs) Grants permission to detach the Volume by a ResourceTag condition.This is implemented via the same mechanism as
invalid @link
IVolume.grantAttachVolumeByResourceTag
- Parameters:
grantee
- the principal being granted permission. This parameter is required.constructs
- The list of constructs that will have the generated resource tag applied to them. This parameter is required.
-