updateRoleCustomPermission method

Future<UpdateRoleCustomPermissionResponse> updateRoleCustomPermission({
  1. required String awsAccountId,
  2. required String customPermissionsName,
  3. required String namespace,
  4. required Role role,
})

Updates the custom permissions that are associated with a role.

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

Parameter awsAccountId : The ID for the Amazon Web Services account that you want to create a group in. The Amazon Web Services account ID that you provide must be the same Amazon Web Services account that contains your Amazon Quick Sight account.

Parameter customPermissionsName : The name of the custom permission that you want to update the role with.

Parameter namespace : The namespace that contains the role that you want to update.

Parameter role : The name of role tht you want to update.

Implementation

Future<UpdateRoleCustomPermissionResponse> updateRoleCustomPermission({
  required String awsAccountId,
  required String customPermissionsName,
  required String namespace,
  required Role role,
}) 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)}/roles/${Uri.encodeComponent(role.value)}/custom-permission',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRoleCustomPermissionResponse.fromJson(response);
}