aws-lite

CloudFront

@aws-lite/cloudfront

Maintained by: @architect

Install

npm i @aws-lite/cloudfront

Optionally install types:

npm i -D @aws-lite/cloudfront-types

Methods

CreateDistribution

Canonical AWS API doc

Properties

DistributionConfig (object) [required]

Complete distribution configuration object

Example
await aws.CloudFront.CreateDistribution({
  DistributionConfig: Object, // required
})

CreateInvalidation

Canonical AWS API doc

Properties

CallerReference (string) [required]

Unique value that ensures that the request cannot be replayed

Id (string) [required]

Distribution ID

InvalidationBatch (string, array)

One or more invalidation parameters

Example
await aws.CloudFront.CreateInvalidation({
  CallerReference: String, // required
  Id: String, // required
  InvalidationBatch: String || Array,
})

DeleteDistribution

Canonical AWS API doc

Properties

Id (string) [required]

Distribution ID

IfMatch (string)

Value of previous GetDistribution call’s ETag property

Example

await aws.CloudFront.DeleteDistribution({
  Id: String, // required
  IfMatch: String,
})

GetDistribution

Canonical AWS API doc

Properties

Id (string) [required]

Distribution ID

Example

await aws.CloudFront.GetDistribution({
  Id: String, // required
})

GetDistributionConfig

Canonical AWS API doc

Properties

Id (string) [required]

Distribution ID

Example

await aws.CloudFront.GetDistributionConfig({
  Id: String, // required
})

ListDistributions

Canonical AWS API doc

Properties

Marker (string)

Pagination cursor token to be used if NextMarker was returned in a previous response

MaxItems (number)

Maximum number of items to return

paginate (boolean, string)

Enable automatic result pagination; use this instead of making your own individual pagination requests

Example

await aws.CloudFront.ListDistributions({
  Marker: String,
  MaxItems: Number,
  paginate: Boolean || String,
})

UpdateDistribution

Canonical AWS API doc

Properties

DistributionConfig (object) [required]

Complete distribution configuration object from GetDistribution call

Example
await aws.CloudFront.UpdateDistribution({
  DistributionConfig: Object, // required
  Id: String, // required
  IfMatch: String, // required
})

Methods yet to be implemented

Please help out by opening a PR!

aws-lite is an Apache 2.0-licensed open source project under the umbrella of OpenJS Foundation Architect. aws-lite is not in any way affiliated with Amazon Web Services, Inc. (AWS). All names and trademarks are the property of their respective owners.