Interface IIdentity
A construct that represents an IAM principal, such as a user, group or role.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IIdentity : IPrincipal, IGrantable, IResource
Syntax (vb)
Public Interface IIdentity
Inherits IPrincipal, IGrantable, IResource, IConstruct, IDependable
Synopsis
Methods
AddManagedPolicy(IManagedPolicy) | Attaches a managed policy to this principal. |
AttachInlinePolicy(Policy) | Attaches an inline policy to this principal. |
Methods
AddManagedPolicy(IManagedPolicy)
Attaches a managed policy to this principal.
void AddManagedPolicy(IManagedPolicy policy)
Parameters
- policy IManagedPolicy
The managed policy.
AttachInlinePolicy(Policy)
Attaches an inline policy to this principal.
void AttachInlinePolicy(Policy policy)
Parameters
- policy Policy
The policy resource to attach to this principal [disable-awslint:ref-via-interface].
Remarks
This is the same as calling policy.addToXxx(principal)
.