Show / Hide Table of Contents

Class CanonicalUserPrincipal

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

Inheritance
object
PrincipalBase
CanonicalUserPrincipal
Implements
IAssumeRolePrincipal
IComparablePrincipal
IPrincipal
IGrantable
Inherited Members
PrincipalBase.AddToAssumeRolePolicy(PolicyDocument)
PrincipalBase.AddToPolicy(PolicyStatement)
PrincipalBase.AddToPrincipalPolicy(PolicyStatement)
PrincipalBase.ToJSON()
PrincipalBase.WithConditions(IDictionary<string, object>)
PrincipalBase.WithSessionTags()
PrincipalBase.AssumeRoleAction
PrincipalBase.GrantPrincipal
PrincipalBase.PrincipalAccount
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

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

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

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

for more details.

ExampleMetadata: fixture=_generated

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

Overrides
PrincipalBase.PolicyFragment
Remarks

See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html

and

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

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

string

Overrides
PrincipalBase.DedupeString()
Remarks

See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html

and

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

for more details.

ExampleMetadata: fixture=_generated

ToString()

Returns a string representation of an object.

public override string ToString()
Returns

string

Overrides
PrincipalBase.ToString()
Remarks

See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html

and

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

for more details.

ExampleMetadata: fixture=_generated

Implements

IAssumeRolePrincipal
IComparablePrincipal
IPrincipal
IGrantable
Back to top Generated by DocFX