---
title: "PUT /v1/projects/{projectsId}/topics/{topicsId}"
method: PUT
path: "/v1/projects/{projectsId}/topics/{topicsId}"
tags: ["projects"]
---

# PUT /v1/projects/{projectsId}/topics/{topicsId}

`PUT /v1/projects/{projectsId}/topics/{topicsId}`

## Request

- Base URL: `https://pubsub.googleapis.com`
- URL: `https://pubsub.googleapis.com/v1/projects/{projectsId}/topics/{topicsId}`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/pubsub`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/pubsub`

Creates the given topic with the given name. See the [resource name rules]( https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).

## Path parameters

- `projectsId` string, required
- `topicsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- Topic: A topic resource.
  - `ingestionDataSourceSettings` IngestionDataSourceSettings: Settings for an ingestion data source on a topic.
    - `awsKinesis` AwsKinesis: Ingestion settings for Amazon Kinesis Data Streams.
      - `awsRoleArn` string: Required. AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
      - `consumerArn` string: Required. The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'KINESIS_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'STREAM_NOT_FOUND' | 'CONSUMER_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Kinesis ingestion source.
      - `streamArn` string: Required. The Kinesis stream ARN to ingest data from.
    - `awsMsk` AwsMsk: Ingestion settings for Amazon MSK.
      - `awsRoleArn` string: Required. AWS role ARN to be used for Federated Identity authentication with Amazon MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
      - `clusterArn` string: Required. The Amazon Resource Name (ARN) that uniquely identifies the cluster.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'MSK_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'CLUSTER_NOT_FOUND' | 'TOPIC_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Amazon MSK ingestion source.
      - `topic` string: Required. The name of the topic in the Amazon MSK cluster that Pub/Sub will import from.
    - `azureEventHubs` AzureEventHubs: Ingestion settings for Azure Event Hubs.
      - `clientId` string: Optional. The client id of the Azure application that is being used to authenticate Pub/Sub.
      - `eventHub` string: Optional. The name of the Event Hub.
      - `gcpServiceAccount` string: Optional. The GCP service account to be used for Federated Identity authentication.
      - `namespace` string: Optional. The name of the Event Hubs namespace.
      - `resourceGroup` string: Optional. Name of the resource group within the azure subscription.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'EVENT_HUBS_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'NAMESPACE_NOT_FOUND' | 'EVENT_HUB_NOT_FOUND' | 'SUBSCRIPTION_NOT_FOUND' | 'RESOURCE_GROUP_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Event Hubs ingestion source.
      - `subscriptionId` string: Optional. The Azure subscription id.
      - `tenantId` string: Optional. The tenant id of the Azure application that is being used to authenticate Pub/Sub.
    - `cloudStorage` CloudStorage: Ingestion settings for Cloud Storage.
      - `avroFormat` AvroFormat: Configuration for reading Cloud Storage data in Avro binary format. The bytes of each object will be set to the `data` field of a Pub/Sub message.
      - `bucket` string: Optional. Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements]( https://cloud.google.com/storage/docs/buckets#naming).
      - `matchGlob` string: Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the [supported patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
      - `minimumObjectCreateTime` string, google-datetime: Optional. Only objects with a larger or equal creation timestamp will be ingested.
      - `pubsubAvroFormat` PubSubAvroFormat: Configuration for reading Cloud Storage data written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'CLOUD_STORAGE_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'BUCKET_NOT_FOUND' | 'TOO_MANY_OBJECTS' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Cloud Storage ingestion source.
      - `textFormat` TextFormat: Configuration for reading Cloud Storage data in text format. Each line of text as specified by the delimiter will be set to the `data` field of a Pub/Sub message.
        - `delimiter` string: Optional. When unset, '\n' is used.
    - `confluentCloud` ConfluentCloud: Ingestion settings for Confluent Cloud.
      - `bootstrapServer` string: Required. The address of the bootstrap server. The format is url:port.
      - `clusterId` string: Required. The id of the cluster.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with `identity_pool_id`.
      - `identityPoolId` string: Required. The id of the identity pool to be used for Federated Identity authentication with Confluent Cloud. See https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'CONFLUENT_CLOUD_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'UNREACHABLE_BOOTSTRAP_SERVER' | 'CLUSTER_NOT_FOUND' | 'TOPIC_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Confluent Cloud ingestion source.
      - `topic` string: Required. The name of the topic in the Confluent Cloud cluster that Pub/Sub will import from.
    - `platformLogsSettings` PlatformLogsSettings: Settings for Platform Logs produced by Pub/Sub.
      - `severity` 'SEVERITY_UNSPECIFIED' | 'DISABLED' | 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR': Optional. The minimum severity level of Platform Logs that will be written.
  - `kmsKeyName` string: 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 `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  - `labels` object: Optional. See [Creating and managing labels]( https://cloud.google.com/pubsub/docs/labels).
  - `messageRetentionDuration` string, google-duration: 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 `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
  - `messageStoragePolicy` MessageStoragePolicy: A policy constraining the storage of messages published to the topic.
    - `allowedPersistenceRegions` string[]: Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
    - `enforceInTransit` boolean: Optional. If true, `allowed_persistence_regions` is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not in `allowed_persistence_regions`.
  - `messageTransforms` MessageTransform[]: Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.
    - `aiInference` AIInference: Configuration for making inference requests against Vertex AI models.
      - `endpoint` string: Required. An endpoint to a Vertex AI model of the form `projects/{project}/locations/{location}/endpoints/{endpoint}` or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`. Vertex AI API requests will be sent to this endpoint.
      - `serviceAccountEmail` string: Optional. The service account to use to make prediction requests against endpoints. The resource creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
      - `unstructuredInference` UnstructuredInference: Configuration for making inferences using arbitrary JSON payloads.
        - `parameters` object: Optional. A parameters object to be included in each inference request. The parameters object is combined with the data field of the Pub/Sub message to form the inference request.
    - `compression` Compression: Configuration for compressing/decompressing message data using a user-specified compression algorithm.
      - `compressionAlgorithm` 'COMPRESSION_ALGORITHM_UNSPECIFIED' | 'ZLIB' | 'ZSTD': Required. Specifies the compression algorithm to use.
      - `compressionMode` 'COMPRESSION_MODE_UNSPECIFIED' | 'COMPRESS' | 'DECOMPRESS': Required. Specifies whether to compress or decompress the message.
    - `disabled` boolean: Optional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`.
    - `enabled` boolean: Optional. This field is deprecated, use the `disabled` field to disable transforms.
    - `javascriptUdf` JavaScriptUDF: User-defined JavaScript function that can transform or filter a Pub/Sub message.
      - `code` string: Required. JavaScript code that contains a function `function_name` with the below signature: ``` /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { } ```
      - `functionName` string: Required. Name of the JavasScript function that should applied to Pub/Sub messages.
  - `name` string: Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
  - `satisfiesPzs` boolean: 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.
  - `schemaSettings` SchemaSettings: Settings for validating messages published against a schema.
    - `encoding` 'ENCODING_UNSPECIFIED' | 'JSON' | 'BINARY': Optional. The encoding of messages validated against `schema`.
    - `firstRevisionId` string: Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
    - `lastRevisionId` string: Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
    - `schema` string: Required. The name of the schema that messages published should be validated against. Format is `projects/{project}/schemas/{schema}`. The value of this field will be `_deleted-schema_` if the schema has been deleted.
  - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'INGESTION_RESOURCE_ERROR': Output only. An output-only field indicating the state of the topic.
  - `tags` object: 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.

## Response `200`

Successful response

- Topic: A topic resource.
  - `ingestionDataSourceSettings` IngestionDataSourceSettings: Settings for an ingestion data source on a topic.
    - `awsKinesis` AwsKinesis: Ingestion settings for Amazon Kinesis Data Streams.
      - `awsRoleArn` string: Required. AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
      - `consumerArn` string: Required. The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'KINESIS_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'STREAM_NOT_FOUND' | 'CONSUMER_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Kinesis ingestion source.
      - `streamArn` string: Required. The Kinesis stream ARN to ingest data from.
    - `awsMsk` AwsMsk: Ingestion settings for Amazon MSK.
      - `awsRoleArn` string: Required. AWS role ARN to be used for Federated Identity authentication with Amazon MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
      - `clusterArn` string: Required. The Amazon Resource Name (ARN) that uniquely identifies the cluster.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with Amazon MSK (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'MSK_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'CLUSTER_NOT_FOUND' | 'TOPIC_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Amazon MSK ingestion source.
      - `topic` string: Required. The name of the topic in the Amazon MSK cluster that Pub/Sub will import from.
    - `azureEventHubs` AzureEventHubs: Ingestion settings for Azure Event Hubs.
      - `clientId` string: Optional. The client id of the Azure application that is being used to authenticate Pub/Sub.
      - `eventHub` string: Optional. The name of the Event Hub.
      - `gcpServiceAccount` string: Optional. The GCP service account to be used for Federated Identity authentication.
      - `namespace` string: Optional. The name of the Event Hubs namespace.
      - `resourceGroup` string: Optional. Name of the resource group within the azure subscription.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'EVENT_HUBS_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'NAMESPACE_NOT_FOUND' | 'EVENT_HUB_NOT_FOUND' | 'SUBSCRIPTION_NOT_FOUND' | 'RESOURCE_GROUP_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Event Hubs ingestion source.
      - `subscriptionId` string: Optional. The Azure subscription id.
      - `tenantId` string: Optional. The tenant id of the Azure application that is being used to authenticate Pub/Sub.
    - `cloudStorage` CloudStorage: Ingestion settings for Cloud Storage.
      - `avroFormat` AvroFormat: Configuration for reading Cloud Storage data in Avro binary format. The bytes of each object will be set to the `data` field of a Pub/Sub message.
      - `bucket` string: Optional. Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements]( https://cloud.google.com/storage/docs/buckets#naming).
      - `matchGlob` string: Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the [supported patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
      - `minimumObjectCreateTime` string, google-datetime: Optional. Only objects with a larger or equal creation timestamp will be ingested.
      - `pubsubAvroFormat` PubSubAvroFormat: Configuration for reading Cloud Storage data written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'CLOUD_STORAGE_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'BUCKET_NOT_FOUND' | 'TOO_MANY_OBJECTS' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Cloud Storage ingestion source.
      - `textFormat` TextFormat: Configuration for reading Cloud Storage data in text format. Each line of text as specified by the delimiter will be set to the `data` field of a Pub/Sub message.
        - `delimiter` string: Optional. When unset, '\n' is used.
    - `confluentCloud` ConfluentCloud: Ingestion settings for Confluent Cloud.
      - `bootstrapServer` string: Required. The address of the bootstrap server. The format is url:port.
      - `clusterId` string: Required. The id of the cluster.
      - `gcpServiceAccount` string: Required. The GCP service account to be used for Federated Identity authentication with `identity_pool_id`.
      - `identityPoolId` string: Required. The id of the identity pool to be used for Federated Identity authentication with Confluent Cloud. See https://docs.confluent.io/cloud/current/security/authenticate/workload-identities/identity-providers/oauth/identity-pools.html#add-oauth-identity-pools.
      - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'CONFLUENT_CLOUD_PERMISSION_DENIED' | 'PUBLISH_PERMISSION_DENIED' | 'UNREACHABLE_BOOTSTRAP_SERVER' | 'CLUSTER_NOT_FOUND' | 'TOPIC_NOT_FOUND' | 'CONFLICTING_REGION_CONSTRAINTS': Output only. An output-only field that indicates the state of the Confluent Cloud ingestion source.
      - `topic` string: Required. The name of the topic in the Confluent Cloud cluster that Pub/Sub will import from.
    - `platformLogsSettings` PlatformLogsSettings: Settings for Platform Logs produced by Pub/Sub.
      - `severity` 'SEVERITY_UNSPECIFIED' | 'DISABLED' | 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR': Optional. The minimum severity level of Platform Logs that will be written.
  - `kmsKeyName` string: 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 `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  - `labels` object: Optional. See [Creating and managing labels]( https://cloud.google.com/pubsub/docs/labels).
  - `messageRetentionDuration` string, google-duration: 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 `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
  - `messageStoragePolicy` MessageStoragePolicy: A policy constraining the storage of messages published to the topic.
    - `allowedPersistenceRegions` string[]: Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
    - `enforceInTransit` boolean: Optional. If true, `allowed_persistence_regions` is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not in `allowed_persistence_regions`.
  - `messageTransforms` MessageTransform[]: Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.
    - `aiInference` AIInference: Configuration for making inference requests against Vertex AI models.
      - `endpoint` string: Required. An endpoint to a Vertex AI model of the form `projects/{project}/locations/{location}/endpoints/{endpoint}` or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`. Vertex AI API requests will be sent to this endpoint.
      - `serviceAccountEmail` string: Optional. The service account to use to make prediction requests against endpoints. The resource creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
      - `unstructuredInference` UnstructuredInference: Configuration for making inferences using arbitrary JSON payloads.
        - `parameters` object: Optional. A parameters object to be included in each inference request. The parameters object is combined with the data field of the Pub/Sub message to form the inference request.
    - `compression` Compression: Configuration for compressing/decompressing message data using a user-specified compression algorithm.
      - `compressionAlgorithm` 'COMPRESSION_ALGORITHM_UNSPECIFIED' | 'ZLIB' | 'ZSTD': Required. Specifies the compression algorithm to use.
      - `compressionMode` 'COMPRESSION_MODE_UNSPECIFIED' | 'COMPRESS' | 'DECOMPRESS': Required. Specifies whether to compress or decompress the message.
    - `disabled` boolean: Optional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`.
    - `enabled` boolean: Optional. This field is deprecated, use the `disabled` field to disable transforms.
    - `javascriptUdf` JavaScriptUDF: User-defined JavaScript function that can transform or filter a Pub/Sub message.
      - `code` string: Required. JavaScript code that contains a function `function_name` with the below signature: ``` /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { } ```
      - `functionName` string: Required. Name of the JavasScript function that should applied to Pub/Sub messages.
  - `name` string: Required. Identifier. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
  - `satisfiesPzs` boolean: 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.
  - `schemaSettings` SchemaSettings: Settings for validating messages published against a schema.
    - `encoding` 'ENCODING_UNSPECIFIED' | 'JSON' | 'BINARY': Optional. The encoding of messages validated against `schema`.
    - `firstRevisionId` string: Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
    - `lastRevisionId` string: Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
    - `schema` string: Required. The name of the schema that messages published should be validated against. Format is `projects/{project}/schemas/{schema}`. The value of this field will be `_deleted-schema_` if the schema has been deleted.
  - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'INGESTION_RESOURCE_ERROR': Output only. An output-only field indicating the state of the topic.
  - `tags` object: 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.

## Changes

- **2026-11-11** `5eea47510ec8`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/pubsub` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/pubsub` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/pubsub/changes/v1/projects/:projectsId/topics/:topicsId/put.md)

---

[API](https://skmtc.dev/google/apis/pubsub.md) - [All operations](https://skmtc.dev/google/apis/pubsub/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/pubsub/revisions/5eea47510ec8?raw)
