def modify_scheduled_task()

in footmark/ess/connection.py [0:0]


    def modify_scheduled_task(self, scheduled_task_id, scaling_rule_ari=None, launch_time=None, name=None, description=None,
                              launch_expiration_time=None, recurrence_type=None, recurrence_value=None, recurrence_end_time=None, task_enabled=None):
        """
        Modifies the attributes of a scheduled task.

        :type str
        :param scheduled_task_id: ID of the scheduled task.
        :type str
        :param scaling_rule_ari: The unique identifier of the scaling rule.
        :type str
        :param launch_time: 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.
        :type str
        :param name: 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.
        :type str
        :param description: Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
        :type int
        :param launch_expiration_time: Time period within which the failed scheduled task is retried. The default value is 600s. Value range: [0, 21600]
        :type str
        :param recurrence_type: 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 at the same time.
        :type str
        :param recurrence_value: 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 at the same tiem.
        :type str
        :param recurrence_end_time: 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 at the same time.
        :type bool
        :param task_enabled: 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.
        
        :rtype: object
        :return: Returns a <footmark.ess.ScheduledTask> object.

        """

        params = {}

        self.build_list_params(params, scheduled_task_id, 'ScheduledTaskId')
        if scaling_rule_ari:
            self.build_list_params(params, scaling_rule_ari, 'ScalingRuleAri')
        if launch_time:
            self.build_list_params(params, launch_time, 'LaunchTime')
        if name:
            self.build_list_params(params, name, 'ScheduledTaskName')
        if description:
            self.build_list_params(params, description, 'Description')
        if launch_expiration_time is not None:
            self.build_list_params(params, launch_expiration_time, 'LaunchExpirationTime')
        if recurrence_type:
            self.build_list_params(params, recurrence_type, 'RecurrenceType')
        if recurrence_value:
            self.build_list_params(params, recurrence_value, 'RecurrenceValue')
        if recurrence_end_time:
            self.build_list_params(params, recurrence_end_time, 'RecurrenceEndTime')
        if task_enabled is True or task_enabled is None:
            self.build_list_params(params, True, 'TaskEnabled')

        return self.get_status('ModifyScheduledTask', params)