extendTrainingPlan method

Future<ExtendTrainingPlanResponse> extendTrainingPlan({
  1. required String trainingPlanExtensionOfferingId,
})

Extends an existing training plan by purchasing an extension offering. This allows you to add additional compute capacity time to your training plan without creating a new plan or reconfiguring your workloads.

To find available extension offerings, use the SearchTrainingPlanOfferings API with the TrainingPlanArn parameter.

To view the history of extensions for a training plan, use the DescribeTrainingPlanExtensionHistory API.

May throw ResourceNotFound.

Parameter trainingPlanExtensionOfferingId : The unique identifier of the extension offering to purchase. You can retrieve this ID from the TrainingPlanExtensionOfferings in the response of the SearchTrainingPlanOfferings API.

Implementation

Future<ExtendTrainingPlanResponse> extendTrainingPlan({
  required String trainingPlanExtensionOfferingId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ExtendTrainingPlan'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TrainingPlanExtensionOfferingId': trainingPlanExtensionOfferingId,
    },
  );

  return ExtendTrainingPlanResponse.fromJson(jsonResponse.body);
}