Class CfnVolume
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.storagegateway.CfnVolume
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IVolumeRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)",
date="2026-09-30T11:05:02.744Z")
@Stability(Stable)
public class CfnVolume
extends CfnResource
implements IInspectable, IVolumeRef, ITaggableV2
Creates a cached iSCSI volume on a Storage Gateway.
A cached volume stores data in Amazon S3 and retains a copy of frequently accessed data subsets locally.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.storagegateway.*;
CfnVolume cfnVolume = CfnVolume.Builder.create(this, "MyCfnVolume")
.gatewayArn("gatewayArn")
.networkInterfaceId("networkInterfaceId")
.targetName("targetName")
.volumeSizeInBytes(123)
// the properties below are optional
.kmsEncrypted(false)
.kmsKey("kmsKey")
.snapshotId("snapshotId")
.sourceVolumeArn("sourceVolumeArn")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.storagegateway.IVolumeRef
IVolumeRef.Jsii$Default, IVolumeRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnVolume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnVolume(software.amazon.jsii.JsiiObjectRef objRef) CfnVolume(software.constructs.Construct scope, String id, CfnVolumeProps props) Create a newAWS::StorageGateway::Volume. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForVolume(IVolumeRef resource) The date the volume was created.The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI target name.The Amazon Resource Name (ARN) of the storage volume.Indicates whether the storage volume is attached to or detached from the gateway.The unique identifier of the volume, extracted from the ARN.The status of the storage volume.The type of the volume (CACHED iSCSI).The size of the data stored on the volume in bytes.Tag Manager which manages the tags for this resource.The Amazon Resource Name (ARN) of the gateway on which to create the volume.Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3.The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption.The network interface of the gateway on which to expose the iSCSI target.The snapshot ID of the snapshot to restore as the new cached volume (e.g., snap-1122aabb).The ARN of an existing volume from which to create the new volume.getTags()A list of up to 50 tags to assign to the volume.The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN.A reference to a Volume resource.The size of the volume in bytes.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnVolume.renderProperties(Map<String, Object> props) voidsetGatewayArn(String value) The Amazon Resource Name (ARN) of the gateway on which to create the volume.voidsetKmsEncrypted(Boolean value) Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3.voidsetKmsEncrypted(IResolvable value) Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3.voidThe Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption.voidsetNetworkInterfaceId(String value) The network interface of the gateway on which to expose the iSCSI target.voidsetSnapshotId(String value) The snapshot ID of the snapshot to restore as the new cached volume (e.g., snap-1122aabb).voidsetSourceVolumeArn(String value) The ARN of an existing volume from which to create the new volume.voidA list of up to 50 tags to assign to the volume.voidsetTargetName(String value) The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN.voidsetVolumeSizeInBytes(Number value) The size of the volume in bytes.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, addResourceDependency, addResourceDependency, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, removeDependency, removeResourceDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnVolume
protected CfnVolume(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVolume
protected CfnVolume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVolume
@Stability(Stable) public CfnVolume(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnVolumeProps props) Create a newAWS::StorageGateway::Volume.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForVolume
- Parameters:
resource- This parameter is required.
-
isCfnVolume
Checks whether the given object is a CfnVolume.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreatedDate
The date the volume was created. -
getAttrTargetArn
The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI target name. -
getAttrVolumeArn
The Amazon Resource Name (ARN) of the storage volume. -
getAttrVolumeAttachmentStatus
Indicates whether the storage volume is attached to or detached from the gateway. -
getAttrVolumeId
The unique identifier of the volume, extracted from the ARN. -
getAttrVolumeStatus
The status of the storage volume. -
getAttrVolumeType
The type of the volume (CACHED iSCSI). -
getAttrVolumeUsedInBytes
The size of the data stored on the volume in bytes. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getVolumeRef
A reference to a Volume resource.- Specified by:
getVolumeRefin interfaceIVolumeRef
-
getGatewayArn
The Amazon Resource Name (ARN) of the gateway on which to create the volume. -
setGatewayArn
The Amazon Resource Name (ARN) of the gateway on which to create the volume. -
getNetworkInterfaceId
The network interface of the gateway on which to expose the iSCSI target. -
setNetworkInterfaceId
The network interface of the gateway on which to expose the iSCSI target. -
getTargetName
The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN. -
setTargetName
The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN. -
getVolumeSizeInBytes
The size of the volume in bytes. -
setVolumeSizeInBytes
The size of the volume in bytes. -
getKmsEncrypted
Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3.Returns union: either
BooleanorIResolvable -
setKmsEncrypted
Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3. -
setKmsEncrypted
Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3. -
getKmsKey
The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. -
setKmsKey
The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. -
getSnapshotId
The snapshot ID of the snapshot to restore as the new cached volume (e.g., snap-1122aabb). -
setSnapshotId
The snapshot ID of the snapshot to restore as the new cached volume (e.g., snap-1122aabb). -
getSourceVolumeArn
The ARN of an existing volume from which to create the new volume. -
setSourceVolumeArn
The ARN of an existing volume from which to create the new volume. -
getTags
A list of up to 50 tags to assign to the volume. -
setTags
A list of up to 50 tags to assign to the volume.
-