com.amazonaws.services.cloudfront

## Class AbstractAmazonCloudFront

- java.lang.Object
- - com.amazonaws.services.cloudfront.AbstractAmazonCloudFront

All Implemented Interfaces:
  AmazonCloudFront

Direct Known Subclasses:
  AbstractAmazonCloudFrontAsync

    public class AbstractAmazonCloudFront
    extends Object
    implements AmazonCloudFront

Abstract implementation of `AmazonCloudFront`. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an `UnsupportedOperationException`.

### Field Summary

### Fields inherited from interface com.amazonaws.services.cloudfront.AmazonCloudFront

`ENDPOINT_PREFIX`

### Constructor Summary

Constructors
`protected` `AbstractAmazonCloudFront()`

### Method Summary

All Methods Instance Methods Concrete Methods
`CreateCloudFrontOriginAccessIdentityResult` `createCloudFrontOriginAccessIdentity(CreateCloudFrontOriginAccessIdentityRequest request)` Creates a new origin access identity.
`CreateDistributionResult` `createDistribution(CreateDistributionRequest request)` Creates a new web distribution.
`CreateDistributionWithTagsResult` `createDistributionWithTags(CreateDistributionWithTagsRequest request)` Create a new distribution with tags.
`CreateInvalidationResult` `createInvalidation(CreateInvalidationRequest request)` Create a new invalidation.
`CreateStreamingDistributionResult` `createStreamingDistribution(CreateStreamingDistributionRequest request)` Creates a new RMTP distribution.
`CreateStreamingDistributionWithTagsResult` `createStreamingDistributionWithTags(CreateStreamingDistributionWithTagsRequest request)` Create a new streaming distribution with tags.
`DeleteCloudFrontOriginAccessIdentityResult` `deleteCloudFrontOriginAccessIdentity(DeleteCloudFrontOriginAccessIdentityRequest request)` Delete an origin access identity.
`DeleteDistributionResult` `deleteDistribution(DeleteDistributionRequest request)` Delete a distribution.
`DeleteStreamingDistributionResult` `deleteStreamingDistribution(DeleteStreamingDistributionRequest request)` Delete a streaming distribution.
`ResponseMetadata` `getCachedResponseMetadata(AmazonWebServiceRequest request)` Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected.
`GetCloudFrontOriginAccessIdentityResult` `getCloudFrontOriginAccessIdentity(GetCloudFrontOriginAccessIdentityRequest request)` Get the information about an origin access identity.
`GetCloudFrontOriginAccessIdentityConfigResult` `getCloudFrontOriginAccessIdentityConfig(GetCloudFrontOriginAccessIdentityConfigRequest request)` Get the configuration information about an origin access identity.
`GetDistributionResult` `getDistribution(GetDistributionRequest request)` Get the information about a distribution.
`GetDistributionConfigResult` `getDistributionConfig(GetDistributionConfigRequest request)` Get the configuration information about a distribution.
`GetInvalidationResult` `getInvalidation(GetInvalidationRequest request)` Get the information about an invalidation.
`GetStreamingDistributionResult` `getStreamingDistribution(GetStreamingDistributionRequest request)` Gets information about a specified RTMP distribution, including the distribution configuration.
`GetStreamingDistributionConfigResult` `getStreamingDistributionConfig(GetStreamingDistributionConfigRequest request)` Get the configuration information about a streaming distribution.
`ListCloudFrontOriginAccessIdentitiesResult` `listCloudFrontOriginAccessIdentities(ListCloudFrontOriginAccessIdentitiesRequest request)` Lists origin access identities.
`ListDistributionsResult` `listDistributions(ListDistributionsRequest request)` List distributions.
`ListDistributionsByWebACLIdResult` `listDistributionsByWebACLId(ListDistributionsByWebACLIdRequest request)` List the distributions that are associated with a specified AWS WAF web ACL.
`ListInvalidationsResult` `listInvalidations(ListInvalidationsRequest request)` Lists invalidation batches.
`ListStreamingDistributionsResult` `listStreamingDistributions(ListStreamingDistributionsRequest request)` List streaming distributions.
`ListTagsForResourceResult` `listTagsForResource(ListTagsForResourceRequest request)` List tags for a CloudFront resource.
`void` `setEndpoint(String endpoint)` Overrides the default endpoint for this client ("https://cloudfront.amazonaws.com/").
`void` `setRegion(Region region)` An alternative to `AmazonCloudFront.setEndpoint(String)`, sets the regional endpoint for this client's service calls.
`void` `shutdown()` Shuts down this client object, releasing any resources that might be held open.
`TagResourceResult` `tagResource(TagResourceRequest request)` Add tags to a CloudFront resource.
`UntagResourceResult` `untagResource(UntagResourceRequest request)` Remove tags from a CloudFront resource.
`UpdateCloudFrontOriginAccessIdentityResult` `updateCloudFrontOriginAccessIdentity(UpdateCloudFrontOriginAccessIdentityRequest request)` Update an origin access identity.
`UpdateDistributionResult` `updateDistribution(UpdateDistributionRequest request)` Update a distribution.
`UpdateStreamingDistributionResult` `updateStreamingDistribution(UpdateStreamingDistributionRequest request)` Update a streaming distribution.
`AmazonCloudFrontWaiters` `waiters()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AbstractAmazonCloudFront

    protected AbstractAmazonCloudFront()

### Method Detail

#### setEndpoint

    public void setEndpoint(String endpoint)

Description copied from interface: `AmazonCloudFront`
Overrides the default endpoint for this client ("https://cloudfront.amazonaws.com/"). Callers can use this method to control which AWS region they want to work with.

Callers can pass in just the endpoint (ex: "cloudfront.amazonaws.com/") or a full URL, including the protocol (ex: "https://cloudfront.amazonaws.com/"). If the protocol is not specified here, the default protocol from this client's `ClientConfiguration` will be used, which by default is HTTPS.

For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912

This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.

Specified by:
  `setEndpoint` in interface `AmazonCloudFront`
Parameters:
  `endpoint` - The endpoint (ex: "cloudfront.amazonaws.com/") or a full URL, including the protocol (ex: "https://cloudfront.amazonaws.com/") of the region specific AWS endpoint this client will communicate with.

#### setRegion

    public void setRegion(Region region)

Description copied from interface: `AmazonCloudFront`
An alternative to `AmazonCloudFront.setEndpoint(String)`, sets the regional endpoint for this client's service calls. Callers can use this method to control which AWS region they want to work with.

By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the `ClientConfiguration` supplied at construction.

This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.

Specified by:
  `setRegion` in interface `AmazonCloudFront`
Parameters:
  `region` - The region this client will communicate with. See `Region.getRegion(com.amazonaws.regions.Regions)` for accessing a given region. Must not be null and must be a region where the service is available.
See Also:
  `Region.getRegion(com.amazonaws.regions.Regions)`, `Region.createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)`, `Region.isServiceSupported(String)`

#### createCloudFrontOriginAccessIdentity

    public CreateCloudFrontOriginAccessIdentityResult createCloudFrontOriginAccessIdentity(CreateCloudFrontOriginAccessIdentityRequest request)

Description copied from interface: `AmazonCloudFront`

Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.

Specified by:
  `createCloudFrontOriginAccessIdentity` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create a new origin access identity.
Returns:
  Result of the CreateCloudFrontOriginAccessIdentity operation returned by the service.

#### createDistribution

    public CreateDistributionResult createDistribution(CreateDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Creates a new web distribution. Send a `GET` request to the `/CloudFront API version/distribution`/`distribution ID` resource.

Specified by:
  `createDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create a new distribution.
