@Internal public static interface IVolume.Jsii$Default extends IVolume, IResource.Jsii$Default
IVolume.IVolume.Jsii$Default, IVolume.Jsii$Proxy| Modifier and Type | Method and Description |
|---|---|
default String |
getAvailabilityZone()
(experimental) The availability zone that the EBS Volume is contained within (ex: us-west-2a).
|
default IKey |
getEncryptionKey()
(experimental) The customer-managed encryption key that is used to encrypt the Volume.
|
default ResourceEnvironment |
getEnv()
(experimental) The environment this resource belongs to.
|
default software.constructs.Node |
getNode()
The tree node.
|
default Stack |
getStack()
(experimental) The stack in which this resource is defined.
|
default String |
getVolumeId()
(experimental) The EBS Volume's ID.
|
default Grant |
grantAttachVolume(IGrantable grantee,
List<IInstance> instances)
(experimental) Grants permission to attach this Volume to an instance.
|
default Grant |
grantAttachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
(experimental) Grants permission to attach the Volume by a ResourceTag condition.
|
default Grant |
grantDetachVolume(IGrantable grantee,
List<IInstance> instances)
(experimental) 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.
|
default Grant |
grantDetachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
(experimental) Grants permission to detach the Volume by a ResourceTag condition.
|
grantAttachVolume, grantAttachVolumeByResourceTag, grantDetachVolume, grantDetachVolumeByResourceTag@Stability(value=Stable) @NotNull default software.constructs.Node getNode()
getNode in interface software.constructs.IConstructgetNode in interface software.constructs.IConstruct.Jsii$DefaultgetNode in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default ResourceEnvironment getEnv()
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
getEnv in interface IResourcegetEnv in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default Stack getStack()
getStack in interface IResourcegetStack in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default String getAvailabilityZone()
getAvailabilityZone in interface IVolume@Stability(value=Experimental) @NotNull default String getVolumeId()
getVolumeId in interface IVolume@Stability(value=Experimental) @Nullable default IKey getEncryptionKey()
getEncryptionKey in interface IVolume@Stability(value=Experimental) @NotNull default 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.
grantAttachVolume in interface IVolumegrantee - 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=Experimental) @NotNull default 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.
grantAttachVolumeByResourceTag in interface IVolumegrantee - 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=Experimental) @NotNull default Grant grantDetachVolume(@NotNull IGrantable grantee, @Nullable List<IInstance> instances)
Use {@link IVolume.grantDetachVolumeFromSelf} to grant an instance permission to detach this volume from itself.
grantDetachVolume in interface IVolumegrantee - 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=Experimental) @NotNull default 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.
grantDetachVolumeByResourceTag in interface IVolumegrantee - 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.Copyright © 2021. All rights reserved.