ScheduledTask
This class encapsulates and extends the ROS resource type ALIYUN::ESS::ScheduledTask, which is used to create a scheduled task by specifying properties.
Initializers
import ros_cdk_ess
ros_cdk_ess.ScheduledTask(
scope: Construct,
id: str,
launch_time: typing.Union[str, IResolvable],
description: typing.Union[str, IResolvable] = None,
desired_capacity: typing.Union[typing.Union[int, float], IResolvable] = None,
launch_expiration_time: typing.Union[typing.Union[int, float], IResolvable] = None,
max_value: typing.Union[typing.Union[int, float], IResolvable] = None,
min_value: typing.Union[typing.Union[int, float], IResolvable] = None,
recurrence_end_time: typing.Union[str, IResolvable] = None,
recurrence_type: typing.Union[str, IResolvable] = None,
recurrence_value: typing.Union[str, IResolvable] = None,
scaling_group_id: typing.Union[str, IResolvable] = None,
scheduled_action: typing.Union[str, IResolvable] = None,
scheduled_task_name: typing.Union[str, IResolvable] = None,
task_enabled: typing.Union[bool, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
launch_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property launchTime: Time point at which the scheduled task is triggered. |
description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property description: Description of the scheduled task, which is 2-200 characters (English or Chinese) long. |
desired_capacity |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property desiredCapacity: The ID of the scaling group whose number of instances must be modified when the scheduled task is triggered. |
launch_expiration_time |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property launchExpirationTime: Time period within which the failed scheduled task is retried. |
max_value |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property maxValue: The expected number of instances in the scaling group if you specify the ScalingGroupId parameter. |
min_value |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property minValue: The maximum number of instances in the scaling group if you specify the ScalingGroupId parameter. |
recurrence_end_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property recurrenceEndTime: End time of the scheduled task to be repeated. |
recurrence_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property recurrenceType: Type of the scheduled task to be repeated. |
recurrence_value |
typing.Union[str, ros_cdk_core.IResolvable] |
Property recurrenceValue: Value of the scheduled task to be repeated. |
scaling_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scalingGroupId: The globally unique ID of the scheduled task. |
scheduled_action |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scheduledAction: Operations performed when the scheduled task is triggered. |
scheduled_task_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scheduledTaskName: Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long. |
task_enabled |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property taskEnabled: Whether to enable the scheduled task. |
enable_resource_property_constraint |
bool |
No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
launch_timeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property launchTime: Time point at which the scheduled task is triggered.
The date format follows the ISO8601 standard and uses UTC time. It is in the format of YYYY-MM-DDThh:mmZ. If RecurrenceType is specified, the time point specified by this attribute is the default time point at which the circle is executed. If RecurrenceType is not specified, the task is executed once on the designated date and time. A time point 90 days after creation or modification cannot be entered.
descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
desired_capacityOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property desiredCapacity: The ID of the scaling group whose number of instances must be modified when the scheduled task is triggered.
If you specify the ScalingGroupId parameter for a scheduled task, you must specify the minimum, maximum, or expected numbers of instances for a scaling group in the scheduled task. That is, you must specify at least one of the MinValue, MaxValue, and DesiredCapacity parameters.
launch_expiration_timeOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property launchExpirationTime: Time period within which the failed scheduled task is retried.
The default value is 600s. Value range: [0, 21600]
max_valueOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property maxValue: The expected number of instances in the scaling group if you specify the ScalingGroupId parameter.
Note: You must specify the DesiredCapacity parameter when you create a scaling group.
min_valueOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property minValue: The maximum number of instances in the scaling group if you specify the ScalingGroupId parameter.
recurrence_end_timeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property recurrenceEndTime: End time of the scheduled task to be repeated.
The date format follows the ISO8601 standard and uses UTC time. It is in the format of YYYY-MM-DDThh:mmZ. A time point 90 days after creation or modification cannot be entered. RecurrenceType, RecurrenceValue and RecurrenceEndTime must be specified.
recurrence_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property recurrenceType: Type of the scheduled task to be repeated.
Optional values:
- Daily: Recurrence interval by day for a scheduled task.
- Weekly: Recurrence interval by week for a scheduled task.
- Monthly: Recurrence interval by month for a scheduled task. RecurrenceType, RecurrenceValue and RecurrenceEndTime must be specified.
recurrence_valueOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property recurrenceValue: Value of the scheduled task to be repeated.
- Daily: Only one value in the range [1,31] can be filled.
- Weekly: Multiple values can be filled. The values of Sunday to Saturday are 0 to 6 in sequence. Multiple values shall be separated by a comma ",".
- Monthly: In the format of A-B. The value range of A and B is 1 to 31, and the B value must be greater than the A value. RecurrenceType, RecurrenceValue and RecurrenceEndTime must be specified.
scaling_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scalingGroupId: The globally unique ID of the scheduled task.
The globally unique ID is generated by the system. Note: You cannot specify the ScheduledAction and ScalingGroupId parameters at the same time.
scheduled_actionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scheduledAction: Operations performed when the scheduled task is triggered.
Fill in the unique identifier of the scaling rule. Note: You cannot specify the ScheduledAction and ScalingGroupId parameters at the same time.
scheduled_task_nameOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scheduledTaskName: Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
It must begin with a number, an upper/lower-case letter or a Chinese character and may contain numbers, "_", "-" or ".". The account name is unique in the same region. If this parameter is not specified, the default value ScheduledScalingTaskId is used.
task_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property taskEnabled: Whether to enable the scheduled task.
- When the parameter is set to true, the task is enabled.
- When the parameter is set to false, the task is disabled. The default value is true.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_ess
ros_cdk_ess.ScheduledTask.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_scheduled_task_id |
ros_cdk_core.IResolvable |
Attribute ScheduledTaskId: ID of the scheduled task, which is generated by the system and globally unique. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
refRequired
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_scheduled_task_idRequired
attr_scheduled_task_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ScheduledTaskId: ID of the scheduled task, which is generated by the system and globally unique.