GrantWithResourceOptions

class aws_cdk.aws_iam.GrantWithResourceOptions(*, actions, grantee, resource_arns, resource, resource_self_arns=None)

Bases: aws_cdk.aws_iam.CommonGrantOptions

Options for a grant operation.

Parameters
  • actions (List[str]) – The actions to grant.

  • grantee (IGrantable) – The principal to grant to. Default: if principal is undefined, no work is done.

  • resource_arns (List[str]) – The resource ARNs to grant to.

  • resource (IResourceWithPolicy) – The resource with a resource policy. The statement will be added to the resource policy if it couldn’t be added to the principal policy.

  • resource_self_arns (Optional[List[str]]) – When referring to the resource in a resource policy, use this as ARN. (Depending on the resource type, this needs to be ‘*’ in a resource policy). Default: Same as regular resource ARNs

stability :stability: experimental

Attributes

actions

The actions to grant.

stability :stability: experimental

Return type

List[str]

grantee

The principal to grant to.

default :default: if principal is undefined, no work is done.

stability :stability: experimental

Return type

IGrantable

resource

The resource with a resource policy.

The statement will be added to the resource policy if it couldn’t be added to the principal policy.

stability :stability: experimental

Return type

IResourceWithPolicy

resource_arns

The resource ARNs to grant to.

stability :stability: experimental

Return type

List[str]

resource_self_arns

When referring to the resource in a resource policy, use this as ARN.

(Depending on the resource type, this needs to be ‘*’ in a resource policy).

default :default: Same as regular resource ARNs

stability :stability: experimental

Return type

Optional[List[str]]