Class CustomOriginConfig
A custom origin configuration.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.AWS.CloudFront.dll
Syntax (csharp)
public class CustomOriginConfig : Object, ICustomOriginConfig
Syntax (vb)
Public Class CustomOriginConfig
Inherits Object
Implements ICustomOriginConfig
Remarks
ExampleMetadata: infused
Examples
Bucket sourceBucket;
OriginAccessIdentity oai;
new CloudFrontWebDistribution(this, "MyCfWebDistribution", new CloudFrontWebDistributionProps {
OriginConfigs = new [] { new SourceConfiguration {
S3OriginSource = new S3OriginConfig {
S3BucketSource = sourceBucket,
OriginAccessIdentity = oai
},
Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
}, new SourceConfiguration {
CustomOriginSource = new CustomOriginConfig {
DomainName = "MYALIAS"
},
Behaviors = new [] { new Behavior { PathPattern = "/somewhere" } }
} }
});
Synopsis
Constructors
CustomOriginConfig() |
Properties
AllowedOriginSSLVersions | The SSL versions to use when interacting with the origin. |
DomainName | The domain name of the custom origin. |
HttpPort | The origin HTTP port. |
HttpsPort | The origin HTTPS port. |
OriginHeaders | Any additional headers to pass to the origin. |
OriginKeepaliveTimeout | The keep alive timeout when making calls in seconds. |
OriginPath | The relative path to the origin root to use for sources. |
OriginProtocolPolicy | The protocol (http or https) policy to use when interacting with the origin. |
OriginReadTimeout | The read timeout when calling the origin in seconds. |
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
CustomOriginConfig()
public CustomOriginConfig()
Properties
AllowedOriginSSLVersions
The SSL versions to use when interacting with the origin.
public OriginSslPolicy[] AllowedOriginSSLVersions { get; set; }
Property Value
Remarks
Default: OriginSslPolicy.TLS_V1_2
DomainName
The domain name of the custom origin.
public string DomainName { get; set; }
Property Value
System.String
Remarks
Should not include the path - that should be in the parent SourceConfiguration
HttpPort
The origin HTTP port.
public Nullable<double> HttpPort { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 80
HttpsPort
The origin HTTPS port.
public Nullable<double> HttpsPort { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 443
OriginHeaders
Any additional headers to pass to the origin.
public IDictionary<string, string> OriginHeaders { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No additional headers are passed.
OriginKeepaliveTimeout
The keep alive timeout when making calls in seconds.
public Duration OriginKeepaliveTimeout { get; set; }
Property Value
Remarks
Default: Duration.seconds(5)
OriginPath
The relative path to the origin root to use for sources.
public string OriginPath { get; set; }
Property Value
System.String
Remarks
Default: /
OriginProtocolPolicy
The protocol (http or https) policy to use when interacting with the origin.
public Nullable<OriginProtocolPolicy> OriginProtocolPolicy { get; set; }
Property Value
System.Nullable<OriginProtocolPolicy>
Remarks
Default: OriginProtocolPolicy.HttpsOnly
OriginReadTimeout
The read timeout when calling the origin in seconds.
public Duration OriginReadTimeout { get; set; }
Property Value
Remarks
Default: Duration.seconds(30)
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