Creates the given topic with the given name. See the resource name rules .
HTTP request
Path parameters
Parameters | |
---|---|
name
|
Required. Name of the topic. Format is |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "labels" : { string : string , ... } , "messageStoragePolicy" : { object ( |
Fields | |
---|---|
labels
|
Optional. See Creating and managing labels . An object containing a list of |
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 |
schemaSettings
|
Optional. Settings for validating messages published against a schema. |
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. |
state
|
Output only. An output-only field indicating the state of the topic. |
ingestionDataSourceSettings
|
Optional. Settings for ingestion from a data source into this topic. |
Response body
If successful, the response body contains a newly created instance of Topic
.
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/pubsub
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .