batchDelete method

Batch deletes multiple accounts.

For accounts that fail to be deleted, error info is contained in the response. The method ignores accounts that do not exist or are duplicated in the request. This method requires a Google OAuth 2.0 credential with proper permissions.

request - The metadata request object.

Request parameters:

targetProjectId - If tenant_id is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that accounts belong to. Value must have pattern ^\[^/\]+$.

tenantId - If the accounts belong to an Identity Platform tenant, the ID of the tenant. If the accounts belong to a default Identity Platform project, the field is not needed. Value must have pattern ^\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse>
    batchDelete(
  GoogleCloudIdentitytoolkitV1BatchDeleteAccountsRequest request,
  core.String targetProjectId,
  core.String tenantId, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/projects/' +
      core.Uri.encodeFull('$targetProjectId') +
      '/tenants/' +
      core.Uri.encodeFull('$tenantId') +
      '/accounts:batchDelete';

  final response_ = await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
  );
  return GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}