Module logging

This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Others

Resources

Resource BillingAccountBucketConfig

class BillingAccountBucketConfig extends CustomResource

Manages a billing account level logging bucket config. For more information see the official logging documentation and Storing Logs.

Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are “_Default” and “_Required”.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const default = gcp.organizations.getBillingAccount({
    billingAccount: "00AA00-000AAA-00AA0A",
});
const basic = new gcp.logging.BillingAccountBucketConfig("basic", {
    billingAccount: _default.then(_default => _default.billingAccount),
    location: "global",
    retentionDays: 30,
    bucketId: "_Default",
});

constructor

new BillingAccountBucketConfig(name: string, args: BillingAccountBucketConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a BillingAccountBucketConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BillingAccountBucketConfigState, opts?: pulumi.CustomResourceOptions): BillingAccountBucketConfig

Get an existing BillingAccountBucketConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BillingAccountBucketConfig

Returns true if the given object is an instance of BillingAccountBucketConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property billingAccount

public billingAccount: pulumi.Output<string>;

The parent resource that contains the logging bucket.

property bucketId

public bucketId: pulumi.Output<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

public description: pulumi.Output<string>;

Describes this bucket.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lifecycleState

public lifecycleState: pulumi.Output<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

public location: pulumi.Output<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

public name: pulumi.Output<string>;

The resource name of the bucket. For example: “projects/my-project-id/locations/my-location/buckets/my-bucket-id”

property retentionDays

public retentionDays: pulumi.Output<number | undefined>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource BillingAccountExclusion

class BillingAccountExclusion extends CustomResource

Manages a billing account logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with the provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myExclusion = new gcp.logging.BillingAccountExclusion("my-exclusion", {
    billingAccount: "ABCDEF-012345-GHIJKL",
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gceInstance AND severity <= DEBUG",
});

constructor

new BillingAccountExclusion(name: string, args: BillingAccountExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a BillingAccountExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BillingAccountExclusionState, opts?: pulumi.CustomResourceOptions): BillingAccountExclusion

Get an existing BillingAccountExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BillingAccountExclusion

Returns true if the given object is an instance of BillingAccountExclusion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property billingAccount

public billingAccount: pulumi.Output<string>;

The billing account to create the exclusion for.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource BillingAccountSink

class BillingAccountSink extends CustomResource

Manages a billing account logging sink. For more information see the official documentation and Exporting Logs in the API.

Note You must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted on the billing account to the credentials used with this provider. IAM roles granted on a billing account are separate from the typical IAM roles granted on a project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const logBucket = new gcp.storage.Bucket("log-bucket", {});
const mySink = new gcp.logging.BillingAccountSink("my-sink", {
    billingAccount: "ABCDEF-012345-GHIJKL",
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
});
const logWriter = new gcp.projects.IAMBinding("log-writer", {
    role: "roles/storage.objectCreator",
    members: [my_sink.writerIdentity],
});

constructor

new BillingAccountSink(name: string, args: BillingAccountSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a BillingAccountSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BillingAccountSinkState, opts?: pulumi.CustomResourceOptions): BillingAccountSink

Get an existing BillingAccountSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is BillingAccountSink

Returns true if the given object is an instance of BillingAccountSink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bigqueryOptions

public bigqueryOptions: pulumi.Output<BillingAccountSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property billingAccount

public billingAccount: pulumi.Output<string>;

The billing account exported to the sink.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

Resource FolderBucketConfig

class FolderBucketConfig extends CustomResource

Manages a folder-level logging bucket config. For more information see the official logging documentation and Storing Logs.

Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are “_Default” and “_Required”.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.organizations.Folder("default", {
    displayName: "some-folder-name",
    parent: "organizations/123456789",
});
const basic = new gcp.logging.FolderBucketConfig("basic", {
    folder: _default.name,
    location: "global",
    retentionDays: 30,
    bucketId: "_Default",
});

constructor

new FolderBucketConfig(name: string, args: FolderBucketConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a FolderBucketConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderBucketConfigState, opts?: pulumi.CustomResourceOptions): FolderBucketConfig

Get an existing FolderBucketConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is FolderBucketConfig

Returns true if the given object is an instance of FolderBucketConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketId

public bucketId: pulumi.Output<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

public description: pulumi.Output<string>;

Describes this bucket.

