1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. logging
  5. BillingAccountSink
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.logging.BillingAccountSink

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    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 log_bucket = new gcp.storage.Bucket("log-bucket", {
        name: "billing-logging-bucket",
        location: "US",
    });
    const my_sink = new gcp.logging.BillingAccountSink("my-sink", {
        name: "my-sink",
        description: "some explanation on what this is",
        billingAccount: "ABCDEF-012345-GHIJKL",
        destination: pulumi.interpolate`storage.googleapis.com/${log_bucket.name}`,
    });
    const log_writer = new gcp.projects.IAMBinding("log-writer", {
        project: "your-project-id",
        role: "roles/storage.objectCreator",
        members: [my_sink.writerIdentity],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    log_bucket = gcp.storage.Bucket("log-bucket",
        name="billing-logging-bucket",
        location="US")
    my_sink = gcp.logging.BillingAccountSink("my-sink",
        name="my-sink",
        description="some explanation on what this is",
        billing_account="ABCDEF-012345-GHIJKL",
        destination=log_bucket.name.apply(lambda name: f"storage.googleapis.com/{name}"))
    log_writer = gcp.projects.IAMBinding("log-writer",
        project="your-project-id",
        role="roles/storage.objectCreator",
        members=[my_sink.writer_identity])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storage.NewBucket(ctx, "log-bucket", &storage.BucketArgs{
    			Name:     pulumi.String("billing-logging-bucket"),
    			Location: pulumi.String("US"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = logging.NewBillingAccountSink(ctx, "my-sink", &logging.BillingAccountSinkArgs{
    			Name:           pulumi.String("my-sink"),
    			Description:    pulumi.String("some explanation on what this is"),
    			BillingAccount: pulumi.String("ABCDEF-012345-GHIJKL"),
    			Destination: log_bucket.Name.ApplyT(func(name string) (string, error) {
    				return fmt.Sprintf("storage.googleapis.com/%v", name), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = projects.NewIAMBinding(ctx, "log-writer", &projects.IAMBindingArgs{
    			Project: pulumi.String("your-project-id"),
    			Role:    pulumi.String("roles/storage.objectCreator"),
    			Members: pulumi.StringArray{
    				my_sink.WriterIdentity,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var log_bucket = new Gcp.Storage.Bucket("log-bucket", new()
        {
            Name = "billing-logging-bucket",
            Location = "US",
        });
    
        var my_sink = new Gcp.Logging.BillingAccountSink("my-sink", new()
        {
            Name = "my-sink",
            Description = "some explanation on what this is",
            BillingAccount = "ABCDEF-012345-GHIJKL",
            Destination = log_bucket.Name.Apply(name => $"storage.googleapis.com/{name}"),
        });
    
        var log_writer = new Gcp.Projects.IAMBinding("log-writer", new()
        {
            Project = "your-project-id",
            Role = "roles/storage.objectCreator",
            Members = new[]
            {
                my_sink.WriterIdentity,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.logging.BillingAccountSink;
    import com.pulumi.gcp.logging.BillingAccountSinkArgs;
    import com.pulumi.gcp.projects.IAMBinding;
    import com.pulumi.gcp.projects.IAMBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var log_bucket = new Bucket("log-bucket", BucketArgs.builder()
                .name("billing-logging-bucket")
                .location("US")
                .build());
    
            var my_sink = new BillingAccountSink("my-sink", BillingAccountSinkArgs.builder()
                .name("my-sink")
                .description("some explanation on what this is")
                .billingAccount("ABCDEF-012345-GHIJKL")
                .destination(log_bucket.name().applyValue(name -> String.format("storage.googleapis.com/%s", name)))
                .build());
    
            var log_writer = new IAMBinding("log-writer", IAMBindingArgs.builder()
                .project("your-project-id")
                .role("roles/storage.objectCreator")
                .members(my_sink.writerIdentity())
                .build());
    
        }
    }
    
    resources:
      my-sink:
        type: gcp:logging:BillingAccountSink
        properties:
          name: my-sink
          description: some explanation on what this is
          billingAccount: ABCDEF-012345-GHIJKL
          destination: storage.googleapis.com/${["log-bucket"].name}
      log-bucket:
        type: gcp:storage:Bucket
        properties:
          name: billing-logging-bucket
          location: US
      log-writer:
        type: gcp:projects:IAMBinding
        properties:
          project: your-project-id
          role: roles/storage.objectCreator
          members:
            - ${["my-sink"].writerIdentity}
    

    Create BillingAccountSink Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BillingAccountSink(name: string, args: BillingAccountSinkArgs, opts?: CustomResourceOptions);
    @overload
    def BillingAccountSink(resource_name: str,
                           args: BillingAccountSinkArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def BillingAccountSink(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           billing_account: Optional[str] = None,
                           destination: Optional[str] = None,
                           bigquery_options: Optional[BillingAccountSinkBigqueryOptionsArgs] = None,
                           description: Optional[str] = None,
                           disabled: Optional[bool] = None,
                           exclusions: Optional[Sequence[BillingAccountSinkExclusionArgs]] = None,
                           filter: Optional[str] = None,
                           name: Optional[str] = None)
    func NewBillingAccountSink(ctx *Context, name string, args BillingAccountSinkArgs, opts ...ResourceOption) (*BillingAccountSink, error)
    public BillingAccountSink(string name, BillingAccountSinkArgs args, CustomResourceOptions? opts = null)
    public BillingAccountSink(String name, BillingAccountSinkArgs args)
    public BillingAccountSink(String name, BillingAccountSinkArgs args, CustomResourceOptions options)
    
    type: gcp:logging:BillingAccountSink
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BillingAccountSinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BillingAccountSinkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BillingAccountSinkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BillingAccountSinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BillingAccountSinkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var billingAccountSinkResource = new Gcp.Logging.BillingAccountSink("billingAccountSinkResource", new()
    {
        BillingAccount = "string",
        Destination = "string",
        BigqueryOptions = new Gcp.Logging.Inputs.BillingAccountSinkBigqueryOptionsArgs
        {
            UsePartitionedTables = false,
        },
        Description = "string",
        Disabled = false,
        Exclusions = new[]
        {
            new Gcp.Logging.Inputs.BillingAccountSinkExclusionArgs
            {
                Filter = "string",
                Name = "string",
                Description = "string",
                Disabled = false,
            },
        },
        Filter = "string",
        Name = "string",
    });
    
    example, err := logging.NewBillingAccountSink(ctx, "billingAccountSinkResource", &logging.BillingAccountSinkArgs{
    	BillingAccount: pulumi.String("string"),
    	Destination:    pulumi.String("string"),
    	BigqueryOptions: &logging.BillingAccountSinkBigqueryOptionsArgs{
    		UsePartitionedTables: pulumi.Bool(false),
    	},
    	Description: pulumi.String("string"),
    	Disabled:    pulumi.Bool(false),
    	Exclusions: logging.BillingAccountSinkExclusionArray{
    		&logging.BillingAccountSinkExclusionArgs{
    			Filter:      pulumi.String("string"),
    			Name:        pulumi.String("string"),
    			Description: pulumi.String("string"),
    			Disabled:    pulumi.Bool(false),
    		},
    	},
    	Filter: pulumi.String("string"),
    	Name:   pulumi.String("string"),
    })
    
    var billingAccountSinkResource = new BillingAccountSink("billingAccountSinkResource", BillingAccountSinkArgs.builder()
        .billingAccount("string")
        .destination("string")
        .bigqueryOptions(BillingAccountSinkBigqueryOptionsArgs.builder()
            .usePartitionedTables(false)
            .build())
        .description("string")
        .disabled(false)
        .exclusions(BillingAccountSinkExclusionArgs.builder()
            .filter("string")
            .name("string")
            .description("string")
            .disabled(false)
            .build())
        .filter("string")
        .name("string")
        .build());
    
    billing_account_sink_resource = gcp.logging.BillingAccountSink("billingAccountSinkResource",
        billing_account="string",
        destination="string",
        bigquery_options={
            "use_partitioned_tables": False,
        },
        description="string",
        disabled=False,
        exclusions=[{
            "filter": "string",
            "name": "string",
            "description": "string",
            "disabled": False,
        }],
        filter="string",
        name="string")
    
    const billingAccountSinkResource = new gcp.logging.BillingAccountSink("billingAccountSinkResource", {
        billingAccount: "string",
        destination: "string",
        bigqueryOptions: {
            usePartitionedTables: false,
        },
        description: "string",
        disabled: false,
        exclusions: [{
            filter: "string",
            name: "string",
            description: "string",
            disabled: false,
        }],
        filter: "string",
        name: "string",
    });
    
    type: gcp:logging:BillingAccountSink
    properties:
        bigqueryOptions:
            usePartitionedTables: false
        billingAccount: string
        description: string
        destination: string
        disabled: false
        exclusions:
            - description: string
              disabled: false
              filter: string
              name: string
        filter: string
        name: string
    

    BillingAccountSink Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BillingAccountSink resource accepts the following input properties:

    BillingAccount string
    The billing account exported to the sink.
    Destination string

    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 or a Cloud Logging bucket. 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]

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

    BigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    Description string
    A description of this sink. The maximum length of the description is 8000 characters.
    Disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    Exclusions List<BillingAccountSinkExclusion>
    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.
    Filter 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.
    Name string
    The name of the logging sink.
    BillingAccount string
    The billing account exported to the sink.
    Destination string

    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 or a Cloud Logging bucket. 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]

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

    BigqueryOptions BillingAccountSinkBigqueryOptionsArgs
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    Description string
    A description of this sink. The maximum length of the description is 8000 characters.
    Disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    Exclusions []BillingAccountSinkExclusionArgs
    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.
    Filter 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.
    Name string
    The name of the logging sink.
    billingAccount String
    The billing account exported to the sink.
    destination String

    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 or a Cloud Logging bucket. 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]

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

    bigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    description String
    A description of this sink. The maximum length of the description is 8000 characters.
    disabled Boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions List<BillingAccountSinkExclusion>
    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.
    filter 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.
    name String
    The name of the logging sink.
    billingAccount string
    The billing account exported to the sink.
    destination string

    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 or a Cloud Logging bucket. 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]

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

    bigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    description string
    A description of this sink. The maximum length of the description is 8000 characters.
    disabled boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions BillingAccountSinkExclusion[]
    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.
    filter 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.
    name string
    The name of the logging sink.
    billing_account str
    The billing account exported to the sink.
    destination str

    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 or a Cloud Logging bucket. 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]

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

    bigquery_options BillingAccountSinkBigqueryOptionsArgs
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    description str
    A description of this sink. The maximum length of the description is 8000 characters.
    disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions Sequence[BillingAccountSinkExclusionArgs]
    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.
    filter str
    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.
    name str
    The name of the logging sink.
    billingAccount String
    The billing account exported to the sink.
    destination String

    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 or a Cloud Logging bucket. 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]

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

    bigqueryOptions Property Map
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    description String
    A description of this sink. The maximum length of the description is 8000 characters.
    disabled Boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions List<Property Map>
    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.
    filter 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.
    name String
    The name of the logging sink.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BillingAccountSink resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    WriterIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    Id string
    The provider-assigned unique ID for this managed resource.
    WriterIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    id String
    The provider-assigned unique ID for this managed resource.
    writerIdentity String
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    id string
    The provider-assigned unique ID for this managed resource.
    writerIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    id str
    The provider-assigned unique ID for this managed resource.
    writer_identity str
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    id String
    The provider-assigned unique ID for this managed resource.
    writerIdentity String
    The identity associated with this sink. This identity must be granted write access to the configured destination.

    Look up Existing BillingAccountSink Resource

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

    public static get(name: string, id: Input<ID>, state?: BillingAccountSinkState, opts?: CustomResourceOptions): BillingAccountSink
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bigquery_options: Optional[BillingAccountSinkBigqueryOptionsArgs] = None,
            billing_account: Optional[str] = None,
            description: Optional[str] = None,
            destination: Optional[str] = None,
            disabled: Optional[bool] = None,
            exclusions: Optional[Sequence[BillingAccountSinkExclusionArgs]] = None,
            filter: Optional[str] = None,
            name: Optional[str] = None,
            writer_identity: Optional[str] = None) -> BillingAccountSink
    func GetBillingAccountSink(ctx *Context, name string, id IDInput, state *BillingAccountSinkState, opts ...ResourceOption) (*BillingAccountSink, error)
    public static BillingAccountSink Get(string name, Input<string> id, BillingAccountSinkState? state, CustomResourceOptions? opts = null)
    public static BillingAccountSink get(String name, Output<String> id, BillingAccountSinkState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    BillingAccount string
    The billing account exported to the sink.
    Description string
    A description of this sink. The maximum length of the description is 8000 characters.
    Destination string

    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 or a Cloud Logging bucket. 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]

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

    Disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    Exclusions List<BillingAccountSinkExclusion>
    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.
    Filter 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.
    Name string
    The name of the logging sink.
    WriterIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    BigqueryOptions BillingAccountSinkBigqueryOptionsArgs
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    BillingAccount string
    The billing account exported to the sink.
    Description string
    A description of this sink. The maximum length of the description is 8000 characters.
    Destination string

    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 or a Cloud Logging bucket. 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]

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

    Disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    Exclusions []BillingAccountSinkExclusionArgs
    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.
    Filter 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.
    Name string
    The name of the logging sink.
    WriterIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    bigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    billingAccount String
    The billing account exported to the sink.
    description String
    A description of this sink. The maximum length of the description is 8000 characters.
    destination String

    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 or a Cloud Logging bucket. 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]

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

    disabled Boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions List<BillingAccountSinkExclusion>
    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.
    filter 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.
    name String
    The name of the logging sink.
    writerIdentity String
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    bigqueryOptions BillingAccountSinkBigqueryOptions
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    billingAccount string
    The billing account exported to the sink.
    description string
    A description of this sink. The maximum length of the description is 8000 characters.
    destination string

    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 or a Cloud Logging bucket. 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]

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

    disabled boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions BillingAccountSinkExclusion[]
    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.
    filter 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.
    name string
    The name of the logging sink.
    writerIdentity string
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    bigquery_options BillingAccountSinkBigqueryOptionsArgs
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    billing_account str
    The billing account exported to the sink.
    description str
    A description of this sink. The maximum length of the description is 8000 characters.
    destination str

    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 or a Cloud Logging bucket. 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]

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

    disabled bool
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions Sequence[BillingAccountSinkExclusionArgs]
    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.
    filter str
    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.
    name str
    The name of the logging sink.
    writer_identity str
    The identity associated with this sink. This identity must be granted write access to the configured destination.
    bigqueryOptions Property Map
    Options that affect sinks exporting data to BigQuery. Structure documented below.
    billingAccount String
    The billing account exported to the sink.
    description String
    A description of this sink. The maximum length of the description is 8000 characters.
    destination String

    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 or a Cloud Logging bucket. 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]

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

    disabled Boolean
    If set to True, then this sink is disabled and it does not export any log entries.
    exclusions List<Property Map>
    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.
    filter 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.
    name String
    The name of the logging sink.
    writerIdentity String
    The identity associated with this sink. This identity must be granted write access to the configured destination.

    Supporting Types

    BillingAccountSinkBigqueryOptions, BillingAccountSinkBigqueryOptionsArgs

    UsePartitionedTables bool
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.
    UsePartitionedTables bool
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.
    usePartitionedTables Boolean
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.
    usePartitionedTables boolean
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.
    use_partitioned_tables bool
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.
    usePartitionedTables Boolean
    Whether to use BigQuery's partition tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables, the date suffix is no longer present and special query syntax has to be used instead. In both cases, tables are sharded based on UTC timezone.

    BillingAccountSinkExclusion, BillingAccountSinkExclusionArgs

    Filter string
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    Name string
    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.
    Description string
    A description of this exclusion.
    Disabled bool
    If set to True, then this exclusion is disabled and it does not exclude any log entries.
    Filter string
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    Name string
    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.
    Description string
    A description of this exclusion.
    Disabled bool
    If set to True, then this exclusion is disabled and it does not exclude any log entries.
    filter String
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    name String
    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.
    description String
    A description of this exclusion.
    disabled Boolean
    If set to True, then this exclusion is disabled and it does not exclude any log entries.
    filter string
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    name string
    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.
    description string
    A description of this exclusion.
    disabled boolean
    If set to True, then this exclusion is disabled and it does not exclude any log entries.
    filter str
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    name str
    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.
    description str
    A description of this exclusion.
    disabled bool
    If set to True, then this exclusion is disabled and it does not exclude any log entries.
    filter String
    An advanced logs filter that matches the log entries to be excluded. By using the sample function, you can exclude less than 100% of the matching log entries. See Advanced Log Filters for information on how to write a filter.
    name String
    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.
    description String
    A description of this exclusion.
    disabled Boolean
    If set to True, then this exclusion is disabled and it does not exclude any log entries.

    Import

    Billing account logging sinks can be imported using this format:

    • billingAccounts/{{billing_account_id}}/sinks/{{sink_id}}

    When using the pulumi import command, billing account logging sinks can be imported using one of the formats above. For example:

    $ pulumi import gcp:logging/billingAccountSink:BillingAccountSink default billingAccounts/{{billing_account_id}}/sinks/{{sink_id}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi