AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
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.
For .NET Core this operation is only available in asynchronous form. Please refer to InitiateJobAsync.
Namespace: Amazon.Glacier
Assembly: AWSSDK.Glacier.dll
Version: 3.x.y.z
public abstract InitiateJobResponse InitiateJob( InitiateJobRequest request )
Container for the necessary parameters to execute the InitiateJob service method.
| Exception | Condition |
|---|---|
| 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. |
| 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. |
The example initiates an inventory-retrieval job for the vault named examplevault.
var client = new AmazonGlacierClient();
var response = client.InitiateJob(new InitiateJobRequest
{
AccountId = "-",
JobParameters = new JobParameters {
Description = "My inventory job",
Format = "CSV",
SNSTopic = "arn:aws:sns:us-west-2:111111111111:Glacier-InventoryRetrieval-topic-Example",
Type = "inventory-retrieval"
},
VaultName = "examplevault"
});
string jobId = response.JobId;
string location = response.Location;
.NET Framework:
Supported in: 4.5 and newer, 3.5