property folder

public folder: pulumi.Output<string>;

The parent resource that contains the logging bucket.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lifecycleState

public lifecycleState: pulumi.Output<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

public location: pulumi.Output<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

public name: pulumi.Output<string>;

The resource name of the bucket. For example: “folders/my-folder-id/locations/my-location/buckets/my-bucket-id”

property retentionDays

public retentionDays: pulumi.Output<number | undefined>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource FolderExclusion

class FolderExclusion extends CustomResource

Manages a folder-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with this provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myFolder = new gcp.organizations.Folder("my-folder", {
    displayName: "My folder",
    parent: "organizations/123456",
});
const myExclusion = new gcp.logging.FolderExclusion("my-exclusion", {
    folder: my_folder.name,
    description: "Exclude GCE instance debug logs",
    filter: "resource.type = gceInstance AND severity <= DEBUG",
});

constructor

new FolderExclusion(name: string, args: FolderExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a FolderExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderExclusionState, opts?: pulumi.CustomResourceOptions): FolderExclusion

Get an existing FolderExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is FolderExclusion

Returns true if the given object is an instance of FolderExclusion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

public folder: pulumi.Output<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource FolderSink

class FolderSink extends CustomResource

Manages a folder-level logging sink. For more information see the official documentation and Exporting Logs in the API.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with this provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const logBucket = new gcp.storage.Bucket("log-bucket", {});
const myFolder = new gcp.organizations.Folder("my-folder", {
    displayName: "My folder",
    parent: "organizations/123456",
});
const mySink = new gcp.logging.FolderSink("my-sink", {
    folder: my_folder.name,
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    filter: "resource.type = gceInstance AND severity >= WARN",
});
const logWriter = new gcp.projects.IAMBinding("log-writer", {
    role: "roles/storage.objectCreator",
    members: [my_sink.writerIdentity],
});

constructor

new FolderSink(name: string, args: FolderSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a FolderSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderSinkState, opts?: pulumi.CustomResourceOptions): FolderSink

Get an existing FolderSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is FolderSink

Returns true if the given object is an instance of FolderSink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bigqueryOptions

public bigqueryOptions: pulumi.Output<FolderSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples: “storage.googleapis.com/[GCS_BUCKET]” “bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]” “pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]” The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

public folder: pulumi.Output<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property includeChildren

public includeChildren: pulumi.Output<boolean | undefined>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

Resource Metric

class Metric extends CustomResource

Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.

To get more information about Metric, see:

Example Usage - Logging Metric Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const loggingMetric = new gcp.logging.Metric("loggingMetric", {
    bucketOptions: {
        linearBuckets: {
            numFiniteBuckets: 3,
            offset: 1,
            width: 1,
        },
    },
    filter: "resource.type=gae_app AND severity>=ERROR",
    labelExtractors: {
        mass: "EXTRACT(jsonPayload.request)",
        sku: "EXTRACT(jsonPayload.id)",
    },
    metricDescriptor: {
        displayName: "My metric",
        labels: [
            {
                description: "amount of matter",
                key: "mass",
                valueType: "STRING",
            },
            {
                description: "Identifying number for item",
                key: "sku",
                valueType: "INT64",
            },
        ],
        metricKind: "DELTA",
        unit: "1",
        valueType: "DISTRIBUTION",
    },
    valueExtractor: "EXTRACT(jsonPayload.request)",
});

Example Usage - Logging Metric Counter Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const loggingMetric = new gcp.logging.Metric("loggingMetric", {
    filter: "resource.type=gae_app AND severity>=ERROR",
    metricDescriptor: {
        metricKind: "DELTA",
        valueType: "INT64",
    },
});

Example Usage - Logging Metric Counter Labels

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const loggingMetric = new gcp.logging.Metric("loggingMetric", {
    filter: "resource.type=gae_app AND severity>=ERROR",
    labelExtractors: {
        mass: "EXTRACT(jsonPayload.request)",
    },
    metricDescriptor: {
        labels: [{
            description: "amount of matter",
            key: "mass",
            valueType: "STRING",
        }],
        metricKind: "DELTA",
        valueType: "INT64",
    },
});

constructor

new Metric(name: string, args: MetricArgs, opts?: pulumi.CustomResourceOptions)

Create a Metric resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MetricState, opts?: pulumi.CustomResourceOptions): Metric

