Fork me on GitHub

Module cloudfront

@pulumi/aws > cloudfront

Index

cloudfront/distribution.ts cloudfront/originAccessIdentity.ts cloudfront/publicKey.ts

class Distribution

Creates an Amazon CloudFront web distribution.

For information about CloudFront distributions, see the [Amazon CloudFront Developer Guide][1]. For specific information about creating CloudFront web distributions, see the [POST Distribution][2] page in the Amazon CloudFront API Reference.

~> NOTE: CloudFront distributions take about 15 minutes to a deployed state after creation or modification. During this time, deletes to resources will be blocked. If you need to delete a distribution that is enabled and you do not want to wait, you need to use the retain_on_delete flag.

constructor

new Distribution(name: string, args: DistributionArgs, opts?: pulumi.CustomResourceOptions)

Create a Distribution resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DistributionState): Distribution

Get an existing Distribution resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property activeTrustedSigners

public activeTrustedSigners: pulumi.Output<{ ... }>;

The key pair IDs that CloudFront is aware of for each trusted signer, if the distribution is set up to serve private content with signed URLs.

property aliases

public aliases: pulumi.Output<string[] | undefined>;

Extra CNAMEs (alternate domain names), if any, for this distribution.

property arn

public arn: pulumi.Output<string>;

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

property cacheBehaviors

public cacheBehaviors: pulumi.Output<{ ... }[] | undefined>;

Deprecated, use ordered_cache_behavior instead.

property callerReference

public callerReference: pulumi.Output<string>;

Internal value used by CloudFront to allow future updates to the distribution configuration.

property comment

public comment: pulumi.Output<string | undefined>;

Any comments you want to include about the distribution.

property customErrorResponses

public customErrorResponses: pulumi.Output<{ ... }[] | undefined>;

One or more custom error response elements (multiples allowed).

property defaultCacheBehavior

public defaultCacheBehavior: pulumi.Output<{ ... }>;

The default cache behavior for this distribution (maximum one).

property defaultRootObject

public defaultRootObject: pulumi.Output<string | undefined>;

The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL.

property domainName

public domainName: pulumi.Output<string>;

The DNS domain name of either the S3 bucket, or web site of your custom origin.

property enabled

public enabled: pulumi.Output<boolean>;

Whether the distribution is enabled to accept end user requests for content.

property etag

public etag: pulumi.Output<string>;

The current version of the distribution’s information. For example: E2QWRUHAPOMQZL.

property hostedZoneId

public hostedZoneId: pulumi.Output<string>;

The CloudFront Route 53 zone ID that can be used to route an [Alias Resource Record Set][7] to. This attribute is simply an alias for the zone ID Z2FDTNDATAQYW2.

property httpVersion

public httpVersion: pulumi.Output<string | undefined>;

The maximum HTTP version to support on the distribution. Allowed values are http1.1 and http2. The default is http2.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property inProgressValidationBatches

public inProgressValidationBatches: pulumi.Output<number>;

The number of invalidation batches currently in progress.

property isIpv6Enabled

public isIpv6Enabled: pulumi.Output<boolean | undefined>;

Whether the IPv6 is enabled for the distribution.

property lastModifiedTime

public lastModifiedTime: pulumi.Output<string>;

The date and time the distribution was last modified.

property loggingConfig

public loggingConfig: pulumi.Output<{ ... } | undefined>;

The logging configuration that controls how logs are written to your distribution (maximum one).

property orderedCacheBehaviors

public orderedCacheBehaviors: pulumi.Output<{ ... }[] | undefined>;

An ordered list of cache behaviors resource for this distribution. List from top to bottom

  • in order of precedence. The topmost cache behavior will have precedence 0.

property origins

public origins: pulumi.Output<{ ... }[]>;

One or more origins for this distribution (multiples allowed).

property priceClass

public priceClass: pulumi.Output<string | undefined>;

The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100

property restrictions

public restrictions: pulumi.Output<{ ... }>;

The restriction configuration for this distribution (maximum one).

property retainOnDelete

public retainOnDelete: pulumi.Output<boolean | undefined>;

Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards. Default: false.

property status

public status: pulumi.Output<string>;

The current status of the distribution. Deployed if the distribution’s information is fully propagated throughout the Amazon CloudFront system.

property tags

public tags: pulumi.Output<Tags | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property viewerCertificate

public viewerCertificate: pulumi.Output<{ ... }>;

The SSL configuration for this distribution (maximum one).

property webAclId

public webAclId: pulumi.Output<string | undefined>;

If you’re using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.

class OriginAccessIdentity

Creates an Amazon CloudFront origin access identity.

For information about CloudFront distributions, see the [Amazon CloudFront Developer Guide][1]. For more information on generating origin access identities, see [Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content][2].

constructor

new OriginAccessIdentity(name: string, args?: OriginAccessIdentityArgs, opts?: pulumi.CustomResourceOptions)

Create a OriginAccessIdentity resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OriginAccessIdentityState): OriginAccessIdentity

