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",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Logging
Assembly: Pulumi.Gcp.dll
Syntax
public class BillingAccountBucketConfig : CustomResource
Constructors
View SourceBillingAccountBucketConfig(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 SourceBillingAccount
The parent resource that contains the logging bucket.
Declaration
public Output<string> BillingAccount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
Description
Describes this bucket.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
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> |
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 SourceGet(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 |