Amazon CloudFront
API Reference (API Version 2010-11-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

DELETE Distribution

Description

This action deletes a distribution. You must follow a particular process when deleting a distribution. For more information, go to Deleting a Distribution in the Amazon CloudFront Developer Guide.

To delete a disabled distribution, you do a DELETE on the 2010-11-01/distribution/<distribution ID> resource. If you haven't disabled the distribution, Amazon CloudFront returns a DistributionNotDisabled error.

Requests

Syntax

DELETE /2010-11-01/distribution/<distribution ID> HTTP/1.1
Host: cloudfront.amazonaws.com
If-Match: [value from ETag header in previous GET or PUT response]
Authorization: [AWS authentication string]
Date: [time stamp]
[Other required headers]	

Headers

The following table lists the special request header the action uses in addition to the common request headers all actions use (for more information, see Common REST Headers).

NameDescriptionRequired

If-Match

The value of the ETag header you received when you disabled the distribution. For example: E2QWRUHAPOMQZL

Type: String

Yes

Responses

Syntax

204 No Content
x-amz-request-id: [Request ID]

Special Errors

The following table lists the special errors returned in addition to the common errors all actions return (for more information, see Errors).

ErrorDescriptionHTTP Status Code

DistributionNotDisabled

The distribution you are trying to delete has not been disabled.

409

InvalidIfMatchVersion

The If-Match version is missing or not valid for the distribution.

400

NoSuchDistribution

The specified distribution does not exist.

404

PreconditionFailed

The precondition given in one or more of the request-header fields evaluated to false.

412

Examples

The following example request deletes the EDFDVBD632BHDS5 distribution.

Sample Request

DELETE /2010-11-01/distribution/EDFDVBD632BHDS5 HTTP 1.1
Host: cloudfront.amazonaws.com
If-Match: E2QWRUHAPOMQZL
Authorization: AWS O39F6A430S6FJNPPGDR2:frJIUN8DYpKDtOLEXAMPLE=
[Other required headers]

Sample Response

204 No Content
x-amz-request-id: request_id