Provides a Log Service (SLS) Scheduled Sql resource.
Scheduled SQL task.
For information about Log Service (SLS) Scheduled Sql and how to use it, see What is Scheduled Sql.
NOTE: Available since v1.224.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultKIe4KV = new alicloud.log.Project("defaultKIe4KV", {
description: `${name}-${_default.result}`,
projectName: `${name}-${_default.result}`,
});
const default1LI9we = new alicloud.log.Store("default1LI9we", {
hotTtl: 8,
retentionPeriod: 30,
shardCount: 2,
projectName: defaultKIe4KV.projectName,
logstoreName: `${name}-${_default.result}`,
});
const defaultScheduledSql = new alicloud.sls.ScheduledSql("default", {
description: "example-tf-scheduled-sql-0006",
schedule: {
type: "Cron",
timeZone: "+0700",
delay: 20,
cronExpression: "0 0/1 * * *",
},
displayName: "example-tf-scheduled-sql-0006",
scheduledSqlConfiguration: {
script: "* | select * from log",
sqlType: "searchQuery",
destEndpoint: "ap-northeast-1.log.aliyuncs.com",
destProject: "job-e2e-project-jj78kur-ap-southeast-1",
sourceLogstore: default1LI9we.logstoreName,
destLogstore: "example-open-api02",
roleArn: "acs:ram::1395894005868720:role/aliyunlogetlrole",
destRoleArn: "acs:ram::1395894005868720:role/aliyunlogetlrole",
fromTimeExpr: "@m-1m",
toTimeExpr: "@m",
maxRunTimeInSeconds: 1800,
resourcePool: "enhanced",
maxRetries: 5,
fromTime: 1713196800,
toTime: 0,
dataFormat: "log2log",
},
scheduledSqlName: name,
project: defaultKIe4KV.projectName,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_k_ie4_kv = alicloud.log.Project("defaultKIe4KV",
description=f"{name}-{default['result']}",
project_name=f"{name}-{default['result']}")
default1_li9we = alicloud.log.Store("default1LI9we",
hot_ttl=8,
retention_period=30,
shard_count=2,
project_name=default_k_ie4_kv.project_name,
logstore_name=f"{name}-{default['result']}")
default_scheduled_sql = alicloud.sls.ScheduledSql("default",
description="example-tf-scheduled-sql-0006",
schedule={
"type": "Cron",
"time_zone": "+0700",
"delay": 20,
"cron_expression": "0 0/1 * * *",
},
display_name="example-tf-scheduled-sql-0006",
scheduled_sql_configuration={
"script": "* | select * from log",
"sql_type": "searchQuery",
"dest_endpoint": "ap-northeast-1.log.aliyuncs.com",
"dest_project": "job-e2e-project-jj78kur-ap-southeast-1",
"source_logstore": default1_li9we.logstore_name,
"dest_logstore": "example-open-api02",
"role_arn": "acs:ram::1395894005868720:role/aliyunlogetlrole",
"dest_role_arn": "acs:ram::1395894005868720:role/aliyunlogetlrole",
"from_time_expr": "@m-1m",
"to_time_expr": "@m",
"max_run_time_in_seconds": 1800,
"resource_pool": "enhanced",
"max_retries": 5,
"from_time": 1713196800,
"to_time": 0,
"data_format": "log2log",
},
scheduled_sql_name=name,
project=default_k_ie4_kv.project_name)
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sls"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultKIe4KV, err := log.NewProject(ctx, "defaultKIe4KV", &log.ProjectArgs{
Description: pulumi.Sprintf("%v-%v", name, _default.Result),
ProjectName: pulumi.Sprintf("%v-%v", name, _default.Result),
})
if err != nil {
return err
}
default1LI9we, err := log.NewStore(ctx, "default1LI9we", &log.StoreArgs{
HotTtl: pulumi.Int(8),
RetentionPeriod: pulumi.Int(30),
ShardCount: pulumi.Int(2),
ProjectName: defaultKIe4KV.ProjectName,
LogstoreName: pulumi.Sprintf("%v-%v", name, _default.Result),
})
if err != nil {
return err
}
_, err = sls.NewScheduledSql(ctx, "default", &sls.ScheduledSqlArgs{
Description: pulumi.String("example-tf-scheduled-sql-0006"),
Schedule: &sls.ScheduledSqlScheduleArgs{
Type: pulumi.String("Cron"),
TimeZone: pulumi.String("+0700"),
Delay: pulumi.Int(20),
CronExpression: pulumi.String("0 0/1 * * *"),
},
DisplayName: pulumi.String("example-tf-scheduled-sql-0006"),
ScheduledSqlConfiguration: &sls.ScheduledSqlScheduledSqlConfigurationArgs{
Script: pulumi.String("* | select * from log"),
SqlType: pulumi.String("searchQuery"),
DestEndpoint: pulumi.String("ap-northeast-1.log.aliyuncs.com"),
DestProject: pulumi.String("job-e2e-project-jj78kur-ap-southeast-1"),
SourceLogstore: default1LI9we.LogstoreName,
DestLogstore: pulumi.String("example-open-api02"),
RoleArn: pulumi.String("acs:ram::1395894005868720:role/aliyunlogetlrole"),
DestRoleArn: pulumi.String("acs:ram::1395894005868720:role/aliyunlogetlrole"),
FromTimeExpr: pulumi.String("@m-1m"),
ToTimeExpr: pulumi.String("@m"),
MaxRunTimeInSeconds: pulumi.Int(1800),
ResourcePool: pulumi.String("enhanced"),
MaxRetries: pulumi.Int(5),
FromTime: pulumi.Int(1713196800),
ToTime: pulumi.Int(0),
DataFormat: pulumi.String("log2log"),
},
ScheduledSqlName: pulumi.String(name),
Project: defaultKIe4KV.ProjectName,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultKIe4KV = new AliCloud.Log.Project("defaultKIe4KV", new()
{
Description = $"{name}-{@default.Result}",
ProjectName = $"{name}-{@default.Result}",
});
var default1LI9we = new AliCloud.Log.Store("default1LI9we", new()
{
HotTtl = 8,
RetentionPeriod = 30,
ShardCount = 2,
ProjectName = defaultKIe4KV.ProjectName,
LogstoreName = $"{name}-{@default.Result}",
});
var defaultScheduledSql = new AliCloud.Sls.ScheduledSql("default", new()
{
Description = "example-tf-scheduled-sql-0006",
Schedule = new AliCloud.Sls.Inputs.ScheduledSqlScheduleArgs
{
Type = "Cron",
TimeZone = "+0700",
Delay = 20,
CronExpression = "0 0/1 * * *",
},
DisplayName = "example-tf-scheduled-sql-0006",
ScheduledSqlConfiguration = new AliCloud.Sls.Inputs.ScheduledSqlScheduledSqlConfigurationArgs
{
Script = "* | select * from log",
SqlType = "searchQuery",
DestEndpoint = "ap-northeast-1.log.aliyuncs.com",
DestProject = "job-e2e-project-jj78kur-ap-southeast-1",
SourceLogstore = default1LI9we.LogstoreName,
DestLogstore = "example-open-api02",
RoleArn = "acs:ram::1395894005868720:role/aliyunlogetlrole",
DestRoleArn = "acs:ram::1395894005868720:role/aliyunlogetlrole",
FromTimeExpr = "@m-1m",
ToTimeExpr = "@m",
MaxRunTimeInSeconds = 1800,
ResourcePool = "enhanced",
MaxRetries = 5,
FromTime = 1713196800,
ToTime = 0,
DataFormat = "log2log",
},
ScheduledSqlName = name,
Project = defaultKIe4KV.ProjectName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.Integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.sls.ScheduledSql;
import com.pulumi.alicloud.sls.ScheduledSqlArgs;
import com.pulumi.alicloud.sls.inputs.ScheduledSqlScheduleArgs;
import com.pulumi.alicloud.sls.inputs.ScheduledSqlScheduledSqlConfigurationArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultKIe4KV = new Project("defaultKIe4KV", ProjectArgs.builder()
.description(String.format("%s-%s", name,default_.result()))
.projectName(String.format("%s-%s", name,default_.result()))
.build());
var default1LI9we = new Store("default1LI9we", StoreArgs.builder()
.hotTtl(8)
.retentionPeriod(30)
.shardCount(2)
.projectName(defaultKIe4KV.projectName())
.logstoreName(String.format("%s-%s", name,default_.result()))
.build());
var defaultScheduledSql = new ScheduledSql("defaultScheduledSql", ScheduledSqlArgs.builder()
.description("example-tf-scheduled-sql-0006")
.schedule(ScheduledSqlScheduleArgs.builder()
.type("Cron")
.timeZone("+0700")
.delay(20)
.cronExpression("0 0/1 * * *")
.build())
.displayName("example-tf-scheduled-sql-0006")
.scheduledSqlConfiguration(ScheduledSqlScheduledSqlConfigurationArgs.builder()
.script("* | select * from log")
.sqlType("searchQuery")
.destEndpoint("ap-northeast-1.log.aliyuncs.com")
.destProject("job-e2e-project-jj78kur-ap-southeast-1")
.sourceLogstore(default1LI9we.logstoreName())
.destLogstore("example-open-api02")
.roleArn("acs:ram::1395894005868720:role/aliyunlogetlrole")
.destRoleArn("acs:ram::1395894005868720:role/aliyunlogetlrole")
.fromTimeExpr("@m-1m")
.toTimeExpr("@m")
.maxRunTimeInSeconds(1800)
.resourcePool("enhanced")
.maxRetries(5)
.fromTime(1713196800)
.toTime(0)
.dataFormat("log2log")
.build())
.scheduledSqlName(name)
.project(defaultKIe4KV.projectName())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:Integer
properties:
min: 10000
max: 99999
defaultKIe4KV:
type: alicloud:log:Project
properties:
description: ${name}-${default.result}
projectName: ${name}-${default.result}
default1LI9we:
type: alicloud:log:Store
properties:
hotTtl: '8'
retentionPeriod: '30'
shardCount: '2'
projectName: ${defaultKIe4KV.projectName}
logstoreName: ${name}-${default.result}
defaultScheduledSql:
type: alicloud:sls:ScheduledSql
name: default
properties:
description: example-tf-scheduled-sql-0006
schedule:
type: Cron
timeZone: '+0700'
delay: '20'
cronExpression: 0 0/1 * * *
displayName: example-tf-scheduled-sql-0006
scheduledSqlConfiguration:
script: '* | select * from log'
sqlType: searchQuery
destEndpoint: ap-northeast-1.log.aliyuncs.com
destProject: job-e2e-project-jj78kur-ap-southeast-1
sourceLogstore: ${default1LI9we.logstoreName}
destLogstore: example-open-api02
roleArn: acs:ram::1395894005868720:role/aliyunlogetlrole
destRoleArn: acs:ram::1395894005868720:role/aliyunlogetlrole
fromTimeExpr: '@m-1m'
toTimeExpr: '@m'
maxRunTimeInSeconds: '1800'
resourcePool: enhanced
maxRetries: '5'
fromTime: '1713196800'
toTime: '0'
dataFormat: log2log
scheduledSqlName: ${name}
project: ${defaultKIe4KV.projectName}
📚 Need more examples? VIEW MORE EXAMPLES
Create ScheduledSql Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledSql(name: string, args: ScheduledSqlArgs, opts?: CustomResourceOptions);@overload
def ScheduledSql(resource_name: str,
args: ScheduledSqlArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledSql(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
project: Optional[str] = None,
schedule: Optional[ScheduledSqlScheduleArgs] = None,
scheduled_sql_configuration: Optional[ScheduledSqlScheduledSqlConfigurationArgs] = None,
scheduled_sql_name: Optional[str] = None,
description: Optional[str] = None,
status: Optional[str] = None)func NewScheduledSql(ctx *Context, name string, args ScheduledSqlArgs, opts ...ResourceOption) (*ScheduledSql, error)public ScheduledSql(string name, ScheduledSqlArgs args, CustomResourceOptions? opts = null)
public ScheduledSql(String name, ScheduledSqlArgs args)
public ScheduledSql(String name, ScheduledSqlArgs args, CustomResourceOptions options)
type: alicloud:sls:ScheduledSql
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 ScheduledSqlArgs
- 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 ScheduledSqlArgs
- 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 ScheduledSqlArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledSqlArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledSqlArgs
- 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 scheduledSqlResource = new AliCloud.Sls.ScheduledSql("scheduledSqlResource", new()
{
DisplayName = "string",
Project = "string",
Schedule = new AliCloud.Sls.Inputs.ScheduledSqlScheduleArgs
{
CronExpression = "string",
Delay = 0,
Interval = "string",
RunImmediately = false,
TimeZone = "string",
Type = "string",
},
ScheduledSqlConfiguration = new AliCloud.Sls.Inputs.ScheduledSqlScheduledSqlConfigurationArgs
{
DataFormat = "string",
DestEndpoint = "string",
DestLogstore = "string",
DestProject = "string",
DestRoleArn = "string",
FromTime = 0,
FromTimeExpr = "string",
MaxRetries = 0,
MaxRunTimeInSeconds = 0,
Parameters =
{
{ "string", "string" },
},
ResourcePool = "string",
RoleArn = "string",
Script = "string",
SourceLogstore = "string",
SqlType = "string",
ToTime = 0,
ToTimeExpr = "string",
},
ScheduledSqlName = "string",
Description = "string",
Status = "string",
});
example, err := sls.NewScheduledSql(ctx, "scheduledSqlResource", &sls.ScheduledSqlArgs{
DisplayName: pulumi.String("string"),
Project: pulumi.String("string"),
Schedule: &sls.ScheduledSqlScheduleArgs{
CronExpression: pulumi.String("string"),
Delay: pulumi.Int(0),
Interval: pulumi.String("string"),
RunImmediately: pulumi.Bool(false),
TimeZone: pulumi.String("string"),
Type: pulumi.String("string"),
},
ScheduledSqlConfiguration: &sls.ScheduledSqlScheduledSqlConfigurationArgs{
DataFormat: pulumi.String("string"),
DestEndpoint: pulumi.String("string"),
DestLogstore: pulumi.String("string"),
DestProject: pulumi.String("string"),
DestRoleArn: pulumi.String("string"),
FromTime: pulumi.Int(0),
FromTimeExpr: pulumi.String("string"),
MaxRetries: pulumi.Int(0),
MaxRunTimeInSeconds: pulumi.Int(0),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
ResourcePool: pulumi.String("string"),
RoleArn: pulumi.String("string"),
Script: pulumi.String("string"),
SourceLogstore: pulumi.String("string"),
SqlType: pulumi.String("string"),
ToTime: pulumi.Int(0),
ToTimeExpr: pulumi.String("string"),
},
ScheduledSqlName: pulumi.String("string"),
Description: pulumi.String("string"),
Status: pulumi.String("string"),
})
var scheduledSqlResource = new ScheduledSql("scheduledSqlResource", ScheduledSqlArgs.builder()
.displayName("string")
.project("string")
.schedule(ScheduledSqlScheduleArgs.builder()
.cronExpression("string")
.delay(0)
.interval("string")
.runImmediately(false)
.timeZone("string")
.type("string")
.build())
.scheduledSqlConfiguration(ScheduledSqlScheduledSqlConfigurationArgs.builder()
.dataFormat("string")
.destEndpoint("string")
.destLogstore("string")
.destProject("string")
.destRoleArn("string")
.fromTime(0)
.fromTimeExpr("string")
.maxRetries(0)
.maxRunTimeInSeconds(0)
.parameters(Map.of("string", "string"))
.resourcePool("string")
.roleArn("string")
.script("string")
.sourceLogstore("string")
.sqlType("string")
.toTime(0)
.toTimeExpr("string")
.build())
.scheduledSqlName("string")
.description("string")
.status("string")
.build());
scheduled_sql_resource = alicloud.sls.ScheduledSql("scheduledSqlResource",
display_name="string",
project="string",
schedule={
"cron_expression": "string",
"delay": 0,
"interval": "string",
"run_immediately": False,
"time_zone": "string",
"type": "string",
},
scheduled_sql_configuration={
"data_format": "string",
"dest_endpoint": "string",
"dest_logstore": "string",
"dest_project": "string",
"dest_role_arn": "string",
"from_time": 0,
"from_time_expr": "string",
"max_retries": 0,
"max_run_time_in_seconds": 0,
"parameters": {
"string": "string",
},
"resource_pool": "string",
"role_arn": "string",
"script": "string",
"source_logstore": "string",
"sql_type": "string",
"to_time": 0,
"to_time_expr": "string",
},
scheduled_sql_name="string",
description="string",
status="string")
const scheduledSqlResource = new alicloud.sls.ScheduledSql("scheduledSqlResource", {
displayName: "string",
project: "string",
schedule: {
cronExpression: "string",
delay: 0,
interval: "string",
runImmediately: false,
timeZone: "string",
type: "string",
},
scheduledSqlConfiguration: {
dataFormat: "string",
destEndpoint: "string",
destLogstore: "string",
destProject: "string",
destRoleArn: "string",
fromTime: 0,
fromTimeExpr: "string",
maxRetries: 0,
maxRunTimeInSeconds: 0,
parameters: {
string: "string",
},
resourcePool: "string",
roleArn: "string",
script: "string",
sourceLogstore: "string",
sqlType: "string",
toTime: 0,
toTimeExpr: "string",
},
scheduledSqlName: "string",
description: "string",
status: "string",
});
type: alicloud:sls:ScheduledSql
properties:
description: string
displayName: string
project: string
schedule:
cronExpression: string
delay: 0
interval: string
runImmediately: false
timeZone: string
type: string
scheduledSqlConfiguration:
dataFormat: string
destEndpoint: string
destLogstore: string
destProject: string
destRoleArn: string
fromTime: 0
fromTimeExpr: string
maxRetries: 0
maxRunTimeInSeconds: 0
parameters:
string: string
resourcePool: string
roleArn: string
script: string
sourceLogstore: string
sqlType: string
toTime: 0
toTimeExpr: string
scheduledSqlName: string
status: string
ScheduledSql 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 ScheduledSql resource accepts the following input properties:
- Display
Name string - Task display name.
- Project string
- A short description of struct.
- Schedule
Pulumi.
Ali Cloud. Sls. Inputs. Scheduled Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - Scheduled
Sql Pulumi.Configuration Ali Cloud. Sls. Inputs. Scheduled Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - Scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- Description string
- Job description.
- Status string
- The status of the scheduled SQL job.
- Display
Name string - Task display name.
- Project string
- A short description of struct.
- Schedule
Scheduled
Sql Schedule Args - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - Scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration Args - Task configuration. See
scheduled_sql_configurationbelow. - Scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- Description string
- Job description.
- Status string
- The status of the scheduled SQL job.
- display
Name String - Task display name.
- project String
- A short description of struct.
- schedule
Scheduled
Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql StringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- description String
- Job description.
- status String
- The status of the scheduled SQL job.
- display
Name string - Task display name.
- project string
- A short description of struct.
- schedule
Scheduled
Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- description string
- Job description.
- status string
- The status of the scheduled SQL job.
- display_
name str - Task display name.
- project str
- A short description of struct.
- schedule
Scheduled
Sql Schedule Args - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled_
sql_ Scheduledconfiguration Sql Scheduled Sql Configuration Args - Task configuration. See
scheduled_sql_configurationbelow. - scheduled_
sql_ strname - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- description str
- Job description.
- status str
- The status of the scheduled SQL job.
- display
Name String - Task display name.
- project String
- A short description of struct.
- schedule Property Map
- Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql Property MapConfiguration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql StringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- description String
- Job description.
- status String
- The status of the scheduled SQL job.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledSql 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 ScheduledSql Resource
Get an existing ScheduledSql 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?: ScheduledSqlState, opts?: CustomResourceOptions): ScheduledSql@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
project: Optional[str] = None,
schedule: Optional[ScheduledSqlScheduleArgs] = None,
scheduled_sql_configuration: Optional[ScheduledSqlScheduledSqlConfigurationArgs] = None,
scheduled_sql_name: Optional[str] = None,
status: Optional[str] = None) -> ScheduledSqlfunc GetScheduledSql(ctx *Context, name string, id IDInput, state *ScheduledSqlState, opts ...ResourceOption) (*ScheduledSql, error)public static ScheduledSql Get(string name, Input<string> id, ScheduledSqlState? state, CustomResourceOptions? opts = null)public static ScheduledSql get(String name, Output<String> id, ScheduledSqlState state, CustomResourceOptions options)resources: _: type: alicloud:sls:ScheduledSql 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.
- Description string
- Job description.
- Display
Name string - Task display name.
- Project string
- A short description of struct.
- Schedule
Pulumi.
Ali Cloud. Sls. Inputs. Scheduled Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - Scheduled
Sql Pulumi.Configuration Ali Cloud. Sls. Inputs. Scheduled Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - Scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- Status string
- The status of the scheduled SQL job.
- Description string
- Job description.
- Display
Name string - Task display name.
- Project string
- A short description of struct.
- Schedule
Scheduled
Sql Schedule Args - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - Scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration Args - Task configuration. See
scheduled_sql_configurationbelow. - Scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- Status string
- The status of the scheduled SQL job.
- description String
- Job description.
- display
Name String - Task display name.
- project String
- A short description of struct.
- schedule
Scheduled
Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql StringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- status String
- The status of the scheduled SQL job.
- description string
- Job description.
- display
Name string - Task display name.
- project string
- A short description of struct.
- schedule
Scheduled
Sql Schedule - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql ScheduledConfiguration Sql Scheduled Sql Configuration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql stringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- status string
- The status of the scheduled SQL job.
- description str
- Job description.
- display_
name str - Task display name.
- project str
- A short description of struct.
- schedule
Scheduled
Sql Schedule Args - Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled_
sql_ Scheduledconfiguration Sql Scheduled Sql Configuration Args - Task configuration. See
scheduled_sql_configurationbelow. - scheduled_
sql_ strname - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- status str
- The status of the scheduled SQL job.
- description String
- Job description.
- display
Name String - Task display name.
- project String
- A short description of struct.
- schedule Property Map
- Schedule type. This field generally does not need to be specified. If you have strict scheduling requirements—for example, running an import job every Monday at 8:00 AM—you can use a cron expression. See
schedulebelow. - scheduled
Sql Property MapConfiguration - Task configuration. See
scheduled_sql_configurationbelow. - scheduled
Sql StringName - The job name. The naming rules are as follows:
- Job names must be unique within the same project.
- The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
- The name must start and end with a lowercase letter or digit.
- The length must be between 2 and 64 characters.
- status String
- The status of the scheduled SQL job.
Supporting Types
ScheduledSqlSchedule, ScheduledSqlScheduleArgs
- Cron
Expression string - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- Delay int
- Delay duration.
- Interval string
- Time interval, such as 5m or 1h.
- Run
Immediately bool - Specifies whether to run the OSS import job immediately after it is created.
- Time
Zone string - Time zone.
- Type string
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
- Cron
Expression string - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- Delay int
- Delay duration.
- Interval string
- Time interval, such as 5m or 1h.
- Run
Immediately bool - Specifies whether to run the OSS import job immediately after it is created.
- Time
Zone string - Time zone.
- Type string
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
- cron
Expression String - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- delay Integer
- Delay duration.
- interval String
- Time interval, such as 5m or 1h.
- run
Immediately Boolean - Specifies whether to run the OSS import job immediately after it is created.
- time
Zone String - Time zone.
- type String
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
- cron
Expression string - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- delay number
- Delay duration.
- interval string
- Time interval, such as 5m or 1h.
- run
Immediately boolean - Specifies whether to run the OSS import job immediately after it is created.
- time
Zone string - Time zone.
- type string
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
- cron_
expression str - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- delay int
- Delay duration.
- interval str
- Time interval, such as 5m or 1h.
- run_
immediately bool - Specifies whether to run the OSS import job immediately after it is created.
- time_
zone str - Time zone.
- type str
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
- cron
Expression String - Cron expression with a minimum precision of minutes in 24-hour format. For example, 0 0/1 * * * means checking once every hour starting from 00:00. When type is set to Cron, cronExpression must be specified.
- delay Number
- Delay duration.
- interval String
- Time interval, such as 5m or 1h.
- run
Immediately Boolean - Specifies whether to run the OSS import job immediately after it is created.
- time
Zone String - Time zone.
- type String
- The check frequency type. Log Service checks query and analysis results based on the frequency you configure. Valid values: FixedRate: Checks query and analysis results at fixed intervals. Cron: Uses a cron expression to specify the interval and checks query and analysis results accordingly. Weekly: Checks query and analysis results once at a fixed time on a specific day of the week. Daily: Checks query and analysis results once at a fixed time each day. Hourly: Checks query and analysis results once every hour.
ScheduledSqlScheduledSqlConfiguration, ScheduledSqlScheduledSqlConfigurationArgs
- Data
Format string - Write mode.
- Dest
Endpoint string - The destination endpoint.
- Dest
Logstore string - The destination Logstore.
- Dest
Project string - The destination project.
- Dest
Role stringArn - Destination write role ARN.
- From
Time int - The start time of the schedule.
- From
Time stringExpr - SQL time window - start.
- Max
Retries int - Maximum number of retries.
- Max
Run intTime In Seconds - SQL timeout.
- Parameters Dictionary<string, string>
- Parameter configuration.
- Resource
Pool string - Resource pool.
- Role
Arn string - Source read role ARN.
- Script string
- SQL statement.
- Source
Logstore string - The source Logstore.
- Sql
Type string - SQL type.
- To
Time int - Scheduled end time.
- To
Time stringExpr - End of the SQL time window.
- Data
Format string - Write mode.
- Dest
Endpoint string - The destination endpoint.
- Dest
Logstore string - The destination Logstore.
- Dest
Project string - The destination project.
- Dest
Role stringArn - Destination write role ARN.
- From
Time int - The start time of the schedule.
- From
Time stringExpr - SQL time window - start.
- Max
Retries int - Maximum number of retries.
- Max
Run intTime In Seconds - SQL timeout.
- Parameters map[string]string
- Parameter configuration.
- Resource
Pool string - Resource pool.
- Role
Arn string - Source read role ARN.
- Script string
- SQL statement.
- Source
Logstore string - The source Logstore.
- Sql
Type string - SQL type.
- To
Time int - Scheduled end time.
- To
Time stringExpr - End of the SQL time window.
- data
Format String - Write mode.
- dest
Endpoint String - The destination endpoint.
- dest
Logstore String - The destination Logstore.
- dest
Project String - The destination project.
- dest
Role StringArn - Destination write role ARN.
- from
Time Integer - The start time of the schedule.
- from
Time StringExpr - SQL time window - start.
- max
Retries Integer - Maximum number of retries.
- max
Run IntegerTime In Seconds - SQL timeout.
- parameters Map<String,String>
- Parameter configuration.
- resource
Pool String - Resource pool.
- role
Arn String - Source read role ARN.
- script String
- SQL statement.
- source
Logstore String - The source Logstore.
- sql
Type String - SQL type.
- to
Time Integer - Scheduled end time.
- to
Time StringExpr - End of the SQL time window.
- data
Format string - Write mode.
- dest
Endpoint string - The destination endpoint.
- dest
Logstore string - The destination Logstore.
- dest
Project string - The destination project.
- dest
Role stringArn - Destination write role ARN.
- from
Time number - The start time of the schedule.
- from
Time stringExpr - SQL time window - start.
- max
Retries number - Maximum number of retries.
- max
Run numberTime In Seconds - SQL timeout.
- parameters {[key: string]: string}
- Parameter configuration.
- resource
Pool string - Resource pool.
- role
Arn string - Source read role ARN.
- script string
- SQL statement.
- source
Logstore string - The source Logstore.
- sql
Type string - SQL type.
- to
Time number - Scheduled end time.
- to
Time stringExpr - End of the SQL time window.
- data_
format str - Write mode.
- dest_
endpoint str - The destination endpoint.
- dest_
logstore str - The destination Logstore.
- dest_
project str - The destination project.
- dest_
role_ strarn - Destination write role ARN.
- from_
time int - The start time of the schedule.
- from_
time_ strexpr - SQL time window - start.
- max_
retries int - Maximum number of retries.
- max_
run_ inttime_ in_ seconds - SQL timeout.
- parameters Mapping[str, str]
- Parameter configuration.
- resource_
pool str - Resource pool.
- role_
arn str - Source read role ARN.
- script str
- SQL statement.
- source_
logstore str - The source Logstore.
- sql_
type str - SQL type.
- to_
time int - Scheduled end time.
- to_
time_ strexpr - End of the SQL time window.
- data
Format String - Write mode.
- dest
Endpoint String - The destination endpoint.
- dest
Logstore String - The destination Logstore.
- dest
Project String - The destination project.
- dest
Role StringArn - Destination write role ARN.
- from
Time Number - The start time of the schedule.
- from
Time StringExpr - SQL time window - start.
- max
Retries Number - Maximum number of retries.
- max
Run NumberTime In Seconds - SQL timeout.
- parameters Map<String>
- Parameter configuration.
- resource
Pool String - Resource pool.
- role
Arn String - Source read role ARN.
- script String
- SQL statement.
- source
Logstore String - The source Logstore.
- sql
Type String - SQL type.
- to
Time Number - Scheduled end time.
- to
Time StringExpr - End of the SQL time window.
Import
Log Service (SLS) Scheduled Sql can be imported using the id, e.g.
$ pulumi import alicloud:sls/scheduledSql:ScheduledSql example <project>:<scheduled_sql_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
