import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * ## Import * * Project-level logging sinks can be imported using their URI, e.g. * * * `projects/{{project_id}}/sinks/{{name}}` * * When using the `pulumi import` command, project-level logging sinks can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:logging/projectSink:ProjectSink default projects/{{project_id}}/sinks/{{name}} * ``` */ export declare class ProjectSink extends pulumi.CustomResource { /** * Get an existing ProjectSink resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ProjectSinkState, opts?: pulumi.CustomResourceOptions): 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. */ static isInstance(obj: any): obj is ProjectSink; /** * Options that affect sinks exporting data to BigQuery. Structure documented below. */ readonly bigqueryOptions: pulumi.Output; /** * A user managed service account that will be used to write * the log entries. The format must be `serviceAccount:some@email`. This field can only be specified if you are * routing logs to a destination outside this sink's project. If not specified, a Logging service account * will automatically be generated. */ readonly customWriterIdentity: pulumi.Output; /** * A description of this sink. The maximum length of the description is 8000 characters. */ readonly description: pulumi.Output; /** * The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, a BigQuery dataset, a Cloud Logging bucket, or a Google Cloud project. Examples: * * - `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]/locations/global/buckets/[BUCKET_ID]` * - `logging.googleapis.com/projects/[PROJECT_ID]` * * The writer associated with the sink must have access to write to the above resource. */ readonly destination: pulumi.Output; /** * If set to True, then this sink is disabled and it does not export any log entries. */ readonly disabled: pulumi.Output; /** * Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both `filter` and one of `exclusions.filter`, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below. */ readonly exclusions: pulumi.Output; /** * The filter to apply when exporting logs. Only log entries that match the filter are exported. * See [Advanced Log Filters](https://cloud.google.com/logging/docs/view/advanced_filters) for information on how to * write a filter. */ readonly filter: pulumi.Output; /** * The name of the logging sink. Logging automatically creates two sinks: `_Required` and `_Default`. */ readonly name: pulumi.Output; /** * The ID of the project to create the sink in. If omitted, the project associated with the provider is * used. */ readonly project: pulumi.Output; /** * Whether or not to create a unique identity associated with this sink. If `false`, then the `writerIdentity` used is `serviceAccount:cloud-logs@system.gserviceaccount.com`. If `true` (the default), * then a unique service account is created and used for this sink. If you wish to publish logs across projects or utilize * `bigqueryOptions`, you must set `uniqueWriterIdentity` to true. */ readonly uniqueWriterIdentity: pulumi.Output; /** * The identity associated with this sink. This identity must be granted write access to the * configured `destination`. */ readonly writerIdentity: pulumi.Output; /** * Create a ProjectSink resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ProjectSinkArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ProjectSink resources. */ export interface ProjectSinkState { /** * Options that affect sinks exporting data to BigQuery. Structure documented below. */ bigqueryOptions?: pulumi.Input; /** * A user managed service account that will be used to write * the log entries. The format must be `serviceAccount:some@email`. This field can only be specified if you are * routing logs to a destination outside this sink's project. If not specified, a Logging service account * will automatically be generated. */ customWriterIdentity?: pulumi.Input; /** * A description of this sink. The maximum length of the description is 8000 characters. */ description?: pulumi.Input; /** * The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, a BigQuery dataset, a Cloud Logging bucket, or a Google Cloud project. Examples: * * - `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]/locations/global/buckets/[BUCKET_ID]` * - `logging.googleapis.com/projects/[PROJECT_ID]` * * The writer associated with the sink must have access to write to the above resource. */ destination?: pulumi.Input; /** * If set to True, then this sink is disabled and it does not export any log entries. */ disabled?: pulumi.Input; /** * Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both `filter` and one of `exclusions.filter`, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below. */ exclusions?: pulumi.Input[]>; /** * The filter to apply when exporting logs. Only log entries that match the filter are exported. * See [Advanced Log Filters](https://cloud.google.com/logging/docs/view/advanced_filters) for information on how to * write a filter. */ filter?: pulumi.Input; /** * The name of the logging sink. Logging automatically creates two sinks: `_Required` and `_Default`. */ name?: pulumi.Input; /** * The ID of the project to create the sink in. If omitted, the project associated with the provider is * used. */ project?: pulumi.Input; /** * Whether or not to create a unique identity associated with this sink. If `false`, then the `writerIdentity` used is `serviceAccount:cloud-logs@system.gserviceaccount.com`. If `true` (the default), * then a unique service account is created and used for this sink. If you wish to publish logs across projects or utilize * `bigqueryOptions`, you must set `uniqueWriterIdentity` to true. */ uniqueWriterIdentity?: pulumi.Input; /** * The identity associated with this sink. This identity must be granted write access to the * configured `destination`. */ writerIdentity?: pulumi.Input; } /** * The set of arguments for constructing a ProjectSink resource. */ export interface ProjectSinkArgs { /** * Options that affect sinks exporting data to BigQuery. Structure documented below. */ bigqueryOptions?: pulumi.Input; /** * A user managed service account that will be used to write * the log entries. The format must be `serviceAccount:some@email`. This field can only be specified if you are * routing logs to a destination outside this sink's project. If not specified, a Logging service account * will automatically be generated. */ customWriterIdentity?: pulumi.Input; /** * A description of this sink. The maximum length of the description is 8000 characters. */ description?: pulumi.Input; /** * The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, a BigQuery dataset, a Cloud Logging bucket, or a Google Cloud project. Examples: * * - `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]/locations/global/buckets/[BUCKET_ID]` * - `logging.googleapis.com/projects/[PROJECT_ID]` * * The writer associated with the sink must have access to write to the above resource. */ destination: pulumi.Input; /** * If set to True, then this sink is disabled and it does not export any log entries. */ disabled?: pulumi.Input; /** * Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both `filter` and one of `exclusions.filter`, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below. */ exclusions?: pulumi.Input[]>; /** * The filter to apply when exporting logs. Only log entries that match the filter are exported. * See [Advanced Log Filters](https://cloud.google.com/logging/docs/view/advanced_filters) for information on how to * write a filter. */ filter?: pulumi.Input; /** * The name of the logging sink. Logging automatically creates two sinks: `_Required` and `_Default`. */ name?: pulumi.Input; /** * The ID of the project to create the sink in. If omitted, the project associated with the provider is * used. */ project?: pulumi.Input; /** * Whether or not to create a unique identity associated with this sink. If `false`, then the `writerIdentity` used is `serviceAccount:cloud-logs@system.gserviceaccount.com`. If `true` (the default), * then a unique service account is created and used for this sink. If you wish to publish logs across projects or utilize * `bigqueryOptions`, you must set `uniqueWriterIdentity` to true. */ uniqueWriterIdentity?: pulumi.Input; }