Show / Hide Table of Contents

Class CfnResponseHeadersPolicy

A response headers policy.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnResponseHeadersPolicy
Implements
IInspectable
IResponseHeadersPolicyRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnResponseHeadersPolicy : CfnResource, IInspectable, IResponseHeadersPolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnResponseHeadersPolicy Inherits CfnResource Implements IInspectable, IResponseHeadersPolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

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 cfnResponseHeadersPolicy = new CfnResponseHeadersPolicy(this, "MyCfnResponseHeadersPolicy", new CfnResponseHeadersPolicyProps {
                 ResponseHeadersPolicyConfig = 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

Constructors

CfnResponseHeadersPolicy(Construct, string, ICfnResponseHeadersPolicyProps)

Create a new AWS::CloudFront::ResponseHeadersPolicy.

Properties

AttrId

The unique identifier for the response headers policy.

AttrLastModifiedTime

The date and time when the response headers policy was last modified.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

A response headers policy.

ResponseHeadersPolicyConfig

A response headers policy configuration.

ResponseHeadersPolicyRef

A reference to a ResponseHeadersPolicy resource.

Methods

ArnForResponseHeadersPolicy(IResponseHeadersPolicyRef)

A response headers policy.

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnResponseHeadersPolicy(object)

Checks whether the given object is a CfnResponseHeadersPolicy.

RenderProperties(IDictionary<string, object>)

A response headers policy.

Constructors

CfnResponseHeadersPolicy(Construct, string, ICfnResponseHeadersPolicyProps)

Create a new AWS::CloudFront::ResponseHeadersPolicy.

public CfnResponseHeadersPolicy(Construct scope, string id, ICfnResponseHeadersPolicyProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnResponseHeadersPolicyProps

Resource properties.

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

Properties

AttrId

The unique identifier for the response headers policy.

public virtual string AttrId { get; }
Property Value

string

Remarks

For example: 57f99797-3b20-4e1b-a728-27972a74082a .

CloudformationAttribute: Id

AttrLastModifiedTime

The date and time when the response headers policy was last modified.

public virtual string AttrLastModifiedTime { get; }
Property Value

string

Remarks

CloudformationAttribute: LastModifiedTime

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

CfnProperties

A response headers policy.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

ResponseHeadersPolicyConfig

A response headers policy configuration.

public virtual object ResponseHeadersPolicyConfig { get; set; }
Property Value

object

Remarks

Type union: either IResolvable or CfnResponseHeadersPolicy.IResponseHeadersPolicyConfigProperty

ResponseHeadersPolicyRef

A reference to a ResponseHeadersPolicy resource.

public virtual IResponseHeadersPolicyReference ResponseHeadersPolicyRef { get; }
Property Value

IResponseHeadersPolicyReference

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

Methods

ArnForResponseHeadersPolicy(IResponseHeadersPolicyRef)

A response headers policy.

public static string ArnForResponseHeadersPolicy(IResponseHeadersPolicyRef resource)
Parameters
resource IResponseHeadersPolicyRef
Returns

string

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

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 cfnResponseHeadersPolicy = new CfnResponseHeadersPolicy(this, "MyCfnResponseHeadersPolicy", new CfnResponseHeadersPolicyProps {
                 ResponseHeadersPolicyConfig = 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
                     }
                 }
             });

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

IsCfnResponseHeadersPolicy(object)

Checks whether the given object is a CfnResponseHeadersPolicy.

public static bool IsCfnResponseHeadersPolicy(object x)
Parameters
x object
Returns

bool

Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

A response headers policy.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide .

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

CloudformationResource: AWS::CloudFront::ResponseHeadersPolicy

ExampleMetadata: fixture=_generated

Implements

IInspectable
IResponseHeadersPolicyRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX