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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CanonicalUserPrincipal(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CanonicalUserPrincipal(String) |
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(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CanonicalUserPrincipal(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CanonicalUserPrincipal(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CanonicalUserPrincipal(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CanonicalUserPrincipal(String)
public CanonicalUserPrincipal(string canonicalUserId)
Parameters
- canonicalUserId System.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
System.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
Overrides
Methods
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string DedupeString()
Returns
System.String
Overrides
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
System.String