java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITapeRef, 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.741Z") @Stability(Stable) public class CfnTape extends CfnResource implements IInspectable, ITapeRef, ITaggableV2
Creates a virtual tape with a user-defined barcode on a Tape Gateway (VTL).

A virtual tape is stored in Amazon S3 and can be archived to S3 Glacier or S3 Glacier Deep Archive.

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.*;
 CfnTape cfnTape = CfnTape.Builder.create(this, "MyCfnTape")
         .gatewayArn("gatewayArn")
         .tapeSizeInBytes(123)
         // the properties below are optional
         .kmsEncrypted(false)
         .kmsKey("kmsKey")
         .poolId("poolId")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .tapeBarcode("tapeBarcode")
         .worm(false)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTape

      protected CfnTape(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTape

      protected CfnTape(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTape

      @Stability(Stable) public CfnTape(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTapeProps props)
      Create a new AWS::StorageGateway::Tape.

      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

    • arnForTape

      @Stability(Stable) @NotNull public static String arnForTape(@NotNull ITapeRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTape

      @Stability(Stable) @NotNull public static Boolean isCfnTape(@NotNull Object x)
      Checks whether the given object is a CfnTape.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrTapeArn

      @Stability(Stable) @NotNull public String getAttrTapeArn()
      The Amazon Resource Name (ARN) of the virtual tape.
    • getAttrTapeCreatedDate

      @Stability(Stable) @NotNull public String getAttrTapeCreatedDate()
      The date and time that the virtual tape was created.
    • getAttrTapeStatus

      @Stability(Stable) @NotNull public String getAttrTapeStatus()
      The current status of the virtual tape.
    • getAttrTapeUsedInBytes

      @Stability(Stable) @NotNull public IResolvable getAttrTapeUsedInBytes()
      The size, in bytes, of data stored on the virtual tape.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTapeRef

      @Stability(Stable) @NotNull public TapeReference getTapeRef()
      A reference to a Tape resource.
      Specified by:
      getTapeRef in interface ITapeRef
    • getGatewayArn

      @Stability(Stable) @NotNull public String getGatewayArn()
      The Amazon Resource Name (ARN) of the Tape Gateway that hosts the virtual tape.
    • setGatewayArn

      @Stability(Stable) public void setGatewayArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the Tape Gateway that hosts the virtual tape.
    • getTapeSizeInBytes

      @Stability(Stable) @NotNull public Number getTapeSizeInBytes()
      The size, in bytes, of the virtual tape that you want to create.
    • setTapeSizeInBytes

      @Stability(Stable) public void setTapeSizeInBytes(@NotNull Number value)
      The size, in bytes, of the virtual tape that you want to create.
    • getKmsEncrypted

      @Stability(Stable) @Nullable public Object 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 Boolean or IResolvable

    • setKmsEncrypted

      @Stability(Stable) public void setKmsEncrypted(@Nullable 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.
    • setKmsEncrypted

      @Stability(Stable) public void setKmsEncrypted(@Nullable 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.
    • getKmsKey

      @Stability(Stable) @Nullable public String getKmsKey()
      The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption.
    • setKmsKey

      @Stability(Stable) public void setKmsKey(@Nullable String value)
      The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption.
    • getPoolId

      @Stability(Stable) @Nullable public String getPoolId()
      The ID of the pool that you want to add your tape to for archiving.
    • setPoolId

      @Stability(Stable) public void setPoolId(@Nullable String value)
      The ID of the pool that you want to add your tape to for archiving.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of up to 50 tags to assign to the virtual tape.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of up to 50 tags to assign to the virtual tape.
    • getTapeBarcode

      @Stability(Stable) @Nullable public String getTapeBarcode()
      The barcode that you want to assign to the virtual tape.
    • setTapeBarcode

      @Stability(Stable) public void setTapeBarcode(@Nullable String value)
      The barcode that you want to assign to the virtual tape.
    • getWorm

      @Stability(Stable) @Nullable public Object getWorm()
      Set to true to create a write-once-read-many (WORM) virtual tape.

      Returns union: either Boolean or IResolvable

    • setWorm

      @Stability(Stable) public void setWorm(@Nullable Boolean value)
      Set to true to create a write-once-read-many (WORM) virtual tape.
    • setWorm

      @Stability(Stable) public void setWorm(@Nullable IResolvable value)
      Set to true to create a write-once-read-many (WORM) virtual tape.