trigger_proxy_patch_operation

ManagementApi.trigger_proxy_patch_operation(role_id, trigger_proxy_patch_operation_request, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Trigger Squid proxy patch operation

Queues a Scan or ScanAndInstall on the InService Squid proxy instance and returns immediately. Poll GET /proxy/instance/patchstatus for progress. Requires system-settings.manage. Only available when managed Squid proxy is enabled. Not idempotent; a second call while Status is Pending or InProgress returns GE-1034.

Parameters:
  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs. (required)

  • trigger_proxy_patch_operation_request (TriggerProxyPatchOperationRequest) – (required)

  • content_type (str) – Request content type. Not read by the Lambda.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

ProxyInstancePatchOperationResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /proxy/instance/patchoperation

Request

Request / response example

{
  "Operation": "Scan",
  "Comment": "Weekly compliance scan"
}

Success (HTTP 200)

Operation queued. Status is always Pending. Poll /proxy/instance/patchstatus for later status. Comment is not returned.

Request / response example

{
  "OperationId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "InstanceId": "i-0123456789abcdef0",
  "Operation": "Scan",
  "Status": "Pending",
  "InitiatedAt": "2026-08-13 14:30:00"
}

Errors

Documented error codes: AUTH-1001, AUTH-1003, AUTH-1030, IPV-1002, GE-1060, IPV-1041, GE-1034, RTE-1001.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001, AUTH-1003, AUTH-1030 (missing system-settings.manage), IPV-1002 (role_id), GE-1060 (invalid user), IPV-1041 (missing or invalid Operation).

Caller lacks system-settings.manage

{
  "Message": "AUTH-1030 - User is not authorized to trigger a proxy instance patch scan or scan-and-install operation due to the following missing permission(s) - {'System Settings': ['manage']}"
}

Operation is missing or not allowed

{
  "Message": "IPV-1041 - Invalid parameter - Operation, allowed values/keys are ['Scan', 'ScanAndInstall']"
}

HTTP 500

Managed Squid proxy disabled, overlapping Pending/InProgress operation, and ASG/instance resolution use GE-1034. AWS client errors return str(error). Orchestrator invoke failures and other uncaught errors use {“Message”: “RTE-1001 - <exception>.”}.

Managed Squid proxy is not enabled

{
  "Message": "GE-1034 - Proxy instance patch management is applicable only when managed Squid proxy is enabled."
}

Another patch operation is Pending or InProgress

{
  "Message": "GE-1034 - A patch operation is already in progress. Please wait for it to complete before retrying."
}

Uncaught handler failure

{
  "Message": "RTE-1001 - Failed to invoke Lambda function projectshortname-prod-v2-proxyPatchOrchestrator with error - An error occurred (ResourceNotFoundException) when calling the Invoke operation: Function not found: arn:aws:lambda:us-east-1:123456789012:function:projectshortname-prod-v2-proxyPatchOrchestrator."
}