discoverPollEndpoint method
Returns an endpoint for the Amazon ECS agent to poll for updates.
May throw AccessDeniedException.
May throw ClientException.
May throw InvalidParameterException.
May throw ServerException.
Parameter cluster :
The short name or full Amazon Resource Name (ARN) of the cluster that the
container instance belongs to.
Parameter containerInstance :
The container instance ID or full ARN of the container instance. For more
information about the ARN format, see Amazon
Resource Name (ARN) in the Amazon ECS Developer Guide.
Implementation
Future<DiscoverPollEndpointResponse> discoverPollEndpoint({
String? cluster,
String? containerInstance,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.DiscoverPollEndpoint'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (cluster != null) 'cluster': cluster,
if (containerInstance != null) 'containerInstance': containerInstance,
},
);
return DiscoverPollEndpointResponse.fromJson(jsonResponse.body);
}