@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:17.127Z") @Stability(value=Experimental) public class Volume extends Resource implements IVolume
| Modifier and Type | Class and Description |
|---|---|
static class |
Volume.Builder
(experimental) A fluent builder for
Volume. |
software.amazon.jsii.JsiiObject.InitializationModeIVolume.Jsii$Default, IVolume.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Volume(software.constructs.Construct scope,
String id,
VolumeProps props) |
protected |
Volume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Volume(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IVolume |
fromVolumeAttributes(software.constructs.Construct scope,
String id,
VolumeAttributes attrs)
(experimental) Import an existing EBS Volume into the Stack.
|
String |
getAvailabilityZone()
(experimental) The availability zone that the EBS Volume is contained within (ex: us-west-2a).
|
IKey |
getEncryptionKey()
(experimental) The customer-managed encryption key that is used to encrypt the Volume.
|
String |
getVolumeId()
(experimental) The EBS Volume's ID.
|
Grant |
grantAttachVolume(IGrantable grantee)
(experimental) Grants permission to attach this Volume to an instance.
|
Grant |
grantAttachVolume(IGrantable grantee,
List<IInstance> instances)
(experimental) Grants permission to attach this Volume to an instance.
|
Grant |
grantAttachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs)
(experimental) Grants permission to attach the Volume by a ResourceTag condition.
|
Grant |
grantAttachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
(experimental) Grants permission to attach the Volume by a ResourceTag condition.
|
Grant |
grantDetachVolume(IGrantable grantee)
(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.
|
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.
|
Grant |
grantDetachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs)
(experimental) Grants permission to detach the Volume by a ResourceTag condition.
|
Grant |
grantDetachVolumeByResourceTag(IGrantable grantee,
List<software.constructs.Construct> constructs,
String tagKeySuffix)
(experimental) Grants permission to detach the Volume by a ResourceTag condition.
|
protected void |
validateProps(VolumeProps props) |
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Volume(software.amazon.jsii.JsiiObjectRef objRef)
protected Volume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Volume(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
VolumeProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IVolume fromVolumeAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VolumeAttributes attrs)
scope - the scope of the import. This parameter is required.id - the ID of the imported Volume in the construct tree. This parameter is required.attrs - the attributes of the imported Volume. This parameter is required.@Stability(value=Experimental) @NotNull public 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 - This parameter is required.instances - @Stability(value=Experimental) @NotNull public 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.
grantAttachVolume in interface IVolumegrantee - This parameter is required.@Stability(value=Experimental) @NotNull public 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 - This parameter is required.constructs - This parameter is required.tagKeySuffix - @Stability(value=Experimental) @NotNull public 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.
grantAttachVolumeByResourceTag in interface IVolumegrantee - This parameter is required.constructs - This parameter is required.@Stability(value=Experimental) @NotNull public 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 - This parameter is required.instances - @Stability(value=Experimental) @NotNull public Grant grantDetachVolume(@NotNull IGrantable grantee)
Use {@link IVolume.grantDetachVolumeFromSelf} to grant an instance permission to detach this volume from itself.
grantDetachVolume in interface IVolumegrantee - This parameter is required.@Stability(value=Experimental) @NotNull public 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 - This parameter is required.constructs - This parameter is required.tagKeySuffix - @Stability(value=Experimental) @NotNull public 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.
grantDetachVolumeByResourceTag in interface IVolumegrantee - This parameter is required.constructs - This parameter is required.@Stability(value=Experimental)
protected void validateProps(@NotNull
VolumeProps props)
props - This parameter is required.@Stability(value=Experimental) @NotNull public String getAvailabilityZone()
getAvailabilityZone in interface IVolume@Stability(value=Experimental) @NotNull public String getVolumeId()
getVolumeId in interface IVolume@Stability(value=Experimental) @Nullable public IKey getEncryptionKey()
getEncryptionKey in interface IVolumeCopyright © 2021. All rights reserved.