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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IOriginAccessIdentity
IOriginAccessIdentity.Jsii$Default, IOriginAccessIdentity.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
OriginAccessIdentity
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
OriginAccessIdentity
(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 String
arn()
The ARN to include in S3 bucket policy to allow CloudFront access.static IOriginAccessIdentity
fromOriginAccessIdentityName
(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, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
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, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods 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:
getGrantPrincipal
in interfaceIGrantable
-
getOriginAccessIdentityName
The Origin Access Identity Name (physical id).- Specified by:
getOriginAccessIdentityName
in interfaceIOriginAccessIdentity
-