GrantOnPrincipalAndResourceOptions

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

Bases: aws_cdk.aws_iam.CommonGrantOptions

__init__(*, actions, grantee, resource_arns, resource, resource_policy_principal=None, resource_self_arns=None)

Options for a grant operation to both identity and resource.

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 always be added to the resource policy.

  • resource_policy_principal (Optional[IPrincipal]) – The principal to use in the statement for the resource policy. Default: - the principal of the grantee will be used

  • 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

Return type

None

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 always be added to the resource policy.

stability :stability: experimental

Return type

IResourceWithPolicy

resource_arns

The resource ARNs to grant to.

stability :stability: experimental

Return type

List[str]

resource_policy_principal

The principal to use in the statement for the resource policy.

default :default: - the principal of the grantee will be used

stability :stability: experimental

Return type

Optional[IPrincipal]

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]]