Class: Google::Apis::PubsubV1::MessageStoragePolicy
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::MessageStoragePolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
A policy constraining the storage of messages published to the topic.
Instance Attribute Summary collapse
-
#allowed_persistence_regions ⇒ Array<String>
Optional.
-
#enforce_in_transit ⇒ Boolean
(also: #enforce_in_transit?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MessageStoragePolicy
constructor
A new instance of MessageStoragePolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MessageStoragePolicy
Returns a new instance of MessageStoragePolicy.
1226 1227 1228 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1226 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allowed_persistence_regions ⇒ 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.
Corresponds to the JSON property allowedPersistenceRegions
1215 1216 1217 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1215 def allowed_persistence_regions @allowed_persistence_regions end |
#enforce_in_transit ⇒ Boolean Also known as: enforce_in_transit?
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.
Corresponds to the JSON property enforceInTransit
1223 1224 1225 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1223 def enforce_in_transit @enforce_in_transit end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1231 1232 1233 1234 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1231 def update!(**args) @allowed_persistence_regions = args[:allowed_persistence_regions] if args.key?(:allowed_persistence_regions) @enforce_in_transit = args[:enforce_in_transit] if args.key?(:enforce_in_transit) end |