Cloud PubSub V1 Client - Class MessageStoragePolicy (1.47.0)

Reference documentation and code samples for the Cloud PubSub V1 Client class MessageStoragePolicy.

A policy constraining the storage of messages published to the topic.

Generated from protobuf message google.pubsub.v1.MessageStoragePolicy

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ allowed_persistence_regions array

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.

getAllowedPersistenceRegions

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAllowedPersistenceRegions

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.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this