Class S3Origin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudfront.origins.S3Origin
- All Implemented Interfaces:
IOrigin
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.248Z")
@Stability(Stable)
public class S3Origin
extends software.amazon.jsii.JsiiObject
implements IOrigin
An Origin that is backed by an S3 bucket.
If the bucket is configured for website hosting, this origin will be configured to use the bucket as an HTTP server origin and will use the bucket's configured website redirects and error handling. Otherwise, the origin is created as a bucket origin and will use CloudFront's redirect and error handling.
Example:
// Adding an existing Lambda@Edge function created in a different stack // to a CloudFront distribution. Bucket s3Bucket; IVersion functionVersion = Version.fromVersionArn(this, "Version", "arn:aws:lambda:us-east-1:123456789012:function:functionName:1"); Distribution.Builder.create(this, "distro") .defaultBehavior(BehaviorOptions.builder() .origin(new S3Origin(s3Bucket)) .edgeLambdas(List.of(EdgeLambda.builder() .functionVersion(functionVersion) .eventType(LambdaEdgeEventType.VIEWER_REQUEST) .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, IOrigin.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbind
(Construct scope, OriginBindOptions options) The method called when a given Origin is added (for the first time) to a Distribution.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
-
S3Origin
protected S3Origin(software.amazon.jsii.JsiiObjectRef objRef) -
S3Origin
protected S3Origin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
S3Origin
- Parameters:
bucket
- This parameter is required.props
-
-
S3Origin
- Parameters:
bucket
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public OriginBindConfig bind(@NotNull Construct scope, @NotNull OriginBindOptions options) The method called when a given Origin is added (for the first time) to a Distribution.
-