CfnResponseHeadersPolicyProps

class aws_cdk.aws_cloudfront.CfnResponseHeadersPolicyProps(*, response_headers_policy_config)

Bases: object

Properties for defining a CfnResponseHeadersPolicy.

Parameters:

response_headers_policy_config (Union[IResolvable, ResponseHeadersPolicyConfigProperty, Dict[str, Any]]) – A response headers policy configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html

ExampleMetadata:

fixture=_generated

Example:

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

cfn_response_headers_policy_props = cloudfront.CfnResponseHeadersPolicyProps(
    response_headers_policy_config=cloudfront.CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty(
        name="name",

        # the properties below are optional
        comment="comment",
        cors_config=cloudfront.CfnResponseHeadersPolicy.CorsConfigProperty(
            access_control_allow_credentials=False,
            access_control_allow_headers=cloudfront.CfnResponseHeadersPolicy.AccessControlAllowHeadersProperty(
                items=["items"]
            ),
            access_control_allow_methods=cloudfront.CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty(
                items=["items"]
            ),
            access_control_allow_origins=cloudfront.CfnResponseHeadersPolicy.AccessControlAllowOriginsProperty(
                items=["items"]
            ),
            origin_override=False,

            # the properties below are optional
            access_control_expose_headers=cloudfront.CfnResponseHeadersPolicy.AccessControlExposeHeadersProperty(
                items=["items"]
            ),
            access_control_max_age_sec=123
        ),
        custom_headers_config=cloudfront.CfnResponseHeadersPolicy.CustomHeadersConfigProperty(
            items=[cloudfront.CfnResponseHeadersPolicy.CustomHeaderProperty(
                header="header",
                override=False,
                value="value"
            )]
        ),
        remove_headers_config=cloudfront.CfnResponseHeadersPolicy.RemoveHeadersConfigProperty(
            items=[cloudfront.CfnResponseHeadersPolicy.RemoveHeaderProperty(
                header="header"
            )]
        ),
        security_headers_config=cloudfront.CfnResponseHeadersPolicy.SecurityHeadersConfigProperty(
            content_security_policy=cloudfront.CfnResponseHeadersPolicy.ContentSecurityPolicyProperty(
                content_security_policy="contentSecurityPolicy",
                override=False
            ),
            content_type_options=cloudfront.CfnResponseHeadersPolicy.ContentTypeOptionsProperty(
                override=False
            ),
            frame_options=cloudfront.CfnResponseHeadersPolicy.FrameOptionsProperty(
                frame_option="frameOption",
                override=False
            ),
            referrer_policy=cloudfront.CfnResponseHeadersPolicy.ReferrerPolicyProperty(
                override=False,
                referrer_policy="referrerPolicy"
            ),
            strict_transport_security=cloudfront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty(
                access_control_max_age_sec=123,
                override=False,

                # the properties below are optional
                include_subdomains=False,
                preload=False
            ),
            xss_protection=cloudfront.CfnResponseHeadersPolicy.XSSProtectionProperty(
                override=False,
                protection=False,

                # the properties below are optional
                mode_block=False,
                report_uri="reportUri"
            )
        ),
        server_timing_headers_config=cloudfront.CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty(
            enabled=False,

            # the properties below are optional
            sampling_rate=123
        )
    )
)

Attributes

response_headers_policy_config

A response headers policy configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html#cfn-cloudfront-responseheaderspolicy-responseheaderspolicyconfig