Get an existing Metric resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Metric

Returns true if the given object is an instance of Metric. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketOptions

public bucketOptions: pulumi.Output<MetricBucketOptions | undefined>;

The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. Structure is documented below.

property description

public description: pulumi.Output<string | undefined>;

A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.

property filter

public filter: pulumi.Output<string>;

An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labelExtractors

public labelExtractors: pulumi.Output<{[key: string]: string} | undefined>;

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

property metricDescriptor

public metricDescriptor: pulumi.Output<MetricMetricDescriptor>;

The metric descriptor associated with the logs-based metric. Structure is documented below.

property name

public name: pulumi.Output<string>;

The client-assigned metric identifier. Examples - “errorCount”, “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 _-.,+!*‘,()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property valueExtractor

public valueExtractor: pulumi.Output<string | undefined>;

A valueExtractor 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 argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. 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 entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.

Resource OrganizationBucketConfig

class OrganizationBucketConfig extends CustomResource

Manages a organization-level logging bucket config. For more information see the official logging documentation and Storing Logs.

Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are “_Default” and “_Required”.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const default = gcp.organizations.getOrganization({
    organization: "123456789",
});
const basic = new gcp.logging.OrganizationBucketConfig("basic", {
    organization: _default.then(_default => _default.organization),
    location: "global",
    retentionDays: 30,
    bucketId: "_Default",
});

constructor

new OrganizationBucketConfig(name: string, args: OrganizationBucketConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a OrganizationBucketConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationBucketConfigState, opts?: pulumi.CustomResourceOptions): OrganizationBucketConfig

Get an existing OrganizationBucketConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is OrganizationBucketConfig

Returns true if the given object is an instance of OrganizationBucketConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketId

public bucketId: pulumi.Output<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

public description: pulumi.Output<string>;

Describes this bucket.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lifecycleState

public lifecycleState: pulumi.Output<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

public location: pulumi.Output<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

public name: pulumi.Output<string>;

The resource name of the bucket. For example: “organizations/my-organization-id/locations/my-location/buckets/my-bucket-id”

property organization

public organization: pulumi.Output<string>;

The parent resource that contains the logging bucket.

property retentionDays

public retentionDays: pulumi.Output<number | undefined>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource OrganizationExclusion

class OrganizationExclusion extends CustomResource

Manages an organization-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with this provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myExclusion = new gcp.logging.OrganizationExclusion("my-exclusion", {
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gceInstance AND severity <= DEBUG",
    orgId: "123456789",
});

constructor

new OrganizationExclusion(name: string, args: OrganizationExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a OrganizationExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationExclusionState, opts?: pulumi.CustomResourceOptions): OrganizationExclusion

Get an existing OrganizationExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is OrganizationExclusion

Returns true if the given object is an instance of OrganizationExclusion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property orgId

public orgId: pulumi.Output<string>;

The organization to create the exclusion in.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource OrganizationSink

class OrganizationSink extends CustomResource

Manages a organization-level logging sink. For more information see the official documentation and Exporting Logs in the API.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with this provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const logBucket = new gcp.storage.Bucket("log-bucket", {});
const mySink = new gcp.logging.OrganizationSink("my-sink", {
    orgId: "123456789",
    destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    filter: "resource.type = gceInstance AND severity >= WARN",
});
const logWriter = new gcp.projects.IAMMember("log-writer", {
    role: "roles/storage.objectCreator",
    member: my_sink.writerIdentity,
});

constructor

new OrganizationSink(name: string, args: OrganizationSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a OrganizationSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationSinkState, opts?: pulumi.CustomResourceOptions): OrganizationSink

Get an existing OrganizationSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is OrganizationSink

Returns true if the given object is an instance of OrganizationSink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bigqueryOptions

public bigqueryOptions: pulumi.Output<OrganizationSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property includeChildren

public includeChildren: pulumi.Output<boolean | undefined>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property orgId

public orgId: pulumi.Output<string>;

The numeric ID of the organization to be exported to the sink.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

Resource ProjectBucketConfig

class ProjectBucketConfig extends CustomResource

Manages a project-level logging bucket config. For more information see the official logging documentation and Storing Logs.

Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are “_Default” and “_Required”.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.organizations.Project("default", {
    projectId: "your-project-id",
    orgId: "123456789",
});
const basic = new gcp.logging.ProjectBucketConfig("basic", {
    project: _default.name,
    location: "global",
    retentionDays: 30,
    bucketId: "_Default",
});

