listVpcEndpoints method
Returns the OpenSearch Serverless-managed interface VPC endpoints associated with the current account. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.
May throw InternalServerException.
May throw ValidationException.
Parameter maxResults :
An optional parameter that specifies the maximum number of results to
return. You can use nextToken to get the next page of
results. The default is 20.
Parameter nextToken :
If your initial ListVpcEndpoints operation returns a
nextToken, you can include the returned
nextToken in subsequent ListVpcEndpoints
operations, which returns results in the next page.
Parameter vpcEndpointFilters :
Filter the results according to the current status of the VPC endpoint.
Possible statuses are CREATING, DELETING,
UPDATING, ACTIVE, and FAILED.
Implementation
Future<ListVpcEndpointsResponse> listVpcEndpoints({
int? maxResults,
String? nextToken,
VpcEndpointFilters? vpcEndpointFilters,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'OpenSearchServerless.ListVpcEndpoints'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (vpcEndpointFilters != null)
'vpcEndpointFilters': vpcEndpointFilters,
},
);
return ListVpcEndpointsResponse.fromJson(jsonResponse.body);
}