@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.178Z") @Stability(value=Stable) public class S3Origin extends software.amazon.jsii.JsiiObject implements IOrigin
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
S3Origin.Builder
A fluent builder for
S3Origin. |
software.amazon.jsii.JsiiObject.InitializationModeIOrigin.Jsii$Default, IOrigin.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
S3Origin(IBucket bucket) |
|
S3Origin(IBucket bucket,
S3OriginProps props) |
protected |
S3Origin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
S3Origin(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
OriginBindConfig |
bind(software.constructs.Construct scope,
OriginBindOptions options)
The method called when a given Origin is added (for the first time) to a Distribution.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected S3Origin(software.amazon.jsii.JsiiObjectRef objRef)
protected S3Origin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public S3Origin(@NotNull
IBucket bucket,
@Nullable
S3OriginProps props)
bucket - This parameter is required.props - @Stability(value=Stable)
public S3Origin(@NotNull
IBucket bucket)
bucket - This parameter is required.@Stability(value=Stable) @NotNull public OriginBindConfig bind(@NotNull software.constructs.Construct scope, @NotNull OriginBindOptions options)
Copyright © 2022. All rights reserved.