Show / Hide Table of Contents

Class CfnBucketPropsMixin.CorsRuleProperty

Specifies a cross-origin access rule for an Amazon S3 bucket.

Inheritance
object
CfnBucketPropsMixin.CorsRuleProperty
Implements
CfnBucketPropsMixin.ICorsRuleProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.Mixins.Preview.AWS.S3.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnBucketPropsMixin.CorsRuleProperty : CfnBucketPropsMixin.ICorsRuleProperty
Syntax (vb)
Public Class CfnBucketPropsMixin.CorsRuleProperty Implements CfnBucketPropsMixin.ICorsRuleProperty
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.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.Mixins.Preview.AWS.S3.Mixins;

             var corsRuleProperty = new CorsRuleProperty {
                 AllowedHeaders = new [] { "allowedHeaders" },
                 AllowedMethods = new [] { "allowedMethods" },
                 AllowedOrigins = new [] { "allowedOrigins" },
                 ExposedHeaders = new [] { "exposedHeaders" },
                 Id = "id",
                 MaxAge = 123
             };

Synopsis

Constructors

CorsRuleProperty()

Specifies a cross-origin access rule for an Amazon S3 bucket.

Properties

AllowedHeaders

Headers that are specified in the Access-Control-Request-Headers header.

AllowedMethods

An HTTP method that you allow the origin to run.

AllowedOrigins

One or more origins you want customers to be able to access the bucket from.

ExposedHeaders

One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

Id

A unique identifier for this rule.

MaxAge

The time in seconds that your browser is to cache the preflight response for the specified resource.

Constructors

CorsRuleProperty()

Specifies a cross-origin access rule for an Amazon S3 bucket.

public CorsRuleProperty()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.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.Mixins.Preview.AWS.S3.Mixins;

             var corsRuleProperty = new CorsRuleProperty {
                 AllowedHeaders = new [] { "allowedHeaders" },
                 AllowedMethods = new [] { "allowedMethods" },
                 AllowedOrigins = new [] { "allowedOrigins" },
                 ExposedHeaders = new [] { "exposedHeaders" },
                 Id = "id",
                 MaxAge = 123
             };

Properties

AllowedHeaders

Headers that are specified in the Access-Control-Request-Headers header.

public string[]? AllowedHeaders { get; set; }
Property Value

string[]

Remarks

These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedheaders

AllowedMethods

An HTTP method that you allow the origin to run.

public string[]? AllowedMethods { get; set; }
Property Value

string[]

Remarks

Allowed values : GET | PUT | HEAD | POST | DELETE

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedmethods

AllowedOrigins

One or more origins you want customers to be able to access the bucket from.

public string[]? AllowedOrigins { get; set; }
Property Value

string[]

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-allowedorigins

ExposedHeaders

One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

public string[]? ExposedHeaders { get; set; }
Property Value

string[]

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-exposedheaders

Id

A unique identifier for this rule.

public string? Id { get; set; }
Property Value

string

Remarks

The value must be no more than 255 characters.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-id

MaxAge

The time in seconds that your browser is to cache the preflight response for the specified resource.

public double? MaxAge { get; set; }
Property Value

double?

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-corsrule.html#cfn-s3-bucket-corsrule-maxage

Implements

CfnBucketPropsMixin.ICorsRuleProperty
Back to top Generated by DocFX