listServiceNetworkServiceAssociations method
Lists the associations between a service network and a service. You can filter the list either by service or service network. You must provide either the service network identifier or the service identifier.
Every association in Amazon VPC Lattice has a unique Amazon Resource Name (ARN), such as when a service network is associated with a VPC or when a service is associated with a service network. If the association is for a resource is shared with another account, the association includes the local account ID as the prefix in the ARN.
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 serviceIdentifier :
The ID or ARN of the service.
Parameter serviceNetworkIdentifier :
The ID or ARN of the service network.
Implementation
Future<ListServiceNetworkServiceAssociationsResponse>
listServiceNetworkServiceAssociations({
int? maxResults,
String? nextToken,
String? serviceIdentifier,
String? serviceNetworkIdentifier,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (serviceIdentifier != null) 'serviceIdentifier': [serviceIdentifier],
if (serviceNetworkIdentifier != null)
'serviceNetworkIdentifier': [serviceNetworkIdentifier],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/servicenetworkserviceassociations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListServiceNetworkServiceAssociationsResponse.fromJson(response);
}