create_tapes
async
¶
create_tapes(
gateway_arn: GatewayARN,
tape_size_in_bytes: TapeSize,
client_token: ClientToken,
num_tapes_to_create: NumTapesToCreate,
tape_barcode_prefix: TapeBarcodePrefix,
*,
config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
kms_encrypted: Optional[Boolean] = None,
kms_key: Optional[KMSKey] = None,
pool_id: Optional[PoolId] = None,
worm: Optional[Boolean2] = None,
tags: Optional[Tags] = None,
) -> CreateTapesOutput
Creates one or more virtual tapes. You write data to the virtual tapes and then archive the tapes. This operation is only supported in the tape gateway type.
Cache storage must be allocated to the gateway before you can create virtual tapes. 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 tapes 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 tapes that you want to create.
The size must be aligned by gigabyte (1024*1024*1024 bytes).
-
client_token(ClientToken) –A unique identifier that you use to retry a request. If you retry a request, use the same
ClientTokenyou specified in the initial request.Using the same
ClientTokenprevents creating the tape multiple times. -
num_tapes_to_create(NumTapesToCreate) –The number of virtual tapes that you want to create.
-
tape_barcode_prefix(TapeBarcodePrefix) –A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode unique.
The prefix must be 1-4 characters in length and must be one of the uppercase letters from A to Z.
-
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 Glacier 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. 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 Creates one or more virtual tapes.
>>> await client.create_tapes(gateway_arn='arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B', tape_size_in_bytes=107374182400, client_token='77777', num_tapes_to_create=3, tape_barcode_prefix='TEST')
Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 | |