getCustomerGatewayAssociations method
Gets the association information for customer gateways that are associated with devices and links in your global network.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter globalNetworkId :
The ID of the global network.
Parameter customerGatewayArns :
One or more customer gateway Amazon Resource Names (ARNs). The maximum is
10.
Parameter maxResults :
The maximum number of results to return.
Parameter nextToken :
The token for the next page of results.
Implementation
Future<GetCustomerGatewayAssociationsResponse>
getCustomerGatewayAssociations({
required String globalNetworkId,
List<String>? customerGatewayArns,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $query = <String, List<String>>{
if (customerGatewayArns != null)
'customerGatewayArns': customerGatewayArns,
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/global-networks/${Uri.encodeComponent(globalNetworkId)}/customer-gateway-associations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetCustomerGatewayAssociationsResponse.fromJson(response);
}