Show / Hide Table of Contents

Interface CfnResponseHeadersPolicy.IResponseHeadersPolicyConfigProperty

A response headers policy configuration.

Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnResponseHeadersPolicy.IResponseHeadersPolicyConfigProperty
Syntax (vb)
Public Interface CfnResponseHeadersPolicy.IResponseHeadersPolicyConfigProperty
Remarks

A response headers policy configuration contains metadata about the response headers policy, and configurations for sets of HTTP response headers.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-responseheaderspolicy-responseheaderspolicyconfig.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.CloudFront;

             var responseHeadersPolicyConfigProperty = new ResponseHeadersPolicyConfigProperty {
                 Name = "name",

                 // the properties below are optional
                 Comment = "comment",
                 CorsConfig = new CorsConfigProperty {
                     AccessControlAllowCredentials = false,
                     AccessControlAllowHeaders = new AccessControlAllowHeadersProperty {
                         Items = new [] { "items" }
                     },
                     AccessControlAllowMethods = new AccessControlAllowMethodsProperty {
                         Items = new [] { "items" }
                     },
                     AccessControlAllowOrigins = new AccessControlAllowOriginsProperty {
                         Items = new [] { "items" }
                     },
                     OriginOverride = false,

                     // the properties below are optional
                     AccessControlExposeHeaders = new AccessControlExposeHeadersProperty {
                         Items = new [] { "items" }
                     },
                     AccessControlMaxAgeSec = 123
                 },
                 CustomHeadersConfig = new CustomHeadersConfigProperty {
                     Items = new [] { new CustomHeaderProperty {
                         Header = "header",
                         Override = false,
                         Value = "value"
                     } }
                 },
                 RemoveHeadersConfig = new RemoveHeadersConfigProperty {
                     Items = new [] { new RemoveHeaderProperty {
                         Header = "header"
                     } }
                 },
                 SecurityHeadersConfig = new SecurityHeadersConfigProperty {
                     ContentSecurityPolicy = new ContentSecurityPolicyProperty {
                         ContentSecurityPolicy = "contentSecurityPolicy",
                         Override = false
                     },
                     ContentTypeOptions = new ContentTypeOptionsProperty {
                         Override = false
                     },
                     FrameOptions = new FrameOptionsProperty {
                         FrameOption = "frameOption",
                         Override = false
                     },
                     ReferrerPolicy = new ReferrerPolicyProperty {
                         Override = false,
                         ReferrerPolicy = "referrerPolicy"
                     },
                     StrictTransportSecurity = new StrictTransportSecurityProperty {
                         AccessControlMaxAgeSec = 123,
                         Override = false,

                         // the properties below are optional
                         IncludeSubdomains = false,
                         Preload = false
                     },
                     XssProtection = new XSSProtectionProperty {
                         Override = false,
                         Protection = false,

                         // the properties below are optional
                         ModeBlock = false,
                         ReportUri = "reportUri"
                     }
                 },
                 ServerTimingHeadersConfig = new ServerTimingHeadersConfigProperty {
                     Enabled = false,

                     // the properties below are optional
                     SamplingRate = 123
                 }
             };

Synopsis

Properties

Comment

A comment to describe the response headers policy.

CorsConfig

A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).

CustomHeadersConfig

A configuration for a set of custom HTTP response headers.

Name

A name to identify the response headers policy.

RemoveHeadersConfig

A configuration for a set of HTTP headers to remove from the HTTP response.

SecurityHeadersConfig

A configuration for a set of security-related HTTP response headers.

ServerTimingHeadersConfig

A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront.

Properties

Comment

A comment to describe the response headers policy.

string? Comment { get; }
Property Value

string

Remarks

The comment cannot be longer than 128 characters.

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

CorsConfig

A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).

object? CorsConfig { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnResponseHeadersPolicy.ICorsConfigProperty

CustomHeadersConfig

A configuration for a set of custom HTTP response headers.

object? CustomHeadersConfig { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnResponseHeadersPolicy.ICustomHeadersConfigProperty

Name

A name to identify the response headers policy.

string Name { get; }
Property Value

string

Remarks

The name must be unique for response headers policies in this AWS account .

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

RemoveHeadersConfig

A configuration for a set of HTTP headers to remove from the HTTP response.

object? RemoveHeadersConfig { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnResponseHeadersPolicy.IRemoveHeadersConfigProperty

SecurityHeadersConfig

A configuration for a set of security-related HTTP response headers.

object? SecurityHeadersConfig { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnResponseHeadersPolicy.ISecurityHeadersConfigProperty

ServerTimingHeadersConfig

A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront.

object? ServerTimingHeadersConfig { get; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnResponseHeadersPolicy.IServerTimingHeadersConfigProperty

Back to top Generated by DocFX