describeAgent method
Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request.
May throw InvalidRequestException. May throw InternalException.
Parameter agentArn
:
The Amazon Resource Name (ARN) of the agent to describe.
Implementation
Future<DescribeAgentResponse> describeAgent({
required String agentArn,
}) async {
ArgumentError.checkNotNull(agentArn, 'agentArn');
_s.validateStringLength(
'agentArn',
agentArn,
0,
128,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'FmrsService.DescribeAgent'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AgentArn': agentArn,
},
);
return DescribeAgentResponse.fromJson(jsonResponse.body);
}