| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
This section describes the required headers that you must send with every POST request to AWS Storage Gateway. You include HTTP headers to identify key information about the request including the operation you want to invoke, the date of the request, and information that indicates the authorization of you as the sender of the request. Headers are case insensitive and the order of the headers is not important.
The following example shows headers that are used in the ActivateGateway operation.
POST / HTTP/1.1 Host: storagegateway.us-east-1.amazonaws.com Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-1/storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2 x-amz-date: 20120912T120000Z x-amz-target: StorageGateway_20120630.ActivateGateway
The following are the headers that must include with your POST requests to AWS Storage Gateway. Headers shown below that begin with "x-amz" are AWS-specific headers. All other headers listed are common header used in HTTP transactions.
| Header | Description |
|---|---|
Authorization |
The authorization header contains several of pieces of information about the request that enable AWS Storage Gateway to determine if the request is a valid action for the requester. The format of this header is as follows (line breaks added for readability):
Authorization: AWS4-HMAC_SHA456 Credentials=
In the preceding syntax, you specify YourAccessKey, the year, month, and day (yyyymmdd), the region, and the CalculatedSignature. The format of the authorization header is dictated by the requirements of the AWS V4 Signing process. The details of signing are discussed in the topic Signing Requests. |
Content-Type |
Use
Content-Type: application/x-amz-json-1.1
|
Host |
Use the host header to specify the AWS Storage Gateway endpoint where you send your
request. For example,
Host: storagegateway.
|
x-amz-date |
You must provide the time stamp in either the HTTP
x-amz-date:
|
x-amz-target |
This header specifies the version of the API and the operation that you are requesting. The target header values are formed by concatenating the API version with the API name and are in the following format.
x-amz-target: StorageGateway_
The operationName value (e.g. "ActivateGateway") can be found from the API list, API Reference for AWS Storage Gateway. |