lookup method

Future<Container> lookup({
  1. String? destinationId,
  2. String? $fields,
})

Looks up a Container by destination ID.

Request parameters:

destinationId - Destination ID linked to a GTM Container, e.g. AW-123456789. Example: accounts/containers:lookup?destination_id={destination_id}.

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

Completes with a Container.

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<Container> lookup({
  core.String? destinationId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (destinationId != null) 'destinationId': [destinationId],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'tagmanager/v2/accounts/containers:lookup';

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