- Resource: Topic
- MessageStoragePolicy
- SchemaSettings
- Encoding
- State
- IngestionDataSourceSettings
- AwsKinesis
- State
- CloudStorage
- State
- TextFormat
- AvroFormat
- PubSubAvroFormat
- PlatformLogsSettings
- Severity
- Methods
Resource: Topic
A topic resource.
JSON representation |
---|
{ "name": string, "labels": { string: string, ... }, "messageStoragePolicy": { object ( |
Fields | |
---|---|
name |
Required. Name of the topic. Format is |
labels |
Optional. See Creating and managing labels. An object containing a list of |
message |
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. |
kms |
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 |
schema |
Optional. Settings for validating messages published against a schema. |
satisfies |
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. |
message |
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 ' |
state |
Output only. An output-only field indicating the state of the topic. |
ingestion |
Optional. Settings for ingestion from a data source into this topic. |
MessageStoragePolicy
A policy constraining the storage of messages published to the topic.
JSON representation |
---|
{ "allowedPersistenceRegions": [ string ], "enforceInTransit": boolean } |
Fields | |
---|---|
allowed |
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. |
enforce |
Optional. If true, |
SchemaSettings
Settings for validating messages published against a schema.
JSON representation |
---|
{
"schema": string,
"encoding": enum ( |
Fields | |
---|---|
schema |
Required. The name of the schema that messages published should be validated against. Format is |
encoding |
Optional. The encoding of messages validated against |
first |
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. |
last |
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. |
Encoding
Possible encoding types for messages.
Enums | |
---|---|
ENCODING_UNSPECIFIED |
Unspecified |
JSON |
JSON encoding |
BINARY |
Binary encoding, as defined by the schema type. For some schema types, binary encoding may not be available. |
State
The state of the topic.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default value. This value is unused. |
ACTIVE |
The topic does not have any persistent errors. |
INGESTION_RESOURCE_ERROR |
Ingestion from the data source has encountered a permanent error. See the more detailed error state in the corresponding ingestion source configuration. |
IngestionDataSourceSettings
Settings for an ingestion data source on a topic.
JSON representation |
---|
{ "platformLogsSettings": { object ( |
Fields | |
---|---|
platform |
Optional. Platform Logs settings. If unset, no Platform Logs will be generated. |
Union field source . Only one source type can have settings set. source can be only one of the following: |
|
aws |
Optional. Amazon Kinesis Data Streams. |
cloud |
Optional. Cloud Storage. |
AwsKinesis
Ingestion settings for Amazon Kinesis Data Streams.
JSON representation |
---|
{
"state": enum ( |
Fields | |
---|---|
state |
Output only. An output-only field that indicates the state of the Kinesis ingestion source. |
stream |
Required. The Kinesis stream ARN to ingest data from. |
consumer |
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. |
aws |
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. |
gcp |
Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a |
State
Possible states for ingestion from Amazon Kinesis Data Streams.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default value. This value is unused. |
ACTIVE |
Ingestion is active. |
KINESIS_PERMISSION_DENIED |
Permission denied encountered while consuming data from Kinesis. This can happen if: - The provided awsRoleArn does not exist or does not have the appropriate permissions attached. - The provided awsRoleArn is not set up properly for Identity Federation using gcpServiceAccount . - The Pub/Sub SA is not granted the iam.serviceAccounts.getOpenIdToken permission on gcpServiceAccount . |
PUBLISH_PERMISSION_DENIED |
Permission denied encountered while publishing to the topic. This can happen if the Pub/Sub SA has not been granted the appropriate publish permissions |
STREAM_NOT_FOUND |
The Kinesis stream does not exist. |
CONSUMER_NOT_FOUND |
The Kinesis consumer does not exist. |
CloudStorage
Ingestion settings for Cloud Storage.
JSON representation |
---|
{ "state": enum ( |
Fields | |
---|---|
state |
Output only. An output-only field that indicates the state of the Cloud Storage ingestion source. |
bucket |
Optional. Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements. |
minimum |
Optional. Only objects with a larger or equal creation timestamp will be ingested. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
match |
Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns. |
Union field input_format . Defaults to text format. input_format can be only one of the following: |
|
text |
Optional. Data from Cloud Storage will be interpreted as text. |
avro |
Optional. Data from Cloud Storage will be interpreted in Avro format. |
pubsub |
Optional. It will be assumed data from Cloud Storage was written via Cloud Storage subscriptions. |
State
Possible states for ingestion from Cloud Storage.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default value. This value is unused. |
ACTIVE |
Ingestion is active. |
CLOUD_STORAGE_PERMISSION_DENIED |
Permission denied encountered while calling the Cloud Storage API. This can happen if the Pub/Sub SA has not been granted the appropriate permissions: - storage.objects.list: to list the objects in a bucket. - storage.objects.get: to read the objects in a bucket. - storage.buckets.get: to verify the bucket exists. |
PUBLISH_PERMISSION_DENIED |
Permission denied encountered while publishing to the topic. This can happen if the Pub/Sub SA has not been granted the appropriate publish permissions |
BUCKET_NOT_FOUND |
The provided Cloud Storage bucket doesn't exist. |
TOO_MANY_OBJECTS |
The Cloud Storage bucket has too many objects, ingestion will be paused. |
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.
JSON representation |
---|
{ "delimiter": string } |
Fields | |
---|---|
delimiter |
Optional. When unset, '\n' is used. |
AvroFormat
This type has no fields.
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.
PubSubAvroFormat
This type has no fields.
Configuration for reading Cloud Storage data written via Cloud Storage subscriptions. The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
PlatformLogsSettings
Settings for Platform Logs produced by Pub/Sub.
JSON representation |
---|
{
"severity": enum ( |
Fields | |
---|---|
severity |
Optional. The minimum severity level of Platform Logs that will be written. |
Severity
Severity levels of Platform Logs.
Enums | |
---|---|
SEVERITY_UNSPECIFIED |
Default value. Logs level is unspecified. Logs will be disabled. |
DISABLED |
Logs will be disabled. |
DEBUG |
Debug logs and higher-severity logs will be written. |
INFO |
Info logs and higher-severity logs will be written. |
WARNING |
Warning logs and higher-severity logs will be written. |
ERROR |
Only error logs will be written. |
Methods |
|
---|---|
|
Creates the given topic with the given name. |
|
Deletes the topic with the given name. |
|
Gets the configuration of a topic. |
|
Gets the access control policy for a resource. |
|
Lists matching topics. |
|
Updates an existing topic by updating the fields specified in the update mask. |
|
Adds one or more messages to the topic. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |