PATCH /connections/{connectionId} – Updates a connection by its ID with partial modifications.

  • For Cognito, the connectionId is the userPoolId.

Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

Path Parameters:

  • connectionId (required): The unique identifier of the connection to update

Query Parameters:

  • None

  • 200 OK – JSON stringified object representing the updated connection. See Connection.

Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
404 Not Found Specified connection does not exist
500 Internal Server Error Unexpected error
{
"error": "Detailed error message here"
}

PATCH /connections/exampleConnectionId
{
"connectionBody": {
"displayName": "Updated Connection Name",
"metadata": {
"key": "new_value"
},
}
}
PATCH /connections/exampleUserPoolId
{
"provider": "cognito-connection",
"connectionBody": {
"name": "Updated Connection Name",
"metadata": {
"key": "new_value"
},
}
}
{
"connectionId": "connection_id",
"name": "Updated Connection Name",
"type": "connection_type",
"status": "active|inactive",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"metadata": {
"key": "new_value"
},
"configuration": {
"setting": "value"
}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.