All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.ess.inputs.ScheduledTaskState Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.ess.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ScheduledTaskState extends com.pulumi.resources.ResourceArgs {

    public static final ScheduledTaskState Empty = new ScheduledTaskState();

    /**
     * Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The expected number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group. **NOTE:** You must specify the `DesiredCapacity` parameter when you create the scaling group.
     * 
     */
    @Import(name="desiredCapacity")
    private @Nullable Output desiredCapacity;

    /**
     * @return The expected number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group. **NOTE:** You must specify the `DesiredCapacity` parameter when you create the scaling group.
     * 
     */
    public Optional> desiredCapacity() {
        return Optional.ofNullable(this.desiredCapacity);
    }

    /**
     * The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
     * 
     */
    @Import(name="launchExpirationTime")
    private @Nullable Output launchExpirationTime;

    /**
     * @return The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
     * 
     */
    public Optional> launchExpirationTime() {
        return Optional.ofNullable(this.launchExpirationTime);
    }

    /**
     * The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ 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_type` parameter 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.
     * 
     */
    @Import(name="launchTime")
    private @Nullable Output launchTime;

    /**
     * @return The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ 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_type` parameter 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.
     * 
     */
    public Optional> launchTime() {
        return Optional.ofNullable(this.launchTime);
    }

    /**
     * The maximum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
     * 
     */
    @Import(name="maxValue")
    private @Nullable Output maxValue;

    /**
     * @return The maximum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
     * 
     */
    public Optional> maxValue() {
        return Optional.ofNullable(this.maxValue);
    }

    /**
     * The minimum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
     * 
     */
    @Import(name="minValue")
    private @Nullable Output minValue;

    /**
     * @return The minimum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
     * 
     */
    public Optional> minValue() {
        return Optional.ofNullable(this.minValue);
    }

    /**
     * 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. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time.
     * 
     */
    @Import(name="recurrenceEndTime")
    private @Nullable Output recurrenceEndTime;

    /**
     * @return 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. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time.
     * 
     */
    public Optional> recurrenceEndTime() {
        return Optional.ofNullable(this.recurrenceEndTime);
    }

    /**
     * Specifies the recurrence type of the scheduled task. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
     * 
     */
    @Import(name="recurrenceType")
    private @Nullable Output recurrenceType;

    /**
     * @return Specifies the recurrence type of the scheduled task. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
     * 
     */
    public Optional> recurrenceType() {
        return Optional.ofNullable(this.recurrenceType);
    }

    /**
     * Specifies how often a scheduled task recurs. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
     * 
     */
    @Import(name="recurrenceValue")
    private @Nullable Output recurrenceValue;

    /**
     * @return Specifies how often a scheduled task recurs. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
     * 
     */
    public Optional> recurrenceValue() {
        return Optional.ofNullable(this.recurrenceValue);
    }

    /**
     * The ID of the scaling group where the number of instances is modified when the scheduled task is triggered. After the `ScalingGroupId` parameter is specified, the scaling method of the scheduled task is to specify the number of instances in a scaling group. You must specify at least one of the following parameters: `MinValue`, `MaxValue`, and `DesiredCapacity`. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
     * 
     */
    @Import(name="scalingGroupId")
    private @Nullable Output scalingGroupId;

    /**
     * @return The ID of the scaling group where the number of instances is modified when the scheduled task is triggered. After the `ScalingGroupId` parameter is specified, the scaling method of the scheduled task is to specify the number of instances in a scaling group. You must specify at least one of the following parameters: `MinValue`, `MaxValue`, and `DesiredCapacity`. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
     * 
     */
    public Optional> scalingGroupId() {
        return Optional.ofNullable(this.scalingGroupId);
    }

    /**
     * The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
     * 
     */
    @Import(name="scheduledAction")
    private @Nullable Output scheduledAction;

    /**
     * @return The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
     * 
     */
    public Optional> scheduledAction() {
        return Optional.ofNullable(this.scheduledAction);
    }

    /**
     * Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
     * 
     */
    @Import(name="scheduledTaskName")
    private @Nullable Output scheduledTaskName;

    /**
     * @return Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
     * 
     */
    public Optional> scheduledTaskName() {
        return Optional.ofNullable(this.scheduledTaskName);
    }

    /**
     * Specifies whether to start the scheduled task. Default to true.
     * 
     */
    @Import(name="taskEnabled")
    private @Nullable Output taskEnabled;

    /**
     * @return Specifies whether to start the scheduled task. Default to true.
     * 
     */
    public Optional> taskEnabled() {
        return Optional.ofNullable(this.taskEnabled);
    }

    private ScheduledTaskState() {}

    private ScheduledTaskState(ScheduledTaskState $) {
        this.description = $.description;
        this.desiredCapacity = $.desiredCapacity;
        this.launchExpirationTime = $.launchExpirationTime;
        this.launchTime = $.launchTime;
        this.maxValue = $.maxValue;
        this.minValue = $.minValue;
        this.recurrenceEndTime = $.recurrenceEndTime;
        this.recurrenceType = $.recurrenceType;
        this.recurrenceValue = $.recurrenceValue;
        this.scalingGroupId = $.scalingGroupId;
        this.scheduledAction = $.scheduledAction;
        this.scheduledTaskName = $.scheduledTaskName;
        this.taskEnabled = $.taskEnabled;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ScheduledTaskState defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ScheduledTaskState $;

        public Builder() {
            $ = new ScheduledTaskState();
        }

        public Builder(ScheduledTaskState defaults) {
            $ = new ScheduledTaskState(Objects.requireNonNull(defaults));
        }

        /**
         * @param description Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param desiredCapacity The expected number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group. **NOTE:** You must specify the `DesiredCapacity` parameter when you create the scaling group.
         * 
         * @return builder
         * 
         */
        public Builder desiredCapacity(@Nullable Output desiredCapacity) {
            $.desiredCapacity = desiredCapacity;
            return this;
        }

        /**
         * @param desiredCapacity The expected number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group. **NOTE:** You must specify the `DesiredCapacity` parameter when you create the scaling group.
         * 
         * @return builder
         * 
         */
        public Builder desiredCapacity(Integer desiredCapacity) {
            return desiredCapacity(Output.of(desiredCapacity));
        }

        /**
         * @param launchExpirationTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
         * 
         * @return builder
         * 
         */
        public Builder launchExpirationTime(@Nullable Output launchExpirationTime) {
            $.launchExpirationTime = launchExpirationTime;
            return this;
        }

        /**
         * @param launchExpirationTime The time period during which a failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600. Default value: 600
         * 
         * @return builder
         * 
         */
        public Builder launchExpirationTime(Integer launchExpirationTime) {
            return launchExpirationTime(Output.of(launchExpirationTime));
        }

        /**
         * @param launchTime The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ 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_type` parameter 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.
         * 
         * @return builder
         * 
         */
        public Builder launchTime(@Nullable Output launchTime) {
            $.launchTime = launchTime;
            return this;
        }

        /**
         * @param launchTime The time at which the scheduled task is triggered. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ 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_type` parameter 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.
         * 
         * @return builder
         * 
         */
        public Builder launchTime(String launchTime) {
            return launchTime(Output.of(launchTime));
        }

        /**
         * @param maxValue The maximum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
         * 
         * @return builder
         * 
         */
        public Builder maxValue(@Nullable Output maxValue) {
            $.maxValue = maxValue;
            return this;
        }

        /**
         * @param maxValue The maximum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
         * 
         * @return builder
         * 
         */
        public Builder maxValue(Integer maxValue) {
            return maxValue(Output.of(maxValue));
        }

        /**
         * @param minValue The minimum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
         * 
         * @return builder
         * 
         */
        public Builder minValue(@Nullable Output minValue) {
            $.minValue = minValue;
            return this;
        }

        /**
         * @param minValue The minimum number of instances in a scaling group when the scaling method of the scheduled task is to specify the number of instances in a scaling group.
         * 
         * @return builder
         * 
         */
        public Builder minValue(Integer minValue) {
            return minValue(Output.of(minValue));
        }

        /**
         * @param recurrenceEndTime 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. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceEndTime(@Nullable Output recurrenceEndTime) {
            $.recurrenceEndTime = recurrenceEndTime;
            return this;
        }

        /**
         * @param recurrenceEndTime 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. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceEndTime(String recurrenceEndTime) {
            return recurrenceEndTime(Output.of(recurrenceEndTime));
        }

        /**
         * @param recurrenceType Specifies the recurrence type of the scheduled task. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceType(@Nullable Output recurrenceType) {
            $.recurrenceType = recurrenceType;
            return this;
        }

        /**
         * @param recurrenceType Specifies the recurrence type of the scheduled task. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceType(String recurrenceType) {
            return recurrenceType(Output.of(recurrenceType));
        }

        /**
         * @param recurrenceValue Specifies how often a scheduled task recurs. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceValue(@Nullable Output recurrenceValue) {
            $.recurrenceValue = recurrenceValue;
            return this;
        }

        /**
         * @param recurrenceValue Specifies how often a scheduled task recurs. **NOTE:** You must specify `RecurrenceType`, `RecurrenceValue`, and `RecurrenceEndTime` at the same time. 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.
         * 
         * @return builder
         * 
         */
        public Builder recurrenceValue(String recurrenceValue) {
            return recurrenceValue(Output.of(recurrenceValue));
        }

        /**
         * @param scalingGroupId The ID of the scaling group where the number of instances is modified when the scheduled task is triggered. After the `ScalingGroupId` parameter is specified, the scaling method of the scheduled task is to specify the number of instances in a scaling group. You must specify at least one of the following parameters: `MinValue`, `MaxValue`, and `DesiredCapacity`. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder scalingGroupId(@Nullable Output scalingGroupId) {
            $.scalingGroupId = scalingGroupId;
            return this;
        }

        /**
         * @param scalingGroupId The ID of the scaling group where the number of instances is modified when the scheduled task is triggered. After the `ScalingGroupId` parameter is specified, the scaling method of the scheduled task is to specify the number of instances in a scaling group. You must specify at least one of the following parameters: `MinValue`, `MaxValue`, and `DesiredCapacity`. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder scalingGroupId(String scalingGroupId) {
            return scalingGroupId(Output.of(scalingGroupId));
        }

        /**
         * @param scheduledAction The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder scheduledAction(@Nullable Output scheduledAction) {
            $.scheduledAction = scheduledAction;
            return this;
        }

        /**
         * @param scheduledAction The operation to be performed when a scheduled task is triggered. Enter the unique identifier of a scaling rule. **NOTE:** You cannot specify `scheduled_action` and `scaling_group_id` at the same time.
         * 
         * @return builder
         * 
         */
        public Builder scheduledAction(String scheduledAction) {
            return scheduledAction(Output.of(scheduledAction));
        }

        /**
         * @param scheduledTaskName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
         * 
         * @return builder
         * 
         */
        public Builder scheduledTaskName(@Nullable Output scheduledTaskName) {
            $.scheduledTaskName = scheduledTaskName;
            return this;
        }

        /**
         * @param scheduledTaskName Display name of the scheduled task, which must be 2-40 characters (English or Chinese) long.
         * 
         * @return builder
         * 
         */
        public Builder scheduledTaskName(String scheduledTaskName) {
            return scheduledTaskName(Output.of(scheduledTaskName));
        }

        /**
         * @param taskEnabled Specifies whether to start the scheduled task. Default to true.
         * 
         * @return builder
         * 
         */
        public Builder taskEnabled(@Nullable Output taskEnabled) {
            $.taskEnabled = taskEnabled;
            return this;
        }

        /**
         * @param taskEnabled Specifies whether to start the scheduled task. Default to true.
         * 
         * @return builder
         * 
         */
        public Builder taskEnabled(Boolean taskEnabled) {
            return taskEnabled(Output.of(taskEnabled));
        }

        public ScheduledTaskState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy