1. Packages
  2. Volcengine
  3. API Docs
  4. tos
  5. BucketRealtimeLog
Volcengine v0.0.28 published on Thursday, Apr 24, 2025 by Volcengine

volcengine.tos.BucketRealtimeLog

Explore with Pulumi AI

Provides a resource to manage tos bucket realtime log

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";

// When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
const foo = new volcengine.tos.BucketRealtimeLog("foo", {
    accessLogConfiguration: {
        ttl: 6,
    },
    bucketName: "terraform-demo",
    role: "TOSLogArchiveTLSRole",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

# When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
foo = volcengine.tos.BucketRealtimeLog("foo",
    access_log_configuration=volcengine.tos.BucketRealtimeLogAccessLogConfigurationArgs(
        ttl=6,
    ),
    bucket_name="terraform-demo",
    role="TOSLogArchiveTLSRole")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tos"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
		_, err := tos.NewBucketRealtimeLog(ctx, "foo", &tos.BucketRealtimeLogArgs{
			AccessLogConfiguration: &tos.BucketRealtimeLogAccessLogConfigurationArgs{
				Ttl: pulumi.Int(6),
			},
			BucketName: pulumi.String("terraform-demo"),
			Role:       pulumi.String("TOSLogArchiveTLSRole"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    // When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
    var foo = new Volcengine.Tos.BucketRealtimeLog("foo", new()
    {
        AccessLogConfiguration = new Volcengine.Tos.Inputs.BucketRealtimeLogAccessLogConfigurationArgs
        {
            Ttl = 6,
        },
        BucketName = "terraform-demo",
        Role = "TOSLogArchiveTLSRole",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tos.BucketRealtimeLog;
import com.pulumi.volcengine.tos.BucketRealtimeLogArgs;
import com.pulumi.volcengine.tos.inputs.BucketRealtimeLogAccessLogConfigurationArgs;
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) {
        // When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
        var foo = new BucketRealtimeLog("foo", BucketRealtimeLogArgs.builder()        
            .accessLogConfiguration(BucketRealtimeLogAccessLogConfigurationArgs.builder()
                .ttl(6)
                .build())
            .bucketName("terraform-demo")
            .role("TOSLogArchiveTLSRole")
            .build());

    }
}
Copy
resources:
  # When deleting this resource, the tls related resources such as project and topic will not be automatically deleted
  foo:
    type: volcengine:tos:BucketRealtimeLog
    properties:
      accessLogConfiguration:
        ttl: 6
      bucketName: terraform-demo
      role: TOSLogArchiveTLSRole
Copy

Create BucketRealtimeLog Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BucketRealtimeLog(name: string, args: BucketRealtimeLogArgs, opts?: CustomResourceOptions);
@overload
def BucketRealtimeLog(resource_name: str,
                      args: BucketRealtimeLogArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def BucketRealtimeLog(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      access_log_configuration: Optional[BucketRealtimeLogAccessLogConfigurationArgs] = None,
                      bucket_name: Optional[str] = None,
                      role: Optional[str] = None)
func NewBucketRealtimeLog(ctx *Context, name string, args BucketRealtimeLogArgs, opts ...ResourceOption) (*BucketRealtimeLog, error)
public BucketRealtimeLog(string name, BucketRealtimeLogArgs args, CustomResourceOptions? opts = null)
public BucketRealtimeLog(String name, BucketRealtimeLogArgs args)
public BucketRealtimeLog(String name, BucketRealtimeLogArgs args, CustomResourceOptions options)
type: volcengine:tos:BucketRealtimeLog
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BucketRealtimeLogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BucketRealtimeLogArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BucketRealtimeLogArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BucketRealtimeLogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BucketRealtimeLogArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var bucketRealtimeLogResource = new Volcengine.Tos.BucketRealtimeLog("bucketRealtimeLogResource", new()
{
    AccessLogConfiguration = new Volcengine.Tos.Inputs.BucketRealtimeLogAccessLogConfigurationArgs
    {
        TlsDashboardId = "string",
        TlsProjectId = "string",
        TlsTopicId = "string",
        Ttl = 0,
    },
    BucketName = "string",
    Role = "string",
});
Copy
example, err := tos.NewBucketRealtimeLog(ctx, "bucketRealtimeLogResource", &tos.BucketRealtimeLogArgs{
	AccessLogConfiguration: &tos.BucketRealtimeLogAccessLogConfigurationArgs{
		TlsDashboardId: pulumi.String("string"),
		TlsProjectId:   pulumi.String("string"),
		TlsTopicId:     pulumi.String("string"),
		Ttl:            pulumi.Int(0),
	},
	BucketName: pulumi.String("string"),
	Role:       pulumi.String("string"),
})
Copy
var bucketRealtimeLogResource = new BucketRealtimeLog("bucketRealtimeLogResource", BucketRealtimeLogArgs.builder()
    .accessLogConfiguration(BucketRealtimeLogAccessLogConfigurationArgs.builder()
        .tlsDashboardId("string")
        .tlsProjectId("string")
        .tlsTopicId("string")
        .ttl(0)
        .build())
    .bucketName("string")
    .role("string")
    .build());
Copy
bucket_realtime_log_resource = volcengine.tos.BucketRealtimeLog("bucketRealtimeLogResource",
    access_log_configuration={
        "tls_dashboard_id": "string",
        "tls_project_id": "string",
        "tls_topic_id": "string",
        "ttl": 0,
    },
    bucket_name="string",
    role="string")
Copy
const bucketRealtimeLogResource = new volcengine.tos.BucketRealtimeLog("bucketRealtimeLogResource", {
    accessLogConfiguration: {
        tlsDashboardId: "string",
        tlsProjectId: "string",
        tlsTopicId: "string",
        ttl: 0,
    },
    bucketName: "string",
    role: "string",
});
Copy
type: volcengine:tos:BucketRealtimeLog
properties:
    accessLogConfiguration:
        tlsDashboardId: string
        tlsProjectId: string
        tlsTopicId: string
        ttl: 0
    bucketName: string
    role: string
Copy

BucketRealtimeLog Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BucketRealtimeLog resource accepts the following input properties:

AccessLogConfiguration This property is required. BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
BucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the bucket.
Role
This property is required.
Changes to this property will trigger replacement.
string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
AccessLogConfiguration This property is required. BucketRealtimeLogAccessLogConfigurationArgs
The export schedule of the bucket inventory.
BucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the bucket.
Role
This property is required.
Changes to this property will trigger replacement.
string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration This property is required. BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
bucketName
This property is required.
Changes to this property will trigger replacement.
String
The name of the bucket.
role
This property is required.
Changes to this property will trigger replacement.
String
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration This property is required. BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
bucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the bucket.
role
This property is required.
Changes to this property will trigger replacement.
string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
access_log_configuration This property is required. BucketRealtimeLogAccessLogConfigurationArgs
The export schedule of the bucket inventory.
bucket_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the bucket.
role
This property is required.
Changes to this property will trigger replacement.
str
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration This property is required. Property Map
The export schedule of the bucket inventory.
bucketName
This property is required.
Changes to this property will trigger replacement.
String
The name of the bucket.
role
This property is required.
Changes to this property will trigger replacement.
String
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.

Outputs

All input properties are implicitly available as output properties. Additionally, the BucketRealtimeLog 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 BucketRealtimeLog Resource

Get an existing BucketRealtimeLog 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?: BucketRealtimeLogState, opts?: CustomResourceOptions): BucketRealtimeLog
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_log_configuration: Optional[BucketRealtimeLogAccessLogConfigurationArgs] = None,
        bucket_name: Optional[str] = None,
        role: Optional[str] = None) -> BucketRealtimeLog
func GetBucketRealtimeLog(ctx *Context, name string, id IDInput, state *BucketRealtimeLogState, opts ...ResourceOption) (*BucketRealtimeLog, error)
public static BucketRealtimeLog Get(string name, Input<string> id, BucketRealtimeLogState? state, CustomResourceOptions? opts = null)
public static BucketRealtimeLog get(String name, Output<String> id, BucketRealtimeLogState state, CustomResourceOptions options)
resources:  _:    type: volcengine:tos:BucketRealtimeLog    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccessLogConfiguration BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
BucketName Changes to this property will trigger replacement. string
The name of the bucket.
Role Changes to this property will trigger replacement. string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
AccessLogConfiguration BucketRealtimeLogAccessLogConfigurationArgs
The export schedule of the bucket inventory.
BucketName Changes to this property will trigger replacement. string
The name of the bucket.
Role Changes to this property will trigger replacement. string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
bucketName Changes to this property will trigger replacement. String
The name of the bucket.
role Changes to this property will trigger replacement. String
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration BucketRealtimeLogAccessLogConfiguration
The export schedule of the bucket inventory.
bucketName Changes to this property will trigger replacement. string
The name of the bucket.
role Changes to this property will trigger replacement. string
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
access_log_configuration BucketRealtimeLogAccessLogConfigurationArgs
The export schedule of the bucket inventory.
bucket_name Changes to this property will trigger replacement. str
The name of the bucket.
role Changes to this property will trigger replacement. str
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.
accessLogConfiguration Property Map
The export schedule of the bucket inventory.
bucketName Changes to this property will trigger replacement. String
The name of the bucket.
role Changes to this property will trigger replacement. String
The role name used to grant TOS access to create resources such as projects and topics, and write logs to the TLS logging service. You can use the default TOS role TOSLogArchiveTLSRole.

Supporting Types

BucketRealtimeLogAccessLogConfiguration
, BucketRealtimeLogAccessLogConfigurationArgs

TlsDashboardId string
The ID of the tls dashboard.
TlsProjectId string
The ID of the tls project.
TlsTopicId string
The ID of the tls topic.
Ttl int
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.
TlsDashboardId string
The ID of the tls dashboard.
TlsProjectId string
The ID of the tls project.
TlsTopicId string
The ID of the tls topic.
Ttl int
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.
tlsDashboardId String
The ID of the tls dashboard.
tlsProjectId String
The ID of the tls project.
tlsTopicId String
The ID of the tls topic.
ttl Integer
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.
tlsDashboardId string
The ID of the tls dashboard.
tlsProjectId string
The ID of the tls project.
tlsTopicId string
The ID of the tls topic.
ttl number
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.
tls_dashboard_id str
The ID of the tls dashboard.
tls_project_id str
The ID of the tls project.
tls_topic_id str
The ID of the tls topic.
ttl int
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.
tlsDashboardId String
The ID of the tls dashboard.
tlsProjectId String
The ID of the tls project.
tlsTopicId String
The ID of the tls topic.
ttl Number
The TLS log retention duration. Unit in days. Valid values range is 1~3650. default is 7.

Import

TosBucketRealtimeLog can be imported using the bucket_name, e.g.

$ pulumi import volcengine:tos/bucketRealtimeLog:BucketRealtimeLog default resource_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.