describeTrainingPlanExtensionHistory method
Retrieves the extension history for a specified training plan. The response includes details about each extension, such as the offering ID, start and end dates, status, payment status, and cost information.
May throw ResourceNotFound.
Parameter trainingPlanArn :
The Amazon Resource Name (ARN); of the training plan to retrieve extension
history for.
Parameter maxResults :
The maximum number of extensions to return in the response.
Parameter nextToken :
A token to continue pagination if more results are available.
Implementation
Future<DescribeTrainingPlanExtensionHistoryResponse>
describeTrainingPlanExtensionHistory({
required String trainingPlanArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DescribeTrainingPlanExtensionHistory'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TrainingPlanArn': trainingPlanArn,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeTrainingPlanExtensionHistoryResponse.fromJson(
jsonResponse.body);
}