synchronizeGatewayTargets method

Future<SynchronizeGatewayTargetsResponse> synchronizeGatewayTargets({
  1. required String gatewayIdentifier,
  2. required List<String> targetIdList,
})

Synchronizes the gateway targets by fetching the latest tool definitions from the target endpoints.

You cannot synchronize a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before synchronizing.

You cannot synchronize a target that has a static tool schema (mcpToolSchema) configured. Remove the static schema through an UpdateGatewayTarget call to enable dynamic tool synchronization.

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

Parameter gatewayIdentifier : The gateway Identifier.

Parameter targetIdList : The target ID list.

Implementation

Future<SynchronizeGatewayTargetsResponse> synchronizeGatewayTargets({
  required String gatewayIdentifier,
  required List<String> targetIdList,
}) async {
  final $payload = <String, dynamic>{
    'targetIdList': targetIdList,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/gateways/${Uri.encodeComponent(gatewayIdentifier)}/synchronizeTargets',
    exceptionFnMap: _exceptionFns,
  );
  return SynchronizeGatewayTargetsResponse.fromJson(response);
}