initiate_job
async
¶
initiate_job(
account_id: string,
vault_name: string,
*,
config_overrides: Optional[AsyncGlacierClientConfig] = None,
job_parameters: Optional[JobParameters] = None,
) -> InitiateJobOutput
This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval. For more information about using this operation, see the documentation for the underlying REST API Initiate a Job.
Parameters:
-
account_id(string) –The
AccountIdvalue is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. -
vault_name(string) –The name of the vault.
-
job_parameters(Optional[JobParameters], default:None) –Provides options for specifying job information.
Raises:
-
InsufficientCapacityException–Returned if there is insufficient capacity to process this expedited request. This error only applies to expedited retrievals and not to standard or bulk retrievals.
-
InvalidParameterValueException–Returned if a parameter of the request is incorrectly specified.
-
MissingParameterValueException–Returned if a required header or parameter is missing from the request.
-
NoLongerSupportedException–Returned if the request was made by a customer with no Amazon Glacier storage. The request is denied as the API is no longer supported for new customers. Please use Amazon S3 Glacier storage classes instead.
-
PolicyEnforcedException–Returned if a retrieval job would exceed the current data policy's retrieval rate limit. For more information about data retrieval policies,
-
ResourceNotFoundException–Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.
-
ServiceUnavailableException–Returned if the service cannot complete the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To initiate an inventory-retrieval job The example initiates an inventory-retrieval job for the vault named examplevault.
>>> await client.initiate_job(account_id='-', vault_name='examplevault', job_parameters={'Type': 'inventory-retrieval', 'Description': 'My inventory job', 'Format': 'CSV', 'SNSTopic': 'arn:aws:sns:us-west-2:111111111111:Glacier-InventoryRetrieval-topic-Example'})
Source code in docs_src/capo_glacier/_services/async_glacier.py
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | |