How to use the @aws-cdk/aws-iam.ArnPrincipal function in @aws-cdk/aws-iam

To help you get started, we’ve selected a few @aws-cdk/aws-iam examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / aws-cloudfront / lib / origin_access_identity.ts View on Github external
public static fromOriginAccessIdentityName(
    scope: cdk.Construct,
    id: string,
    originAccessIdentityName: string): IOriginAccessIdentity {

    class Import extends OriginAccessIdentityBase {
      public readonly originAccessIdentityName = originAccessIdentityName;
      public readonly grantPrincipal = new iam.ArnPrincipal(this.arn());
      constructor(s: cdk.Construct, i: string) {
        super(s, i, { physicalName: originAccessIdentityName });
      }
    }

    return new Import(scope, id);
  }