Show / Hide Table of Contents

Class BillingAccountSink

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

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

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

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

}
Inheritance
System.Object
Resource
CustomResource
BillingAccountSink
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Logging
Assembly: Pulumi.Gcp.dll
Syntax
public class BillingAccountSink : CustomResource

Constructors

View Source

BillingAccountSink(String, BillingAccountSinkArgs, CustomResourceOptions)

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

Declaration
public BillingAccountSink(string name, BillingAccountSinkArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

BillingAccountSinkArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BigqueryOptions

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

Declaration
public Output<BillingAccountSinkBigqueryOptions> BigqueryOptions { get; }
Property Value
Type Description
Output<BillingAccountSinkBigqueryOptions>
View Source

BillingAccount

The billing account exported to the sink.

Declaration
public Output<string> BillingAccount { get; }
Property Value
Type Description
Output<System.String>
View Source

Destination

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

using Pulumi;
Declaration
public Output<string> Destination { get; }
Property Value
Type Description
Output<System.String>
View Source

Filter

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.

Declaration
public Output<string> Filter { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the logging sink.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

WriterIdentity

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

Declaration
public Output<string> WriterIdentity { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, BillingAccountSinkState, CustomResourceOptions)

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

Declaration
public static BillingAccountSink Get(string name, Input<string> id, BillingAccountSinkState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

BillingAccountSinkState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
BillingAccountSink
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.