tencentcloud.PtsCronJob
Explore with Pulumi AI
Provides a resource to create a pts cron_job
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const cronJob = new tencentcloud.PtsCronJob("cronJob", {
cronExpression: "* 1 * * *",
frequencyType: 2,
jobOwner: "userName",
note: "desc",
noticeId: "notice-vp6i38jt",
projectId: "project-7qkzxhea",
scenarioId: "scenario-c22lqb1w",
scenarioName: "pts-js(2022-11-10 21:53:53)",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
cron_job = tencentcloud.PtsCronJob("cronJob",
cron_expression="* 1 * * *",
frequency_type=2,
job_owner="userName",
note="desc",
notice_id="notice-vp6i38jt",
project_id="project-7qkzxhea",
scenario_id="scenario-c22lqb1w",
scenario_name="pts-js(2022-11-10 21:53:53)")
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 {
_, err := tencentcloud.NewPtsCronJob(ctx, "cronJob", &tencentcloud.PtsCronJobArgs{
CronExpression: pulumi.String("* 1 * * *"),
FrequencyType: pulumi.Float64(2),
JobOwner: pulumi.String("userName"),
Note: pulumi.String("desc"),
NoticeId: pulumi.String("notice-vp6i38jt"),
ProjectId: pulumi.String("project-7qkzxhea"),
ScenarioId: pulumi.String("scenario-c22lqb1w"),
ScenarioName: pulumi.String("pts-js(2022-11-10 21:53:53)"),
})
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 cronJob = new Tencentcloud.PtsCronJob("cronJob", new()
{
CronExpression = "* 1 * * *",
FrequencyType = 2,
JobOwner = "userName",
Note = "desc",
NoticeId = "notice-vp6i38jt",
ProjectId = "project-7qkzxhea",
ScenarioId = "scenario-c22lqb1w",
ScenarioName = "pts-js(2022-11-10 21:53:53)",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PtsCronJob;
import com.pulumi.tencentcloud.PtsCronJobArgs;
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 cronJob = new PtsCronJob("cronJob", PtsCronJobArgs.builder()
.cronExpression("* 1 * * *")
.frequencyType(2)
.jobOwner("userName")
.note("desc")
.noticeId("notice-vp6i38jt")
.projectId("project-7qkzxhea")
.scenarioId("scenario-c22lqb1w")
.scenarioName("pts-js(2022-11-10 21:53:53)")
.build());
}
}
resources:
cronJob:
type: tencentcloud:PtsCronJob
properties:
cronExpression: '* 1 * * *'
frequencyType: 2
jobOwner: userName
note: desc
# end_time = ""
noticeId: notice-vp6i38jt
projectId: project-7qkzxhea
scenarioId: scenario-c22lqb1w
scenarioName: pts-js(2022-11-10 21:53:53)
Create PtsCronJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PtsCronJob(name: string, args: PtsCronJobArgs, opts?: CustomResourceOptions);
@overload
def PtsCronJob(resource_name: str,
args: PtsCronJobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PtsCronJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
cron_expression: Optional[str] = None,
frequency_type: Optional[float] = None,
job_owner: Optional[str] = None,
project_id: Optional[str] = None,
scenario_id: Optional[str] = None,
scenario_name: Optional[str] = None,
end_time: Optional[str] = None,
name: Optional[str] = None,
note: Optional[str] = None,
notice_id: Optional[str] = None,
pts_cron_job_id: Optional[str] = None)
func NewPtsCronJob(ctx *Context, name string, args PtsCronJobArgs, opts ...ResourceOption) (*PtsCronJob, error)
public PtsCronJob(string name, PtsCronJobArgs args, CustomResourceOptions? opts = null)
public PtsCronJob(String name, PtsCronJobArgs args)
public PtsCronJob(String name, PtsCronJobArgs args, CustomResourceOptions options)
type: tencentcloud:PtsCronJob
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 PtsCronJobArgs
- 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 PtsCronJobArgs
- 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 PtsCronJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PtsCronJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PtsCronJobArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PtsCronJob 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 PtsCronJob resource accepts the following input properties:
- Cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- Frequency
Type double - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - Job
Owner string - Job Owner.
- Project
Id string - Project Id.
- Scenario
Id string - Scenario Id.
- Scenario
Name string - Scenario Name.
- End
Time string - End Time; type: Timestamp ISO8601.
- Name string
- Cron Job Name.
- Note string
- Note.
- Notice
Id string - Notice ID.
- Pts
Cron stringJob Id - ID of the resource.
- Cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- Frequency
Type float64 - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - Job
Owner string - Job Owner.
- Project
Id string - Project Id.
- Scenario
Id string - Scenario Id.
- Scenario
Name string - Scenario Name.
- End
Time string - End Time; type: Timestamp ISO8601.
- Name string
- Cron Job Name.
- Note string
- Note.
- Notice
Id string - Notice ID.
- Pts
Cron stringJob Id - ID of the resource.
- cron
Expression String - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- frequency
Type Double - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner String - Job Owner.
- project
Id String - Project Id.
- scenario
Id String - Scenario Id.
- scenario
Name String - Scenario Name.
- end
Time String - End Time; type: Timestamp ISO8601.
- name String
- Cron Job Name.
- note String
- Note.
- notice
Id String - Notice ID.
- pts
Cron StringJob Id - ID of the resource.
- cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- frequency
Type number - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner string - Job Owner.
- project
Id string - Project Id.
- scenario
Id string - Scenario Id.
- scenario
Name string - Scenario Name.
- end
Time string - End Time; type: Timestamp ISO8601.
- name string
- Cron Job Name.
- note string
- Note.
- notice
Id string - Notice ID.
- pts
Cron stringJob Id - ID of the resource.
- cron_
expression str - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- frequency_
type float - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job_
owner str - Job Owner.
- project_
id str - Project Id.
- scenario_
id str - Scenario Id.
- scenario_
name str - Scenario Name.
- end_
time str - End Time; type: Timestamp ISO8601.
- name str
- Cron Job Name.
- note str
- Note.
- notice_
id str - Notice ID.
- pts_
cron_ strjob_ id - ID of the resource.
- cron
Expression String - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- frequency
Type Number - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner String - Job Owner.
- project
Id String - Project Id.
- scenario
Id String - Scenario Id.
- scenario
Name String - Scenario Name.
- end
Time String - End Time; type: Timestamp ISO8601.
- name String
- Cron Job Name.
- note String
- Note.
- notice
Id String - Notice ID.
- pts
Cron StringJob Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PtsCronJob resource produces the following output properties:
- Abort
Reason double - Reason for suspension.
- App
Id double - App ID.
- Created
At string - Creation time; type: Timestamp ISO8601.
- Cron
Job stringId - Cron job ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status double
- Scheduled task status.
- Sub
Account stringUin - Sub-user ID.
- Uin string
- User ID.
- Updated
At string - Update time; type: Timestamp ISO8601.
- Abort
Reason float64 - Reason for suspension.
- App
Id float64 - App ID.
- Created
At string - Creation time; type: Timestamp ISO8601.
- Cron
Job stringId - Cron job ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status float64
- Scheduled task status.
- Sub
Account stringUin - Sub-user ID.
- Uin string
- User ID.
- Updated
At string - Update time; type: Timestamp ISO8601.
- abort
Reason Double - Reason for suspension.
- app
Id Double - App ID.
- created
At String - Creation time; type: Timestamp ISO8601.
- cron
Job StringId - Cron job ID.
- id String
- The provider-assigned unique ID for this managed resource.
- status Double
- Scheduled task status.
- sub
Account StringUin - Sub-user ID.
- uin String
- User ID.
- updated
At String - Update time; type: Timestamp ISO8601.
- abort
Reason number - Reason for suspension.
- app
Id number - App ID.
- created
At string - Creation time; type: Timestamp ISO8601.
- cron
Job stringId - Cron job ID.
- id string
- The provider-assigned unique ID for this managed resource.
- status number
- Scheduled task status.
- sub
Account stringUin - Sub-user ID.
- uin string
- User ID.
- updated
At string - Update time; type: Timestamp ISO8601.
- abort_
reason float - Reason for suspension.
- app_
id float - App ID.
- created_
at str - Creation time; type: Timestamp ISO8601.
- cron_
job_ strid - Cron job ID.
- id str
- The provider-assigned unique ID for this managed resource.
- status float
- Scheduled task status.
- sub_
account_ struin - Sub-user ID.
- uin str
- User ID.
- updated_
at str - Update time; type: Timestamp ISO8601.
- abort
Reason Number - Reason for suspension.
- app
Id Number - App ID.
- created
At String - Creation time; type: Timestamp ISO8601.
- cron
Job StringId - Cron job ID.
- id String
- The provider-assigned unique ID for this managed resource.
- status Number
- Scheduled task status.
- sub
Account StringUin - Sub-user ID.
- uin String
- User ID.
- updated
At String - Update time; type: Timestamp ISO8601.
Look up Existing PtsCronJob Resource
Get an existing PtsCronJob 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?: PtsCronJobState, opts?: CustomResourceOptions): PtsCronJob
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
abort_reason: Optional[float] = None,
app_id: Optional[float] = None,
created_at: Optional[str] = None,
cron_expression: Optional[str] = None,
cron_job_id: Optional[str] = None,
end_time: Optional[str] = None,
frequency_type: Optional[float] = None,
job_owner: Optional[str] = None,
name: Optional[str] = None,
note: Optional[str] = None,
notice_id: Optional[str] = None,
project_id: Optional[str] = None,
pts_cron_job_id: Optional[str] = None,
scenario_id: Optional[str] = None,
scenario_name: Optional[str] = None,
status: Optional[float] = None,
sub_account_uin: Optional[str] = None,
uin: Optional[str] = None,
updated_at: Optional[str] = None) -> PtsCronJob
func GetPtsCronJob(ctx *Context, name string, id IDInput, state *PtsCronJobState, opts ...ResourceOption) (*PtsCronJob, error)
public static PtsCronJob Get(string name, Input<string> id, PtsCronJobState? state, CustomResourceOptions? opts = null)
public static PtsCronJob get(String name, Output<String> id, PtsCronJobState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PtsCronJob 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.
- Abort
Reason double - Reason for suspension.
- App
Id double - App ID.
- Created
At string - Creation time; type: Timestamp ISO8601.
- Cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- Cron
Job stringId - Cron job ID.
- End
Time string - End Time; type: Timestamp ISO8601.
- Frequency
Type double - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - Job
Owner string - Job Owner.
- Name string
- Cron Job Name.
- Note string
- Note.
- Notice
Id string - Notice ID.
- Project
Id string - Project Id.
- Pts
Cron stringJob Id - ID of the resource.
- Scenario
Id string - Scenario Id.
- Scenario
Name string - Scenario Name.
- Status double
- Scheduled task status.
- Sub
Account stringUin - Sub-user ID.
- Uin string
- User ID.
- Updated
At string - Update time; type: Timestamp ISO8601.
- Abort
Reason float64 - Reason for suspension.
- App
Id float64 - App ID.
- Created
At string - Creation time; type: Timestamp ISO8601.
- Cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- Cron
Job stringId - Cron job ID.
- End
Time string - End Time; type: Timestamp ISO8601.
- Frequency
Type float64 - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - Job
Owner string - Job Owner.
- Name string
- Cron Job Name.
- Note string
- Note.
- Notice
Id string - Notice ID.
- Project
Id string - Project Id.
- Pts
Cron stringJob Id - ID of the resource.
- Scenario
Id string - Scenario Id.
- Scenario
Name string - Scenario Name.
- Status float64
- Scheduled task status.
- Sub
Account stringUin - Sub-user ID.
- Uin string
- User ID.
- Updated
At string - Update time; type: Timestamp ISO8601.
- abort
Reason Double - Reason for suspension.
- app
Id Double - App ID.
- created
At String - Creation time; type: Timestamp ISO8601.
- cron
Expression String - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- cron
Job StringId - Cron job ID.
- end
Time String - End Time; type: Timestamp ISO8601.
- frequency
Type Double - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner String - Job Owner.
- name String
- Cron Job Name.
- note String
- Note.
- notice
Id String - Notice ID.
- project
Id String - Project Id.
- pts
Cron StringJob Id - ID of the resource.
- scenario
Id String - Scenario Id.
- scenario
Name String - Scenario Name.
- status Double
- Scheduled task status.
- sub
Account StringUin - Sub-user ID.
- uin String
- User ID.
- updated
At String - Update time; type: Timestamp ISO8601.
- abort
Reason number - Reason for suspension.
- app
Id number - App ID.
- created
At string - Creation time; type: Timestamp ISO8601.
- cron
Expression string - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- cron
Job stringId - Cron job ID.
- end
Time string - End Time; type: Timestamp ISO8601.
- frequency
Type number - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner string - Job Owner.
- name string
- Cron Job Name.
- note string
- Note.
- notice
Id string - Notice ID.
- project
Id string - Project Id.
- pts
Cron stringJob Id - ID of the resource.
- scenario
Id string - Scenario Id.
- scenario
Name string - Scenario Name.
- status number
- Scheduled task status.
- sub
Account stringUin - Sub-user ID.
- uin string
- User ID.
- updated
At string - Update time; type: Timestamp ISO8601.
- abort_
reason float - Reason for suspension.
- app_
id float - App ID.
- created_
at str - Creation time; type: Timestamp ISO8601.
- cron_
expression str - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- cron_
job_ strid - Cron job ID.
- end_
time str - End Time; type: Timestamp ISO8601.
- frequency_
type float - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job_
owner str - Job Owner.
- name str
- Cron Job Name.
- note str
- Note.
- notice_
id str - Notice ID.
- project_
id str - Project Id.
- pts_
cron_ strjob_ id - ID of the resource.
- scenario_
id str - Scenario Id.
- scenario_
name str - Scenario Name.
- status float
- Scheduled task status.
- sub_
account_ struin - Sub-user ID.
- uin str
- User ID.
- updated_
at str - Update time; type: Timestamp ISO8601.
- abort
Reason Number - Reason for suspension.
- app
Id Number - App ID.
- created
At String - Creation time; type: Timestamp ISO8601.
- cron
Expression String - Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
- cron
Job StringId - Cron job ID.
- end
Time String - End Time; type: Timestamp ISO8601.
- frequency
Type Number - Execution frequency type,
1
: execute only once;2
: daily granularity;3
: weekly granularity;4
: advanced. - job
Owner String - Job Owner.
- name String
- Cron Job Name.
- note String
- Note.
- notice
Id String - Notice ID.
- project
Id String - Project Id.
- pts
Cron StringJob Id - ID of the resource.
- scenario
Id String - Scenario Id.
- scenario
Name String - Scenario Name.
- status Number
- Scheduled task status.
- sub
Account StringUin - Sub-user ID.
- uin String
- User ID.
- updated
At String - Update time; type: Timestamp ISO8601.
Import
pts cron_job can be imported using the projectId#cronJobId, e.g.
$ pulumi import tencentcloud:index/ptsCronJob:PtsCronJob cron_job project-7qkzxhea#scenario-c22lqb1w
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.