updateAppImageConfig method

Future<UpdateAppImageConfigResponse> updateAppImageConfig({
  1. required String appImageConfigName,
  2. KernelGatewayImageConfig? kernelGatewayImageConfig,
})

Updates the properties of an AppImageConfig.

May throw ResourceNotFound.

Parameter appImageConfigName : The name of the AppImageConfig to update.

Parameter kernelGatewayImageConfig : The new KernelGateway app to run on the image.

Implementation

Future<UpdateAppImageConfigResponse> updateAppImageConfig({
  required String appImageConfigName,
  KernelGatewayImageConfig? kernelGatewayImageConfig,
}) async {
  ArgumentError.checkNotNull(appImageConfigName, 'appImageConfigName');
  _s.validateStringLength(
    'appImageConfigName',
    appImageConfigName,
    0,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateAppImageConfig'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AppImageConfigName': appImageConfigName,
      if (kernelGatewayImageConfig != null)
        'KernelGatewayImageConfig': kernelGatewayImageConfig,
    },
  );

  return UpdateAppImageConfigResponse.fromJson(jsonResponse.body);
}