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

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LogBucket

Returns a new instance of LogBucket.



1037
1038
1039
# File 'lib/google/apis/logging_v2/classes.rb', line 1037

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

Instance Attribute Details

#cmek_settingsGoogle::Apis::LoggingV2::CmekSettings

Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud. google.com/logging/docs/routing/managed-encryption) for more information. Corresponds to the JSON property cmekSettings



981
982
983
# File 'lib/google/apis/logging_v2/classes.rb', line 981

def cmek_settings
  @cmek_settings
end

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


987
988
989
# File 'lib/google/apis/logging_v2/classes.rb', line 987

def create_time
  @create_time
end

#descriptionString

Describes this bucket. Corresponds to the JSON property description

Returns:

  • (String)


992
993
994
# File 'lib/google/apis/logging_v2/classes.rb', line 992

def description
  @description
end

#lifecycle_stateString

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

Returns:

  • (String)


997
998
999
# File 'lib/google/apis/logging_v2/classes.rb', line 997

def lifecycle_state
  @lifecycle_state
end

#lockedBoolean 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

Returns:

  • (Boolean)


1003
1004
1005
# File 'lib/google/apis/logging_v2/classes.rb', line 1003

def locked
  @locked
end

#nameString

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

Returns:

  • (String)


1013
1014
1015
# File 'lib/google/apis/logging_v2/classes.rb', line 1013

def name
  @name
end

#restricted_fieldsArray<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

Returns:

  • (Array<String>)


1022
1023
1024
# File 'lib/google/apis/logging_v2/classes.rb', line 1022

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


1030
1031
1032
# File 'lib/google/apis/logging_v2/classes.rb', line 1030

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)


1035
1036
1037
# File 'lib/google/apis/logging_v2/classes.rb', line 1035

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
# File 'lib/google/apis/logging_v2/classes.rb', line 1042

def update!(**args)
  @cmek_settings = args[:cmek_settings] if args.key?(:cmek_settings)
  @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