Show / Hide Table of Contents

Class OrganizationBucketConfig

Manages a organization-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.GetOrganization.InvokeAsync(new Gcp.Organizations.GetOrganizationArgs
    {
        Organization = "123456789",
    }));
    var basic = new Gcp.Logging.OrganizationBucketConfig("basic", new Gcp.Logging.OrganizationBucketConfigArgs
    {
        Organization = @default.Apply(@default => @default.Organization),
        Location = "global",
        RetentionDays = 30,
        BucketId = "_Default",
    });
}

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

Constructors

View Source

OrganizationBucketConfig(String, OrganizationBucketConfigArgs, CustomResourceOptions)

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

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

The unique name of the resource

OrganizationBucketConfigArgs 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

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: "organizations/my-organization-id/locations/my-location/buckets/my-bucket-id"

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

Organization

The parent resource that contains the logging bucket.

Declaration
public Output<string> Organization { 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>, OrganizationBucketConfigState, CustomResourceOptions)

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

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

OrganizationBucketConfigState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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