The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.CloudFront

Inherits:
AWS.Service show all
Identifier:
cloudfront
API Version:
2020-05-31
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

This is the Amazon CloudFront API Reference. This guide is for developers who need detailed information about CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the Amazon CloudFront Developer Guide.

Sending a Request Using CloudFront

var cloudfront = new AWS.CloudFront();
cloudfront.associateAlias(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the CloudFront object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var cloudfront = new AWS.CloudFront({apiVersion: '2020-05-31'});

You can also set the API version globally in AWS.config.apiVersions using the cloudfront service identifier:

AWS.config.apiVersions = {
  cloudfront: '2020-05-31',
  // other service API versions
};

var cloudfront = new AWS.CloudFront();

Version:

  • 2020-05-31

Defined Under Namespace

Classes: Signer

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

distributionDeployed, invalidationCompleted, streamingDistributionDeployed

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse