updateProject method

Future<UpdateProjectOutput> updateProject({
  1. required String projectName,
  2. String? projectDescription,
  3. ServiceCatalogProvisioningUpdateDetails? serviceCatalogProvisioningUpdateDetails,
  4. List<Tag>? tags,
  5. List<UpdateTemplateProvider>? templateProvidersToUpdate,
})

Updates a machine learning (ML) project that is created from a template that sets up an ML pipeline from training to deploying an approved model.

May throw ConflictException.

Parameter projectName : The name of the project.

Parameter projectDescription : The description for the project.

Parameter serviceCatalogProvisioningUpdateDetails : The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see What is Amazon Web Services Service Catalog.

Parameter tags : An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see Amazon Web Services Service Catalog Tag Update Constraints.

Parameter templateProvidersToUpdate : The template providers to update in the project.

Implementation

Future<UpdateProjectOutput> updateProject({
  required String projectName,
  String? projectDescription,
  ServiceCatalogProvisioningUpdateDetails?
      serviceCatalogProvisioningUpdateDetails,
  List<Tag>? tags,
  List<UpdateTemplateProvider>? templateProvidersToUpdate,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateProject'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProjectName': projectName,
      if (projectDescription != null)
        'ProjectDescription': projectDescription,
      if (serviceCatalogProvisioningUpdateDetails != null)
        'ServiceCatalogProvisioningUpdateDetails':
            serviceCatalogProvisioningUpdateDetails,
      if (tags != null) 'Tags': tags,
      if (templateProvidersToUpdate != null)
        'TemplateProvidersToUpdate': templateProvidersToUpdate,
    },
  );

  return UpdateProjectOutput.fromJson(jsonResponse.body);
}