queryStatus method

Future<QueryHubStatusResponse> queryStatus(
  1. String name, {
  2. String? filter,
  3. String? groupBy,
  4. String? orderBy,
  5. int? pageSize,
  6. String? pageToken,
  7. String? $fields,
})

Query the Private Service Connect propagation status of a Network Connectivity Center hub.

Request parameters:

name - Required. The name of the hub. Value must have pattern ^projects/\[^/\]+/locations/global/hubs/\[^/\]+$.

filter - Optional. An expression that filters the list of results. The filter can be used to filter the results by the following fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code * psc_propagation_status.message

groupBy - Optional. Aggregate the results by the specified fields. A comma-separated list of any of these fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code

orderBy - Optional. Sort the results in ascending order by the specified fields. A comma-separated list of any of these fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code If group_by is set, the value of the order_by field must be the same as or a subset of the group_by field.

pageSize - Optional. The maximum number of results to return per page.

pageToken - Optional. The page token.

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

Completes with a QueryHubStatusResponse.

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<QueryHubStatusResponse> queryStatus(
  core.String name, {
  core.String? filter,
  core.String? groupBy,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (groupBy != null) 'groupBy': [groupBy],
    if (orderBy != null) 'orderBy': [orderBy],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':queryStatus';

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