Class S3BucketOrigin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudfront.OriginBase
software.amazon.awscdk.services.cloudfront.origins.S3BucketOrigin
- All Implemented Interfaces:
IOrigin
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:11.687Z")
@Stability(Stable)
public abstract class S3BucketOrigin
extends OriginBase
A S3 Bucket Origin.
Example:
Bucket myBucket = new Bucket(this, "myBucket"); Distribution.Builder.create(this, "myDist") .defaultBehavior(BehaviorOptions.builder() .origin(OriginGroup.Builder.create() .primaryOrigin(S3BucketOrigin.withOriginAccessControl(myBucket)) .fallbackOrigin(new HttpOrigin("www.example.com")) // optional, defaults to: 500, 502, 503 and 504 .fallbackStatusCodes(List.of(404)) .build()) .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.amazon.awscdk.services.cloudfront.IOrigin
IOrigin.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
S3BucketOrigin
(IBucket bucket) protected
S3BucketOrigin
(IBucket bucket, S3BucketOriginBaseProps props) protected
S3BucketOrigin
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
S3BucketOrigin
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionprotected CfnDistribution.S3OriginConfigProperty
static IOrigin
withBucketDefaults
(IBucket bucket) Create a S3 Origin with default S3 bucket settings (no origin access control).static IOrigin
withBucketDefaults
(IBucket bucket, OriginProps props) Create a S3 Origin with default S3 bucket settings (no origin access control).static IOrigin
withOriginAccessControl
(IBucket bucket) Create a S3 Origin with Origin Access Control (OAC) configured.static IOrigin
withOriginAccessControl
(IBucket bucket, S3BucketOriginWithOACProps props) Create a S3 Origin with Origin Access Control (OAC) configured.static IOrigin
withOriginAccessIdentity
(IBucket bucket) Create a S3 Origin with Origin Access Identity (OAI) configured OAI is a legacy feature and we strongly recommend you to use OAC viawithOriginAccessControl()
unless it is not supported in your required region (e.g.static IOrigin
withOriginAccessIdentity
(IBucket bucket, S3BucketOriginWithOAIProps props) Create a S3 Origin with Origin Access Identity (OAI) configured OAI is a legacy feature and we strongly recommend you to use OAC viawithOriginAccessControl()
unless it is not supported in your required region (e.g.Methods inherited from class software.amazon.awscdk.services.cloudfront.OriginBase
bind, renderCustomOriginConfig
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, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
S3BucketOrigin
protected S3BucketOrigin(software.amazon.jsii.JsiiObjectRef objRef) -
S3BucketOrigin
protected S3BucketOrigin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
S3BucketOrigin
@Stability(Stable) protected S3BucketOrigin(@NotNull IBucket bucket, @Nullable S3BucketOriginBaseProps props) - Parameters:
bucket
- This parameter is required.props
-
-
S3BucketOrigin
- Parameters:
bucket
- This parameter is required.
-
-
Method Details
-
withBucketDefaults
@Stability(Stable) @NotNull public static IOrigin withBucketDefaults(@NotNull IBucket bucket, @Nullable OriginProps props) Create a S3 Origin with default S3 bucket settings (no origin access control).- Parameters:
bucket
- This parameter is required.props
-
-
withBucketDefaults
Create a S3 Origin with default S3 bucket settings (no origin access control).- Parameters:
bucket
- This parameter is required.
-
withOriginAccessControl
@Stability(Stable) @NotNull public static IOrigin withOriginAccessControl(@NotNull IBucket bucket, @Nullable S3BucketOriginWithOACProps props) Create a S3 Origin with Origin Access Control (OAC) configured.- Parameters:
bucket
- This parameter is required.props
-
-
withOriginAccessControl
Create a S3 Origin with Origin Access Control (OAC) configured.- Parameters:
bucket
- This parameter is required.
-
withOriginAccessIdentity
@Stability(Stable) @NotNull public static IOrigin withOriginAccessIdentity(@NotNull IBucket bucket, @Nullable S3BucketOriginWithOAIProps props) Create a S3 Origin with Origin Access Identity (OAI) configured OAI is a legacy feature and we strongly recommend you to use OAC viawithOriginAccessControl()
unless it is not supported in your required region (e.g. China regions).- Parameters:
bucket
- This parameter is required.props
-
-
withOriginAccessIdentity
Create a S3 Origin with Origin Access Identity (OAI) configured OAI is a legacy feature and we strongly recommend you to use OAC viawithOriginAccessControl()
unless it is not supported in your required region (e.g. China regions).- Parameters:
bucket
- This parameter is required.
-
renderS3OriginConfig
@Stability(Stable) @Nullable protected CfnDistribution.S3OriginConfigProperty renderS3OriginConfig()- Overrides:
renderS3OriginConfig
in classOriginBase
-