Class CfnDistribution.OriginShieldProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnDistribution.OriginShieldProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDistribution.OriginShieldProperty>
- Enclosing interface:
CfnDistribution.OriginShieldProperty
@Stability(Stable)
public static final class CfnDistribution.OriginShieldProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDistribution.OriginShieldProperty>
A builder for
CfnDistribution.OriginShieldProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnDistribution.OriginShieldProperty.getEnabled()
enabled
(IResolvable enabled) Sets the value ofCfnDistribution.OriginShieldProperty.getEnabled()
originShieldRegion
(String originShieldRegion) Sets the value ofCfnDistribution.OriginShieldProperty.getOriginShieldRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
enabled
Sets the value ofCfnDistribution.OriginShieldProperty.getEnabled()
- Parameters:
enabled
- A flag that specifies whether Origin Shield is enabled. 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.- Returns:
this
-
enabled
Sets the value ofCfnDistribution.OriginShieldProperty.getEnabled()
- Parameters:
enabled
- A flag that specifies whether Origin Shield is enabled. 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.- Returns:
this
-
originShieldRegion
@Stability(Stable) public CfnDistribution.OriginShieldProperty.Builder originShieldRegion(String originShieldRegion) Sets the value ofCfnDistribution.OriginShieldProperty.getOriginShieldRegion()
- Parameters:
originShieldRegion
- The AWS Region for Origin Shield. 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 asus-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 .
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDistribution.OriginShieldProperty>
- Returns:
- a new instance of
CfnDistribution.OriginShieldProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-