list method

Future<ListConnectionsResponse> list(
  1. String parent, {
  2. String? network,
  3. String? $fields,
})

List the private connections that are configured in a service consumer's VPC network.

Request parameters:

parent - The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is services/servicenetworking.googleapis.com. If you specify services/- as the parameter value, all configured peering services are listed. Value must have pattern ^services/\[^/\]+$.

network - The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: projects/{project}/global/networks/{network}. {project} is a project number, such as in 12345 that includes the VPC service consumer's VPC network. {network} is the name of the service consumer's VPC network.

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

Completes with a ListConnectionsResponse.

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

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/connections';

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