Class IVolume.Jsii$Proxy
- All Implemented Interfaces:
IConstruct
,IConstruct.Jsii$Default
,IDependable
,IDependable.Jsii$Default
,IResource
,IResource.Jsii$Default
,IVolume
,IVolume.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
- Enclosing interface:
- IVolume
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IDependable
IDependable.Jsii$Default, IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IVolume
IVolume.Jsii$Default, IVolume.Jsii$Proxy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.final String
The availability zone that the EBS Volume is contained within (ex: us-west-2a).final IKey
The customer-managed encryption key that is used to encrypt the Volume.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final ConstructNode
getNode()
The construct tree node for this construct.final Stack
getStack()
The stack in which this resource is defined.final String
The EBS Volume's ID.final Grant
grantAttachVolume
(IGrantable grantee) Grants permission to attach this Volume to an instance.final Grant
grantAttachVolume
(IGrantable grantee, List<IInstance> instances) Grants permission to attach this Volume to an instance.final Grant
grantAttachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs) Grants permission to attach the Volume by a ResourceTag condition.final Grant
grantAttachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs, String tagKeySuffix) Grants permission to attach the Volume by a ResourceTag condition.final 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.final 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.final Grant
grantDetachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs) Grants permission to detach the Volume by a ResourceTag condition.final Grant
grantDetachVolumeByResourceTag
(IGrantable grantee, List<software.constructs.Construct> constructs, String tagKeySuffix) Grants permission to detach the Volume by a ResourceTag condition.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getNode
The construct tree node for this construct.- Specified by:
getNode
in interfaceIConstruct
- Specified by:
getNode
in interfaceIConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
- Specified by:
getNode
in interfaceIVolume.Jsii$Default
-
getEnv
The environment this resource belongs to.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.
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
- Specified by:
getEnv
in interfaceIVolume.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
- Specified by:
getStack
in interfaceIVolume.Jsii$Default
-
getAvailabilityZone
The availability zone that the EBS Volume is contained within (ex: us-west-2a).- Specified by:
getAvailabilityZone
in interfaceIVolume
- Specified by:
getAvailabilityZone
in interfaceIVolume.Jsii$Default
-
getVolumeId
The EBS Volume's ID.- Specified by:
getVolumeId
in interfaceIVolume
- Specified by:
getVolumeId
in interfaceIVolume.Jsii$Default
-
getEncryptionKey
The customer-managed encryption key that is used to encrypt the Volume.- Specified by:
getEncryptionKey
in interfaceIVolume
- Specified by:
getEncryptionKey
in interfaceIVolume.Jsii$Default
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIVolume.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
grantAttachVolume
@Stability(Stable) @NotNull public final 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
IVolume.grantAttachVolumeToSelf
to grant an instance permission to attach this volume to itself.- Specified by:
grantAttachVolume
in interfaceIVolume
- Specified by:
grantAttachVolume
in interfaceIVolume.Jsii$Default
- 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
IVolume.grantAttachVolumeToSelf
to grant an instance permission to attach this volume to itself.- Specified by:
grantAttachVolume
in interfaceIVolume
- Parameters:
grantee
- the principal being granted permission. This parameter is required.
-
grantAttachVolumeByResourceTag
@Stability(Stable) @NotNull public final 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.- Specified by:
grantAttachVolumeByResourceTag
in interfaceIVolume
- Specified by:
grantAttachVolumeByResourceTag
in interfaceIVolume.Jsii$Default
- 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 public final 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.- Specified by:
grantAttachVolumeByResourceTag
in interfaceIVolume
- 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 public final 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
IVolume.grantDetachVolumeFromSelf
to grant an instance permission to detach this volume from itself.- Specified by:
grantDetachVolume
in interfaceIVolume
- Specified by:
grantDetachVolume
in interfaceIVolume.Jsii$Default
- 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
IVolume.grantDetachVolumeFromSelf
to grant an instance permission to detach this volume from itself.- Specified by:
grantDetachVolume
in interfaceIVolume
- Parameters:
grantee
- the principal being granted permission. This parameter is required.
-
grantDetachVolumeByResourceTag
@Stability(Stable) @NotNull public final 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
IVolume.grantAttachVolumeByResourceTag
, and is subject to the same conditions.- Specified by:
grantDetachVolumeByResourceTag
in interfaceIVolume
- Specified by:
grantDetachVolumeByResourceTag
in interfaceIVolume.Jsii$Default
- 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 public final 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
IVolume.grantAttachVolumeByResourceTag
, and is subject to the same conditions.- Specified by:
grantDetachVolumeByResourceTag
in interfaceIVolume
- 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.
-