Returns:
  Result of the CreateDistribution operation returned by the service.

#### createDistributionWithTags

    public CreateDistributionWithTagsResult createDistributionWithTags(CreateDistributionWithTagsRequest request)

Description copied from interface: `AmazonCloudFront`

Create a new distribution with tags.

Specified by:
  `createDistributionWithTags` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create a new distribution with tags.
Returns:
  Result of the CreateDistributionWithTags operation returned by the service.

#### createInvalidation

    public CreateInvalidationResult createInvalidation(CreateInvalidationRequest request)

Description copied from interface: `AmazonCloudFront`

Create a new invalidation.

Specified by:
  `createInvalidation` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create an invalidation.
Returns:
  Result of the CreateInvalidation operation returned by the service.

#### createStreamingDistribution

    public CreateStreamingDistributionResult createStreamingDistribution(CreateStreamingDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Creates a new RMTP distribution. An RTMP distribution is similar to a web distribution, but an RTMP distribution streams media files using the Adobe Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.

To create a new web distribution, submit a `POST` request to the CloudFront API version/distribution resource. The request body must include a document with a StreamingDistributionConfig element. The response echoes the `StreamingDistributionConfig` element and returns other information about the RTMP distribution.

To get the status of your request, use the GET StreamingDistribution API action. When the value of `Enabled` is `true` and the value of `Status` is `Deployed`, your distribution is ready. A distribution usually deploys in less than 15 minutes.

For more information about web distributions, see Working with RTMP Distributions in the Amazon CloudFront Developer Guide.

<important>

Beginning with the 2012-05-05 version of the CloudFront API, we made substantial changes to the format of the XML document that you include in the request body when you create or update a web distribution or an RTMP distribution, and when you invalidate objects. With previous versions of the API, we discovered that it was too easy to accidentally delete one or more values for an element that accepts multiple values, for example, CNAMEs and trusted signers. Our changes for the 2012-05-05 release are intended to prevent these accidental deletions and to notify you when there's a mismatch between the number of values you say you're specifying in the `Quantity` element and the number of values specified.

</important>

Specified by:
  `createStreamingDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create a new streaming distribution.
Returns:
  Result of the CreateStreamingDistribution operation returned by the service.

#### createStreamingDistributionWithTags

    public CreateStreamingDistributionWithTagsResult createStreamingDistributionWithTags(CreateStreamingDistributionWithTagsRequest request)

Description copied from interface: `AmazonCloudFront`

Create a new streaming distribution with tags.

Specified by:
  `createStreamingDistributionWithTags` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to create a new streaming distribution with tags.
Returns:
  Result of the CreateStreamingDistributionWithTags operation returned by the service.

#### deleteCloudFrontOriginAccessIdentity

    public DeleteCloudFrontOriginAccessIdentityResult deleteCloudFrontOriginAccessIdentity(DeleteCloudFrontOriginAccessIdentityRequest request)

Description copied from interface: `AmazonCloudFront`

Delete an origin access identity.

Specified by:
  `deleteCloudFrontOriginAccessIdentity` in interface `AmazonCloudFront`
Parameters:
  `request` - Deletes a origin access identity.
Returns:
  Result of the DeleteCloudFrontOriginAccessIdentity operation returned by the service.

#### deleteDistribution

    public DeleteDistributionResult deleteDistribution(DeleteDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Delete a distribution.

Specified by:
  `deleteDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - This action deletes a web distribution. To delete a web distribution using the CloudFront API, perform the following steps.

  To delete a web distribution using the CloudFront API:

  1. Disable the web distribution

  2. Submit a `GET Distribution Config` request to get the current configuration and the `Etag` header for the distribution.

  3. Update the XML document that was returned in the response to your `GET Distribution Config` request to change the value of `Enabled` to `false`.

  4. Submit a `PUT Distribution Config` request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Distribution Config` request in Step 2.

  5. Review the response to the `PUT Distribution Config` request to confirm that the distribution was successfully disabled.

  6. Submit a `GET Distribution` request to confirm that your changes have propagated. When propagation is complete, the value of `Status` is `Deployed`.

  7. Submit a `DELETE Distribution` request. Set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Distribution Config` request in Step 6.

  8. Review the response to your `DELETE Distribution` request to confirm that the distribution was successfully deleted.

  For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the Amazon CloudFront Developer Guide.

Returns:
  Result of the DeleteDistribution operation returned by the service.

#### deleteStreamingDistribution

    public DeleteStreamingDistributionResult deleteStreamingDistribution(DeleteStreamingDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps.

To delete an RTMP distribution using the CloudFront API:

1. Disable the RTMP distribution.

2. Submit a `GET Streaming Distribution Config` request to get the current configuration and the `Etag` header for the distribution.

3. Update the XML document that was returned in the response to your `GET Streaming Distribution Config` request to change the value of `Enabled` to `false`.

4. Submit a `PUT Streaming Distribution Config` request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Streaming Distribution Config` request in Step 2.

5. Review the response to the `PUT Streaming Distribution Config` request to confirm that the distribution was successfully disabled.

6. Submit a `GET Streaming Distribution Config` request to confirm that your changes have propagated. When propagation is complete, the value of `Status` is `Deployed`.

7. Submit a `DELETE Streaming Distribution` request. Set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Streaming Distribution Config` request in Step 2.

8. Review the response to your `DELETE Streaming Distribution` request to confirm that the distribution was successfully deleted.

For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the Amazon CloudFront Developer Guide.

Specified by:
  `deleteStreamingDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to delete a streaming distribution.
Returns:
  Result of the DeleteStreamingDistribution operation returned by the service.

#### getCloudFrontOriginAccessIdentity

    public GetCloudFrontOriginAccessIdentityResult getCloudFrontOriginAccessIdentity(GetCloudFrontOriginAccessIdentityRequest request)

Description copied from interface: `AmazonCloudFront`

Get the information about an origin access identity.

Specified by:
  `getCloudFrontOriginAccessIdentity` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to get an origin access identity's information.
Returns:
  Result of the GetCloudFrontOriginAccessIdentity operation returned by the service.

#### getCloudFrontOriginAccessIdentityConfig

    public GetCloudFrontOriginAccessIdentityConfigResult getCloudFrontOriginAccessIdentityConfig(GetCloudFrontOriginAccessIdentityConfigRequest request)

Description copied from interface: `AmazonCloudFront`

Get the configuration information about an origin access identity.

Specified by:
  `getCloudFrontOriginAccessIdentityConfig` in interface `AmazonCloudFront`
Parameters:
  `request` - The origin access identity's configuration information. For more information, see CloudFrontOriginAccessIdentityConfigComplexType.
Returns:
  Result of the GetCloudFrontOriginAccessIdentityConfig operation returned by the service.

#### getDistribution

    public GetDistributionResult getDistribution(GetDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Get the information about a distribution.

Specified by:
  `getDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to get a distribution's information.
Returns:
  Result of the GetDistribution operation returned by the service.

#### getDistributionConfig

    public GetDistributionConfigResult getDistributionConfig(GetDistributionConfigRequest request)

Description copied from interface: `AmazonCloudFront`

Get the configuration information about a distribution.

Specified by:
  `getDistributionConfig` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to get a distribution configuration.
Returns:
  Result of the GetDistributionConfig operation returned by the service.

#### getInvalidation

    public GetInvalidationResult getInvalidation(GetInvalidationRequest request)

Description copied from interface: `AmazonCloudFront`

Get the information about an invalidation.

Specified by:
  `getInvalidation` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to get an invalidation's information.
Returns:
  Result of the GetInvalidation operation returned by the service.

#### getStreamingDistribution

    public GetStreamingDistributionResult getStreamingDistribution(GetStreamingDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Gets information about a specified RTMP distribution, including the distribution configuration.

Specified by:
  `getStreamingDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to get a streaming distribution's information.
Returns:
  Result of the GetStreamingDistribution operation returned by the service.

#### getStreamingDistributionConfig

    public GetStreamingDistributionConfigResult getStreamingDistributionConfig(GetStreamingDistributionConfigRequest request)

Description copied from interface: `AmazonCloudFront`

Get the configuration information about a streaming distribution.

Specified by:
  `getStreamingDistributionConfig` in interface `AmazonCloudFront`
Parameters:
  `request` - To request to get a streaming distribution configuration.
Returns:
  Result of the GetStreamingDistributionConfig operation returned by the service.

#### listCloudFrontOriginAccessIdentities

    public ListCloudFrontOriginAccessIdentitiesResult listCloudFrontOriginAccessIdentities(ListCloudFrontOriginAccessIdentitiesRequest request)

Description copied from interface: `AmazonCloudFront`

Lists origin access identities.

Specified by:
  `listCloudFrontOriginAccessIdentities` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list origin access identities.
Returns:
  Result of the ListCloudFrontOriginAccessIdentities operation returned by the service.

#### listDistributions

    public ListDistributionsResult listDistributions(ListDistributionsRequest request)

Description copied from interface: `AmazonCloudFront`

List distributions.

Specified by:
  `listDistributions` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list your distributions.
Returns:
  Result of the ListDistributions operation returned by the service.

#### listDistributionsByWebACLId

    public ListDistributionsByWebACLIdResult listDistributionsByWebACLId(ListDistributionsByWebACLIdRequest request)

Description copied from interface: `AmazonCloudFront`

List the distributions that are associated with a specified AWS WAF web ACL.

Specified by:
  `listDistributionsByWebACLId` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list distributions that are associated with a specified AWS WAF web ACL.
Returns:
  Result of the ListDistributionsByWebACLId operation returned by the service.

#### listInvalidations

    public ListInvalidationsResult listInvalidations(ListInvalidationsRequest request)

Description copied from interface: `AmazonCloudFront`

Lists invalidation batches.

Specified by:
  `listInvalidations` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list invalidations.
Returns:
  Result of the ListInvalidations operation returned by the service.

#### listStreamingDistributions

    public ListStreamingDistributionsResult listStreamingDistributions(ListStreamingDistributionsRequest request)

Description copied from interface: `AmazonCloudFront`

List streaming distributions.

Specified by:
  `listStreamingDistributions` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list your streaming distributions.
Returns:
  Result of the ListStreamingDistributions operation returned by the service.

#### listTagsForResource

    public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request)

Description copied from interface: `AmazonCloudFront`

List tags for a CloudFront resource.

Specified by:
  `listTagsForResource` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to list tags for a CloudFront resource.
Returns:
  Result of the ListTagsForResource operation returned by the service.

#### tagResource

    public TagResourceResult tagResource(TagResourceRequest request)

Description copied from interface: `AmazonCloudFront`

Add tags to a CloudFront resource.

Specified by:
  `tagResource` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to add tags to a CloudFront resource.
Returns:
  Result of the TagResource operation returned by the service.

#### untagResource

    public UntagResourceResult untagResource(UntagResourceRequest request)

Description copied from interface: `AmazonCloudFront`

Remove tags from a CloudFront resource.

Specified by:
  `untagResource` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to remove tags from a CloudFront resource.
Returns:
  Result of the UntagResource operation returned by the service.

#### updateCloudFrontOriginAccessIdentity

    public UpdateCloudFrontOriginAccessIdentityResult updateCloudFrontOriginAccessIdentity(UpdateCloudFrontOriginAccessIdentityRequest request)

Description copied from interface: `AmazonCloudFront`

Update an origin access identity.

Specified by:
  `updateCloudFrontOriginAccessIdentity` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to update an origin access identity.
Returns:
  Result of the UpdateCloudFrontOriginAccessIdentity operation returned by the service.

#### updateDistribution

    public UpdateDistributionResult updateDistribution(UpdateDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Update a distribution.

Specified by:
  `updateDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to update a distribution.
Returns:
  Result of the UpdateDistribution operation returned by the service.

#### updateStreamingDistribution

    public UpdateStreamingDistributionResult updateStreamingDistribution(UpdateStreamingDistributionRequest request)

Description copied from interface: `AmazonCloudFront`

Update a streaming distribution.

Specified by:
  `updateStreamingDistribution` in interface `AmazonCloudFront`
Parameters:
  `request` - The request to update a streaming distribution.
Returns:
  Result of the UpdateStreamingDistribution operation returned by the service.

#### shutdown

    public void shutdown()

Description copied from interface: `AmazonCloudFront`
Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.

Specified by:
  `shutdown` in interface `AmazonCloudFront`

#### getCachedResponseMetadata

    public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)

Description copied from interface: `AmazonCloudFront`
Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.

Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.

Specified by:
  `getCachedResponseMetadata` in interface `AmazonCloudFront`
Parameters:
  `request` - The originally executed request.
Returns:
  The response metadata for the specified request, or null if none is available.

#### waiters

    public AmazonCloudFrontWaiters waiters()

Specified by:
  `waiters` in interface `AmazonCloudFront`