Show / Hide Table of Contents

Class BillingAccountBucketConfig

Manages a billing account level logging bucket config. For more information see the official logging documentation and Storing Logs.

Note: Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your state but will leave the logging bucket unchanged. The buckets that are currently automatically created are "_Default" and "_Required".

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var @default = Output.Create(Gcp.Organizations.GetBillingAccount.InvokeAsync(new Gcp.Organizations.GetBillingAccountArgs
    {
        BillingAccount = "00AA00-000AAA-00AA0A",
    }));
    var basic = new Gcp.Logging.BillingAccountBucketConfig("basic", new Gcp.Logging.BillingAccountBucketConfigArgs
    {
        BillingAccount = @default.Apply(@default => @default.BillingAccount),
        Location = "global",
        RetentionDays = 30,
        BucketId = "_Default",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BillingAccountBucketConfig
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 BillingAccountBucketConfig : CustomResource

Constructors

View Source

BillingAccountBucketConfig(String, BillingAccountBucketConfigArgs, CustomResourceOptions)

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

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

The unique name of the resource

BillingAccountBucketConfigArgs 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

BillingAccount

The parent resource that contains the logging bucket.

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

BucketId

The name of the logging bucket. Logging automatically creates two log buckets: _Required and _Default.

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

Description

Describes this bucket.

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

LifecycleState

The bucket's lifecycle such as active or deleted. See LifecycleState.

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

Location

The location of the bucket. The supported locations are: "global" "us-central1"

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

Name

The resource name of the bucket. For example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id"

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

RetentionDays

Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used.

Declaration
public Output<int?> RetentionDays { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>

Methods

View Source

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

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

Declaration
public static BillingAccountBucketConfig Get(string name, Input<string> id, BillingAccountBucketConfigState 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.

BillingAccountBucketConfigState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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