(::Array<::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.
value (::Array<::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.
Returns
(::Array<::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.
#enforce_in_transit
defenforce_in_transit()->::Boolean
Returns
(::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.
#enforce_in_transit=
defenforce_in_transit=(value)->::Boolean
Parameter
value (::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.
Returns
(::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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Pub/Sub V1 API - Class Google::Cloud::PubSub::V1::MessageStoragePolicy (v1.11.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.1 (latest)](/ruby/docs/reference/google-cloud-pubsub-v1/latest/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.11.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.11.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.10.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.10.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.9.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.9.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.8.2](/ruby/docs/reference/google-cloud-pubsub-v1/1.8.2/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.7.1](/ruby/docs/reference/google-cloud-pubsub-v1/1.7.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.6.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.6.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.5.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.5.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.4.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.4.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.3.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.3.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.2.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.2.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.1.2](/ruby/docs/reference/google-cloud-pubsub-v1/1.1.2/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [1.0.0](/ruby/docs/reference/google-cloud-pubsub-v1/1.0.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.25.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.25.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.24.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.24.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.23.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.23.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.22.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.22.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.21.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.21.2/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.20.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.20.2/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.19.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.19.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.18.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.18.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.17.4](/ruby/docs/reference/google-cloud-pubsub-v1/0.17.4/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.16.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.16.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.15.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.15.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.14.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.14.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.13.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.13.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.12.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.12.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.11.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.11.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.10.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.10.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.9.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.9.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.8.0](/ruby/docs/reference/google-cloud-pubsub-v1/0.8.0/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.7.1](/ruby/docs/reference/google-cloud-pubsub-v1/0.7.1/Google-Cloud-PubSub-V1-MessageStoragePolicy)\n- [0.6.2](/ruby/docs/reference/google-cloud-pubsub-v1/0.6.2/Google-Cloud-PubSub-V1-MessageStoragePolicy) \nReference documentation and code samples for the Cloud Pub/Sub V1 API class Google::Cloud::PubSub::V1::MessageStoragePolicy.\n\nA policy constraining the storage of messages published to the topic. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allowed_persistence_regions\n\n def allowed_persistence_regions() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n### #allowed_persistence_regions=\n\n def allowed_persistence_regions=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- 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. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n### #enforce_in_transit\n\n def enforce_in_transit() -\u003e ::Boolean\n\n**Returns**\n\n- (::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`.\n\n### #enforce_in_transit=\n\n def enforce_in_transit=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::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`. \n**Returns**\n\n- (::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`."]]