listServiceNetworkVpcAssociations method
Lists the associations between a service network and a VPC. You can filter the list either by VPC or service network. You must provide either the ID of the service network identifier or the ID of the VPC.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return.
Parameter nextToken :
A pagination token for the next page of results.
Parameter serviceNetworkIdentifier :
The ID or ARN of the service network.
Parameter vpcIdentifier :
The ID or ARN of the VPC.
Implementation
Future<ListServiceNetworkVpcAssociationsResponse>
listServiceNetworkVpcAssociations({
int? maxResults,
String? nextToken,
String? serviceNetworkIdentifier,
String? vpcIdentifier,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (serviceNetworkIdentifier != null)
'serviceNetworkIdentifier': [serviceNetworkIdentifier],
if (vpcIdentifier != null) 'vpcIdentifier': [vpcIdentifier],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/servicenetworkvpcassociations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListServiceNetworkVpcAssociationsResponse.fromJson(response);
}