updateInstance method

Future<UpdateInstanceResponse> updateInstance({
  1. required String instanceId,
  2. String? instanceDescription,
  3. String? instanceName,
})

Enables you to programmatically update an Amazon Web Services Supply Chain instance description by providing all the relevant information such as account ID, instance ID and so on without using the AWS console.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter instanceId : The AWS Supply Chain instance identifier.

Parameter instanceDescription : The AWS Supply Chain instance description.

Parameter instanceName : The AWS Supply Chain instance name.

Implementation

Future<UpdateInstanceResponse> updateInstance({
  required String instanceId,
  String? instanceDescription,
  String? instanceName,
}) async {
  final $payload = <String, dynamic>{
    if (instanceDescription != null)
      'instanceDescription': instanceDescription,
    if (instanceName != null) 'instanceName': instanceName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/api/instance/${Uri.encodeComponent(instanceId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateInstanceResponse.fromJson(response);
}