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

com.aliyun.sdk.service.ess20220222.models.ModifyScheduledTaskRequest Maven / Gradle / Ivy

There is a newer version: 1.0.25
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ess20220222.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link ModifyScheduledTaskRequest} extends {@link RequestModel}
 *
 * 

ModifyScheduledTaskRequest

*/ public class ModifyScheduledTaskRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DesiredCapacity") private Integer desiredCapacity; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("LaunchExpirationTime") @com.aliyun.core.annotation.Validation(maximum = 86400) private Integer launchExpirationTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("LaunchTime") private String launchTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("MaxValue") private Integer maxValue; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("MinValue") private Integer minValue; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RecurrenceEndTime") private String recurrenceEndTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RecurrenceType") private String recurrenceType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RecurrenceValue") private String recurrenceValue; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScalingGroupId") private String scalingGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScheduledAction") private String scheduledAction; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScheduledTaskId") @com.aliyun.core.annotation.Validation(required = true) private String scheduledTaskId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScheduledTaskName") private String scheduledTaskName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("TaskEnabled") private Boolean taskEnabled; private ModifyScheduledTaskRequest(Builder builder) { super(builder); this.description = builder.description; this.desiredCapacity = builder.desiredCapacity; this.launchExpirationTime = builder.launchExpirationTime; this.launchTime = builder.launchTime; this.maxValue = builder.maxValue; this.minValue = builder.minValue; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.recurrenceEndTime = builder.recurrenceEndTime; this.recurrenceType = builder.recurrenceType; this.recurrenceValue = builder.recurrenceValue; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.scalingGroupId = builder.scalingGroupId; this.scheduledAction = builder.scheduledAction; this.scheduledTaskId = builder.scheduledTaskId; this.scheduledTaskName = builder.scheduledTaskName; this.taskEnabled = builder.taskEnabled; } public static Builder builder() { return new Builder(); } public static ModifyScheduledTaskRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return description */ public String getDescription() { return this.description; } /** * @return desiredCapacity */ public Integer getDesiredCapacity() { return this.desiredCapacity; } /** * @return launchExpirationTime */ public Integer getLaunchExpirationTime() { return this.launchExpirationTime; } /** * @return launchTime */ public String getLaunchTime() { return this.launchTime; } /** * @return maxValue */ public Integer getMaxValue() { return this.maxValue; } /** * @return minValue */ public Integer getMinValue() { return this.minValue; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return recurrenceEndTime */ public String getRecurrenceEndTime() { return this.recurrenceEndTime; } /** * @return recurrenceType */ public String getRecurrenceType() { return this.recurrenceType; } /** * @return recurrenceValue */ public String getRecurrenceValue() { return this.recurrenceValue; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return scalingGroupId */ public String getScalingGroupId() { return this.scalingGroupId; } /** * @return scheduledAction */ public String getScheduledAction() { return this.scheduledAction; } /** * @return scheduledTaskId */ public String getScheduledTaskId() { return this.scheduledTaskId; } /** * @return scheduledTaskName */ public String getScheduledTaskName() { return this.scheduledTaskName; } /** * @return taskEnabled */ public Boolean getTaskEnabled() { return this.taskEnabled; } public static final class Builder extends Request.Builder { private String description; private Integer desiredCapacity; private Integer launchExpirationTime; private String launchTime; private Integer maxValue; private Integer minValue; private String ownerAccount; private Long ownerId; private String recurrenceEndTime; private String recurrenceType; private String recurrenceValue; private String resourceOwnerAccount; private Long resourceOwnerId; private String scalingGroupId; private String scheduledAction; private String scheduledTaskId; private String scheduledTaskName; private Boolean taskEnabled; private Builder() { super(); } private Builder(ModifyScheduledTaskRequest request) { super(request); this.description = request.description; this.desiredCapacity = request.desiredCapacity; this.launchExpirationTime = request.launchExpirationTime; this.launchTime = request.launchTime; this.maxValue = request.maxValue; this.minValue = request.minValue; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.recurrenceEndTime = request.recurrenceEndTime; this.recurrenceType = request.recurrenceType; this.recurrenceValue = request.recurrenceValue; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.scalingGroupId = request.scalingGroupId; this.scheduledAction = request.scheduledAction; this.scheduledTaskId = request.scheduledTaskId; this.scheduledTaskName = request.scheduledTaskName; this.taskEnabled = request.taskEnabled; } /** * The description of the scheduled task. The description must be 2 to 200 characters in length. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * The expected number of instances in the scaling group if you specify the ScalingGroupId parameter. *

* * > You must specify the `DesiredCapacity` parameter when you create a scaling group. */ public Builder desiredCapacity(Integer desiredCapacity) { this.putQueryParameter("DesiredCapacity", desiredCapacity); this.desiredCapacity = desiredCapacity; return this; } /** * The time period during which the failed scheduled task is retried. Unit: seconds. Valid values: 0 to 1800. *

* * Default value: 600. */ public Builder launchExpirationTime(Integer launchExpirationTime) { this.putQueryParameter("LaunchExpirationTime", launchExpirationTime); this.launchExpirationTime = launchExpirationTime; return this; } /** * The point in time at which the scheduled task is triggered. The time follows 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 point in time at which the scheduled task is modified. *

* * * If you specify the `RecurrenceType` parameter, the task is repeatedly executed at the time point that is specified by the LaunchTime parameter. * * If you do not specify the `RecurrenceType` parameter, the task is executed only once at the point in time that is specified by the LaunchTime parameter. */ public Builder launchTime(String launchTime) { this.putQueryParameter("LaunchTime", launchTime); this.launchTime = launchTime; return this; } /** * The maximum number of instances in the scaling group if you specify the ScalingGroupId parameter. */ public Builder maxValue(Integer maxValue) { this.putQueryParameter("MaxValue", maxValue); this.maxValue = maxValue; return this; } /** * The minimum number of instances in the scaling group if you specify the ScalingGroupId parameter. */ public Builder minValue(Integer minValue) { this.putQueryParameter("MinValue", minValue); this.minValue = minValue; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** * The end time of the scheduled task. 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 point in time that is later than 365 days from the point in time at which the scheduled task is modified. */ public Builder recurrenceEndTime(String recurrenceEndTime) { this.putQueryParameter("RecurrenceEndTime", recurrenceEndTime); this.recurrenceEndTime = recurrenceEndTime; return this; } /** * The interval at which the scheduled task is repeated. 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 the week. * * Monthly: The scheduled task is executed on each specified day of the month. * * Cron: The scheduled task is executed based on the specified cron expression. * * After you modify the scheduled task, the values that you specify for the `RecurrenceType` and `RecurrenceValue` parameters must be valid at the same time. */ public Builder recurrenceType(String recurrenceType) { this.putQueryParameter("RecurrenceType", recurrenceType); this.recurrenceType = recurrenceType; return this; } /** * The number of recurrences of the scheduled task. *

* * * If you set the `RecurrenceType` parameter to `Daily`, you can specify only one value for this parameter. Valid values: 1 to 31. * * If you set the `RecurrenceType` parameter to `Weekly`, you can specify multiple values for this parameter. Separate the values with commas (,). The values that correspond to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6.`` * * If you set the `RecurrenceType` parameter to `Monthly`, you can specify two values in the `A-B` format for this parameter. Valid values of A and B: 1 to 31. B must be greater than or equal to A. * * If you set the `RecurrenceType` parameter to `Cron`, you can specify a cron expression. A cron expression is written in UTC time and consists of the following fields: minute, hour, day, month, and week. The expression can contain the letters L and W and the following wildcard characters: commas (,), question marks (?), hyphens (-), asterisks (\*), number signs (#), and forward slashes (/). * * After you modify the scheduled task, the values that you specify for the `RecurrenceType` and `RecurrenceValue` parameters must be valid at the same time. */ public Builder recurrenceValue(String recurrenceValue) { this.putQueryParameter("RecurrenceValue", recurrenceValue); this.recurrenceValue = recurrenceValue; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } /** * 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. *

* * > You cannot specify the `ScheduledAction` and `ScalingGroupId` parameters at the same time. */ public Builder scalingGroupId(String scalingGroupId) { this.putQueryParameter("ScalingGroupId", scalingGroupId); this.scalingGroupId = scalingGroupId; return this; } /** * The scaling rule that you want to execute when the scheduled task is triggered. Enter the ID of the scaling rule. To obtain the ID of a scaling rule, go to the scaling rule details page. If you specify `ScheduledAction`, you must select an existing scaling rule for the scheduled task. *

* * > You can specify only one of `ScheduledAction` and `ScalingGroupId`. */ public Builder scheduledAction(String scheduledAction) { this.putQueryParameter("ScheduledAction", scheduledAction); this.scheduledAction = scheduledAction; return this; } /** * The ID of the scheduled task. */ public Builder scheduledTaskId(String scheduledTaskId) { this.putQueryParameter("ScheduledTaskId", scheduledTaskId); this.scheduledTaskId = scheduledTaskId; return this; } /** * The name of the scheduled task. The name must be 2 to 64 characters in length, and can contain letters, digits, underscores (\_), hyphens (-), and periods (.). It must start with a letter or a digit. The name of the scheduled task must be unique in the region and within the Alibaba Cloud account. */ public Builder scheduledTaskName(String scheduledTaskName) { this.putQueryParameter("ScheduledTaskName", scheduledTaskName); this.scheduledTaskName = scheduledTaskName; return this; } /** * Specifies whether to enable the scheduled task. Valid values: *

* * * true * * false * * Default value: true. */ public Builder taskEnabled(Boolean taskEnabled) { this.putQueryParameter("TaskEnabled", taskEnabled); this.taskEnabled = taskEnabled; return this; } @Override public ModifyScheduledTaskRequest build() { return new ModifyScheduledTaskRequest(this); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy