Class CfnDistribution.OriginShieldProperty
CloudFront Origin Shield.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OriginShieldProperty : Object, CfnDistribution.IOriginShieldProperty
Syntax (vb)
Public Class OriginShieldProperty
Inherits Object
Implements CfnDistribution.IOriginShieldProperty
Remarks
Using Origin Shield can help reduce the load on your origin. For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide .
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 originShieldProperty = new OriginShieldProperty {
Enabled = false,
OriginShieldRegion = "originShieldRegion"
};
Synopsis
Constructors
OriginShieldProperty() |
Properties
Enabled | A flag that specifies whether Origin Shield is enabled. |
OriginShieldRegion | The AWS Region for Origin Shield. |
Constructors
OriginShieldProperty()
public OriginShieldProperty()
Properties
Enabled
A flag that specifies whether Origin Shield is enabled.
public object Enabled { get; set; }
Property Value
System.Object
Remarks
When it's enabled, CloudFront routes all requests through Origin Shield, which can help protect your origin. When it's disabled, CloudFront might send requests directly to your origin from multiple edge locations or regional edge caches.
OriginShieldRegion
The AWS Region for Origin Shield.
public string OriginShieldRegion { get; set; }
Property Value
System.String
Remarks
Specify the AWS Region that has the lowest latency to your origin. To specify a region, use the region code, not the region name. For example, specify the US East (Ohio) region as us-east-2
.
When you enable CloudFront Origin Shield, you must specify the AWS Region for Origin Shield. For the list of AWS Regions that you can specify, and for help choosing the best Region for your origin, see Choosing the AWS Region for Origin Shield in the Amazon CloudFront Developer Guide .