updateConnector method

Future<UpdateConnectorResponse> updateConnector({
  1. required String connectorArn,
  2. required String currentVersion,
  3. CapacityUpdate? capacity,
  4. Map<String, String>? connectorConfiguration,
})

Updates the specified connector. For request body, specify only one parameter: either capacity or connectorConfiguration.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter connectorArn : The Amazon Resource Name (ARN) of the connector that you want to update.

Parameter currentVersion : The current version of the connector that you want to update.

Parameter capacity : The target capacity.

Parameter connectorConfiguration : A map of keys to values that represent the configuration for the connector.

Implementation

Future<UpdateConnectorResponse> updateConnector({
  required String connectorArn,
  required String currentVersion,
  CapacityUpdate? capacity,
  Map<String, String>? connectorConfiguration,
}) async {
  final $query = <String, List<String>>{
    'currentVersion': [currentVersion],
  };
  final $payload = <String, dynamic>{
    if (capacity != null) 'capacity': capacity,
    if (connectorConfiguration != null)
      'connectorConfiguration': connectorConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/connectors/${Uri.encodeComponent(connectorArn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateConnectorResponse.fromJson(response);
}