@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:26.280Z") @Stability(value=Stable) public interface IVolume extends software.amazon.jsii.JsiiSerializable, IResource
Modifier and Type | Interface and Description |
---|---|
static interface |
IVolume.Jsii$Default
Internal default implementation for
IVolume . |
static class |
IVolume.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
Modifier and Type | Method and Description |
---|---|
String |
getAvailabilityZone()
The availability zone that the EBS Volume is contained within (ex: us-west-2a).
|
default IKey |
getEncryptionKey()
The customer-managed encryption key that is used to encrypt the Volume.
|
String |
getVolumeId()
The EBS Volume's ID.
|
Grant |
grantAttachVolume(IGrantable grantee)
Grants permission to attach this Volume to an instance.
|
Grant |
grantAttachVolume(IGrantable grantee,
List<IInstance> instances)
Grants permission to attach this Volume to an instance.
|
Grant |
grantAttachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs)
Grants permission to attach the Volume by a ResourceTag condition.
|
Grant |
grantAttachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
Grants permission to attach the Volume by a ResourceTag condition.
|
Grant |
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.
|
Grant |
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.
|
Grant |
grantDetachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs)
Grants permission to detach the Volume by a ResourceTag condition.
|
Grant |
grantDetachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
Grants permission to detach the Volume by a ResourceTag condition.
|
applyRemovalPolicy, getEnv, getStack
getNode
@Stability(value=Stable) @NotNull String getAvailabilityZone()
@Stability(value=Stable) @NotNull String getVolumeId()
@Stability(value=Stable) @Nullable default IKey getEncryptionKey()
@Stability(value=Stable) @NotNull Grant grantAttachVolume(@NotNull IGrantable grantee, @Nullable List<IInstance> instances)
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 {@link IVolume.grantAttachVolumeToSelf} to grant an instance permission to attach this volume to itself.
grantee
- the principal being granted permission. This parameter is required.instances
- the instances to which permission is being granted to attach this volume to.@Stability(value=Stable) @NotNull Grant grantAttachVolume(@NotNull IGrantable grantee)
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 {@link IVolume.grantAttachVolumeToSelf} to grant an instance permission to attach this volume to itself.
grantee
- the principal being granted permission. This parameter is required.@Stability(value=Stable) @NotNull Grant grantAttachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs, @Nullable String tagKeySuffix)
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.
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.@Stability(value=Stable) @NotNull Grant grantAttachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs)
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.
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.@Stability(value=Stable) @NotNull Grant grantDetachVolume(@NotNull IGrantable grantee, @Nullable List<IInstance> instances)
Use {@link IVolume.grantDetachVolumeFromSelf} to grant an instance permission to detach this volume from itself.
grantee
- the principal being granted permission. This parameter is required.instances
- the instances to which permission is being granted to detach this volume from.@Stability(value=Stable) @NotNull Grant grantDetachVolume(@NotNull IGrantable grantee)
Use {@link IVolume.grantDetachVolumeFromSelf} to grant an instance permission to detach this volume from itself.
grantee
- the principal being granted permission. This parameter is required.@Stability(value=Stable) @NotNull Grant grantDetachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs, @Nullable String tagKeySuffix)
This is implemented via the same mechanism as {@link IVolume.grantAttachVolumeByResourceTag}, and is subject to the same conditions.
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.@Stability(value=Stable) @NotNull Grant grantDetachVolumeByResourceTag(@NotNull IGrantable grantee, @NotNull List<software.constructs.Construct> constructs)
This is implemented via the same mechanism as {@link IVolume.grantAttachVolumeByResourceTag}, and is subject to the same conditions.
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.Copyright © 2023. All rights reserved.