Deletes the permissions boundary for the specified IAM role.
You cannot set the boundary for a service-linked role.
Deleting the permissions boundary for a role might increase its permissions. For example, it might allow anyone who assumes the role to perform all the actions granted in its permissions policies.
Parameters:
-
role_name
(roleNameType)
–
The name (friendly name, not ARN) of the IAM role from which you want to remove the permissions boundary.
Raises:
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnmodifiableEntityException
–
The request was rejected because service-linked roles are protected Amazon Web Services resources. Only the service that depends on the service-linked role can modify or delete the role on your behalf. The error message includes the name of the service that depends on this service-linked role. You must request the change through that service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/async_iam.py
| async def delete_role_permissions_boundary(
self,
role_name: "capo_iam.types.role_name_type.roleNameType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> None:
"""<p>Deletes the permissions boundary for the specified IAM role. </p> <p>You cannot set the boundary for a service-linked role.</p> <important> <p>Deleting the permissions boundary for a role might increase its permissions. For example, it might allow anyone who assumes the role to perform all the actions granted in its permissions policies.</p> </important>
Args:
role_name: <p>The name (friendly name, not ARN) of the IAM role from which you want to remove the permissions boundary.</p>
Raises:
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.unmodifiable_entity_exception.UnmodifiableEntityException: <p>The request was rejected because service-linked roles are protected Amazon Web Services resources. Only the service that depends on the service-linked role can modify or delete the role on your behalf. The error message includes the name of the service that depends on this service-linked role. You must request the change through that service.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.delete_role_permissions_boundary_request.DeleteRolePermissionsBoundaryRequest]",
) -> AsyncOperationResponse[None]:
import capo_iam._operations.aws_identity_management_v20100508.delete_role_permissions_boundary
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.delete_role_permissions_boundary.async_delete_role_permissions_boundary(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteRolePermissionsBoundary")
)
input_: capo_iam.types.delete_role_permissions_boundary_request.DeleteRolePermissionsBoundaryRequest = {
"role_name": role_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|