Class OriginAccessIdentity

All Implemented Interfaces:
IConstruct, IDependable, IResource, IOriginAccessIdentity, IGrantable,, 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.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 OriginAccessIdentity originAccessIdentity = OriginAccessIdentity.Builder.create(this, "MyOriginAccessIdentity")
  • Constructor Details

    • OriginAccessIdentity

      protected OriginAccessIdentity( objRef)
    • OriginAccessIdentity

      protected OriginAccessIdentity( initializationMode)
    • OriginAccessIdentity

      @Stability(Stable) public OriginAccessIdentity(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable OriginAccessIdentityProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • OriginAccessIdentity

      @Stability(Stable) public OriginAccessIdentity(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.

      scope - This parameter is required.
      id - This parameter is required.
      originAccessIdentityName - This parameter is required.
    • arn

      @Stability(Stable) @NotNull protected String arn()
      The ARN to include in S3 bucket policy to allow CloudFront access.
    • getCloudFrontOriginAccessIdentityS3CanonicalUserId

      @Stability(Stable) @NotNull public String 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

      @Stability(Stable) @NotNull public IPrincipal getGrantPrincipal()
      Derived principal value for bucket access.
      Specified by:
      getGrantPrincipal in interface IGrantable
    • getOriginAccessIdentityName

      @Stability(Stable) @NotNull public String getOriginAccessIdentityName()
      The Origin Access Identity Name (physical id).
      Specified by:
      getOriginAccessIdentityName in interface IOriginAccessIdentity