createTapeWithBarcode
inline suspend fun StorageGatewayClient.createTapeWithBarcode(crossinline block: CreateTapeWithBarcodeRequest.Builder.() -> Unit): CreateTapeWithBarcodeResponse
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.
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.
Samples
fun main() {
//sampleStart
// Creates a virtual tape by using your own barcode.
val resp = storageGatewayClient.createTapeWithBarcode {
gatewayArn = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"
tapeSizeInBytes = 107374182400
tapeBarcode = "TEST12345"
}
//sampleEnd
}