startExportTask method
Begins the export of a discovered data report to an Amazon S3 bucket
managed by Amazon Web Services.
If you do not specify preferences or agentIds in
the filter, a summary of all servers, applications, tags, and performance
is generated. This data is an aggregation of all server data collected
through on-premises tooling, file import, application grouping and
applying tags.
If you specify agentIds in a filter, the task exports up to
72 hours of detailed data collected by the identified Application
Discovery Agent, including network, process, and performance details. A
time range for exported agent data may be set by using
startTime and endTime. Export of detailed agent
data is limited to five concurrently running exports. Export of detailed
agent data is limited to two exports per day.
If you enable ec2RecommendationsPreferences in
preferences , an Amazon EC2 instance matching the
characteristics of each server in Application Discovery Service is
generated. Changing the attributes of the
ec2RecommendationsPreferences changes the criteria of the
recommendation.
May throw AuthorizationErrorException.
May throw HomeRegionNotSetException.
May throw InvalidParameterException.
May throw InvalidParameterValueException.
May throw OperationNotPermittedException.
May throw ServerInternalErrorException.
Parameter endTime :
The end timestamp for exported data from the single Application Discovery
Agent selected in the filters. If no value is specified, exported data
includes the most recent data collected by the agent.
Parameter exportDataFormat :
The file format for the returned export data. Default value is
CSV. Note: The GRAPHML option
has been deprecated.
Parameter filters :
If a filter is present, it selects the single agentId of the
Application Discovery Agent for which data is exported. The
agentId can be found in the results of the
DescribeAgents API or CLI. If no filter is present,
startTime and endTime are ignored and exported
data includes both Amazon Web Services Application Discovery Service
Agentless Collector collectors data and summary data from Application
Discovery Agent agents.
Parameter preferences :
Indicates the type of data that needs to be exported. Only one ExportPreferences
can be enabled at any time.
Parameter startTime :
The start timestamp for exported data from the single Application
Discovery Agent selected in the filters. If no value is specified, data is
exported starting from the first data collected by the agent.
Implementation
Future<StartExportTaskResponse> startExportTask({
DateTime? endTime,
List<ExportDataFormat>? exportDataFormat,
List<ExportFilter>? filters,
ExportPreferences? preferences,
DateTime? startTime,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSPoseidonService_V2015_11_01.StartExportTask'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (endTime != null) 'endTime': unixTimestampToJson(endTime),
if (exportDataFormat != null)
'exportDataFormat': exportDataFormat.map((e) => e.value).toList(),
if (filters != null) 'filters': filters,
if (preferences != null) 'preferences': preferences,
if (startTime != null) 'startTime': unixTimestampToJson(startTime),
},
);
return StartExportTaskResponse.fromJson(jsonResponse.body);
}