constructor

new ProjectBucketConfig(name: string, args: ProjectBucketConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectBucketConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectBucketConfigState, opts?: pulumi.CustomResourceOptions): ProjectBucketConfig

Get an existing ProjectBucketConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectBucketConfig

Returns true if the given object is an instance of ProjectBucketConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bucketId

public bucketId: pulumi.Output<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

public description: pulumi.Output<string>;

Describes this bucket.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lifecycleState

public lifecycleState: pulumi.Output<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

public location: pulumi.Output<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

public name: pulumi.Output<string>;

The resource name of the bucket. For example: “projects/my-project-id/locations/my-location/buckets/my-bucket-id”

property project

public project: pulumi.Output<string>;

The parent resource that contains the logging bucket.

property retentionDays

public retentionDays: pulumi.Output<number | undefined>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ProjectExclusion

class ProjectExclusion extends CustomResource

Manages a project-level logging exclusion. For more information see the official documentation and Excluding Logs.

Note that you must have the “Logs Configuration Writer” IAM role (roles/logging.configWriter) granted to the credentials used with this provider.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myExclusion = new gcp.logging.ProjectExclusion("my-exclusion", {
    description: "Exclude GCE instance debug logs",
    // Exclude all DEBUG or lower severity messages relating to instances
    filter: "resource.type = gceInstance AND severity <= DEBUG",
});

constructor

new ProjectExclusion(name: string, args: ProjectExclusionArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectExclusion resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectExclusionState, opts?: pulumi.CustomResourceOptions): ProjectExclusion

Get an existing ProjectExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectExclusion

Returns true if the given object is an instance of ProjectExclusion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

A human-readable description.

property disabled

public disabled: pulumi.Output<boolean | undefined>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

public filter: pulumi.Output<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging exclusion.

property project

public project: pulumi.Output<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ProjectSink

class ProjectSink extends CustomResource

Manages a project-level logging sink. For more information see the official documentation, Exporting Logs in the API and API.

Note: You must have granted the “Logs Configuration Writer” IAM role (roles/logging.configWriter) to the credentials used with this provider.

Note You must enable the Cloud Resource Manager API

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const mySink = new gcp.logging.ProjectSink("my-sink", {
    // Can export to pubsub, cloud storage, or bigquery
    destination: "pubsub.googleapis.com/projects/my-project/topics/instance-activity",
    // Log all WARN or higher severity messages relating to instances
    filter: "resource.type = gceInstance AND severity >= WARN",
    // Use a unique writer (creates a unique service account used for writing)
    uniqueWriterIdentity: true,
});

constructor

new ProjectSink(name: string, args: ProjectSinkArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectSink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectSinkState, opts?: pulumi.CustomResourceOptions): ProjectSink

Get an existing ProjectSink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectSink

Returns true if the given object is an instance of ProjectSink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property bigqueryOptions

public bigqueryOptions: pulumi.Output<ProjectSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

public destination: pulumi.Output<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

public filter: pulumi.Output<string | undefined>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the logging sink.

property project

public project: pulumi.Output<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

public uniqueWriterIdentity: pulumi.Output<boolean | undefined>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writerIdentity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set uniqueWriterIdentity to true.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property writerIdentity

public writerIdentity: pulumi.Output<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

Others

interface BillingAccountBucketConfigArgs

interface BillingAccountBucketConfigArgs

The set of arguments for constructing a BillingAccountBucketConfig resource.

property billingAccount

billingAccount: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property bucketId

bucketId: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property location

location: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface BillingAccountBucketConfigState

interface BillingAccountBucketConfigState

Input properties used for looking up and filtering BillingAccountBucketConfig resources.

property billingAccount

billingAccount?: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property bucketId

bucketId?: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property lifecycleState

lifecycleState?: pulumi.Input<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

location?: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

name?: pulumi.Input<string>;

The resource name of the bucket. For example: “projects/my-project-id/locations/my-location/buckets/my-bucket-id”

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface BillingAccountExclusionArgs

interface BillingAccountExclusionArgs

The set of arguments for constructing a BillingAccountExclusion resource.

property billingAccount

