updateUserCustomPermission method

Future<UpdateUserCustomPermissionResponse> updateUserCustomPermission({
  1. required String awsAccountId,
  2. required String customPermissionsName,
  3. required String namespace,
  4. required String userName,
})

Updates a custom permissions profile for a user.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw PreconditionNotMetException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the custom permission configuration that you want to update.

Parameter customPermissionsName : The name of the custom permissions that you want to update.

Parameter namespace : The namespace that the user belongs to.

Parameter userName : The username of the user that you want to update custom permissions for.

Implementation

Future<UpdateUserCustomPermissionResponse> updateUserCustomPermission({
  required String awsAccountId,
  required String customPermissionsName,
  required String namespace,
  required String userName,
}) async {
  final $payload = <String, dynamic>{
    'CustomPermissionsName': customPermissionsName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/namespaces/${Uri.encodeComponent(namespace)}/users/${Uri.encodeComponent(userName)}/custom-permission',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateUserCustomPermissionResponse.fromJson(response);
}