Class CloudStorageConfig (2.20.2)

CloudStorageConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Configuration for a Cloud Storage subscription.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
bucket :noindex: str
Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).
filename_prefix :noindex: str
Optional. User-provided prefix for Cloud Storage filename. See the `object naming requirements
filename_suffix :noindex: str
Optional. User-provided suffix for Cloud Storage filename. See the `object naming requirements
text_config :noindex: google.pubsub_v1.types.CloudStorageConfig.TextConfig
Optional. If set, message data will be written to Cloud Storage in text format. This field is a member of oneof_ output_format.
avro_config :noindex: google.pubsub_v1.types.CloudStorageConfig.AvroConfig
Optional. If set, message data will be written to Cloud Storage in Avro format. This field is a member of oneof_ output_format.
max_duration :noindex: google.protobuf.duration_pb2.Duration
Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.
max_bytes :noindex: int
Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.
state :noindex: google.pubsub_v1.types.CloudStorageConfig.State
Output only. An output-only field that indicates whether or not the subscription can receive messages.

Classes

AvroConfig

AvroConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary.

State

State(value)

Possible states for a Cloud Storage subscription.

Values: STATE_UNSPECIFIED (0): Default value. This value is unused. ACTIVE (1): The subscription can actively send messages to Cloud Storage. PERMISSION_DENIED (2): Cannot write to the Cloud Storage bucket because of permission denied errors. NOT_FOUND (3): Cannot write to the Cloud Storage bucket because it does not exist. IN_TRANSIT_LOCATION_RESTRICTION (4): Cannot write to the destination because enforce_in_transit is set to true and the destination locations are not in the allowed regions.

TextConfig

TextConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.