Skip to content
v2.274.0

CommonGrantOptions Struct ​

Basic options for a grant operation.

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';

declare const conditions: any;
declare const grantable: iam.IGrantable;
const commonGrantOptions: iam.CommonGrantOptions = {
  actions: ['actions'],
  grantee: grantable,
  resourceArns: ['resourceArns'],

  // the properties below are optional
  conditions: {
    conditionsKey: {
      conditionsKey: conditions,
    },
  },
};

Properties ​

actionsstring[]actionstyping.List[str]actionsList<String>Actionsstring[]Actions*[]*stringrequired#
The actions to grant.
conditions{ [key: string]: { [key: string]: any } }conditionstyping.Mapping[str, typing.Mapping[str, Any]]conditionsMap<String, Map<String, Object>>ConditionsIDictionary<string, IDictionary<string, object>>Conditions*map[string]*map[string]interface{}= No conditions#
Any conditions to attach to the grant.
granteeIGrantablegranteeIGrantablegranteeIGrantableGranteeIGrantableGranteeIGrantable= if principal is undefined, no wo…required#
The principal to grant to.
default

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.