gcp.logging.BillingAccountExclusion

Import

Billing account logging exclusions can be imported using their URI, e.g.

 $ pulumi import gcp:logging/billingAccountExclusion:BillingAccountExclusion my_exclusion billingAccounts/my-billing_account/exclusions/my-exclusion

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var my_exclusion = new Gcp.Logging.BillingAccountExclusion("my-exclusion", new()
    {
        BillingAccount = "ABCDEF-012345-GHIJKL",
        Description = "Exclude GCE instance debug logs",
        Filter = "resource.type = gce_instance AND severity <= DEBUG",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/logging"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := logging.NewBillingAccountExclusion(ctx, "my-exclusion", &logging.BillingAccountExclusionArgs{
			BillingAccount: pulumi.String("ABCDEF-012345-GHIJKL"),
			Description:    pulumi.String("Exclude GCE instance debug logs"),
			Filter:         pulumi.String("resource.type = gce_instance AND severity <= DEBUG"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.BillingAccountExclusion;
import com.pulumi.gcp.logging.BillingAccountExclusionArgs;
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 my_exclusion = new BillingAccountExclusion("my-exclusion", BillingAccountExclusionArgs.builder()        
            .billingAccount("ABCDEF-012345-GHIJKL")
            .description("Exclude GCE instance debug logs")
            .filter("resource.type = gce_instance AND severity <= DEBUG")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

my_exclusion = gcp.logging.BillingAccountExclusion("my-exclusion",
    billing_account="ABCDEF-012345-GHIJKL",
    description="Exclude GCE instance debug logs",
    filter="resource.type = gce_instance AND severity <= DEBUG")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

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

Create BillingAccountExclusion Resource

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

name string
The unique name of the resource.
args BillingAccountExclusionArgs
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 BillingAccountExclusionArgs
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 BillingAccountExclusionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BillingAccountExclusionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BillingAccountExclusionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BillingAccountExclusion 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 BillingAccountExclusion resource accepts the following input properties:

BillingAccount string

The billing account to create the exclusion for.

Filter string

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

Description string

A human-readable description.

Disabled bool

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

Name string

The name of the logging exclusion.

BillingAccount string

The billing account to create the exclusion for.

Filter string

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

Description string

A human-readable description.

Disabled bool

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

Name string

The name of the logging exclusion.

billingAccount String

The billing account to create the exclusion for.

filter String

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

description String

A human-readable description.

disabled Boolean

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

name String

The name of the logging exclusion.

billingAccount string

The billing account to create the exclusion for.

filter string

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

description string

A human-readable description.

disabled boolean

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

name string

The name of the logging exclusion.

billing_account str

The billing account to create the exclusion for.

filter str

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

description str

A human-readable description.

disabled bool

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

name str

The name of the logging exclusion.

billingAccount String

The billing account to create the exclusion for.

filter String

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

description String

A human-readable description.

disabled Boolean

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

name String

The name of the logging exclusion.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing BillingAccountExclusion Resource

Get an existing BillingAccountExclusion 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?: BillingAccountExclusionState, opts?: CustomResourceOptions): BillingAccountExclusion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        billing_account: Optional[str] = None,
        description: Optional[str] = None,
        disabled: Optional[bool] = None,
        filter: Optional[str] = None,
        name: Optional[str] = None) -> BillingAccountExclusion
func GetBillingAccountExclusion(ctx *Context, name string, id IDInput, state *BillingAccountExclusionState, opts ...ResourceOption) (*BillingAccountExclusion, error)
public static BillingAccountExclusion Get(string name, Input<string> id, BillingAccountExclusionState? state, CustomResourceOptions? opts = null)
public static BillingAccountExclusion get(String name, Output<String> id, BillingAccountExclusionState 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:
BillingAccount string

The billing account to create the exclusion for.

Description string

A human-readable description.

Disabled bool

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

Filter string

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

Name string

The name of the logging exclusion.

BillingAccount string

The billing account to create the exclusion for.

Description string

A human-readable description.

Disabled bool

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

Filter string

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

Name string

The name of the logging exclusion.

billingAccount String

The billing account to create the exclusion for.

description String

A human-readable description.

disabled Boolean

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

filter String

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

name String

The name of the logging exclusion.

billingAccount string

The billing account to create the exclusion for.

description string

A human-readable description.

disabled boolean

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

filter string

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

name string

The name of the logging exclusion.

billing_account str

The billing account to create the exclusion for.

description str

A human-readable description.

disabled bool

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

filter str

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

name str

The name of the logging exclusion.

billingAccount String

The billing account to create the exclusion for.

description String

A human-readable description.

disabled Boolean

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

filter String

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

name String

The name of the logging exclusion.

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.