buckets
Creates, updates, deletes, gets or lists a buckets
resource.
Overview
Name | buckets |
Type | Resource |
Id | google.logging.buckets |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_buckets_get
- organizations_locations_buckets_get
- folders_locations_buckets_get
- billing_accounts_locations_buckets_get
- locations_buckets_list
- projects_locations_buckets_list
- organizations_locations_buckets_list
- folders_locations_buckets_list
- billing_accounts_locations_buckets_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | 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. |
analyticsEnabled | boolean | Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. |
cmekSettings | object | Optional. 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. (id: CmekSettings) |
createTime | string (google-datetime) | Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
description | string | Optional. Describes this bucket. |
indexConfigs | array | Optional. A list of indexed fields and related configuration data. |
lifecycleState | string | Output only. The bucket lifecycle state. |
locked | boolean | Optional. 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. |
restrictedFields | array | Optional. 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) |
retentionDays | integer (int32) | Optional. 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp of the bucket. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_buckets_get | select | projectsId , locationsId , bucketsId | Gets a log bucket. | |
organizations_locations_buckets_get | select | organizationsId , locationsId , bucketsId | Gets a log bucket. | |
folders_locations_buckets_get | select | foldersId , locationsId , bucketsId | Gets a log bucket. | |
billing_accounts_locations_buckets_get | select | billingAccountsId , locationsId , bucketsId | Gets a log bucket. | |
locations_buckets_list | select | parentType , parent | pageToken , pageSize | Lists log buckets. |
projects_locations_buckets_list | select | projectsId , locationsId | pageToken , pageSize | Lists log buckets. |
organizations_locations_buckets_list | select | organizationsId , locationsId | pageToken , pageSize | Lists log buckets. |
folders_locations_buckets_list | select | foldersId , locationsId | pageToken , pageSize | Lists log buckets. |
billing_accounts_locations_buckets_list | select | billingAccountsId , locationsId | pageToken , pageSize | Lists log buckets. |
locations_buckets_create | insert | parentType , parent | bucketId | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
projects_locations_buckets_create | insert | projectsId , locationsId | bucketId | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
organizations_locations_buckets_create | insert | organizationsId , locationsId | bucketId | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
folders_locations_buckets_create | insert | foldersId , locationsId | bucketId | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
billing_accounts_locations_buckets_create | insert | billingAccountsId , locationsId | bucketId | Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. |
projects_locations_buckets_patch | update | projectsId , locationsId , bucketsId | updateMask | Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. |
organizations_locations_buckets_patch | update | organizationsId , locationsId , bucketsId | updateMask | Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. |
folders_locations_buckets_patch | update | foldersId , locationsId , bucketsId | updateMask | Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. |
billing_accounts_locations_buckets_patch | update | billingAccountsId , locationsId , bucketsId | updateMask | Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. |
projects_locations_buckets_delete | delete | projectsId , locationsId , bucketsId | Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. | |
organizations_locations_buckets_delete | delete | organizationsId , locationsId , bucketsId | Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. | |
folders_locations_buckets_delete | delete | foldersId , locationsId , bucketsId | Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. | |
billing_accounts_locations_buckets_delete | delete | billingAccountsId , locationsId , bucketsId | Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. | |
locations_buckets_undelete | exec | name | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. | |
projects_locations_buckets_undelete | exec | projectsId , locationsId , bucketsId | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. | |
organizations_locations_buckets_undelete | exec | organizationsId , locationsId , bucketsId | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. | |
folders_locations_buckets_undelete | exec | foldersId , locationsId , bucketsId | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. | |
billing_accounts_locations_buckets_undelete | exec | billingAccountsId , locationsId , bucketsId | Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
billingAccountsId | string | |
bucketsId | string | |
foldersId | string | |
locationsId | string | |
name | string | |
organizationsId | string | |
parent | string | |
parentType | string | |
projectsId | string | |
bucketId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_buckets_get
- organizations_locations_buckets_get
- folders_locations_buckets_get
- billing_accounts_locations_buckets_get
- locations_buckets_list
- projects_locations_buckets_list
- organizations_locations_buckets_list
- folders_locations_buckets_list
- billing_accounts_locations_buckets_list
Gets a log bucket.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND bucketsId = '{{ bucketsId }}' -- required;
Gets a log bucket.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND bucketsId = '{{ bucketsId }}' -- required;
Gets a log bucket.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE foldersId = '{{ foldersId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND bucketsId = '{{ bucketsId }}' -- required;
Gets a log bucket.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE billingAccountsId = '{{ billingAccountsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND bucketsId = '{{ bucketsId }}' -- required;
Lists log buckets.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE parentType = '{{ parentType }}' -- required
AND parent = '{{ parent }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists log buckets.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists log buckets.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists log buckets.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE foldersId = '{{ foldersId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists log buckets.
SELECT
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
FROM google.logging.buckets
WHERE billingAccountsId = '{{ billingAccountsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
INSERT
examples
- locations_buckets_create
- projects_locations_buckets_create
- organizations_locations_buckets_create
- folders_locations_buckets_create
- billing_accounts_locations_buckets_create
- Manifest
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
INSERT INTO google.logging.buckets (
data__description,
data__retentionDays,
data__locked,
data__analyticsEnabled,
data__restrictedFields,
data__indexConfigs,
data__cmekSettings,
parentType,
parent,
bucketId
)
SELECT
'{{ description }}',
{{ retentionDays }},
{{ locked }},
{{ analyticsEnabled }},
'{{ restrictedFields }}',
'{{ indexConfigs }}',
'{{ cmekSettings }}',
'{{ parentType }}',
'{{ parent }}',
'{{ bucketId }}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
;
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
INSERT INTO google.logging.buckets (
data__description,
data__retentionDays,
data__locked,
data__analyticsEnabled,
data__restrictedFields,
data__indexConfigs,
data__cmekSettings,
projectsId,
locationsId,
bucketId
)
SELECT
'{{ description }}',
{{ retentionDays }},
{{ locked }},
{{ analyticsEnabled }},
'{{ restrictedFields }}',
'{{ indexConfigs }}',
'{{ cmekSettings }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ bucketId }}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
;
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
INSERT INTO google.logging.buckets (
data__description,
data__retentionDays,
data__locked,
data__analyticsEnabled,
data__restrictedFields,
data__indexConfigs,
data__cmekSettings,
organizationsId,
locationsId,
bucketId
)
SELECT
'{{ description }}',
{{ retentionDays }},
{{ locked }},
{{ analyticsEnabled }},
'{{ restrictedFields }}',
'{{ indexConfigs }}',
'{{ cmekSettings }}',
'{{ organizationsId }}',
'{{ locationsId }}',
'{{ bucketId }}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
;
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
INSERT INTO google.logging.buckets (
data__description,
data__retentionDays,
data__locked,
data__analyticsEnabled,
data__restrictedFields,
data__indexConfigs,
data__cmekSettings,
foldersId,
locationsId,
bucketId
)
SELECT
'{{ description }}',
{{ retentionDays }},
{{ locked }},
{{ analyticsEnabled }},
'{{ restrictedFields }}',
'{{ indexConfigs }}',
'{{ cmekSettings }}',
'{{ foldersId }}',
'{{ locationsId }}',
'{{ bucketId }}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
;
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
INSERT INTO google.logging.buckets (
data__description,
data__retentionDays,
data__locked,
data__analyticsEnabled,
data__restrictedFields,
data__indexConfigs,
data__cmekSettings,
billingAccountsId,
locationsId,
bucketId
)
SELECT
'{{ description }}',
{{ retentionDays }},
{{ locked }},
{{ analyticsEnabled }},
'{{ restrictedFields }}',
'{{ indexConfigs }}',
'{{ cmekSettings }}',
'{{ billingAccountsId }}',
'{{ locationsId }}',
'{{ bucketId }}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime
;
# Description fields are for documentation purposes
- name: buckets
props:
- name: parentType
value: string
description: Required parameter for the buckets resource.
- name: parent
value: string
description: Required parameter for the buckets resource.
- name: projectsId
value: string
description: Required parameter for the buckets resource.
- name: locationsId
value: string
description: Required parameter for the buckets resource.
- name: organizationsId
value: string
description: Required parameter for the buckets resource.
- name: foldersId
value: string
description: Required parameter for the buckets resource.
- name: billingAccountsId
value: string
description: Required parameter for the buckets resource.
- name: description
value: string
description: >
Optional. Describes this bucket.
- name: retentionDays
value: integer
description: >
Optional. 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.
- name: locked
value: boolean
description: >
Optional. 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: analyticsEnabled
value: boolean
description: >
Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled.
- name: restrictedFields
value: array
description: >
Optional. 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)
- name: indexConfigs
value: array
description: >
Optional. A list of indexed fields and related configuration data.
- name: cmekSettings
value: object
description: >
Optional. 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.
- name: bucketId
value: string
UPDATE
examples
- projects_locations_buckets_patch
- organizations_locations_buckets_patch
- folders_locations_buckets_patch
- billing_accounts_locations_buckets_patch
Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.
UPDATE google.logging.buckets
SET
data__description = '{{ description }}',
data__retentionDays = {{ retentionDays }},
data__locked = {{ locked }},
data__analyticsEnabled = {{ analyticsEnabled }},
data__restrictedFields = '{{ restrictedFields }}',
data__indexConfigs = '{{ indexConfigs }}',
data__cmekSettings = '{{ cmekSettings }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime;
Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.
UPDATE google.logging.buckets
SET
data__description = '{{ description }}',
data__retentionDays = {{ retentionDays }},
data__locked = {{ locked }},
data__analyticsEnabled = {{ analyticsEnabled }},
data__restrictedFields = '{{ restrictedFields }}',
data__indexConfigs = '{{ indexConfigs }}',
data__cmekSettings = '{{ cmekSettings }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime;
Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.
UPDATE google.logging.buckets
SET
data__description = '{{ description }}',
data__retentionDays = {{ retentionDays }},
data__locked = {{ locked }},
data__analyticsEnabled = {{ analyticsEnabled }},
data__restrictedFields = '{{ restrictedFields }}',
data__indexConfigs = '{{ indexConfigs }}',
data__cmekSettings = '{{ cmekSettings }}'
WHERE
foldersId = '{{ foldersId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime;
Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed.
UPDATE google.logging.buckets
SET
data__description = '{{ description }}',
data__retentionDays = {{ retentionDays }},
data__locked = {{ locked }},
data__analyticsEnabled = {{ analyticsEnabled }},
data__restrictedFields = '{{ restrictedFields }}',
data__indexConfigs = '{{ indexConfigs }}',
data__cmekSettings = '{{ cmekSettings }}'
WHERE
billingAccountsId = '{{ billingAccountsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
analyticsEnabled,
cmekSettings,
createTime,
description,
indexConfigs,
lifecycleState,
locked,
restrictedFields,
retentionDays,
updateTime;
DELETE
examples
- projects_locations_buckets_delete
- organizations_locations_buckets_delete
- folders_locations_buckets_delete
- billing_accounts_locations_buckets_delete
Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.
DELETE FROM google.logging.buckets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required;
Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.
DELETE FROM google.logging.buckets
WHERE organizationsId = '{{ organizationsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required;
Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.
DELETE FROM google.logging.buckets
WHERE foldersId = '{{ foldersId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required;
Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.
DELETE FROM google.logging.buckets
WHERE billingAccountsId = '{{ billingAccountsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND bucketsId = '{{ bucketsId }}' --required;
Lifecycle Methods
- locations_buckets_undelete
- projects_locations_buckets_undelete
- organizations_locations_buckets_undelete
- folders_locations_buckets_undelete
- billing_accounts_locations_buckets_undelete
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
EXEC google.logging.buckets.locations_buckets_undelete
@name='{{ name }}' --required;
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
EXEC google.logging.buckets.projects_locations_buckets_undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@bucketsId='{{ bucketsId }}' --required;
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
EXEC google.logging.buckets.organizations_locations_buckets_undelete
@organizationsId='{{ organizationsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@bucketsId='{{ bucketsId }}' --required;
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
EXEC google.logging.buckets.folders_locations_buckets_undelete
@foldersId='{{ foldersId }}' --required,
@locationsId='{{ locationsId }}' --required,
@bucketsId='{{ bucketsId }}' --required;
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
EXEC google.logging.buckets.billing_accounts_locations_buckets_undelete
@billingAccountsId='{{ billingAccountsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@bucketsId='{{ bucketsId }}' --required;