Class GrantOnPrincipalOptions
Options for a grant operation that only applies to principals.
Inheritance
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GrantOnPrincipalOptions : Object, IGrantOnPrincipalOptions, ICommonGrantOptions
Syntax (vb)
Public Class GrantOnPrincipalOptions
Inherits Object
Implements IGrantOnPrincipalOptions, ICommonGrantOptions
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 Constructs;
var conditions;
Construct construct;
IGrantable grantable;
var grantOnPrincipalOptions = new GrantOnPrincipalOptions {
Actions = new [] { "actions" },
Grantee = grantable,
ResourceArns = new [] { "resourceArns" },
// the properties below are optional
Conditions = new Dictionary<string, IDictionary<string, object>> {
{ "conditionsKey", new Dictionary<string, object> {
{ "conditionsKey", conditions }
} }
},
Scope = construct
};
Synopsis
Constructors
GrantOnPrincipalOptions() |
Properties
Actions | The actions to grant. |
Conditions | Any conditions to attach to the grant. |
Grantee | The principal to grant to. |
ResourceArns | The resource ARNs to grant to. |
Scope | Construct to report warnings on in case grant could not be registered. |
Constructors
GrantOnPrincipalOptions()
public GrantOnPrincipalOptions()
Properties
Actions
The actions to grant.
public string[] Actions { get; set; }
Property Value
System.String[]
Conditions
Any conditions to attach to the grant.
public IDictionary<string, IDictionary<string, object>> Conditions { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.IDictionary<System.String, System.Object>>
Remarks
Default: - No conditions
Grantee
The principal to grant to.
public IGrantable Grantee { get; set; }
Property Value
Remarks
Default: if principal is undefined, no work is done.
ResourceArns
The resource ARNs to grant to.
public string[] ResourceArns { get; set; }
Property Value
System.String[]
Scope
Construct to report warnings on in case grant could not be registered.
public IConstruct Scope { get; set; }
Property Value
Constructs.IConstruct
Remarks
Default: - the construct in which this construct is defined