Skip to main content

@swamp/gcp/logging

v2026.04.04.2

Google Cloud logging infrastructure models

Labels

gcpgoogle-cloudloggingcloudinfrastructure

Contents

Install

$ swamp extension pull @swamp/gcp/logging

Release Notes

  • Updated: entries

@swamp/gcp/logging/bucketsv2026.04.03.3buckets.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
analyticsEnabled?booleanOptional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled.
cmekSettings?objectDescribes 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 Configure CMEK for Cloud Logging (https://docs.cloud.google.com/logging/docs/routing/managed-encryption) for more information.
description?stringOptional. Describes this bucket.
indexConfigs?arrayOptional. A list of indexed fields and related configuration data.
locked?booleanOptional. 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?arrayOptional. 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?numberOptional. 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.
bucketId?stringRequired. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a buckets
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a buckets
ArgumentTypeDescription
identifierstringThe name of the buckets
updateUpdate buckets attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the buckets
ArgumentTypeDescription
identifierstringThe name of the buckets
syncSync buckets state from GCP
create_asynccreate async
ArgumentTypeDescription
analyticsEnabled?any
cmekSettings?any
createTime?any
description?any
indexConfigs?any
lifecycleState?any
locked?any
name?any
restrictedFields?any
retentionDays?any
updateTime?any
undeleteundelete
update_asyncupdate async
ArgumentTypeDescription
analyticsEnabled?any
cmekSettings?any
createTime?any
description?any
indexConfigs?any
lifecycleState?any
locked?any
name?any
restrictedFields?any
retentionDays?any
updateTime?any

Resources

state(infinite)— Describes a repository in which log entries are stored.
@swamp/gcp/logging/buckets-linksv2026.04.03.3buckets_links.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
bigqueryDataset?objectDescribes a BigQuery dataset that was created by a link.
description?stringOptional. Describes this link.The maximum length of the description is 8000 characters.
linkId?stringRequired. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a links
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a links
ArgumentTypeDescription
identifierstringThe name of the links
deleteDelete the links
ArgumentTypeDescription
identifierstringThe name of the links
syncSync links state from GCP

Resources

state(infinite)— Describes a link connected to an analytics enabled bucket.
@swamp/gcp/logging/buckets-viewsv2026.04.03.3buckets_views.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
description?stringOptional. Describes this view.
filter?stringOptional. Filter that restricts which log entries in a bucket are visible in this view.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resour
viewId?stringRequired. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, and hyphens.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a views
getGet a views
ArgumentTypeDescription
identifierstringThe name of the views
updateUpdate views attributes
deleteDelete the views
ArgumentTypeDescription
identifierstringThe name of the views
syncSync views state from GCP

Resources

state(infinite)— Describes a view over log entries in a bucket.
@swamp/gcp/logging/buckets-views-logsv2026.04.03.3buckets_views_logs.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
getGet a logs
ArgumentTypeDescription
identifierstringThe name of the logs
syncSync logs state from GCP

Resources

state(infinite)— Lists the logs in projects, organizations, folders, or billing accounts. Only...
@swamp/gcp/logging/entriesv2026.04.04.1entries.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a entries
ArgumentTypeDescription
identifierstringThe name of the entries
syncSync entries state from GCP
copycopy
ArgumentTypeDescription
destination?any
filter?any
name?any
tailtail
ArgumentTypeDescription
bufferWindow?any
filter?any
resourceNames?any
writewrite
ArgumentTypeDescription
dryRun?any
entries?any
labels?any
logName?any
partialSuccess?any
resource?any

Resources

state(infinite)— An individual entry in a log.
@swamp/gcp/logging/exclusionsv2026.04.03.3exclusions.ts

Global Arguments

ArgumentTypeDescription
description?stringOptional. A description of this exclusion.
disabled?booleanOptional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.
filter?stringRequired. An advanced logs filter (https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression) that matches the log entries to be excluded. By using the sample function (https://docs.cloud.google.com/logging/docs/view/logging-query-language#sample), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs_bucket severity<ERROR sample(insertId,
name?stringOptional. A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a exclusions
getGet a exclusions
ArgumentTypeDescription
identifierstringThe name of the exclusions
updateUpdate exclusions attributes
deleteDelete the exclusions
ArgumentTypeDescription
identifierstringThe name of the exclusions
syncSync exclusions state from GCP

Resources

state(infinite)— Specifies a set of log entries that are filtered out by a sink. If your Googl...
@swamp/gcp/logging/locationsv2026.04.03.3locations.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a locations
ArgumentTypeDescription
identifierstringThe name of the locations
syncSync locations state from GCP

Resources

state(infinite)— A resource that represents a Google Cloud location.
@swamp/gcp/logging/logsv2026.04.03.3logs.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
getGet a logs
ArgumentTypeDescription
identifierstringThe name of the logs
deleteDelete the logs
ArgumentTypeDescription
identifierstringThe name of the logs
syncSync logs state from GCP

Resources

state(infinite)— Lists the logs in projects, organizations, folders, or billing accounts. Only...
@swamp/gcp/logging/logscopesv2026.04.03.3logscopes.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
description?stringOptional. Describes this log scope.The maximum length of the description is 8000 characters.
resourceNames?arrayRequired. Names of one or more parent resources (organizations and folders are not supported.): projects/[PROJECT_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]A log scope can include a maximum of 5 projects and a maximum of 100 resources in total.
logScopeId?stringRequired. A client-assigned identifier such as "log-scope". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a logScopes
getGet a logScopes
ArgumentTypeDescription
identifierstringThe name of the logScopes
updateUpdate logScopes attributes
deleteDelete the logScopes
ArgumentTypeDescription
identifierstringThe name of the logScopes
syncSync logScopes state from GCP

Resources

state(infinite)— Describes a group of resources to read log entries from.
@swamp/gcp/logging/metricsv2026.04.03.3metrics.ts

Global Arguments

ArgumentTypeDescription
bucketName?stringOptional. The resource name of the Log Bucket that owns the Log Metric. Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric.For example:projects/my-project/locations/global/buckets/my-bucketIf empty, then the Log Metric is considered a non-Bucket Log Metric.
bucketOptions?objectBucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribu
description?stringOptional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.
disabled?booleanOptional. If set to True, then this metric is disabled and it does not generate any points.
filter?stringRequired. An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced_filters) which is used to match log entries. Example: "resource.type=gae_app AND severity>=ERROR" The maximum length of the filter is 20000 characters.
labelExtractors?recordOptional. A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the value_extractor field.The extracted value is converted to the type defined in the label descriptor. If either the extraction or the type conversion fails, the label will have a defa
metricDescriptor?objectDefines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.
name?stringRequired. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*\
valueExtractor?stringOptional. A value_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex). The arguments are: field: The name of the log entry field from which the value is to be extracted. regex: A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log en
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a metrics
getGet a metrics
ArgumentTypeDescription
identifierstringThe name of the metrics
updateUpdate metrics attributes
deleteDelete the metrics
ArgumentTypeDescription
identifierstringThe name of the metrics
syncSync metrics state from GCP