billingAccount: pulumi.Input<string>;

The billing account to create the exclusion for.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface BillingAccountExclusionState

interface BillingAccountExclusionState

Input properties used for looking up and filtering BillingAccountExclusion resources.

property billingAccount

billingAccount?: pulumi.Input<string>;

The billing account to create the exclusion for.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface BillingAccountSinkArgs

interface BillingAccountSinkArgs

The set of arguments for constructing a BillingAccountSink resource.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<BillingAccountSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property billingAccount

billingAccount: pulumi.Input<string>;

The billing account exported to the sink.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

interface BillingAccountSinkState

interface BillingAccountSinkState

Input properties used for looking up and filtering BillingAccountSink resources.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<BillingAccountSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property billingAccount

billingAccount?: pulumi.Input<string>;

The billing account exported to the sink.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface FolderBucketConfigArgs

interface FolderBucketConfigArgs

The set of arguments for constructing a FolderBucketConfig resource.

property bucketId

bucketId: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property folder

folder: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property location

location: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface FolderBucketConfigState

interface FolderBucketConfigState

Input properties used for looking up and filtering FolderBucketConfig resources.

property bucketId

bucketId?: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property folder

folder?: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property lifecycleState

lifecycleState?: pulumi.Input<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

location?: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

name?: pulumi.Input<string>;

The resource name of the bucket. For example: “folders/my-folder-id/locations/my-location/buckets/my-bucket-id”

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface FolderExclusionArgs

interface FolderExclusionArgs

The set of arguments for constructing a FolderExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

folder: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface FolderExclusionState

interface FolderExclusionState

Input properties used for looking up and filtering FolderExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property folder

folder?: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

interface FolderSinkArgs

interface FolderSinkArgs

The set of arguments for constructing a FolderSink resource.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<FolderSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples: “storage.googleapis.com/[GCS_BUCKET]” “bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]” “pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]” The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

folder: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

interface FolderSinkState

interface FolderSinkState

Input properties used for looking up and filtering FolderSink resources.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<FolderSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples: “storage.googleapis.com/[GCS_BUCKET]” “bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]” “pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]” The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property folder

folder?: pulumi.Input<string>;

The folder to be exported to the sink. Note that either [FOLDER_ID] or “folders/[FOLDER_ID]” is accepted.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children folders in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided folder are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface MetricArgs

interface MetricArgs

The set of arguments for constructing a Metric resource.

property bucketOptions

bucketOptions?: pulumi.Input<MetricBucketOptions>;

The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. Structure is documented below.

property description

description?: pulumi.Input<string>;

A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.

property filter

filter: pulumi.Input<string>;

An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.

property labelExtractors

labelExtractors?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

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

property metricDescriptor

metricDescriptor: pulumi.Input<MetricMetricDescriptor>;

The metric descriptor associated with the logs-based metric. Structure is documented below.

property name

name?: pulumi.Input<string>;

The client-assigned metric identifier. Examples - “errorCount”, “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 _-.,+!*‘,()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property valueExtractor

valueExtractor?: pulumi.Input<string>;

A valueExtractor 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 argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. 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 entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.

interface MetricState

interface MetricState

Input properties used for looking up and filtering Metric resources.

property bucketOptions

bucketOptions?: pulumi.Input<MetricBucketOptions>;

The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. Structure is documented below.

property description

description?: pulumi.Input<string>;

A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.

property filter

filter?: pulumi.Input<string>;

An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.

property labelExtractors

labelExtractors?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

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

property metricDescriptor

metricDescriptor?: pulumi.Input<MetricMetricDescriptor>;

The metric descriptor associated with the logs-based metric. Structure is documented below.

property name

name?: pulumi.Input<string>;

The client-assigned metric identifier. Examples - “errorCount”, “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 _-.,+!*‘,()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property valueExtractor

valueExtractor?: pulumi.Input<string>;

A valueExtractor 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 argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. 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 entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.

interface OrganizationBucketConfigArgs

interface OrganizationBucketConfigArgs

The set of arguments for constructing a OrganizationBucketConfig resource.

property bucketId

bucketId: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property location

location: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property organization

organization: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface OrganizationBucketConfigState

interface OrganizationBucketConfigState

Input properties used for looking up and filtering OrganizationBucketConfig resources.

property bucketId

bucketId?: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property lifecycleState

