Method: projects.topics.patch
Stay organized with collections
Save and categorize content based on your preferences.
Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.
HTTP request
PATCH https://pubsub.googleapis.com/v1/{topic.name} Path parameters
| Parameters | |
|---|---|
topic.name |
Required. Identifier. Name of the topic. Format is |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "topic": { "name": string, "labels": { string: string, ... }, "messageStoragePolicy": { "allowedPersistenceRegions": [ string ], "enforceInTransit": boolean }, "kmsKeyName": string, "schemaSettings": { "schema": string, "encoding": enum ( |
| Fields | |
|---|---|
topic.labels |
Optional. See Creating and managing labels. An object containing a list of |
topic.messageStoragePolicy |
Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. |
topic.kmsKeyName |
Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is |
topic.schemaSettings |
Optional. Settings for validating messages published against a schema. |
topic.satisfiesPzs |
Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. |
topic.messageRetentionDuration |
Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last A duration in seconds with up to nine fractional digits, ending with ' |
topic.state |
Output only. An output-only field indicating the state of the topic. |
topic.ingestionDataSourceSettings |
Optional. Settings for ingestion from a data source into this topic. |
topic.messageTransforms[] |
Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified. |
topic.tags |
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://{$universe.dns_names.final_documentation_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources. An object containing a list of |
updateMask |
Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if This is a comma-separated list of fully qualified names of fields. Example: |
Response body
If successful, the response body contains an instance of Topic .
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/pubsubhttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.