Class OriginRequestPolicy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudfront.OriginRequestPolicy
- All Implemented Interfaces:
IResource
,IOriginRequestPolicy
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:27.667Z")
@Stability(Stable)
public class OriginRequestPolicy
extends Resource
implements IOriginRequestPolicy
A Origin Request Policy configuration.
Example:
// Using an existing origin request policy for a Distribution S3Origin bucketOrigin; Distribution.Builder.create(this, "myDistManagedPolicy") .defaultBehavior(BehaviorOptions.builder() .origin(bucketOrigin) .originRequestPolicy(OriginRequestPolicy.CORS_S3_ORIGIN) .build()) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IOriginRequestPolicy
IOriginRequestPolicy.Jsii$Default, IOriginRequestPolicy.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IOriginRequestPolicy
This policy includes all values (query strings, headers, and cookies) in the viewer request.static final IOriginRequestPolicy
This policy includes all values (headers, cookies, and query strings) in the viewer request, and all CloudFront headers that were released through June 2022 (CloudFront headers released after June 2022 are not included).static final IOriginRequestPolicy
This policy includes all values (query strings, and cookies) except the header in the viewer request.static final IOriginRequestPolicy
This policy includes the header that enables cross-origin resource sharing (CORS) requests when the origin is a custom origin.static final IOriginRequestPolicy
This policy includes the headers that enable cross-origin resource sharing (CORS) requests when the origin is an Amazon S3 bucket.static final IOriginRequestPolicy
This policy is designed for use with an origin that is an AWS Elemental MediaTailor endpoint.static final IOriginRequestPolicy
This policy includes only the User-Agent and Referer headers. -
Constructor Summary
ModifierConstructorDescriptionprotected
OriginRequestPolicy
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
OriginRequestPolicy
(software.amazon.jsii.JsiiObjectRef objRef) OriginRequestPolicy
(software.constructs.Construct scope, String id) OriginRequestPolicy
(software.constructs.Construct scope, String id, OriginRequestPolicyProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IOriginRequestPolicy
fromOriginRequestPolicyId
(software.constructs.Construct scope, String id, String originRequestPolicyId) Imports a Origin Request Policy from its id.The ID of the origin request policy.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
ALL_VIEWER
This policy includes all values (query strings, headers, and cookies) in the viewer request. -
ALL_VIEWER_AND_CLOUDFRONT_2022
This policy includes all values (headers, cookies, and query strings) in the viewer request, and all CloudFront headers that were released through June 2022 (CloudFront headers released after June 2022 are not included). -
ALL_VIEWER_EXCEPT_HOST_HEADER
This policy includes all values (query strings, and cookies) except the header in the viewer request. -
CORS_CUSTOM_ORIGIN
This policy includes the header that enables cross-origin resource sharing (CORS) requests when the origin is a custom origin. -
CORS_S3_ORIGIN
This policy includes the headers that enable cross-origin resource sharing (CORS) requests when the origin is an Amazon S3 bucket. -
ELEMENTAL_MEDIA_TAILOR
This policy is designed for use with an origin that is an AWS Elemental MediaTailor endpoint. -
USER_AGENT_REFERER_HEADERS
This policy includes only the User-Agent and Referer headers.It doesn’t include any query strings or cookies.
-
-
Constructor Details
-
OriginRequestPolicy
protected OriginRequestPolicy(software.amazon.jsii.JsiiObjectRef objRef) -
OriginRequestPolicy
protected OriginRequestPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
OriginRequestPolicy
@Stability(Stable) public OriginRequestPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable OriginRequestPolicyProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
OriginRequestPolicy
@Stability(Stable) public OriginRequestPolicy(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromOriginRequestPolicyId
@Stability(Stable) @NotNull public static IOriginRequestPolicy fromOriginRequestPolicyId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String originRequestPolicyId) Imports a Origin Request Policy from its id.- Parameters:
scope
- This parameter is required.id
- This parameter is required.originRequestPolicyId
- This parameter is required.
-
getOriginRequestPolicyId
The ID of the origin request policy.- Specified by:
getOriginRequestPolicyId
in interfaceIOriginRequestPolicy
-