Class: Google::Apis::LoggingV2::LogBucket
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::LogBucket
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/logging_v2/classes.rb,
generated/google/apis/logging_v2/representations.rb,
generated/google/apis/logging_v2/representations.rb
Overview
Describes a repository of logs.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Describes this bucket.
-
#lifecycle_state ⇒ String
Output only.
-
#locked ⇒ Boolean
(also: #locked?)
Whether the bucket has been locked.
-
#name ⇒ String
Output only.
-
#retention_days ⇒ Fixnum
Logs will be retained by default for this amount of time, after which they will automatically be deleted.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogBucket
constructor
A new instance of LogBucket.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LogBucket
Returns a new instance of LogBucket.
857 858 859 |
# File 'generated/google/apis/logging_v2/classes.rb', line 857 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. The creation timestamp of the bucket. This is not set for any of
the default buckets.
Corresponds to the JSON property createTime
816 817 818 |
# File 'generated/google/apis/logging_v2/classes.rb', line 816 def create_time @create_time end |
#description ⇒ String
Describes this bucket.
Corresponds to the JSON property description
821 822 823 |
# File 'generated/google/apis/logging_v2/classes.rb', line 821 def description @description end |
#lifecycle_state ⇒ String
Output only. The bucket lifecycle state.
Corresponds to the JSON property lifecycleState
826 827 828 |
# File 'generated/google/apis/logging_v2/classes.rb', line 826 def lifecycle_state @lifecycle_state end |
#locked ⇒ Boolean Also known as: locked?
Whether the bucket has been locked. The retention period on a locked bucket
may not be changed. Locked buckets may only be deleted if they are empty.
Corresponds to the JSON property locked
832 833 834 |
# File 'generated/google/apis/logging_v2/classes.rb', line 832 def locked @locked end |
#name ⇒ String
Output only. The resource name of the bucket. For example: "projects/my-
project-id/locations/my-location/buckets/my-bucket-id The supported locations
are: "global"For the location of global it is unspecified where logs are
actually stored. Once a bucket has been created, the location can not be
changed.
Corresponds to the JSON property name
842 843 844 |
# File 'generated/google/apis/logging_v2/classes.rb', line 842 def name @name end |
#retention_days ⇒ Fixnum
Logs will be retained by default for this amount of time, after which they
will automatically be deleted. The minimum retention period is 1 day. If this
value is set to zero at bucket creation time, the default time of 30 days will
be used.
Corresponds to the JSON property retentionDays
850 851 852 |
# File 'generated/google/apis/logging_v2/classes.rb', line 850 def retention_days @retention_days end |
#update_time ⇒ String
Output only. The last update timestamp of the bucket.
Corresponds to the JSON property updateTime
855 856 857 |
# File 'generated/google/apis/logging_v2/classes.rb', line 855 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
862 863 864 865 866 867 868 869 870 |
# File 'generated/google/apis/logging_v2/classes.rb', line 862 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @locked = args[:locked] if args.key?(:locked) @name = args[:name] if args.key?(:name) @retention_days = args[:retention_days] if args.key?(:retention_days) @update_time = args[:update_time] if args.key?(:update_time) end |