Class OriginAccessIdentity
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.cloudfront.OriginAccessIdentity
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IOriginAccessIdentity,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.724Z")
@Stability(Stable)
public class OriginAccessIdentity
extends Resource
implements IOriginAccessIdentity
An origin access identity is a special CloudFront user that you can associate with Amazon S3 origins, so that you can secure all or just some of your Amazon S3 content.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
OriginAccessIdentity originAccessIdentity = OriginAccessIdentity.Builder.create(this, "MyOriginAccessIdentity")
.comment("comment")
.build();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IOriginAccessIdentity
IOriginAccessIdentity.Jsii$Default, IOriginAccessIdentity.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOriginAccessIdentity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedOriginAccessIdentity(software.amazon.jsii.JsiiObjectRef objRef) OriginAccessIdentity(software.constructs.Construct scope, String id) OriginAccessIdentity(software.constructs.Construct scope, String id, OriginAccessIdentityProps props) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringarn()The ARN to include in S3 bucket policy to allow CloudFront access.static IOriginAccessIdentityfromOriginAccessIdentityName(software.constructs.Construct scope, String id, String originAccessIdentityName) Creates a OriginAccessIdentity by providing the OriginAccessIdentityName.The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access identity read permission to an object in Amazon S3.Derived principal value for bucket access.The Origin Access Identity Name (physical id).Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
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.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
OriginAccessIdentity
protected OriginAccessIdentity(software.amazon.jsii.JsiiObjectRef objRef) -
OriginAccessIdentity
protected OriginAccessIdentity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
OriginAccessIdentity
@Stability(Stable) public OriginAccessIdentity(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable OriginAccessIdentityProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
OriginAccessIdentity
@Stability(Stable) public OriginAccessIdentity(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromOriginAccessIdentityName
@Stability(Stable) @NotNull public static IOriginAccessIdentity fromOriginAccessIdentityName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String originAccessIdentityName) Creates a OriginAccessIdentity by providing the OriginAccessIdentityName.- Parameters:
scope- This parameter is required.id- This parameter is required.originAccessIdentityName- This parameter is required.
-
arn
The ARN to include in S3 bucket policy to allow CloudFront access. -
getCloudFrontOriginAccessIdentityS3CanonicalUserId
The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access identity read permission to an object in Amazon S3. -
getGrantPrincipal
Derived principal value for bucket access.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getOriginAccessIdentityName
The Origin Access Identity Name (physical id).- Specified by:
getOriginAccessIdentityNamein interfaceIOriginAccessIdentity
-