Class: Google::Apis::LoggingV2::LogBucket
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::LogBucket
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/logging_v2/classes.rb,
lib/google/apis/logging_v2/representations.rb,
lib/google/apis/logging_v2/representations.rb
Overview
Describes a repository in which log entries are stored.
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 is locked.The retention period on a locked bucket cannot be changed.
-
#name ⇒ String
Output only.
-
#restricted_fields ⇒ Array<String>
Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values.
-
#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.
1016 1017 1018 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1016 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
966 967 968 |
# File 'lib/google/apis/logging_v2/classes.rb', line 966 def create_time @create_time end |
#description ⇒ String
Describes this bucket.
Corresponds to the JSON property description
971 972 973 |
# File 'lib/google/apis/logging_v2/classes.rb', line 971 def description @description end |
#lifecycle_state ⇒ String
Output only. The bucket lifecycle state.
Corresponds to the JSON property lifecycleState
976 977 978 |
# File 'lib/google/apis/logging_v2/classes.rb', line 976 def lifecycle_state @lifecycle_state end |
#locked ⇒ Boolean Also known as: locked?
Whether the bucket is locked.The retention period on a locked bucket cannot be
changed. Locked buckets may only be deleted if they are empty.
Corresponds to the JSON property locked
982 983 984 |
# File 'lib/google/apis/logging_v2/classes.rb', line 982 def locked @locked end |
#name ⇒ String
Output only. The resource name of the bucket.For example:projects/my-project/
locations/global/buckets/my-bucketFor a list of supported locations, see
Supported Regions (https://cloud.google.com/logging/docs/region-support)For
the location of global it is unspecified where log entries are actually stored.
After a bucket has been created, the location cannot be changed.
Corresponds to the JSON property name
992 993 994 |
# File 'lib/google/apis/logging_v2/classes.rb', line 992 def name @name end |
#restricted_fields ⇒ Array<String>
Log entry field paths that are denied access in this bucket.The following
fields and their children are eligible: textPayload, jsonPayload, protoPayload,
httpRequest, labels, sourceLocation.Restricting a repeated field will
restrict all values. Adding a parent will block all child fields. (e.g. foo.
bar will block foo.bar.baz)
Corresponds to the JSON property restrictedFields
1001 1002 1003 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1001 def restricted_fields @restricted_fields 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
1009 1010 1011 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1009 def retention_days @retention_days end |
#update_time ⇒ String
Output only. The last update timestamp of the bucket.
Corresponds to the JSON property updateTime
1014 1015 1016 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1014 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'lib/google/apis/logging_v2/classes.rb', line 1021 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) @restricted_fields = args[:restricted_fields] if args.key?(:restricted_fields) @retention_days = args[:retention_days] if args.key?(:retention_days) @update_time = args[:update_time] if args.key?(:update_time) end |