(::Google::Cloud::Logging::V2::CmekSettings) — The CMEK settings of the log bucket. If present, new log entries written to
this log bucket are encrypted using the CMEK key provided in this
configuration. If a log bucket has CMEK settings, the CMEK settings cannot
be disabled later by updating the log bucket. Changing the KMS key is
allowed.
value (::Google::Cloud::Logging::V2::CmekSettings) — The CMEK settings of the log bucket. If present, new log entries written to
this log bucket are encrypted using the CMEK key provided in this
configuration. If a log bucket has CMEK settings, the CMEK settings cannot
be disabled later by updating the log bucket. Changing the KMS key is
allowed.
Returns
(::Google::Cloud::Logging::V2::CmekSettings) — The CMEK settings of the log bucket. If present, new log entries written to
this log bucket are encrypted using the CMEK key provided in this
configuration. If a log bucket has CMEK settings, the CMEK settings cannot
be disabled later by updating the log bucket. Changing the KMS key is
allowed.
#create_time
defcreate_time()->::Google::Protobuf::Timestamp
Returns
(::Google::Protobuf::Timestamp) — Output only. The creation timestamp of the bucket. This is not set for any
of the default buckets.
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.
#restricted_fields
defrestricted_fields()->::Array<::String>
Returns
(::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)
#restricted_fields=
defrestricted_fields=(value)->::Array<::String>
Parameter
value (::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)
Returns
(::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)
#retention_days
defretention_days()->::Integer
Returns
(::Integer) — 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.
#retention_days=
defretention_days=(value)->::Integer
Parameter
value (::Integer) — 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.
Returns
(::Integer) — 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Logging V2 API - Class Google::Cloud::Logging::V2::LogBucket (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Cloud-Logging-V2-LogBucket)\n- [1.2.1](/ruby/docs/reference/google-cloud-logging-v2/1.2.1/Google-Cloud-Logging-V2-LogBucket)\n- [1.1.0](/ruby/docs/reference/google-cloud-logging-v2/1.1.0/Google-Cloud-Logging-V2-LogBucket)\n- [1.0.1](/ruby/docs/reference/google-cloud-logging-v2/1.0.1/Google-Cloud-Logging-V2-LogBucket)\n- [0.13.0](/ruby/docs/reference/google-cloud-logging-v2/0.13.0/Google-Cloud-Logging-V2-LogBucket)\n- [0.12.2](/ruby/docs/reference/google-cloud-logging-v2/0.12.2/Google-Cloud-Logging-V2-LogBucket)\n- [0.11.0](/ruby/docs/reference/google-cloud-logging-v2/0.11.0/Google-Cloud-Logging-V2-LogBucket)\n- [0.10.1](/ruby/docs/reference/google-cloud-logging-v2/0.10.1/Google-Cloud-Logging-V2-LogBucket)\n- [0.9.0](/ruby/docs/reference/google-cloud-logging-v2/0.9.0/Google-Cloud-Logging-V2-LogBucket)\n- [0.8.1](/ruby/docs/reference/google-cloud-logging-v2/0.8.1/Google-Cloud-Logging-V2-LogBucket)\n- [0.7.0](/ruby/docs/reference/google-cloud-logging-v2/0.7.0/Google-Cloud-Logging-V2-LogBucket)\n- [0.6.0](/ruby/docs/reference/google-cloud-logging-v2/0.6.0/Google-Cloud-Logging-V2-LogBucket)\n- [0.5.6](/ruby/docs/reference/google-cloud-logging-v2/0.5.6/Google-Cloud-Logging-V2-LogBucket) \nReference documentation and code samples for the Cloud Logging V2 API class Google::Cloud::Logging::V2::LogBucket.\n\nDescribes a repository in which log entries are stored. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #analytics_enabled\n\n def analytics_enabled() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Whether log analytics is enabled for this bucket.\n\n Once enabled, log analytics features cannot be disabled.\n\n### #analytics_enabled=\n\n def analytics_enabled=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Whether log analytics is enabled for this bucket.\n\n\nOnce enabled, log analytics features cannot be disabled. \n**Returns**\n\n- (::Boolean) --- Whether log analytics is enabled for this bucket.\n\n Once enabled, log analytics features cannot be disabled.\n\n### #cmek_settings\n\n def cmek_settings() -\u003e ::Google::Cloud::Logging::V2::CmekSettings\n\n**Returns**\n\n- ([::Google::Cloud::Logging::V2::CmekSettings](./Google-Cloud-Logging-V2-CmekSettings)) --- The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.\n\n### #cmek_settings=\n\n def cmek_settings=(value) -\u003e ::Google::Cloud::Logging::V2::CmekSettings\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Logging::V2::CmekSettings](./Google-Cloud-Logging-V2-CmekSettings)) --- The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. \n**Returns**\n\n- ([::Google::Cloud::Logging::V2::CmekSettings](./Google-Cloud-Logging-V2-CmekSettings)) --- The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed.\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Describes this bucket.\n\n### #description=\n\n def description=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Describes this bucket. \n**Returns**\n\n- (::String) --- Describes this bucket.\n\n### #index_configs\n\n def index_configs() -\u003e ::Array\u003c::Google::Cloud::Logging::V2::IndexConfig\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Logging::V2::IndexConfig](./Google-Cloud-Logging-V2-IndexConfig)\\\u003e) --- A list of indexed fields and related configuration data.\n\n### #index_configs=\n\n def index_configs=(value) -\u003e ::Array\u003c::Google::Cloud::Logging::V2::IndexConfig\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Logging::V2::IndexConfig](./Google-Cloud-Logging-V2-IndexConfig)\\\u003e) --- A list of indexed fields and related configuration data. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Logging::V2::IndexConfig](./Google-Cloud-Logging-V2-IndexConfig)\\\u003e) --- A list of indexed fields and related configuration data.\n\n### #lifecycle_state\n\n def lifecycle_state() -\u003e ::Google::Cloud::Logging::V2::LifecycleState\n\n**Returns**\n\n- ([::Google::Cloud::Logging::V2::LifecycleState](./Google-Cloud-Logging-V2-LifecycleState)) --- Output only. The bucket lifecycle state.\n\n### #locked\n\n def locked() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Whether the bucket is locked.\n\n The retention period on a locked bucket cannot be changed. Locked buckets\n may only be deleted if they are empty.\n\n### #locked=\n\n def locked=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Whether the bucket is locked.\n\n\n The retention period on a locked bucket cannot be changed. Locked buckets\nmay only be deleted if they are empty. \n**Returns**\n\n- (::Boolean) --- Whether the bucket is locked.\n\n The retention period on a locked bucket cannot be changed. Locked buckets\n may only be deleted if they are empty.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The resource name of the bucket.\n\n For example:\n\n `projects/my-project/locations/global/buckets/my-bucket`\n\n For a list of supported locations, see [Supported\n Regions](https://cloud.google.com/logging/docs/region-support)\n\n For the location of `global` it is unspecified where log entries are\n actually stored.\n\n After a bucket has been created, the location cannot be changed.\n\n### #restricted_fields\n\n def restricted_fields() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Log entry field paths that are denied access in this bucket.\n\n The following fields and their children are eligible: `textPayload`,\n `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`.\n\n Restricting a repeated field will restrict all values. Adding a parent will\n block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`)\n\n### #restricted_fields=\n\n def restricted_fields=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Log entry field paths that are denied access in this bucket.\n\n\n The following fields and their children are eligible: `textPayload`,\n `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`.\n\n Restricting a repeated field will restrict all values. Adding a parent will\nblock all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Log entry field paths that are denied access in this bucket.\n\n The following fields and their children are eligible: `textPayload`,\n `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`.\n\n Restricting a repeated field will restrict all values. Adding a parent will\n block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`)\n\n### #retention_days\n\n def retention_days() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- 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.\n\n### #retention_days=\n\n def retention_days=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- 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. \n**Returns**\n\n- (::Integer) --- 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.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The last update timestamp of the bucket."]]