Class: Google::Apis::PubsubV1::ExpirationPolicy
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::ExpirationPolicy
- 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 that specifies the conditions for resource expiration (i.e., automatic resource deletion).
Instance Attribute Summary collapse
-
#ttl ⇒ String
Specifies the "time-to-live" duration for an associated resource.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ExpirationPolicy
constructor
A new instance of ExpirationPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ExpirationPolicy
Returns a new instance of ExpirationPolicy.
407 408 409 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 407 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ttl ⇒ String
Specifies the "time-to-live" duration for an associated resource. The resource
expires if it is not active for a period of ttl
. The definition of "activity"
depends on the type of the associated resource. The minimum and maximum
allowed values for ttl
depend on the type of the associated resource, as
well. If ttl
is not set, the associated resource never expires.
Corresponds to the JSON property ttl
405 406 407 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 405 def ttl @ttl end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
412 413 414 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 412 def update!(**args) @ttl = args[:ttl] if args.key?(:ttl) end |