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

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

The 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 CreateScheduledTaskRequest} extends {@link RequestModel}
 *
 * 

CreateScheduledTaskRequest

*/ public class CreateScheduledTaskRequest 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("RegionId") @com.aliyun.core.annotation.Validation(required = true) private String regionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @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("ScheduledTaskName") private String scheduledTaskName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("TaskEnabled") private Boolean taskEnabled; private CreateScheduledTaskRequest(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.regionId = builder.regionId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.scalingGroupId = builder.scalingGroupId; this.scheduledAction = builder.scheduledAction; this.scheduledTaskName = builder.scheduledTaskName; this.taskEnabled = builder.taskEnabled; } public static Builder builder() { return new Builder(); } public static CreateScheduledTaskRequest 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 regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return scalingGroupId */ public String getScalingGroupId() { return this.scalingGroupId; } /** * @return scheduledAction */ public String getScheduledAction() { return this.scheduledAction; } /** * @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 regionId; private String resourceOwnerAccount; private String scalingGroupId; private String scheduledAction; private String scheduledTaskName; private Boolean taskEnabled; private Builder() { super(); } private Builder(CreateScheduledTaskRequest 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.regionId = request.regionId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.scalingGroupId = request.scalingGroupId; this.scheduledAction = request.scheduledAction; this.scheduledTaskName = request.scheduledTaskName; this.taskEnabled = request.taskEnabled; } /** *

The description of the scheduled task. The description must be 2 to 200 characters in length.

* * example: *

Test scheduled task.

*/ 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.

*
* * example: *

10

*/ public Builder desiredCapacity(Integer desiredCapacity) { this.putQueryParameter("DesiredCapacity", desiredCapacity); this.desiredCapacity = desiredCapacity; return this; } /** *

The time period during which the failed scheduled task can be retried. Unit: seconds. Valid values: 0 to 1800.

*

Default value: 600.

* * example: *

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 point in time that is later than 90 days from the point in time at which the scheduled task is created.

*
    *
  • If you specify the RecurrenceType parameter, the scheduled task is repeatedly executed at the point in time 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.
  • *
* * example: *

2014-08-17T16:52Z

*/ 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.

* * example: *

10

*/ 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.

* * example: *

0

*/ 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 created.

* * example: *

2014-08-17T16:55Z

*/ 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.
  • *
*

You must specify the RecurrenceType and RecurrenceValue parameters at the same time.

* * example: *

Daily

*/ 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 (/).
  • *
*

You must specify both the RecurrenceType parameter and the RecurrenceValue parameter.

* * example: *

1

*/ public Builder recurrenceValue(String recurrenceValue) { this.putQueryParameter("RecurrenceValue", recurrenceValue); this.recurrenceValue = recurrenceValue; return this; } /** *

The region ID of the scheduled task.

*

This parameter is required.

* * example: *

cn-qingdao

*/ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** *

The ID of the scaling group. If you specify this parameter, the number of instances in the scaling group will be changed when the scheduled task is triggered.

*

If you specify ScalingGroupId, you must also specify at least one of the following parameters: MinValue, MaxValue, and DesiredCapacity. You cannot specify ScheduledAction and ScalingGroupId at the same time.

* * example: *

asg-bp18p2yfxow2dloq****

*/ 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. Specify the unique identifier of the scaling rule.

*

If you specify ScheduledAction, the scheduled task uses an existing scaling rule. You cannot specify ScheduledAction and ScalingGroupId at the same time.

* * example: *

ari:acs:ess:cn-hangzhou:140692647****:scalingrule/asr-bp12tcnol686y1ik****

*/ public Builder scheduledAction(String scheduledAction) { this.putQueryParameter("ScheduledAction", scheduledAction); this.scheduledAction = scheduledAction; 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 (.). The name 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.

*

If you do not specify this parameter, the value of the ScheduledTaskId parameter is used.

* * example: *

scheduled****

*/ public Builder scheduledTaskName(String scheduledTaskName) { this.putQueryParameter("ScheduledTaskName", scheduledTaskName); this.scheduledTaskName = scheduledTaskName; return this; } /** *

Specifies whether to enable the scheduled task.

*
    *
  • true
  • *
  • false
  • *
*

Default value: true.

* * example: *

true

*/ public Builder taskEnabled(Boolean taskEnabled) { this.putQueryParameter("TaskEnabled", taskEnabled); this.taskEnabled = taskEnabled; return this; } @Override public CreateScheduledTaskRequest build() { return new CreateScheduledTaskRequest(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy