create_tape_with_barcode
¶
create_tape_with_barcode(
gateway_arn: GatewayARN,
tape_size_in_bytes: TapeSize,
tape_barcode: TapeBarcode,
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
kms_encrypted: Optional[Boolean] = None,
kms_key: Optional[KMSKey] = None,
pool_id: Optional[PoolId] = None,
worm: Optional[Boolean2] = None,
tags: Optional[Tags] = None,
) -> CreateTapeWithBarcodeOutput
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.
Parameters:
-
gateway_arn(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 Amazon Web Services Region.
-
tape_size_in_bytes(TapeSize) –The size, in bytes, of the virtual tape that you want to create.
The size must be aligned by gigabyte (1024*1024*1024 bytes).
-
tape_barcode(TapeBarcode) –The barcode that you want to assign to the tape.
Barcodes cannot be reused. This includes barcodes used for tapes that have been deleted.
-
kms_encrypted(Optional[Boolean], default:None) –Set to
trueto use Amazon S3 server-side encryption with your own KMS key, orfalseto use a key managed by Amazon S3. Optional.Valid Values:
true|false -
kms_key(Optional[KMSKey], default:None) –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
KMSEncryptedistrue. Optional. -
pool_id(Optional[PoolId], default:None) –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.
-
worm(Optional[Boolean2], default:None) –Set to
TRUEif the tape you are creating is to be configured as a write-once-read-many (WORM) tape. -
tags(Optional[Tags], default:None) –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.
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.
Raises:
-
InternalServerError–An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException–An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a virtual tape using a barcode Creates a virtual tape by using your own barcode.
>>> client.create_tape_with_barcode(gateway_arn='arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B', tape_size_in_bytes=107374182400, tape_barcode='TEST12345')
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 | |