tencentcloud.ClsScheduledSql
Explore with Pulumi AI
Provides a resource to create a cls scheduled_sql
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const logset = new tencentcloud.ClsLogset("logset", {
logsetName: "tf-example-logset",
tags: {
createdBy: "terraform",
},
});
const topic = new tencentcloud.ClsTopic("topic", {
topicName: "tf-example-topic",
logsetId: logset.clsLogsetId,
autoSplit: false,
maxSplitPartitions: 20,
partitionCount: 1,
period: 10,
storageType: "hot",
tags: {
test: "test",
},
});
const scheduledSql = new tencentcloud.ClsScheduledSql("scheduledSql", {
srcTopicId: topic.clsTopicId,
enableFlag: 1,
dstResource: {
topicId: topic.clsTopicId,
region: "ap-guangzhou",
bizType: 0,
metricName: "test",
},
scheduledSqlContent: "xxx",
processStartTime: 1690515360000,
processType: 1,
processPeriod: 10,
processTimeWindow: "@m-15m,@m",
processDelay: 5,
srcTopicRegion: "ap-guangzhou",
processEndTime: 1690515360000,
syntaxRule: 0,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
logset = tencentcloud.ClsLogset("logset",
logset_name="tf-example-logset",
tags={
"createdBy": "terraform",
})
topic = tencentcloud.ClsTopic("topic",
topic_name="tf-example-topic",
logset_id=logset.cls_logset_id,
auto_split=False,
max_split_partitions=20,
partition_count=1,
period=10,
storage_type="hot",
tags={
"test": "test",
})
scheduled_sql = tencentcloud.ClsScheduledSql("scheduledSql",
src_topic_id=topic.cls_topic_id,
enable_flag=1,
dst_resource={
"topic_id": topic.cls_topic_id,
"region": "ap-guangzhou",
"biz_type": 0,
"metric_name": "test",
},
scheduled_sql_content="xxx",
process_start_time=1690515360000,
process_type=1,
process_period=10,
process_time_window="@m-15m,@m",
process_delay=5,
src_topic_region="ap-guangzhou",
process_end_time=1690515360000,
syntax_rule=0)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
logset, err := tencentcloud.NewClsLogset(ctx, "logset", &tencentcloud.ClsLogsetArgs{
LogsetName: pulumi.String("tf-example-logset"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
topic, err := tencentcloud.NewClsTopic(ctx, "topic", &tencentcloud.ClsTopicArgs{
TopicName: pulumi.String("tf-example-topic"),
LogsetId: logset.ClsLogsetId,
AutoSplit: pulumi.Bool(false),
MaxSplitPartitions: pulumi.Float64(20),
PartitionCount: pulumi.Float64(1),
Period: pulumi.Float64(10),
StorageType: pulumi.String("hot"),
Tags: pulumi.StringMap{
"test": pulumi.String("test"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewClsScheduledSql(ctx, "scheduledSql", &tencentcloud.ClsScheduledSqlArgs{
SrcTopicId: topic.ClsTopicId,
EnableFlag: pulumi.Float64(1),
DstResource: &tencentcloud.ClsScheduledSqlDstResourceArgs{
TopicId: topic.ClsTopicId,
Region: pulumi.String("ap-guangzhou"),
BizType: pulumi.Float64(0),
MetricName: pulumi.String("test"),
},
ScheduledSqlContent: pulumi.String("xxx"),
ProcessStartTime: pulumi.Float64(1690515360000),
ProcessType: pulumi.Float64(1),
ProcessPeriod: pulumi.Float64(10),
ProcessTimeWindow: pulumi.String("@m-15m,@m"),
ProcessDelay: pulumi.Float64(5),
SrcTopicRegion: pulumi.String("ap-guangzhou"),
ProcessEndTime: pulumi.Float64(1690515360000),
SyntaxRule: pulumi.Float64(0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var logset = new Tencentcloud.ClsLogset("logset", new()
{
LogsetName = "tf-example-logset",
Tags =
{
{ "createdBy", "terraform" },
},
});
var topic = new Tencentcloud.ClsTopic("topic", new()
{
TopicName = "tf-example-topic",
LogsetId = logset.ClsLogsetId,
AutoSplit = false,
MaxSplitPartitions = 20,
PartitionCount = 1,
Period = 10,
StorageType = "hot",
Tags =
{
{ "test", "test" },
},
});
var scheduledSql = new Tencentcloud.ClsScheduledSql("scheduledSql", new()
{
SrcTopicId = topic.ClsTopicId,
EnableFlag = 1,
DstResource = new Tencentcloud.Inputs.ClsScheduledSqlDstResourceArgs
{
TopicId = topic.ClsTopicId,
Region = "ap-guangzhou",
BizType = 0,
MetricName = "test",
},
ScheduledSqlContent = "xxx",
ProcessStartTime = 1690515360000,
ProcessType = 1,
ProcessPeriod = 10,
ProcessTimeWindow = "@m-15m,@m",
ProcessDelay = 5,
SrcTopicRegion = "ap-guangzhou",
ProcessEndTime = 1690515360000,
SyntaxRule = 0,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsLogset;
import com.pulumi.tencentcloud.ClsLogsetArgs;
import com.pulumi.tencentcloud.ClsTopic;
import com.pulumi.tencentcloud.ClsTopicArgs;
import com.pulumi.tencentcloud.ClsScheduledSql;
import com.pulumi.tencentcloud.ClsScheduledSqlArgs;
import com.pulumi.tencentcloud.inputs.ClsScheduledSqlDstResourceArgs;
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) {
var logset = new ClsLogset("logset", ClsLogsetArgs.builder()
.logsetName("tf-example-logset")
.tags(Map.of("createdBy", "terraform"))
.build());
var topic = new ClsTopic("topic", ClsTopicArgs.builder()
.topicName("tf-example-topic")
.logsetId(logset.clsLogsetId())
.autoSplit(false)
.maxSplitPartitions(20)
.partitionCount(1)
.period(10)
.storageType("hot")
.tags(Map.of("test", "test"))
.build());
var scheduledSql = new ClsScheduledSql("scheduledSql", ClsScheduledSqlArgs.builder()
.srcTopicId(topic.clsTopicId())
.enableFlag(1)
.dstResource(ClsScheduledSqlDstResourceArgs.builder()
.topicId(topic.clsTopicId())
.region("ap-guangzhou")
.bizType(0)
.metricName("test")
.build())
.scheduledSqlContent("xxx")
.processStartTime(1690515360000)
.processType(1)
.processPeriod(10)
.processTimeWindow("@m-15m,@m")
.processDelay(5)
.srcTopicRegion("ap-guangzhou")
.processEndTime(1690515360000)
.syntaxRule(0)
.build());
}
}
resources:
logset:
type: tencentcloud:ClsLogset
properties:
logsetName: tf-example-logset
tags:
createdBy: terraform
topic:
type: tencentcloud:ClsTopic
properties:
topicName: tf-example-topic
logsetId: ${logset.clsLogsetId}
autoSplit: false
maxSplitPartitions: 20
partitionCount: 1
period: 10
storageType: hot
tags:
test: test
scheduledSql:
type: tencentcloud:ClsScheduledSql
properties:
srcTopicId: ${topic.clsTopicId}
enableFlag: 1
dstResource:
topicId: ${topic.clsTopicId}
region: ap-guangzhou
bizType: 0
metricName: test
scheduledSqlContent: xxx
processStartTime: 1.69051536e+12
processType: 1
processPeriod: 10
processTimeWindow: '@m-15m,@m'
processDelay: 5
srcTopicRegion: ap-guangzhou
processEndTime: 1.69051536e+12
syntaxRule: 0
Create ClsScheduledSql Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsScheduledSql(name: string, args: ClsScheduledSqlArgs, opts?: CustomResourceOptions);
@overload
def ClsScheduledSql(resource_name: str,
args: ClsScheduledSqlArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClsScheduledSql(resource_name: str,
opts: Optional[ResourceOptions] = None,
process_type: Optional[float] = None,
src_topic_region: Optional[str] = None,
enable_flag: Optional[float] = None,
process_start_time: Optional[float] = None,
process_delay: Optional[float] = None,
src_topic_id: Optional[str] = None,
process_time_window: Optional[str] = None,
process_period: Optional[float] = None,
dst_resource: Optional[ClsScheduledSqlDstResourceArgs] = None,
scheduled_sql_content: Optional[str] = None,
cls_scheduled_sql_id: Optional[str] = None,
process_end_time: Optional[float] = None,
name: Optional[str] = None,
syntax_rule: Optional[float] = None)
func NewClsScheduledSql(ctx *Context, name string, args ClsScheduledSqlArgs, opts ...ResourceOption) (*ClsScheduledSql, error)
public ClsScheduledSql(string name, ClsScheduledSqlArgs args, CustomResourceOptions? opts = null)
public ClsScheduledSql(String name, ClsScheduledSqlArgs args)
public ClsScheduledSql(String name, ClsScheduledSqlArgs args, CustomResourceOptions options)
type: tencentcloud:ClsScheduledSql
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 ClsScheduledSqlArgs
- 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 ClsScheduledSqlArgs
- 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 ClsScheduledSqlArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsScheduledSqlArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsScheduledSqlArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsScheduledSql 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 ClsScheduledSql resource accepts the following input properties:
- Dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- Enable
Flag double - task enable flag.
- Process
Delay double - process delay.
- Process
Period double - process period.
- Process
Start doubleTime - process start timestamp.
- Process
Time stringWindow - process time window.
- Process
Type double - process type.
- Scheduled
Sql stringContent - scheduled sql content.
- Src
Topic stringId - src topic id.
- Src
Topic stringRegion - src topic region.
- Cls
Scheduled stringSql Id - ID of the resource.
- Name string
- task name.
- Process
End doubleTime - process end timestamp.
- Syntax
Rule double - syntax rule.
- Dst
Resource ClsScheduled Sql Dst Resource Args - scheduled slq dst resource.
- Enable
Flag float64 - task enable flag.
- Process
Delay float64 - process delay.
- Process
Period float64 - process period.
- Process
Start float64Time - process start timestamp.
- Process
Time stringWindow - process time window.
- Process
Type float64 - process type.
- Scheduled
Sql stringContent - scheduled sql content.
- Src
Topic stringId - src topic id.
- Src
Topic stringRegion - src topic region.
- Cls
Scheduled stringSql Id - ID of the resource.
- Name string
- task name.
- Process
End float64Time - process end timestamp.
- Syntax
Rule float64 - syntax rule.
- dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- enable
Flag Double - task enable flag.
- process
Delay Double - process delay.
- process
Period Double - process period.
- process
Start DoubleTime - process start timestamp.
- process
Time StringWindow - process time window.
- process
Type Double - process type.
- scheduled
Sql StringContent - scheduled sql content.
- src
Topic StringId - src topic id.
- src
Topic StringRegion - src topic region.
- cls
Scheduled StringSql Id - ID of the resource.
- name String
- task name.
- process
End DoubleTime - process end timestamp.
- syntax
Rule Double - syntax rule.
- dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- enable
Flag number - task enable flag.
- process
Delay number - process delay.
- process
Period number - process period.
- process
Start numberTime - process start timestamp.
- process
Time stringWindow - process time window.
- process
Type number - process type.
- scheduled
Sql stringContent - scheduled sql content.
- src
Topic stringId - src topic id.
- src
Topic stringRegion - src topic region.
- cls
Scheduled stringSql Id - ID of the resource.
- name string
- task name.
- process
End numberTime - process end timestamp.
- syntax
Rule number - syntax rule.
- dst_
resource ClsScheduled Sql Dst Resource Args - scheduled slq dst resource.
- enable_
flag float - task enable flag.
- process_
delay float - process delay.
- process_
period float - process period.
- process_
start_ floattime - process start timestamp.
- process_
time_ strwindow - process time window.
- process_
type float - process type.
- scheduled_
sql_ strcontent - scheduled sql content.
- src_
topic_ strid - src topic id.
- src_
topic_ strregion - src topic region.
- cls_
scheduled_ strsql_ id - ID of the resource.
- name str
- task name.
- process_
end_ floattime - process end timestamp.
- syntax_
rule float - syntax rule.
- dst
Resource Property Map - scheduled slq dst resource.
- enable
Flag Number - task enable flag.
- process
Delay Number - process delay.
- process
Period Number - process period.
- process
Start NumberTime - process start timestamp.
- process
Time StringWindow - process time window.
- process
Type Number - process type.
- scheduled
Sql StringContent - scheduled sql content.
- src
Topic StringId - src topic id.
- src
Topic StringRegion - src topic region.
- cls
Scheduled StringSql Id - ID of the resource.
- name String
- task name.
- process
End NumberTime - process end timestamp.
- syntax
Rule Number - syntax rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsScheduledSql 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 ClsScheduledSql Resource
Get an existing ClsScheduledSql 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?: ClsScheduledSqlState, opts?: CustomResourceOptions): ClsScheduledSql
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cls_scheduled_sql_id: Optional[str] = None,
dst_resource: Optional[ClsScheduledSqlDstResourceArgs] = None,
enable_flag: Optional[float] = None,
name: Optional[str] = None,
process_delay: Optional[float] = None,
process_end_time: Optional[float] = None,
process_period: Optional[float] = None,
process_start_time: Optional[float] = None,
process_time_window: Optional[str] = None,
process_type: Optional[float] = None,
scheduled_sql_content: Optional[str] = None,
src_topic_id: Optional[str] = None,
src_topic_region: Optional[str] = None,
syntax_rule: Optional[float] = None) -> ClsScheduledSql
func GetClsScheduledSql(ctx *Context, name string, id IDInput, state *ClsScheduledSqlState, opts ...ResourceOption) (*ClsScheduledSql, error)
public static ClsScheduledSql Get(string name, Input<string> id, ClsScheduledSqlState? state, CustomResourceOptions? opts = null)
public static ClsScheduledSql get(String name, Output<String> id, ClsScheduledSqlState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClsScheduledSql 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.
- Cls
Scheduled stringSql Id - ID of the resource.
- Dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- Enable
Flag double - task enable flag.
- Name string
- task name.
- Process
Delay double - process delay.
- Process
End doubleTime - process end timestamp.
- Process
Period double - process period.
- Process
Start doubleTime - process start timestamp.
- Process
Time stringWindow - process time window.
- Process
Type double - process type.
- Scheduled
Sql stringContent - scheduled sql content.
- Src
Topic stringId - src topic id.
- Src
Topic stringRegion - src topic region.
- Syntax
Rule double - syntax rule.
- Cls
Scheduled stringSql Id - ID of the resource.
- Dst
Resource ClsScheduled Sql Dst Resource Args - scheduled slq dst resource.
- Enable
Flag float64 - task enable flag.
- Name string
- task name.
- Process
Delay float64 - process delay.
- Process
End float64Time - process end timestamp.
- Process
Period float64 - process period.
- Process
Start float64Time - process start timestamp.
- Process
Time stringWindow - process time window.
- Process
Type float64 - process type.
- Scheduled
Sql stringContent - scheduled sql content.
- Src
Topic stringId - src topic id.
- Src
Topic stringRegion - src topic region.
- Syntax
Rule float64 - syntax rule.
- cls
Scheduled StringSql Id - ID of the resource.
- dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- enable
Flag Double - task enable flag.
- name String
- task name.
- process
Delay Double - process delay.
- process
End DoubleTime - process end timestamp.
- process
Period Double - process period.
- process
Start DoubleTime - process start timestamp.
- process
Time StringWindow - process time window.
- process
Type Double - process type.
- scheduled
Sql StringContent - scheduled sql content.
- src
Topic StringId - src topic id.
- src
Topic StringRegion - src topic region.
- syntax
Rule Double - syntax rule.
- cls
Scheduled stringSql Id - ID of the resource.
- dst
Resource ClsScheduled Sql Dst Resource - scheduled slq dst resource.
- enable
Flag number - task enable flag.
- name string
- task name.
- process
Delay number - process delay.
- process
End numberTime - process end timestamp.
- process
Period number - process period.
- process
Start numberTime - process start timestamp.
- process
Time stringWindow - process time window.
- process
Type number - process type.
- scheduled
Sql stringContent - scheduled sql content.
- src
Topic stringId - src topic id.
- src
Topic stringRegion - src topic region.
- syntax
Rule number - syntax rule.
- cls_
scheduled_ strsql_ id - ID of the resource.
- dst_
resource ClsScheduled Sql Dst Resource Args - scheduled slq dst resource.
- enable_
flag float - task enable flag.
- name str
- task name.
- process_
delay float - process delay.
- process_
end_ floattime - process end timestamp.
- process_
period float - process period.
- process_
start_ floattime - process start timestamp.
- process_
time_ strwindow - process time window.
- process_
type float - process type.
- scheduled_
sql_ strcontent - scheduled sql content.
- src_
topic_ strid - src topic id.
- src_
topic_ strregion - src topic region.
- syntax_
rule float - syntax rule.
- cls
Scheduled StringSql Id - ID of the resource.
- dst
Resource Property Map - scheduled slq dst resource.
- enable
Flag Number - task enable flag.
- name String
- task name.
- process
Delay Number - process delay.
- process
End NumberTime - process end timestamp.
- process
Period Number - process period.
- process
Start NumberTime - process start timestamp.
- process
Time StringWindow - process time window.
- process
Type Number - process type.
- scheduled
Sql StringContent - scheduled sql content.
- src
Topic StringId - src topic id.
- src
Topic StringRegion - src topic region.
- syntax
Rule Number - syntax rule.
Supporting Types
ClsScheduledSqlDstResource, ClsScheduledSqlDstResourceArgs
- Topic
Id string - dst topic id.
- Biz
Type double - topic type.
- Metric
Name string - metric name.
- Region string
- topic region.
- Topic
Id string - dst topic id.
- Biz
Type float64 - topic type.
- Metric
Name string - metric name.
- Region string
- topic region.
- topic
Id String - dst topic id.
- biz
Type Double - topic type.
- metric
Name String - metric name.
- region String
- topic region.
- topic
Id string - dst topic id.
- biz
Type number - topic type.
- metric
Name string - metric name.
- region string
- topic region.
- topic_
id str - dst topic id.
- biz_
type float - topic type.
- metric_
name str - metric name.
- region str
- topic region.
- topic
Id String - dst topic id.
- biz
Type Number - topic type.
- metric
Name String - metric name.
- region String
- topic region.
Import
cls scheduled_sql can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsScheduledSql:ClsScheduledSql scheduled_sql scheduled_sql_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.