CfnDistributionProps

class aws_cdk.aws_lightsail.CfnDistributionProps(*, bundle_id, default_cache_behavior, distribution_name, origin, cache_behaviors=None, cache_behavior_settings=None, certificate_name=None, ip_address_type=None, is_enabled=None, tags=None)

Bases: object

Properties for defining a CfnDistribution.

Parameters:
  • bundle_id (str) – The ID of the bundle applied to the distribution.

  • default_cache_behavior (Union[IResolvable, CacheBehaviorProperty, Dict[str, Any]]) – An object that describes the default cache behavior of the distribution.

  • distribution_name (str) – The name of the distribution.

  • origin (Union[IResolvable, InputOriginProperty, Dict[str, Any]]) – An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. The distribution pulls, caches, and serves content from the origin.

  • cache_behaviors (Union[IResolvable, Sequence[Union[IResolvable, CacheBehaviorPerPathProperty, Dict[str, Any]]], None]) – An array of objects that describe the per-path cache behavior of the distribution.

  • cache_behavior_settings (Union[IResolvable, CacheSettingsProperty, Dict[str, Any], None]) – An object that describes the cache behavior settings of the distribution.

  • certificate_name (Optional[str]) – The name of the SSL/TLS certificate attached to the distribution.

  • ip_address_type (Optional[str]) – The IP address type of the distribution. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.

  • is_enabled (Union[bool, IResolvable, None]) – A Boolean value indicating whether the distribution is enabled.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:: The Value of Tags is optional for Lightsail resources.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_lightsail as lightsail

cfn_distribution_props = lightsail.CfnDistributionProps(
    bundle_id="bundleId",
    default_cache_behavior=lightsail.CfnDistribution.CacheBehaviorProperty(
        behavior="behavior"
    ),
    distribution_name="distributionName",
    origin=lightsail.CfnDistribution.InputOriginProperty(
        name="name",
        protocol_policy="protocolPolicy",
        region_name="regionName"
    ),

    # the properties below are optional
    cache_behaviors=[lightsail.CfnDistribution.CacheBehaviorPerPathProperty(
        behavior="behavior",
        path="path"
    )],
    cache_behavior_settings=lightsail.CfnDistribution.CacheSettingsProperty(
        allowed_http_methods="allowedHttpMethods",
        cached_http_methods="cachedHttpMethods",
        default_ttl=123,
        forwarded_cookies=lightsail.CfnDistribution.CookieObjectProperty(
            cookies_allow_list=["cookiesAllowList"],
            option="option"
        ),
        forwarded_headers=lightsail.CfnDistribution.HeaderObjectProperty(
            headers_allow_list=["headersAllowList"],
            option="option"
        ),
        forwarded_query_strings=lightsail.CfnDistribution.QueryStringObjectProperty(
            option=False,
            query_strings_allow_list=["queryStringsAllowList"]
        ),
        maximum_ttl=123,
        minimum_ttl=123
    ),
    certificate_name="certificateName",
    ip_address_type="ipAddressType",
    is_enabled=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

bundle_id

The ID of the bundle applied to the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-bundleid

cache_behavior_settings

An object that describes the cache behavior settings of the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-cachebehaviorsettings

cache_behaviors

An array of objects that describe the per-path cache behavior of the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-cachebehaviors

certificate_name

The name of the SSL/TLS certificate attached to the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-certificatename

default_cache_behavior

An object that describes the default cache behavior of the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-defaultcachebehavior

distribution_name

The name of the distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-distributionname

ip_address_type

The IP address type of the distribution.

The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-ipaddresstype

is_enabled

A Boolean value indicating whether the distribution is enabled.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-isenabled

origin

An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.

The distribution pulls, caches, and serves content from the origin.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-origin

tags

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:

The ``Value`` of ``Tags`` is optional for Lightsail resources.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-tags