lifecycleState?: pulumi.Input<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

location?: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

name?: pulumi.Input<string>;

The resource name of the bucket. For example: “organizations/my-organization-id/locations/my-location/buckets/my-bucket-id”

property organization

organization?: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface OrganizationExclusionArgs

interface OrganizationExclusionArgs

The set of arguments for constructing a OrganizationExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property orgId

orgId: pulumi.Input<string>;

The organization to create the exclusion in.

interface OrganizationExclusionState

interface OrganizationExclusionState

Input properties used for looking up and filtering OrganizationExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property orgId

orgId?: pulumi.Input<string>;

The organization to create the exclusion in.

interface OrganizationSinkArgs

interface OrganizationSinkArgs

The set of arguments for constructing a OrganizationSink resource.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<OrganizationSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property orgId

orgId: pulumi.Input<string>;

The numeric ID of the organization to be exported to the sink.

interface OrganizationSinkState

interface OrganizationSinkState

Input properties used for looking up and filtering OrganizationSink resources.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<OrganizationSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property includeChildren

includeChildren?: pulumi.Input<boolean>;

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property orgId

orgId?: pulumi.Input<string>;

The numeric ID of the organization to be exported to the sink.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.

interface ProjectBucketConfigArgs

interface ProjectBucketConfigArgs

The set of arguments for constructing a ProjectBucketConfig resource.

property bucketId

bucketId: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property location

location: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property project

project: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface ProjectBucketConfigState

interface ProjectBucketConfigState

Input properties used for looking up and filtering ProjectBucketConfig resources.

property bucketId

bucketId?: pulumi.Input<string>;

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

property description

description?: pulumi.Input<string>;

Describes this bucket.

property lifecycleState

lifecycleState?: pulumi.Input<string>;

The bucket’s lifecycle such as active or deleted. See LifecycleState.

property location

location?: pulumi.Input<string>;

The location of the bucket. The supported locations are: “global” “us-central1”

property name

name?: pulumi.Input<string>;

The resource name of the bucket. For example: “projects/my-project-id/locations/my-location/buckets/my-bucket-id”

property project

project?: pulumi.Input<string>;

The parent resource that contains the logging bucket.

property retentionDays

retentionDays?: pulumi.Input<number>;

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.

interface ProjectExclusionArgs

interface ProjectExclusionArgs

The set of arguments for constructing a ProjectExclusion resource.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property project

project?: pulumi.Input<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

interface ProjectExclusionState

interface ProjectExclusionState

Input properties used for looking up and filtering ProjectExclusion resources.

property description

description?: pulumi.Input<string>;

A human-readable description.

property disabled

disabled?: pulumi.Input<boolean>;

Whether this exclusion rule should be disabled or not. This defaults to false.

property filter

filter?: pulumi.Input<string>;

The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging exclusion.

property project

project?: pulumi.Input<string>;

The project to create the exclusion in. If omitted, the project associated with the provider is used.

interface ProjectSinkArgs

interface ProjectSinkArgs

The set of arguments for constructing a ProjectSink resource.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<ProjectSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property project

project?: pulumi.Input<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

uniqueWriterIdentity?: pulumi.Input<boolean>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writerIdentity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set uniqueWriterIdentity to true.

interface ProjectSinkState

interface ProjectSinkState

Input properties used for looking up and filtering ProjectSink resources.

property bigqueryOptions

bigqueryOptions?: pulumi.Input<ProjectSinkBigqueryOptions>;

Options that affect sinks exporting data to BigQuery. Structure documented below.

property destination

destination?: pulumi.Input<string>;

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, or a BigQuery dataset. Examples:

import * as pulumi from "@pulumi/pulumi";

The writer associated with the sink must have access to write to the above resource.

property filter

filter?: pulumi.Input<string>;

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

property name

name?: pulumi.Input<string>;

The name of the logging sink.

property project

project?: pulumi.Input<string>;

The ID of the project to create the sink in. If omitted, the project associated with the provider is used.

property uniqueWriterIdentity

uniqueWriterIdentity?: pulumi.Input<boolean>;

Whether or not to create a unique identity associated with this sink. If false (the default), then the writerIdentity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set uniqueWriterIdentity to true.

property writerIdentity

writerIdentity?: pulumi.Input<string>;

The identity associated with this sink. This identity must be granted write access to the configured destination.