getInsightImpactGraph method

Future<GetInsightImpactGraphResult> getInsightImpactGraph({
  1. required DateTime endTime,
  2. required String insightId,
  3. required DateTime startTime,
  4. String? nextToken,
})

Retrieves a service graph structure filtered by the specified insight. The service graph is limited to only structural information. For a complete service graph, use this API with the GetServiceGraph API.

May throw InvalidRequestException. May throw ThrottledException.

Parameter endTime : The estimated end time of the insight, in Unix time seconds. The EndTime is exclusive of the value provided. The time range between the start time and end time can't be more than six hours.

Parameter insightId : The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.

Parameter startTime : The estimated start time of the insight, in Unix time seconds. The StartTime is inclusive of the value provided and can't be more than 30 days old.

Parameter nextToken : Specify the pagination token returned by a previous request to retrieve the next page of results.

Implementation

Future<GetInsightImpactGraphResult> getInsightImpactGraph({
  required DateTime endTime,
  required String insightId,
  required DateTime startTime,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(endTime, 'endTime');
  ArgumentError.checkNotNull(insightId, 'insightId');
  ArgumentError.checkNotNull(startTime, 'startTime');
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2000,
  );
  final $payload = <String, dynamic>{
    'EndTime': unixTimestampToJson(endTime),
    'InsightId': insightId,
    'StartTime': unixTimestampToJson(startTime),
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/InsightImpactGraph',
    exceptionFnMap: _exceptionFns,
  );
  return GetInsightImpactGraphResult.fromJson(response);
}