1.9.0 (latest) 1.8.0 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.13.0 0.12.2 0.11.0 0.10.1 0.9.0 0.8.1 0.7.0 0.6.0 0.5.6 Reference documentation and code samples for the Cloud Logging V2 API class Google::Cloud::Logging::V2::LogBucket.

Describes a repository in which log entries are stored.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #analytics_enabled

    def analytics_enabled() -> ::Boolean

**Returns**

- (::Boolean) --- Whether log analytics is enabled for this bucket.

  Once enabled, log analytics features cannot be disabled.

### #analytics_enabled=

    def analytics_enabled=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Whether log analytics is enabled for this bucket.


  Once enabled, log analytics features cannot be disabled.
**Returns**

- (::Boolean) --- Whether log analytics is enabled for this bucket.

  Once enabled, log analytics features cannot be disabled.

### #cmek_settings

    def cmek_settings() -> ::Google::Cloud::Logging::V2::CmekSettings

**Returns**

- ([::Google::Cloud::Logging::V2::CmekSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/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.

### #cmek_settings=

    def cmek_settings=(value) -> ::Google::Cloud::Logging::V2::CmekSettings

**Parameter**

- **value** ([::Google::Cloud::Logging::V2::CmekSettings](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/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

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Protobuf-Timestamp)) --- Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Describes this bucket.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Describes this bucket.
**Returns**

- (::String) --- Describes this bucket.

### #index_configs

    def index_configs() -> ::Array<::Google::Cloud::Logging::V2::IndexConfig>

**Returns**

- (::Array\<[::Google::Cloud::Logging::V2::IndexConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Cloud-Logging-V2-IndexConfig)\>) --- A list of indexed fields and related configuration data.

### #index_configs=

    def index_configs=(value) -> ::Array<::Google::Cloud::Logging::V2::IndexConfig>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Logging::V2::IndexConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Cloud-Logging-V2-IndexConfig)\>) --- A list of indexed fields and related configuration data.
**Returns**

- (::Array\<[::Google::Cloud::Logging::V2::IndexConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Cloud-Logging-V2-IndexConfig)\>) --- A list of indexed fields and related configuration data.

### #lifecycle_state

    def lifecycle_state() -> ::Google::Cloud::Logging::V2::LifecycleState

**Returns**

- ([::Google::Cloud::Logging::V2::LifecycleState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Cloud-Logging-V2-LifecycleState)) --- Output only. The bucket lifecycle state.

### #locked

    def locked() -> ::Boolean

**Returns**

- (::Boolean) --- 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.

### #locked=

    def locked=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- 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.
**Returns**

- (::Boolean) --- 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.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the bucket.

  For example:

  `projects/my-project/locations/global/buckets/my-bucket`

  For 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.

### #restricted_fields

    def restricted_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=

    def restricted_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

    def retention_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=

    def retention_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.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging-v2/latest/Google-Protobuf-Timestamp)) --- Output only. The last update timestamp of the bucket.