Table of Contents

Class CanonicalUserPrincipal

Namespace
Amazon.CDK.AWS.IAM
Assembly
Amazon.CDK.AWS.IAM.dll

A policy principal for canonicalUserIds - useful for S3 bucket policies that use Origin Access identities.

public class CanonicalUserPrincipal : PrincipalBase, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Inheritance
CanonicalUserPrincipal
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.IAM;

             var canonicalUserPrincipal = new CanonicalUserPrincipal("canonicalUserId");

Remarks

Constructors

CanonicalUserPrincipal(string)

public CanonicalUserPrincipal(string canonicalUserId)

Parameters

canonicalUserId string

unique identifier assigned by AWS for every account.

Properties

CanonicalUserId

unique identifier assigned by AWS for every account.

public virtual string CanonicalUserId { get; }

Property Value

string

Remarks

root user and IAM users for an account all see the same ID. (i.e. 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be)

PolicyFragment

Return the policy fragment that identifies this principal in a Policy.

public override PrincipalPolicyFragment PolicyFragment { get; }

Property Value

PrincipalPolicyFragment

Methods

DedupeString()

Return whether or not this principal is equal to the given principal.

public override string? DedupeString()

Returns

string

ToString()

Returns a string representation of an object.

public override string ToString()

Returns

string