Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

BillingAccountSink

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

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var log_bucket = new Gcp.Storage.Bucket("log-bucket", new Gcp.Storage.BucketArgs
        {
            Location = "US",
        });
        var my_sink = new Gcp.Logging.BillingAccountSink("my-sink", new Gcp.Logging.BillingAccountSinkArgs
        {
            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 Gcp.Projects.IAMBindingArgs
        {
            Project = "your-project-id",
            Role = "roles/storage.objectCreator",
            Members = 
            {
                my_sink.WriterIdentity,
            },
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/logging"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/projects"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			Location: pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		_, err = logging.NewBillingAccountSink(ctx, "my-sink", &logging.BillingAccountSinkArgs{
			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("%v%v", "storage.googleapis.com/", 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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()        
            .location("US")
            .build());

        var my_sink = new BillingAccountSink("my-sink", BillingAccountSinkArgs.builder()        
            .description("some explanation on what this is")
            .billingAccount("ABCDEF-012345-GHIJKL")
            .destination(log_bucket.getName().apply(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.getWriterIdentity())
            .build());

        }
}
import pulumi
import pulumi_gcp as gcp

log_bucket = gcp.storage.Bucket("log-bucket", location="US")
my_sink = gcp.logging.BillingAccountSink("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])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const log_bucket = new gcp.storage.Bucket("log-bucket", {location: "US"});
const my_sink = new gcp.logging.BillingAccountSink("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],
});
resources:
  my-sink:
    type: gcp:logging:BillingAccountSink
    properties:
      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:
      location: US
  log-writer:
    type: gcp:projects:IAMBinding
    properties:
      project: your-project-id
      role: roles/storage.objectCreator
      members:
        - ${["my-sink"].writerIdentity}

Create a BillingAccountSink Resource

new BillingAccountSink(name: string, args: BillingAccountSinkArgs, opts?: CustomResourceOptions);
@overload
def BillingAccountSink(resource_name: 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)
@overload
def BillingAccountSink(resource_name: str,
                       args: BillingAccountSinkArgs,
                       opts: Optional[ResourceOptions] = 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.

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.

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

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions List<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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions ListAccountSinkExclusionArgs>

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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

disabled boolean

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

disabled bool

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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 exclusion.

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List

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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 an 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 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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude any log entries.

Exclusions List<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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

Disabled bool

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions ListAccountSinkExclusionArgs>

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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

disabled boolean

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

disabled bool

If set to True, then this exclusion is disabled and it does not exclude 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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

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 exclusion.

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:

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

class MyStack : Stack { public MyStack() { }

}

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        }
}
{}

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

disabled Boolean

If set to True, then this exclusion is disabled and it does not exclude any log entries.

exclusions List

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 exclusion_filters it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

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.

writerIdentity String

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

Supporting Types

BillingAccountSinkBigqueryOptions

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

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.