Class RoleGrants
Collection of grant methods for a IRoleRef.
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RoleGrants : DeputyBase
Syntax (vb)
Public Class RoleGrants Inherits DeputyBase
Remarks
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;
using Amazon.CDK.Interfaces.IAM;
IRoleRef roleRef;
var roleGrants = RoleGrants.FromRole(roleRef);
Synopsis
Methods
| AssumeRole(IPrincipal) | Grant permissions to the given principal to assume this role. |
| FromRole(IRoleRef) | Creates grants for IRoleRef. |
| PassRole(IPrincipal) | Grant permissions to the given principal to pass this role. |
Methods
AssumeRole(IPrincipal)
Grant permissions to the given principal to assume this role.
public virtual Grant AssumeRole(IPrincipal identity)
Parameters
- identity IPrincipal
Returns
Remarks
ExampleMetadata: fixture=_generated
FromRole(IRoleRef)
Creates grants for IRoleRef.
public static RoleGrants FromRole(IRoleRef role)
Parameters
- role IRoleRef
Returns
Remarks
ExampleMetadata: fixture=_generated
PassRole(IPrincipal)
Grant permissions to the given principal to pass this role.
public virtual Grant PassRole(IPrincipal identity)
Parameters
- identity IPrincipal
Returns
Remarks
ExampleMetadata: fixture=_generated