startDataCollectionByAgentIds method
Instructs the specified agents or connectors to start collecting data.
May throw AuthorizationErrorException. May throw InvalidParameterException. May throw InvalidParameterValueException. May throw ServerInternalErrorException. May throw HomeRegionNotSetException.
Parameter agentIds
:
The IDs of the agents or connectors from which to start collecting data.
If you send a request to an agent/connector ID that you do not have
permission to contact, according to your AWS 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/connectors and you do not have permission to contact some of those
agents/connectors, 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 {
ArgumentError.checkNotNull(agentIds, 'agentIds');
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);
}