Class S3OriginAccessControl
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudfront.S3OriginAccessControl
- All Implemented Interfaces:
IEnvironmentAware,IResource,IOriginAccessControl,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:06.635Z")
@Stability(Stable)
public class S3OriginAccessControl
extends Resource
implements IOriginAccessControl
An Origin Access Control for Amazon S3 origins.
Example:
Bucket myBucket = new Bucket(this, "myBucket");
S3OriginAccessControl oac = S3OriginAccessControl.Builder.create(this, "MyOAC")
.signing(Signing.SIGV4_NO_OVERRIDE)
.build();
IOrigin s3Origin = S3BucketOrigin.withOriginAccessControl(myBucket, S3BucketOriginWithOACProps.builder()
.originAccessControl(oac)
.build());
Distribution.Builder.create(this, "myDist")
.defaultBehavior(BehaviorOptions.builder()
.origin(s3Origin)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IOriginAccessControl
IOriginAccessControl.Jsii$Default, IOriginAccessControl.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedS3OriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedS3OriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef) S3OriginAccessControl(software.constructs.Construct scope, String id) S3OriginAccessControl(software.constructs.Construct scope, String id, S3OriginAccessControlProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IOriginAccessControlfromOriginAccessControlId(software.constructs.Construct scope, String id, String originAccessControlId) Imports an S3 origin access control from its id.The unique identifier of this Origin Access Control.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
S3OriginAccessControl
protected S3OriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef) -
S3OriginAccessControl
protected S3OriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
S3OriginAccessControl
@Stability(Stable) public S3OriginAccessControl(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable S3OriginAccessControlProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
S3OriginAccessControl
@Stability(Stable) public S3OriginAccessControl(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromOriginAccessControlId
@Stability(Stable) @NotNull public static IOriginAccessControl fromOriginAccessControlId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String originAccessControlId) Imports an S3 origin access control from its id.- Parameters:
scope- This parameter is required.id- This parameter is required.originAccessControlId- This parameter is required.
-
getOriginAccessControlId
The unique identifier of this Origin Access Control.- Specified by:
getOriginAccessControlIdin interfaceIOriginAccessControl
-