Wählen Sie Ihre Cookie-Einstellungen aus

Wir verwenden essentielle Cookies und ähnliche Tools, die für die Bereitstellung unserer Website und Services erforderlich sind. Wir verwenden Performance-Cookies, um anonyme Statistiken zu sammeln, damit wir verstehen können, wie Kunden unsere Website nutzen, und Verbesserungen vornehmen können. Essentielle Cookies können nicht deaktiviert werden, aber Sie können auf „Anpassen“ oder „Ablehnen“ klicken, um Performance-Cookies abzulehnen.

Wenn Sie damit einverstanden sind, verwenden AWS und zugelassene Drittanbieter auch Cookies, um nützliche Features der Website bereitzustellen, Ihre Präferenzen zu speichern und relevante Inhalte, einschließlich relevanter Werbung, anzuzeigen. Um alle nicht notwendigen Cookies zu akzeptieren oder abzulehnen, klicken Sie auf „Akzeptieren“ oder „Ablehnen“. Um detailliertere Entscheidungen zu treffen, klicken Sie auf „Anpassen“.

CreateTapeWithBarcode - Storage Gateway
Diese Seite wurde nicht in Ihre Sprache übersetzt. Übersetzung anfragen

CreateTapeWithBarcode

Creates a virtual tape by using your own barcode. You write data to the virtual tape and then archive the tape. A barcode is unique and cannot be reused if it has already been used on a tape. This applies to barcodes used on deleted tapes. This operation is only supported in the tape gateway type.

Note

Cache storage must be allocated to the gateway before you can create a virtual tape. Use the AddCache operation to add cache storage to a gateway.

Request Syntax

{ "GatewayARN": "string", "KMSEncrypted": boolean, "KMSKey": "string", "PoolId": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "TapeBarcode": "string", "TapeSizeInBytes": number, "Worm": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

GatewayARN

The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tape with. Use the ListGateways operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes

KMSEncrypted

Set to true to use Amazon S3 server-side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Optional.

Valid Values: true | false

Type: Boolean

Required: No

KMSKey

The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value can only be set when KMSEncrypted is true. Optional.

Type: String

Length Constraints: Minimum length of 7. Maximum length of 2048.

Pattern: (^arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*)):kms:([a-zA-Z0-9-]+):([0-9]+):(key|alias)/(\S+)$)|(^alias/(\S+)$)

Required: No

PoolId

The ID of the pool that you want to add your tape to for archiving. The tape in this pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the storage class (S3 Glacier or S3 Deep Archive) that corresponds to the pool.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: No

Tags

A list of up to 50 tags that can be assigned to a virtual tape that has a barcode. Each tag is a key-value pair.

Note

Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

Type: Array of Tag objects

Required: No

TapeBarcode

The barcode that you want to assign to the tape.

Note

Barcodes cannot be reused. This includes barcodes used for tapes that have been deleted.

Type: String

Length Constraints: Minimum length of 5. Maximum length of 16.

Pattern: ^[A-Z0-9]*$

Required: Yes

TapeSizeInBytes

The size, in bytes, of the virtual tape that you want to create.

Note

The size must be aligned by gigabyte (1024*1024*1024 bytes).

Type: Long

Required: Yes

Worm

Set to TRUE if the tape you are creating is to be configured as a write-once-read-many (WORM) tape.

Type: Boolean

Required: No

Response Syntax

{ "TapeARN": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

TapeARN

A unique Amazon Resource Name (ARN) that represents the virtual tape that was created.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Pattern: arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*)):storagegateway:[a-z\-0-9]+:[0-9]+:tape\/[0-9A-Z]{5,16}$

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An internal server error has occurred during the request. For more information, see the error and message fields.

HTTP Status Code: 400

InvalidGatewayRequestException

An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

HTTP Status Code: 400

Examples

Create a tape with your own barcode in a tape gateway

In the following request, you add a 100 GB tape cartridge to the tape gateway with the ID sgw-12A3456B. The tape appears in the gateway's virtual tape library. In the request, you set the barcode to "TEST12345".

Sample Request

{ "GatewayARN": "arn:aws:storagegateway:us-east-2:999999999999:gateway/sgw-12A3456B", "KMSEncrypted": "true", "KMSKey": "arn:aws:kms:us-east-1:11111111:key/b72aaa2a-2222-99tt-12345690qwe", "TapeSizeInBytes": "107374182400", "PooId": "Deep_Archive", "TapeBarcode": "TEST12345" }

Sample Response

{ "TapeARN": [ "arn:aws:storagegateway:us-east-2:999999999999:tape/TEST12345" ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

DatenschutzNutzungsbedingungen für die WebsiteCookie-Einstellungen
© 2025, Amazon Web Services, Inc. oder Tochtergesellschaften. Alle Rechte vorbehalten.