Skip to content

put_role_permissions_boundary

Operation

put_role_permissions_boundary

put_role_permissions_boundary(request: PutRolePermissionsBoundaryInput | PutRolePermissionsBoundaryInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PutRolePermissionsBoundaryInputDict]) -> PutRolePermissionsBoundaryOutput

Adds or updates the policy that is specified as the IAM role's permissions boundary. You can use an Amazon Web Services managed policy or a customer managed policy to set the boundary for a role. Use the boundary to control the maximum permissions that the role can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the role.

You cannot set the boundary for a service-linked role.

Warning

Policies used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the role. To learn how the effective permissions for a role are evaluated, see IAM JSON policy evaluation logic in the IAM User Guide.

Parameters:

Name Type Description Default
request PutRolePermissionsBoundaryInput | PutRolePermissionsBoundaryInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PutRolePermissionsBoundaryInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PutRolePermissionsBoundaryOutput

An instance of PutRolePermissionsBoundaryOutput.

put_role_permissions_boundary async

put_role_permissions_boundary(request: PutRolePermissionsBoundaryInput | PutRolePermissionsBoundaryInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PutRolePermissionsBoundaryInputDict]) -> PutRolePermissionsBoundaryOutput

Adds or updates the policy that is specified as the IAM role's permissions boundary. You can use an Amazon Web Services managed policy or a customer managed policy to set the boundary for a role. Use the boundary to control the maximum permissions that the role can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the role.

You cannot set the boundary for a service-linked role.

Warning

Policies used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the role. To learn how the effective permissions for a role are evaluated, see IAM JSON policy evaluation logic in the IAM User Guide.

Parameters:

Name Type Description Default
request PutRolePermissionsBoundaryInput | PutRolePermissionsBoundaryInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PutRolePermissionsBoundaryInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PutRolePermissionsBoundaryOutput

An instance of PutRolePermissionsBoundaryOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

PutRolePermissionsBoundaryInputDict

Bases: TypedDict

Dictionary form of PutRolePermissionsBoundaryInput.

Attributes

permissions_boundary instance-attribute
permissions_boundary: Required[str]

The ARN of the managed policy that is used to set the permissions boundary for the role.

A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see Permissions boundaries for IAM entities in the IAM User Guide.

For more information about policy types, see Policy types in the IAM User Guide.

role_name instance-attribute
role_name: Required[str]

The name (friendly name, not ARN) of the IAM role for which you want to set the permissions boundary.

PutRolePermissionsBoundaryInput dataclass

Bases: _SerdeShape

Dataclass for PutRolePermissionsBoundaryInput structure.

Attributes

permissions_boundary class-attribute instance-attribute
permissions_boundary: str | None = ...

The ARN of the managed policy that is used to set the permissions boundary for the role.

A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see Permissions boundaries for IAM entities in the IAM User Guide.

For more information about policy types, see Policy types in the IAM User Guide.

role_name class-attribute instance-attribute
role_name: str | None = ...

The name (friendly name, not ARN) of the IAM role for which you want to set the permissions boundary.

Output

PutRolePermissionsBoundaryOutput dataclass

Bases: _SerdeShape

Dataclass for PutRolePermissionsBoundaryOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.