Provides a resource to manage tls trace instance
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
// Example: Create a TLS trace instance
const foo = new volcengine.tls.TraceInstance("foo", {
projectId: "bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
traceInstanceName: "tf-trace-instance-df",
description: "This is an example trace instance",
backendConfig: {
ttl: 60,
enableHotTtl: true,
hotTtl: 30,
coldTtl: 30,
archiveTtl: 0,
autoSplit: true,
maxSplitPartitions: 10,
},
});
export const tlsTraceInstanceId = foo.id;
export const tlsTraceInstanceName = foo.traceInstanceName;
export const tlsTraceInstanceDescription = foo.description;
import pulumi
import pulumi_volcengine as volcengine
# Example: Create a TLS trace instance
foo = volcengine.tls.TraceInstance("foo",
project_id="bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
trace_instance_name="tf-trace-instance-df",
description="This is an example trace instance",
backend_config=volcengine.tls.TraceInstanceBackendConfigArgs(
ttl=60,
enable_hot_ttl=True,
hot_ttl=30,
cold_ttl=30,
archive_ttl=0,
auto_split=True,
max_split_partitions=10,
))
pulumi.export("tlsTraceInstanceId", foo.id)
pulumi.export("tlsTraceInstanceName", foo.trace_instance_name)
pulumi.export("tlsTraceInstanceDescription", foo.description)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tls"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Example: Create a TLS trace instance
foo, err := tls.NewTraceInstance(ctx, "foo", &tls.TraceInstanceArgs{
ProjectId: pulumi.String("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac"),
TraceInstanceName: pulumi.String("tf-trace-instance-df"),
Description: pulumi.String("This is an example trace instance"),
BackendConfig: &tls.TraceInstanceBackendConfigArgs{
Ttl: pulumi.Int(60),
EnableHotTtl: pulumi.Bool(true),
HotTtl: pulumi.Int(30),
ColdTtl: pulumi.Int(30),
ArchiveTtl: pulumi.Int(0),
AutoSplit: pulumi.Bool(true),
MaxSplitPartitions: pulumi.Int(10),
},
})
if err != nil {
return err
}
ctx.Export("tlsTraceInstanceId", foo.ID())
ctx.Export("tlsTraceInstanceName", foo.TraceInstanceName)
ctx.Export("tlsTraceInstanceDescription", foo.Description)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
// Example: Create a TLS trace instance
var foo = new Volcengine.Tls.TraceInstance("foo", new()
{
ProjectId = "bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac",
TraceInstanceName = "tf-trace-instance-df",
Description = "This is an example trace instance",
BackendConfig = new Volcengine.Tls.Inputs.TraceInstanceBackendConfigArgs
{
Ttl = 60,
EnableHotTtl = true,
HotTtl = 30,
ColdTtl = 30,
ArchiveTtl = 0,
AutoSplit = true,
MaxSplitPartitions = 10,
},
});
return new Dictionary<string, object?>
{
["tlsTraceInstanceId"] = foo.Id,
["tlsTraceInstanceName"] = foo.TraceInstanceName,
["tlsTraceInstanceDescription"] = foo.Description,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tls.TraceInstance;
import com.pulumi.volcengine.tls.TraceInstanceArgs;
import com.pulumi.volcengine.tls.inputs.TraceInstanceBackendConfigArgs;
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) {
// Example: Create a TLS trace instance
var foo = new TraceInstance("foo", TraceInstanceArgs.builder()
.projectId("bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac")
.traceInstanceName("tf-trace-instance-df")
.description("This is an example trace instance")
.backendConfig(TraceInstanceBackendConfigArgs.builder()
.ttl(60)
.enableHotTtl(true)
.hotTtl(30)
.coldTtl(30)
.archiveTtl(0)
.autoSplit(true)
.maxSplitPartitions(10)
.build())
.build());
ctx.export("tlsTraceInstanceId", foo.id());
ctx.export("tlsTraceInstanceName", foo.traceInstanceName());
ctx.export("tlsTraceInstanceDescription", foo.description());
}
}
resources:
# Example: Create a TLS trace instance
foo:
type: volcengine:tls:TraceInstance
properties:
projectId: bdb87e4d-7dad-4b96-ac43-e1b09e9dc8ac
traceInstanceName: tf-trace-instance-df
description: This is an example trace instance
backendConfig:
ttl: 60
enableHotTtl: true
hotTtl: 30
coldTtl: 30
archiveTtl: 0
autoSplit: true
maxSplitPartitions: 10
outputs:
tlsTraceInstanceId: ${foo.id}
tlsTraceInstanceName: ${foo.traceInstanceName}
tlsTraceInstanceDescription: ${foo.description}
Create TraceInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TraceInstance(name: string, args: TraceInstanceArgs, opts?: CustomResourceOptions);@overload
def TraceInstance(resource_name: str,
args: TraceInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TraceInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
trace_instance_name: Optional[str] = None,
backend_config: Optional[TraceInstanceBackendConfigArgs] = None,
description: Optional[str] = None)func NewTraceInstance(ctx *Context, name string, args TraceInstanceArgs, opts ...ResourceOption) (*TraceInstance, error)public TraceInstance(string name, TraceInstanceArgs args, CustomResourceOptions? opts = null)
public TraceInstance(String name, TraceInstanceArgs args)
public TraceInstance(String name, TraceInstanceArgs args, CustomResourceOptions options)
type: volcengine:tls:TraceInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TraceInstanceArgs
- 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 TraceInstanceArgs
- 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 TraceInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TraceInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TraceInstanceArgs
- 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 traceInstanceResource = new Volcengine.Tls.TraceInstance("traceInstanceResource", new()
{
ProjectId = "string",
TraceInstanceName = "string",
BackendConfig = new Volcengine.Tls.Inputs.TraceInstanceBackendConfigArgs
{
ArchiveTtl = 0,
AutoSplit = false,
ColdTtl = 0,
EnableHotTtl = false,
HotTtl = 0,
MaxSplitPartitions = 0,
Ttl = 0,
},
Description = "string",
});
example, err := tls.NewTraceInstance(ctx, "traceInstanceResource", &tls.TraceInstanceArgs{
ProjectId: pulumi.String("string"),
TraceInstanceName: pulumi.String("string"),
BackendConfig: &tls.TraceInstanceBackendConfigArgs{
ArchiveTtl: pulumi.Int(0),
AutoSplit: pulumi.Bool(false),
ColdTtl: pulumi.Int(0),
EnableHotTtl: pulumi.Bool(false),
HotTtl: pulumi.Int(0),
MaxSplitPartitions: pulumi.Int(0),
Ttl: pulumi.Int(0),
},
Description: pulumi.String("string"),
})
var traceInstanceResource = new TraceInstance("traceInstanceResource", TraceInstanceArgs.builder()
.projectId("string")
.traceInstanceName("string")
.backendConfig(TraceInstanceBackendConfigArgs.builder()
.archiveTtl(0)
.autoSplit(false)
.coldTtl(0)
.enableHotTtl(false)
.hotTtl(0)
.maxSplitPartitions(0)
.ttl(0)
.build())
.description("string")
.build());
trace_instance_resource = volcengine.tls.TraceInstance("traceInstanceResource",
project_id="string",
trace_instance_name="string",
backend_config={
"archive_ttl": 0,
"auto_split": False,
"cold_ttl": 0,
"enable_hot_ttl": False,
"hot_ttl": 0,
"max_split_partitions": 0,
"ttl": 0,
},
description="string")
const traceInstanceResource = new volcengine.tls.TraceInstance("traceInstanceResource", {
projectId: "string",
traceInstanceName: "string",
backendConfig: {
archiveTtl: 0,
autoSplit: false,
coldTtl: 0,
enableHotTtl: false,
hotTtl: 0,
maxSplitPartitions: 0,
ttl: 0,
},
description: "string",
});
type: volcengine:tls:TraceInstance
properties:
backendConfig:
archiveTtl: 0
autoSplit: false
coldTtl: 0
enableHotTtl: false
hotTtl: 0
maxSplitPartitions: 0
ttl: 0
description: string
projectId: string
traceInstanceName: string
TraceInstance 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 TraceInstance resource accepts the following input properties:
- Project
Id string - The ID of the project.
- Trace
Instance stringName - The name of the trace instance.
- Backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- Description string
- The description of the trace instance.
- Project
Id string - The ID of the project.
- Trace
Instance stringName - The name of the trace instance.
- Backend
Config TraceInstance Backend Config Args - The backend config of the trace instance.
- Description string
- The description of the trace instance.
- project
Id String - The ID of the project.
- trace
Instance StringName - The name of the trace instance.
- backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- description String
- The description of the trace instance.
- project
Id string - The ID of the project.
- trace
Instance stringName - The name of the trace instance.
- backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- description string
- The description of the trace instance.
- project_
id str - The ID of the project.
- trace_
instance_ strname - The name of the trace instance.
- backend_
config TraceInstance Backend Config Args - The backend config of the trace instance.
- description str
- The description of the trace instance.
- project
Id String - The ID of the project.
- trace
Instance StringName - The name of the trace instance.
- backend
Config Property Map - The backend config of the trace instance.
- description String
- The description of the trace instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the TraceInstance 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 TraceInstance Resource
Get an existing TraceInstance 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?: TraceInstanceState, opts?: CustomResourceOptions): TraceInstance@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend_config: Optional[TraceInstanceBackendConfigArgs] = None,
description: Optional[str] = None,
project_id: Optional[str] = None,
trace_instance_name: Optional[str] = None) -> TraceInstancefunc GetTraceInstance(ctx *Context, name string, id IDInput, state *TraceInstanceState, opts ...ResourceOption) (*TraceInstance, error)public static TraceInstance Get(string name, Input<string> id, TraceInstanceState? state, CustomResourceOptions? opts = null)public static TraceInstance get(String name, Output<String> id, TraceInstanceState state, CustomResourceOptions options)resources: _: type: volcengine:tls:TraceInstance get: id: ${id}- 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.
- Backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- Description string
- The description of the trace instance.
- Project
Id string - The ID of the project.
- Trace
Instance stringName - The name of the trace instance.
- Backend
Config TraceInstance Backend Config Args - The backend config of the trace instance.
- Description string
- The description of the trace instance.
- Project
Id string - The ID of the project.
- Trace
Instance stringName - The name of the trace instance.
- backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- description String
- The description of the trace instance.
- project
Id String - The ID of the project.
- trace
Instance StringName - The name of the trace instance.
- backend
Config TraceInstance Backend Config - The backend config of the trace instance.
- description string
- The description of the trace instance.
- project
Id string - The ID of the project.
- trace
Instance stringName - The name of the trace instance.
- backend_
config TraceInstance Backend Config Args - The backend config of the trace instance.
- description str
- The description of the trace instance.
- project_
id str - The ID of the project.
- trace_
instance_ strname - The name of the trace instance.
- backend
Config Property Map - The backend config of the trace instance.
- description String
- The description of the trace instance.
- project
Id String - The ID of the project.
- trace
Instance StringName - The name of the trace instance.
Supporting Types
TraceInstanceBackendConfig, TraceInstanceBackendConfigArgs
- Archive
Ttl int - Archive storage duration in days.
- Auto
Split bool - Whether to enable auto split.
- Cold
Ttl int - Infrequent storage duration in days.
- Enable
Hot boolTtl - Whether to enable tiered storage.
- Hot
Ttl int - Standard storage duration in days.
- Max
Split intPartitions - Max split partitions.
- Ttl int
- Total log retention time in days.
- Archive
Ttl int - Archive storage duration in days.
- Auto
Split bool - Whether to enable auto split.
- Cold
Ttl int - Infrequent storage duration in days.
- Enable
Hot boolTtl - Whether to enable tiered storage.
- Hot
Ttl int - Standard storage duration in days.
- Max
Split intPartitions - Max split partitions.
- Ttl int
- Total log retention time in days.
- archive
Ttl Integer - Archive storage duration in days.
- auto
Split Boolean - Whether to enable auto split.
- cold
Ttl Integer - Infrequent storage duration in days.
- enable
Hot BooleanTtl - Whether to enable tiered storage.
- hot
Ttl Integer - Standard storage duration in days.
- max
Split IntegerPartitions - Max split partitions.
- ttl Integer
- Total log retention time in days.
- archive
Ttl number - Archive storage duration in days.
- auto
Split boolean - Whether to enable auto split.
- cold
Ttl number - Infrequent storage duration in days.
- enable
Hot booleanTtl - Whether to enable tiered storage.
- hot
Ttl number - Standard storage duration in days.
- max
Split numberPartitions - Max split partitions.
- ttl number
- Total log retention time in days.
- archive_
ttl int - Archive storage duration in days.
- auto_
split bool - Whether to enable auto split.
- cold_
ttl int - Infrequent storage duration in days.
- enable_
hot_ boolttl - Whether to enable tiered storage.
- hot_
ttl int - Standard storage duration in days.
- max_
split_ intpartitions - Max split partitions.
- ttl int
- Total log retention time in days.
- archive
Ttl Number - Archive storage duration in days.
- auto
Split Boolean - Whether to enable auto split.
- cold
Ttl Number - Infrequent storage duration in days.
- enable
Hot BooleanTtl - Whether to enable tiered storage.
- hot
Ttl Number - Standard storage duration in days.
- max
Split NumberPartitions - Max split partitions.
- ttl Number
- Total log retention time in days.
Import
tls trace instance can be imported using the id, e.g.
$ pulumi import volcengine:tls/traceInstance:TraceInstance default instance-1234567890
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
volcengineTerraform Provider.
