ScheduledTask
Create a ScheduledTask Resource
new ScheduledTask(name: string, args: ScheduledTaskArgs, opts?: CustomResourceOptions);def ScheduledTask(resource_name, opts=None, description=None, launch_expiration_time=None, launch_time=None, recurrence_end_time=None, recurrence_type=None, recurrence_value=None, scheduled_action=None, scheduled_task_name=None, task_enabled=None, __props__=None);func NewScheduledTask(ctx *Context, name string, args ScheduledTaskArgs, opts ...ResourceOption) (*ScheduledTask, error)public ScheduledTask(string name, ScheduledTaskArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ScheduledTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScheduledTaskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ScheduledTask Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ScheduledTask resource accepts the following input properties:
- Launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- Scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- Description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- Launch
Expiration intTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- Recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- Recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- Recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- Scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- Task
Enabled bool Specifies whether to start the scheduled task. Default to true.
- Launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- Scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- Description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- Launch
Expiration intTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- Recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- Recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- Recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- Scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- Task
Enabled bool Specifies whether to start the scheduled task. Default to true.
- launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- launch
Expiration numberTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- task
Enabled boolean Specifies whether to start the scheduled task. Default to true.
- launch_
time str The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- scheduled_
action str The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- description str
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- launch_
expiration_ floattime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- recurrence_
end_ strtime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- recurrence_
type str Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- recurrence_
value str Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- scheduled_
task_ strname Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- task_
enabled bool Specifies whether to start the scheduled task. Default to true.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledTask resource produces the following output properties:
Look up an Existing ScheduledTask Resource
Get an existing ScheduledTask 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?: ScheduledTaskState, opts?: CustomResourceOptions): ScheduledTaskstatic get(resource_name, id, opts=None, description=None, launch_expiration_time=None, launch_time=None, recurrence_end_time=None, recurrence_type=None, recurrence_value=None, scheduled_action=None, scheduled_task_name=None, task_enabled=None, __props__=None);func GetScheduledTask(ctx *Context, name string, id IDInput, state *ScheduledTaskState, opts ...ResourceOption) (*ScheduledTask, error)public static ScheduledTask Get(string name, Input<string> id, ScheduledTaskState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- Launch
Expiration intTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- Launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- Recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- Recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- Recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- Scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- Scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- Task
Enabled bool Specifies whether to start the scheduled task. Default to true.
- Description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- Launch
Expiration intTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- Launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- Recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- Recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- Recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- Scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- Scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- Task
Enabled bool Specifies whether to start the scheduled task. Default to true.
- description string
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- launch
Expiration numberTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- launch
Time string The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- recurrence
End stringTime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- recurrence
Type string Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- recurrence
Value string Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- scheduled
Action string The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- scheduled
Task stringName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- task
Enabled boolean Specifies whether to start the scheduled task. Default to true.
- description str
Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
- launch_
expiration_ floattime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
- launch_
time str The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 90 days from the date of scheduled task creation. If the
recurrence_typeparameter is specified, the task is executed repeatedly at the time specified by LaunchTime. Otherwise, the task is only executed once at the date and time specified by LaunchTime.- recurrence_
end_ strtime Specifies the end time after which the scheduled task is no longer repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. You cannot enter a time point later than 365 days from the date of scheduled task creation.
- recurrence_
type str Specifies the recurrence type of the scheduled task. If set, both
recurrence_valueandrecurrence_end_timemust be set. Valid values: - Daily: The scheduled task is executed once every specified number of days. - Weekly: The scheduled task is executed on each specified day of a week. - Monthly: The scheduled task is executed on each specified day of a month. - Cron: (Available in 1.60.0+) The scheduled task is executed based on the specified cron expression.- recurrence_
value str Specifies how often a scheduled task recurs. The valid value depends on
recurrence_type- Daily: You can enter one value. Valid values: 1 to 31. - Weekly: You can enter multiple values and separate them with commas (,). For example, the values 0 to 6 correspond to the days of the week in sequence from Sunday to Saturday. - Monthly: You can enter two values in A-B format. Valid values of A and B: 1 to 31. The value of B must be greater than or equal to the value of A. - Cron: You can enter a cron expression which is written in UTC and consists of five fields: minute, hour, day of month (date), month, and day of week. The expression can contain wildcard characters including commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), forward slashes (/), and the L and W letters.- scheduled_
action str The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule.
- scheduled_
task_ strname Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
- task_
enabled bool Specifies whether to start the scheduled task. Default to true.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.