putUserPermissionsBoundary method

Future<void> putUserPermissionsBoundary({
  1. required String permissionsBoundary,
  2. required String userName,
})

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

May throw InvalidInputException. May throw NoSuchEntityException. May throw PolicyNotAttachableException. May throw ServiceFailureException.

Parameter permissionsBoundary : The ARN of the managed policy that is used to set the permissions boundary for the user.

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.

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

Implementation

Future<void> putUserPermissionsBoundary({
  required String permissionsBoundary,
  required String userName,
}) async {
  final $request = <String, String>{
    'PermissionsBoundary': permissionsBoundary,
    'UserName': userName,
  };
  await _protocol.send(
    $request,
    action: 'PutUserPermissionsBoundary',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
  );
}