Class CanonicalUserPrincipal
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
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated
Constructors
CanonicalUserPrincipal(string)
public CanonicalUserPrincipal(string canonicalUserId)
Parameters
canonicalUserId
stringunique identifier assigned by AWS for every account.
Properties
CanonicalUserId
unique identifier assigned by AWS for every account.
public virtual string CanonicalUserId { get; }
Property Value
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
Methods
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string? DedupeString()
Returns
ToString()
Returns a string representation of an object.
public override string ToString()