startDataCollectionByAgentIds method
Instructs the specified agents to start collecting data.
May throw AuthorizationErrorException.
May throw HomeRegionNotSetException.
May throw InvalidParameterException.
May throw InvalidParameterValueException.
May throw ServerInternalErrorException.
Parameter agentIds :
The IDs of the agents from which to start collecting data. If you send a
request to an agent ID that you do not have permission to contact,
according to your Amazon Web Services account, the service does not throw
an exception. Instead, it returns the error in the Description
field. If you send a request to multiple agents and you do not have
permission to contact some of those agents, the system does not throw an
exception. Instead, the system shows Failed in the
Description field.
Implementation
Future<StartDataCollectionByAgentIdsResponse> startDataCollectionByAgentIds({
required List<String> agentIds,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSPoseidonService_V2015_11_01.StartDataCollectionByAgentIds'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'agentIds': agentIds,
},
);
return StartDataCollectionByAgentIdsResponse.fromJson(jsonResponse.body);
}