cloudfront

class pulumi_aws.cloudfront.Distribution(resource_name, opts=None, aliases=None, comment=None, custom_error_responses=None, default_cache_behavior=None, default_root_object=None, enabled=None, http_version=None, is_ipv6_enabled=None, logging_config=None, ordered_cache_behaviors=None, origins=None, price_class=None, restrictions=None, retain_on_delete=None, tags=None, viewer_certificate=None, web_acl_id=None, __name__=None, __opts__=None)

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.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • aliases (pulumi.Input[list]) – Extra CNAMEs (alternate domain names), if any, for this distribution.
  • comment (pulumi.Input[str]) – Any comments you want to include about the distribution.
  • custom_error_responses (pulumi.Input[list]) – One or more custom error response elements (multiples allowed).
  • default_cache_behavior (pulumi.Input[dict]) – The default cache behavior for this distribution (maximum one).
  • default_root_object (pulumi.Input[str]) – The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL.
  • enabled (pulumi.Input[bool]) – Whether the distribution is enabled to accept end user requests for content.
  • http_version (pulumi.Input[str]) – The maximum HTTP version to support on the distribution. Allowed values are http1.1 and http2. The default is http2.
  • is_ipv6_enabled (pulumi.Input[bool]) – Whether the IPv6 is enabled for the distribution.
  • logging_config (pulumi.Input[dict]) – The logging configuration that controls how logs are written to your distribution (maximum one).
  • ordered_cache_behaviors (pulumi.Input[list]) – 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.
  • origins (pulumi.Input[list]) – One or more origins for this distribution (multiples allowed).
  • price_class (pulumi.Input[str]) – The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100
  • restrictions (pulumi.Input[dict]) – The restriction configuration for this distribution (maximum one).
  • retain_on_delete (pulumi.Input[bool]) – 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.
  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
  • viewer_certificate (pulumi.Input[dict]) – The SSL configuration for this distribution (maximum one).
  • web_acl_id (pulumi.Input[str]) – If you’re using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.
active_trusted_signers = None

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.

aliases = None

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

arn = None

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

caller_reference = None

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

comment = None

Any comments you want to include about the distribution.

custom_error_responses = None

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

default_cache_behavior = None

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

default_root_object = None

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

domain_name = None

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

enabled = None

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

etag = None

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

hosted_zone_id = None

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.

http_version = None

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

in_progress_validation_batches = None

The number of invalidation batches currently in progress.

is_ipv6_enabled = None

Whether the IPv6 is enabled for the distribution.

last_modified_time = None

The date and time the distribution was last modified.

logging_config = None

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

ordered_cache_behaviors = None

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.

origins = None

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

price_class = None

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

restrictions = None

The restriction configuration for this distribution (maximum one).

retain_on_delete = None

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.

status = None

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

tags = None

A mapping of tags to assign to the resource.

viewer_certificate = None

The SSL configuration for this distribution (maximum one).

web_acl_id = None

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

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_aws.cloudfront.OriginAccessIdentity(resource_name, opts=None, comment=None, __name__=None, __opts__=None)

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].

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • comment (pulumi.Input[str]) – An optional comment for the origin access identity.
caller_reference = None

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

cloudfront_access_identity_path = None

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

comment = None

An optional comment for the origin access identity.

etag = None

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

iam_arn = None

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

s3_canonical_user_id = None

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.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_aws.cloudfront.PublicKey(resource_name, opts=None, comment=None, encoded_key=None, name=None, name_prefix=None, __name__=None, __opts__=None)

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

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • comment (pulumi.Input[str]) – An optional comment about the public key.
  • encoded_key (pulumi.Input[str]) – The encoded public key that you want to add to CloudFront to use with features like field-level encryption.
  • name (pulumi.Input[str]) – The name for the public key. By default generated by Terraform.
  • name_prefix (pulumi.Input[str]) – The name for the public key. Conflicts with name.
caller_reference = None

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

comment = None

An optional comment about the public key.

encoded_key = None

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

etag = None

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

name = None

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

name_prefix = None

The name for the public key. Conflicts with name.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str