Skip to main content
PATCH
Update mutable subscription settings
Requires the IAM action notifications:UpdateSubscription. See NOTIFICATIONS permissions for the full list, what each one covers, and an example policy.

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Path Parameters

topic_id
string<uuid>
required
Example:

"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d"

subscription_id
string<uuid>
required
Example:

"b2c3d4e5-6f7a-4b8c-9d0e-1f2a3b4c5d6e"

Body

application/json
raw_message_delivery
boolean
Example:

true

filter_policy
object

Matches publication attributes, not fields inside the message body. Every named attribute must match at least one alternative (AND across names, OR within each array). Names and string comparisons are case-sensitive. An omitted or empty policy matches every message.

Alternatives are exact strings or numbers, or single-operator objects: {"prefix": "order."}, {"suffix": ".failed"}, {"anything-but": ["debug", "trace"]}, {"exists": true}, {"exists": false}, or {"numeric": [">=", 100, "<", 1000]}. Prefix and suffix values must be nonempty. anything-but accepts one string or number, or a list of 1–50 such values.

Only exists: false matches an absent attribute. Exclusion also requires presence. Numeric operators are =, <, <=, >, and >=; every operator/number pair in one numeric matcher must succeed. Attribute values that cannot be parsed as numbers do not match. Bare numeric alternatives compare string representations; use numeric for numeric equality, such as matching both "100" and "100.0".

At most 20 nonblank attribute names and 1–50 alternatives per name. Each operator object has exactly one operator. Wildcards, regular expressions, body filtering, and nested operators are not supported. PATCH replaces the entire policy; {} clears it and omission preserves it. See Filter policies for worked examples.

Example:
delivery_policy
object

Retry behaviour. Omitted fields fall back to the topic's policy, then to platform defaults (6 attempts, 20s to 20m exponential backoff with jitter, 15s per-request timeout). A subscription's policy is layered on its topic's field by field, so overriding only max_attempts keeps the topic's backoff curve.

redrive_policy
object

Omitted leaves the dead-letter queue unchanged. Present with an empty dead_letter_queue clears it. Setting a new target re-checks queue:SendMessage on it.

tags
object
Example:

Response

Updated subscription.

subscription
object
required