Class OriginOptions
Options to define an Origin.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.AWS.CloudFront.dll
Syntax (csharp)
public class OriginOptions : Object, IOriginOptions
Syntax (vb)
Public Class OriginOptions
Inherits Object
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.AWS.CloudFront;
using Amazon.CDK;
var originOptions = new OriginOptions {
ConnectionAttempts = 123,
ConnectionTimeout = Duration.Minutes(30),
CustomHeaders = new Dictionary<string, string> {
{ "customHeadersKey", "customHeaders" }
},
OriginShieldRegion = "originShieldRegion"
};
Synopsis
Constructors
OriginOptions() |
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. |
OriginShieldRegion | When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. |
Constructors
OriginOptions()
public OriginOptions()
Properties
ConnectionAttempts
The number of times that CloudFront attempts to connect to the origin;
public Nullable<double> ConnectionAttempts { get; set; }
Property Value
System.Nullable<System.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
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
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: {}
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
System.String
Remarks
Default: - origin shield not enabled
See: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html