getNetworkTelemetry method

Future<GetNetworkTelemetryResponse> getNetworkTelemetry({
  1. required String globalNetworkId,
  2. String? accountId,
  3. String? awsRegion,
  4. String? coreNetworkId,
  5. int? maxResults,
  6. String? nextToken,
  7. String? registeredGatewayArn,
  8. String? resourceArn,
  9. String? resourceType,
})

Gets the network telemetry of the specified global network.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter globalNetworkId : The ID of the global network.

Parameter accountId : The Amazon Web Services account ID.

Parameter awsRegion : The Amazon Web Services Region.

Parameter coreNetworkId : The ID of a core network.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : The token for the next page of results.

Parameter registeredGatewayArn : The ARN of the gateway.

Parameter resourceArn : The ARN of the resource.

Parameter resourceType : The resource type. The following are the supported resource types:

  • connect-peer
  • transit-gateway-connect-peer
  • vpn-connection

Implementation

Future<GetNetworkTelemetryResponse> getNetworkTelemetry({
  required String globalNetworkId,
  String? accountId,
  String? awsRegion,
  String? coreNetworkId,
  int? maxResults,
  String? nextToken,
  String? registeredGatewayArn,
  String? resourceArn,
  String? resourceType,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $query = <String, List<String>>{
    if (accountId != null) 'accountId': [accountId],
    if (awsRegion != null) 'awsRegion': [awsRegion],
    if (coreNetworkId != null) 'coreNetworkId': [coreNetworkId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (registeredGatewayArn != null)
      'registeredGatewayArn': [registeredGatewayArn],
    if (resourceArn != null) 'resourceArn': [resourceArn],
    if (resourceType != null) 'resourceType': [resourceType],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/global-networks/${Uri.encodeComponent(globalNetworkId)}/network-telemetry',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetNetworkTelemetryResponse.fromJson(response);
}