Resources

state(infinite)— Describes a logs-based metric. The value of the metric is the number of log e...
@swamp/gcp/logging/monitoredresourcedescriptorsv2026.04.03.3monitoredresourcedescriptors.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a monitoredResourceDescriptors
ArgumentTypeDescription
identifierstringThe name of the monitoredResourceDescriptors
syncSync monitoredResourceDescriptors state from GCP

Resources

state(infinite)— An object that describes the schema of a MonitoredResource object using a typ...
@swamp/gcp/logging/recentqueriesv2026.04.04.1recentqueries.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
getGet a recentQueries
ArgumentTypeDescription
identifierstringThe name of the recentQueries
syncSync recentQueries state from GCP

Resources

state(infinite)— Describes a recent query executed on the Logs Explorer or Log Analytics page ...
@swamp/gcp/logging/savedqueriesv2026.04.04.1savedqueries.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
description?stringOptional. A human readable description of the saved query.
displayName?stringRequired. The user specified title for the SavedQuery.
loggingQuery?objectDescribes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results.
opsAnalyticsQuery?objectDescribes a query that can be run in Log Analytics.
visibility?enumRequired. The visibility status of this query, which determines its ownership.
savedQueryId?stringOptional. The ID to use for the saved query, which will become the final component of the saved query's resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a savedQueries
getGet a savedQueries
ArgumentTypeDescription
identifierstringThe name of the savedQueries
updateUpdate savedQueries attributes
deleteDelete the savedQueries
ArgumentTypeDescription
identifierstringThe name of the savedQueries
syncSync savedQueries state from GCP

Resources

state(infinite)— Describes a query that has been saved by a user.
@swamp/gcp/logging/sinksv2026.04.03.3sinks.ts

Global Arguments

ArgumentTypeDescription
bigqueryOptions?objectOptions that change functionality of a sink exporting data to BigQuery.
description?stringOptional. A description of this sink.The maximum length of the description is 8000 characters.
destination?stringRequired. The export destination: "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" "logging.googleapis.com/projects/[PROJECT_ID]" "logging.googleapis.com/projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" The sink\
disabled?booleanOptional. If set to true, then this sink is disabled and it does not export any log entries.
exclusions?arrayOptional. Log entries that match any of these exclusion filters will not be exported.If a log entry is matched by both filter and one of exclusions it will not be exported.
filter?stringOptional. An advanced logs filter (https://docs.cloud.google.com/logging/docs/view/building-queries#queries-by-expression). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
includeChildren?booleanOptional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression.For example, if this field is true, then the
interceptChildren?booleanOptional. This field applies only to sinks owned by organizations and folders.When the value of 'intercept_children' is true, the following restrictions apply: The sink must have the include_children flag set to true. The sink destination must be a Cloud project.Also, the following behaviors apply: Any logs matched by the sink won't be included by non-_Required sinks owned by child resources. The sink appears in the results of a ListSinks call from a child resource if the value of the filter fie
name?stringOptional. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric.
customWriterIdentity?stringOptional. The service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified when you are routing logs to a log bucket that is in a different project than the sink. When not specified, a Logging service account will automatically be generated.
uniqueWriterIdentity?stringOptional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organizatio
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a sinks
getGet a sinks
ArgumentTypeDescription
identifierstringThe name of the sinks
updateUpdate sinks attributes
deleteDelete the sinks
ArgumentTypeDescription
identifierstringThe name of the sinks
syncSync sinks state from GCP

Resources

state(infinite)— Describes a sink used to export log entries to one of the following destinati...