updatePartnerApp method

Future<UpdatePartnerAppResponse> updatePartnerApp({
  1. required String arn,
  2. String? appVersion,
  3. PartnerAppConfig? applicationConfig,
  4. String? clientToken,
  5. bool? enableAutoMinorVersionUpgrade,
  6. bool? enableIamSessionBasedIdentity,
  7. PartnerAppMaintenanceConfig? maintenanceConfig,
  8. List<Tag>? tags,
  9. String? tier,
})

Updates all of the SageMaker Partner AI Apps in an account.

May throw ConflictException. May throw ResourceNotFound.

Parameter arn : The ARN of the SageMaker Partner AI App to update.

Parameter appVersion : The semantic version to upgrade the SageMaker Partner AI App to. Must be the same semantic version returned in the AvailableUpgrade field from DescribePartnerApp. Version skipping and downgrades are not supported.

Parameter applicationConfig : Configuration settings for the SageMaker Partner AI App.

Parameter clientToken : A unique token that guarantees that the call to this API is idempotent.

Parameter enableAutoMinorVersionUpgrade : When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available.

Parameter enableIamSessionBasedIdentity : When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.

Parameter maintenanceConfig : Maintenance configuration settings for the SageMaker Partner AI App.

Parameter tags : Each tag consists of a key and an optional value. Tag keys must be unique per resource.

Parameter tier : Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App.

Implementation

Future<UpdatePartnerAppResponse> updatePartnerApp({
  required String arn,
  String? appVersion,
  PartnerAppConfig? applicationConfig,
  String? clientToken,
  bool? enableAutoMinorVersionUpgrade,
  bool? enableIamSessionBasedIdentity,
  PartnerAppMaintenanceConfig? maintenanceConfig,
  List<Tag>? tags,
  String? tier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdatePartnerApp'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Arn': arn,
      if (appVersion != null) 'AppVersion': appVersion,
      if (applicationConfig != null) 'ApplicationConfig': applicationConfig,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (enableAutoMinorVersionUpgrade != null)
        'EnableAutoMinorVersionUpgrade': enableAutoMinorVersionUpgrade,
      if (enableIamSessionBasedIdentity != null)
        'EnableIamSessionBasedIdentity': enableIamSessionBasedIdentity,
      if (maintenanceConfig != null) 'MaintenanceConfig': maintenanceConfig,
      if (tags != null) 'Tags': tags,
      if (tier != null) 'Tier': tier,
    },
  );

  return UpdatePartnerAppResponse.fromJson(jsonResponse.body);
}