Interface CfnOriginAccessControlPropsMixin.OriginAccessControlConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnOriginAccessControlPropsMixin.OriginAccessControlConfigProperty.Jsii$Proxy
- Enclosing class:
CfnOriginAccessControlPropsMixin
After you create an origin access control, you can add it to an origin in a CloudFront distribution so that CloudFront sends authenticated (signed) requests to the origin.
This makes it possible to block public access to the origin, allowing viewers (users) to access the origin's content only through CloudFront.
For more information about using a CloudFront origin access control, see Restricting access to an AWS origin in the Amazon CloudFront Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.cloudfront.*;
OriginAccessControlConfigProperty originAccessControlConfigProperty = OriginAccessControlConfigProperty.builder()
.description("description")
.name("name")
.originAccessControlOriginType("originAccessControlOriginType")
.signingBehavior("signingBehavior")
.signingProtocol("signingProtocol")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnOriginAccessControlPropsMixin.OriginAccessControlConfigProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringA description of the origin access control.default StringgetName()A name to identify the origin access control.default StringThe type of origin that this origin access control is for.default StringSpecifies which requests CloudFront signs (adds authentication information to).default StringThe signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDescription
A description of the origin access control.- See Also:
-
getName
A name to identify the origin access control.You can specify up to 64 characters.
- See Also:
-
getOriginAccessControlOriginType
The type of origin that this origin access control is for.- See Also:
-
getSigningBehavior
Specifies which requests CloudFront signs (adds authentication information to).Specify
alwaysfor the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide .This field can have one of the following values:
always– CloudFront signs all origin requests, overwriting theAuthorizationheader from the viewer request if one exists.never– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.no-override– If the viewer request doesn't contain theAuthorizationheader, then CloudFront signs the origin request. If the viewer request contains theAuthorizationheader, then CloudFront doesn't sign the origin request and instead passes along theAuthorizationheader from the viewer request. WARNING: To pass along theAuthorizationheader from the viewer request, you must add theAuthorizationheader to a cache policy for all cache behaviors that use origins associated with this origin access control.
- See Also:
-
getSigningProtocol
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.The only valid value is
sigv4.- See Also:
-
builder
@Stability(Stable) static CfnOriginAccessControlPropsMixin.OriginAccessControlConfigProperty.Builder builder()
-