Class: Google::Apis::LoggingV2::LogBucket

Inherits:
Object
  • Object
show all
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 (Beta).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogBucket

Returns a new instance of LogBucket.



745
746
747
# File 'generated/google/apis/logging_v2/classes.rb', line 745

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. Corresponds to the JSON property createTime

Returns:

  • (String)


711
712
713
# File 'generated/google/apis/logging_v2/classes.rb', line 711

def create_time
  @create_time
end

#descriptionString

Describes this bucket. Corresponds to the JSON property description

Returns:

  • (String)


716
717
718
# File 'generated/google/apis/logging_v2/classes.rb', line 716

def description
  @description
end

#lifecycle_stateString

The bucket lifecycle state.Output only. Corresponds to the JSON property lifecycleState

Returns:

  • (String)


721
722
723
# File 'generated/google/apis/logging_v2/classes.rb', line 721

def lifecycle_state
  @lifecycle_state
end

#nameString

The resource name of the bucket. For example: "projects/my-project-id/ locations/my-location/buckets/my-bucket-id The supported locations are: " global" "us-central1"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

Returns:

  • (String)


730
731
732
# File 'generated/google/apis/logging_v2/classes.rb', line 730

def name
  @name
end

#retention_daysFixnum

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

Returns:

  • (Fixnum)


738
739
740
# File 'generated/google/apis/logging_v2/classes.rb', line 738

def retention_days
  @retention_days
end

#update_timeString

Output only. The last update timestamp of the bucket. Corresponds to the JSON property updateTime

Returns:

  • (String)


743
744
745
# File 'generated/google/apis/logging_v2/classes.rb', line 743

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



750
751
752
753
754
755
756
757
# File 'generated/google/apis/logging_v2/classes.rb', line 750

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)
  @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