GrantOnPrincipalOptions Struct
Options for a grant operation that only applies to principals.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
import * as constructs from 'constructs';
declare const conditions: any;
declare const construct: constructs.Construct;
declare const grantable: iam.IGrantable;
const grantOnPrincipalOptions: iam.GrantOnPrincipalOptions = {
actions: ['actions'],
grantee: grantable,
resourceArns: ['resourceArns'],
// the properties below are optional
conditions: {
conditionsKey: {
conditionsKey: conditions,
},
},
scope: construct,
};
Properties
The actions to grant.
conditionsoptional{ [key: string]: { [key: string]: any } }conditionsoptionaltyping.Mapping[str, typing.Mapping[str, Any]]conditionsoptionalMap<String, Map<String, Object>>ConditionsoptionalIDictionary<string, IDictionary<string, object>>Conditionsoptional*map[string]*map[string]interface{}#Any conditions to attach to the grant.
Default: No conditions
The principal to grant to.
Default: if principal is undefined, no work is done.
resourceArnsstring[]resource_arnstyping.List[str]resourceArnsList<String>ResourceArnsstring[]ResourceArns*[]*stringrequired#The resource ARNs to grant to.
scopeoptionalIConstructscopeoptionalIConstructscopeoptionalIConstructScopeoptionalIConstructScopeoptionalIConstructdeprecated#The scope argument is currently unused.
Default: the construct in which this construct is defined