Class CanonicalUserPrincipal
A policy principal for canonicalUserIds - useful for S3 bucket policies that use Origin Access identities.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CanonicalUserPrincipal : PrincipalBase, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Syntax (vb)
Public Class CanonicalUserPrincipal Inherits PrincipalBase Implements IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Remarks
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated
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");
Synopsis
Constructors
| CanonicalUserPrincipal(string) | A policy principal for canonicalUserIds - useful for S3 bucket policies that use Origin Access identities. |
Properties
| CanonicalUserId | unique identifier assigned by AWS for every account. |
| PolicyFragment | Return the policy fragment that identifies this principal in a Policy. |
Methods
| DedupeString() | Return whether or not this principal is equal to the given principal. |
| ToString() | Returns a string representation of an object. |
Constructors
CanonicalUserPrincipal(string)
A policy principal for canonicalUserIds - useful for S3 bucket policies that use Origin Access identities.
public CanonicalUserPrincipal(string canonicalUserId)
Parameters
- canonicalUserId string
unique identifier assigned by AWS for every account.
Remarks
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated
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
Overrides
Remarks
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated
Methods
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string? DedupeString()
Returns
Overrides
Remarks
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
Overrides
Remarks
See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
and
for more details.
ExampleMetadata: fixture=_generated