Show / Hide Table of Contents

Class OriginOptions

Options to define an Origin.

Inheritance
object
OriginOptions
Implements
IOriginOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OriginOptions : IOriginOptions
Syntax (vb)
Public Class OriginOptions Implements IOriginOptions
Remarks

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;
            using Amazon.CDK.AWS.CloudFront;

            var originOptions = new OriginOptions {
                ConnectionAttempts = 123,
                ConnectionTimeout = Duration.Minutes(30),
                CustomHeaders = new Dictionary<string, string> {
                    { "customHeadersKey", "customHeaders" }
                },
                OriginAccessControlId = "originAccessControlId",
                OriginId = "originId",
                OriginShieldEnabled = false,
                OriginShieldRegion = "originShieldRegion",
                ResponseCompletionTimeout = Duration.Minutes(30)
            };

Synopsis

Constructors

OriginOptions()

Options to define an Origin.

Properties

ConnectionAttempts

The number of times that CloudFront attempts to connect to the origin;

ConnectionTimeout

The number of seconds that CloudFront waits when trying to establish a connection to the origin.

CustomHeaders

A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.

OriginAccessControlId

The unique identifier of an origin access control for this origin.

OriginId

A unique identifier for the origin.

OriginShieldEnabled

Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.

OriginShieldRegion

When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.

ResponseCompletionTimeout

The time that a request from CloudFront to the origin can stay open and wait for a response.

Constructors

OriginOptions()

Options to define an Origin.

public OriginOptions()
Remarks

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;
            using Amazon.CDK.AWS.CloudFront;

            var originOptions = new OriginOptions {
                ConnectionAttempts = 123,
                ConnectionTimeout = Duration.Minutes(30),
                CustomHeaders = new Dictionary<string, string> {
                    { "customHeadersKey", "customHeaders" }
                },
                OriginAccessControlId = "originAccessControlId",
                OriginId = "originId",
                OriginShieldEnabled = false,
                OriginShieldRegion = "originShieldRegion",
                ResponseCompletionTimeout = Duration.Minutes(30)
            };

Properties

ConnectionAttempts

The number of times that CloudFront attempts to connect to the origin;

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

double?

Remarks

valid values are 1, 2, or 3 attempts.

Default: 3

ConnectionTimeout

The number of seconds that CloudFront waits when trying to establish a connection to the origin.

public Duration? ConnectionTimeout { get; set; }
Property Value

Duration

Remarks

Valid values are 1-10 seconds, inclusive.

Default: Duration.seconds(10)

CustomHeaders

A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.

public IDictionary<string, string>? CustomHeaders { get; set; }
Property Value

IDictionary<string, string>

Remarks

Default: {}

OriginAccessControlId

The unique identifier of an origin access control for this origin.

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

string

Remarks

Default: - no origin access control

OriginId

A unique identifier for the origin.

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

string

Remarks

This value must be unique within the distribution.

Default: - an originid will be generated for you

OriginShieldEnabled

Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.

public bool? OriginShieldEnabled { get; set; }
Property Value

bool?

Remarks

Default: - true

OriginShieldRegion

When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.

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

string

Remarks

Default: - origin shield not enabled

See: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html

ResponseCompletionTimeout

The time that a request from CloudFront to the origin can stay open and wait for a response.

public Duration? ResponseCompletionTimeout { get; set; }
Property Value

Duration

Remarks

If the complete response isn't received from the origin by this time, CloudFront ends the connection.

Valid values are 1-3600 seconds, inclusive.

Default: undefined - AWS CloudFront default is not enforcing a maximum value

See: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistValuesOrigin.html#response-completion-timeout

Implements

IOriginOptions
Back to top Generated by DocFX