Sends an HTTP `PATCH` request to the specified URL.

For more information, see
[Make an HTTP request](https://cloud.google.com/workflows/docs/http-requests).

## Arguments

| Arguments ||
|---|---|
| `url` | `string` The URL to send the request to. |
| `timeout` | `float` The request timeout, in seconds (default: `300.0`). If the request takes longer than the timeout, a `TimeoutError` is raised. The maximum allowed timeout is `1800` seconds. |
| `body` | If present, the request body (PATCH requests do generally require a body). If a `Content-Type` header is not specified and if the body value is bytes, the header is set to `Content-Type: application/octet-stream`; otherwise, the body is JSON-encoded and the header is set to `Content-type: application/json; charset=utf-8`. |
| `headers` | The HTTP request headers. If present, must be a map of strings. If a `Content-Type` header is specified, the request body is encoded as prescribed. For example, it might be JSON or URL-encoded. |
| `query` | Optional query parameters. If present, must be a map that will get URL-encoded and appended to the URL. The map values must be strings, ints, floats, booleans, or lists of those. |
| `auth` | Optional authentication properties. If present, must be a map with `type` attribute in `["OIDC", "OAuth2"]`. A `scopes` key is also supported. For details, see [Make authenticated requests to Google Cloud APIs](https://cloud.google.com/workflows/docs/authenticate-from-workflow#authenticate-apis). |
| `private_service_name` | `string` If present, `private_service_name` must be a string that specifies a registered Service Directory service name with format `projects/my-project/locations/us-east1/namespaces/` `my-namespace/services/my-service`. |
| `ca_certificate` | `bytes` If present, `ca_certificate` must be a bytes value describing a custom CA certificate in DER format that will be used in place of the standard certificate pool. The certificate must be signed by a subject alternative name as defined by [RFC 3280](https://www.rfc-editor.org/rfc/rfc3280). |

## Returns

The HTTP response as a map with `body`, `code` (status code), and `headers`
attributes.

## Raised exceptions

| Exceptions ||
|---|---|
| `ConnectionError` | When a network or connection issue happens before or during data transfer, like a DNS failure, an SSL/TLS validation failure, or a connection reset or truncated response. Because the request might have reached the endpoint, retries are not always idempotent. |
| `ConnectionFailedError` | When the connection is refused or fails to establish before any data is sent. Retries are idempotent. |
| `TimeoutError` | When the specified timeout is reached before the response is received. |
| `HttpError` | If the response status is \>= 400. |
| `ValueError` | If timeout is \> 1800. If the URL is invalid or if authType is present and URL is invalid for the given authType. If the private_service_name is invalid. If private_service_name is present and URL contains a port. If ca_certificate is present and not of type bytes. |

## Examples

```yaml
# Make a `PATCH` request to an external HTTP endpoint
- update_resource:
    call: http.patch
    args:
      url: https://www.example.com/endpoint
      body:
        some_val: "Hello World"
        another_val: 123
    result: message
- return_value:
    return: ${message.body}
```