| Did this page help you? Yes No Tell us about it... |
This action creates a new CloudFront origin access identity. You can create up to 100 per AWS account. For information about why and how you use CloudFront origin access identities, go to Serving Private Content in the Amazon CloudFront Developer Guide.
To create a new CloudFront origin access identity, you do a POST on the
2010-11-01/origin-access-identity/cloudfront resource. The request body
must include an XML document with a CloudFrontOriginAccessIdentityConfig element. The
response echoes the CloudFrontOriginAccessIdentityConfig element and returns other
metadata about the origin access identity.
POST /2010-11-01/origin-access-identity/cloudfront HTTP/1.1 Host: cloudfront.amazonaws.com Authorization: [AWS authentication string] Date: [time stamp] [Other required headers] <?xml version="1.0" encoding="UTF-8"?> <CloudFrontOriginAccessIdentityConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"> <CallerReference>ref</CallerReference> <Comment>The comment.</Comment> </CloudFrontOriginAccessIdentityConfig>
The request must include the headers required in all CloudFront requests. For more information, see Common REST Headers.
| Name | Description | Required |
|---|---|---|
|
|
The origin access identity's configuration information. For more information, see CloudFrontOriginAccessIdentityConfig Complex Type. Type: Default: None |
Yes |
201 Created
Location: [URI of new origin access identity]
x-amz-request-id: [Request ID]
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentity xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<Id>E74FTE3AJFJ256A</Id>
<S3CanonicalUserId>
cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9a69ba19f
</S3CanonicalUserId>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference/>
<Comment/>
</CloudFrontOriginAccessIdentityConfig>
</CloudFrontOriginAccessIdentity>| Name | Description |
|---|---|
|
|
The fully qualified URI of the new origin access identity just
created. For example: Type: String |
| Name | Description |
|---|---|
|
|
The origin access identity's information. For more information, see CloudFrontOriginAccessIdentity Complex Type. Type: |
The following table lists the special errors returned in addition to the common errors all actions return (for more information, see Errors).
| Error | Description | HTTP Status Code |
|---|---|---|
|
|
The caller reference you attempted to create the origin access identity with is associated with another identity. |
409 |
|
|
This operation requires a body. Ensure that the body is present and the Content-Type header is set. |
400 |
|
|
Processing your request would cause you to exceed the maximum number of CloudFront origin access identities allowed. |
400 |
The following example request creates a new CloudFront origin access identity.
POST /2010-11-01/origin-access-identity/cloudfront HTTP/1.1 Host: cloudfront.amazonaws.com Authorization: AWS O39F6A430S6FJNPPGDR2:frJIUN8DYpKDtOLEXAMPLE= Date: Thu, 19 Nov 2009 19:37:58 GMT [Other required headers] <?xml version="1.0" encoding="UTF-8"?> <CloudFrontOriginAccessIdentityConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"> <CallerReference>20091130090000</CallerReference> <Comment>My comments</Comment> </CloudFrontOriginAccessIdentityConfig>
201 Created
Location: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A
x-amz-request-id: request_id
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentity xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/">
<Id>E74FTE3AJFJ256A</Id>
<S3CanonicalUserId>
cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9a69ba19f
</S3CanonicalUserId>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference>20091130090000</CallerReference>
<Comment>My comments</Comment>
</CloudFrontOriginAccessIdentityConfig>
</CloudFrontOriginAccessIdentity>