Get an existing OriginAccessIdentity resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property callerReference

public callerReference: pulumi.Output<string>;

Internal value used by CloudFront to allow future updates to the origin access identity.

property cloudfrontAccessIdentityPath

public cloudfrontAccessIdentityPath: pulumi.Output<string>;

A shortcut to the full path for the origin access identity to use in CloudFront, see below.

property comment

public comment: pulumi.Output<string | undefined>;

An optional comment for the origin access identity.

property etag

public etag: pulumi.Output<string>;

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

property iamArn

public iamArn: pulumi.Output<string>;

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property s3CanonicalUserId

public s3CanonicalUserId: pulumi.Output<string>;

The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class PublicKey

constructor

new PublicKey(name: string, args: PublicKeyArgs, opts?: pulumi.CustomResourceOptions)

Create a PublicKey resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PublicKeyState): PublicKey

Get an existing PublicKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property callerReference

public callerReference: pulumi.Output<string>;

Internal value used by CloudFront to allow future updates to the public key configuration.

property comment

public comment: pulumi.Output<string | undefined>;

An optional comment about the public key.

property encodedKey

public encodedKey: pulumi.Output<string>;

The encoded public key that you want to add to CloudFront to use with features like field-level encryption.

property etag

public etag: pulumi.Output<string>;

The current version of the public key. For example: E2QWRUHAPOMQZL.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name for the public key. By default generated by Terraform.

property namePrefix

public namePrefix: pulumi.Output<string>;

The name for the public key. Conflicts with name.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface DistributionArgs

The set of arguments for constructing a Distribution resource.

property aliases

aliases?: pulumi.Input<pulumi.Input<string>[]>;

Extra CNAMEs (alternate domain names), if any, for this distribution.

property cacheBehaviors

cacheBehaviors?: pulumi.Input<pulumi.Input<{ ... }>[]>;

Deprecated, use ordered_cache_behavior instead.

property comment

comment?: pulumi.Input<string>;

Any comments you want to include about the distribution.

property customErrorResponses

customErrorResponses?: pulumi.Input<pulumi.Input<{ ... }>[]>;

One or more custom error response elements (multiples allowed).

property defaultCacheBehavior

defaultCacheBehavior: pulumi.Input<{ ... }>;

The default cache behavior for this distribution (maximum one).

property defaultRootObject

defaultRootObject?: pulumi.Input<string>;

The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL.

property enabled

enabled: pulumi.Input<boolean>;

Whether the distribution is enabled to accept end user requests for content.

property httpVersion

httpVersion?: pulumi.Input<string>;

The maximum HTTP version to support on the distribution. Allowed values are http1.1 and http2. The default is http2.

property isIpv6Enabled

isIpv6Enabled?: pulumi.Input<boolean>;

Whether the IPv6 is enabled for the distribution.

property loggingConfig

loggingConfig?: pulumi.Input<{ ... }>;

The logging configuration that controls how logs are written to your distribution (maximum one).

property orderedCacheBehaviors

orderedCacheBehaviors?: pulumi.Input<pulumi.Input<{ ... }>[]>;

An ordered list of cache behaviors resource for this distribution. List from top to bottom

  • in order of precedence. The topmost cache behavior will have precedence 0.

property origins

origins: pulumi.Input<pulumi.Input<{ ... }>[]>;

One or more origins for this distribution (multiples allowed).

property priceClass

priceClass?: pulumi.Input<string>;

The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100

property restrictions

restrictions: pulumi.Input<{ ... }>;

The restriction configuration for this distribution (maximum one).

property retainOnDelete

retainOnDelete?: pulumi.Input<boolean>;

Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards. Default: false.

property tags

tags?: pulumi.Input<Tags>;

A mapping of tags to assign to the resource.

property viewerCertificate

viewerCertificate: pulumi.Input<{ ... }>;

The SSL configuration for this distribution (maximum one).

property webAclId

webAclId?: pulumi.Input<string>;

If you’re using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.

interface DistributionState

Input properties used for looking up and filtering Distribution resources.

property activeTrustedSigners

activeTrustedSigners?: pulumi.Input<{ ... }>;

The key pair IDs that CloudFront is aware of for each trusted signer, if the distribution is set up to serve private content with signed URLs.

property aliases

aliases?: pulumi.Input<pulumi.Input<string>[]>;

Extra CNAMEs (alternate domain names), if any, for this distribution.

property arn

arn?: pulumi.Input<string>;

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

property cacheBehaviors

cacheBehaviors?: pulumi.Input<pulumi.Input<{ ... }>[]>;

Deprecated, use ordered_cache_behavior instead.

property callerReference

callerReference?: pulumi.Input<string>;

Internal value used by CloudFront to allow future updates to the distribution configuration.

property comment

comment?: pulumi.Input<string>;

Any comments you want to include about the distribution.

property customErrorResponses

customErrorResponses?: pulumi.Input<pulumi.Input<{ ... }>[]>;

