Stackdriver Logging V2 Client - Class LogBucket (1.24.10)

Reference documentation and code samples for the Stackdriver Logging V2 Client class LogBucket.

Describes a repository in which log entries are stored.

Generated from protobuf message google.logging.v2.LogBucket

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name 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 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.

↳ description string

Describes this bucket.

↳ create_time Google\Protobuf\Timestamp

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

↳ update_time Google\Protobuf\Timestamp

Output only. The last update timestamp of the bucket.

↳ retention_days int

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.

↳ locked bool

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.

↳ lifecycle_state int

Output only. The bucket lifecycle state.

↳ restricted_fields array

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)

↳ cmek_settings 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.

getName

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
string

setName

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

Describes this bucket.

Generated from protobuf field string description = 3;

Returns
TypeDescription
string

setDescription

Describes this bucket.

Generated from protobuf field string description = 3;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The creation timestamp of the bucket. This is not set for any of the default buckets.

Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The last update timestamp of the bucket.

Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last update timestamp of the bucket.

Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getRetentionDays

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.

Generated from protobuf field int32 retention_days = 11;

Returns
TypeDescription
int

setRetentionDays

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.

Generated from protobuf field int32 retention_days = 11;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLocked

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.

Generated from protobuf field bool locked = 9;

Returns
TypeDescription
bool

setLocked

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.

Generated from protobuf field bool locked = 9;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getLifecycleState

Output only. The bucket lifecycle state.

Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

setLifecycleState

Output only. The bucket lifecycle state.

Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRestrictedFields

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)

Generated from protobuf field repeated string restricted_fields = 15;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRestrictedFields

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)

Generated from protobuf field repeated string restricted_fields = 15;

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getCmekSettings

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.

Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19;

Returns
TypeDescription
Google\Cloud\Logging\V2\CmekSettings|null

hasCmekSettings

clearCmekSettings

setCmekSettings

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.

Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19;

Parameter
NameDescription
var Google\Cloud\Logging\V2\CmekSettings
Returns
TypeDescription
$this