One or more custom error response elements (multiples allowed).

property defaultCacheBehavior

defaultCacheBehavior?: pulumi.Input<{ ... }>;

The default cache behavior for this distribution (maximum one).

property defaultRootObject

defaultRootObject?: pulumi.Input<string>;

The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL.

property domainName

domainName?: pulumi.Input<string>;

The DNS domain name of either the S3 bucket, or web site of your custom origin.

property enabled

enabled?: pulumi.Input<boolean>;

Whether the distribution is enabled to accept end user requests for content.

property etag

etag?: pulumi.Input<string>;

The current version of the distribution’s information. For example: E2QWRUHAPOMQZL.

property hostedZoneId

hostedZoneId?: pulumi.Input<string>;

The CloudFront Route 53 zone ID that can be used to route an [Alias Resource Record Set][7] to. This attribute is simply an alias for the zone ID Z2FDTNDATAQYW2.

property httpVersion

httpVersion?: pulumi.Input<string>;

The maximum HTTP version to support on the distribution. Allowed values are http1.1 and http2. The default is http2.

property inProgressValidationBatches

inProgressValidationBatches?: pulumi.Input<number>;

The number of invalidation batches currently in progress.

property isIpv6Enabled

isIpv6Enabled?: pulumi.Input<boolean>;

Whether the IPv6 is enabled for the distribution.

property lastModifiedTime

lastModifiedTime?: pulumi.Input<string>;

The date and time the distribution was last modified.

property loggingConfig

loggingConfig?: pulumi.Input<{ ... }>;

The logging configuration that controls how logs are written to your distribution (maximum one).

property orderedCacheBehaviors

orderedCacheBehaviors?: pulumi.Input<pulumi.Input<{ ... }>[]>;

An ordered list of cache behaviors resource for this distribution. List from top to bottom

  • in order of precedence. The topmost cache behavior will have precedence 0.

property origins

origins?: pulumi.Input<pulumi.Input<{ ... }>[]>;

One or more origins for this distribution (multiples allowed).

property priceClass

priceClass?: pulumi.Input<string>;

The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100

property restrictions

restrictions?: pulumi.Input<{ ... }>;

The restriction configuration for this distribution (maximum one).

property retainOnDelete

retainOnDelete?: pulumi.Input<boolean>;

Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards. Default: false.

property status

status?: pulumi.Input<string>;

The current status of the distribution. Deployed if the distribution’s information is fully propagated throughout the Amazon CloudFront system.

property tags

tags?: pulumi.Input<Tags>;

A mapping of tags to assign to the resource.

property viewerCertificate

viewerCertificate?: pulumi.Input<{ ... }>;

The SSL configuration for this distribution (maximum one).

property webAclId

webAclId?: pulumi.Input<string>;

If you’re using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.

interface OriginAccessIdentityArgs

The set of arguments for constructing a OriginAccessIdentity resource.

property comment

comment?: pulumi.Input<string>;

An optional comment for the origin access identity.

interface OriginAccessIdentityState

Input properties used for looking up and filtering OriginAccessIdentity resources.

property callerReference

callerReference?: pulumi.Input<string>;

Internal value used by CloudFront to allow future updates to the origin access identity.

property cloudfrontAccessIdentityPath

cloudfrontAccessIdentityPath?: pulumi.Input<string>;

A shortcut to the full path for the origin access identity to use in CloudFront, see below.

property comment

comment?: pulumi.Input<string>;

An optional comment for the origin access identity.

property etag

etag?: pulumi.Input<string>;

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

property iamArn

iamArn?: pulumi.Input<string>;

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

property s3CanonicalUserId

s3CanonicalUserId?: pulumi.Input<string>;

The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.

interface PublicKeyArgs

The set of arguments for constructing a PublicKey resource.

property comment

comment?: pulumi.Input<string>;

An optional comment about the public key.

property encodedKey

encodedKey: pulumi.Input<string>;

The encoded public key that you want to add to CloudFront to use with features like field-level encryption.

property name

name?: pulumi.Input<string>;

The name for the public key. By default generated by Terraform.

property namePrefix

namePrefix?: pulumi.Input<string>;

The name for the public key. Conflicts with name.

interface PublicKeyState

Input properties used for looking up and filtering PublicKey resources.

property callerReference

callerReference?: pulumi.Input<string>;

Internal value used by CloudFront to allow future updates to the public key configuration.

property comment

comment?: pulumi.Input<string>;

An optional comment about the public key.

property encodedKey

encodedKey?: pulumi.Input<string>;

The encoded public key that you want to add to CloudFront to use with features like field-level encryption.

property etag

etag?: pulumi.Input<string>;

The current version of the public key. For example: E2QWRUHAPOMQZL.

property name

name?: pulumi.Input<string>;

The name for the public key. By default generated by Terraform.

property namePrefix

namePrefix?: pulumi.Input<string>;

The name for the public key. Conflicts with name.