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

com.aliyun.sdk.service.ecs20140526.models.RebootInstancesRequest Maven / Gradle / Ivy

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

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

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

RebootInstancesRequest

*/ public class RebootInstancesRequest extends Request { @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("BatchOptimization") private String batchOptimization; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ForceReboot") private Boolean forceReboot; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceId") @com.aliyun.core.annotation.Validation(required = true) private java.util.List instanceId; @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("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("ResourceOwnerId") private Long resourceOwnerId; private RebootInstancesRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.batchOptimization = builder.batchOptimization; this.dryRun = builder.dryRun; this.forceReboot = builder.forceReboot; this.instanceId = builder.instanceId; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.regionId = builder.regionId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; } public static Builder builder() { return new Builder(); } public static RebootInstancesRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return batchOptimization */ public String getBatchOptimization() { return this.batchOptimization; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return forceReboot */ public Boolean getForceReboot() { return this.forceReboot; } /** * @return instanceId */ public java.util.List getInstanceId() { return this.instanceId; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } public static final class Builder extends Request.Builder { private String sourceRegionId; private String batchOptimization; private Boolean dryRun; private Boolean forceReboot; private java.util.List instanceId; private String ownerAccount; private Long ownerId; private String regionId; private String resourceOwnerAccount; private Long resourceOwnerId; private Builder() { super(); } private Builder(RebootInstancesRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.batchOptimization = request.batchOptimization; this.dryRun = request.dryRun; this.forceReboot = request.forceReboot; this.instanceId = request.instanceId; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.regionId = request.regionId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** *

The batch operation mode. Valid values:

*
    *
  • AllTogether: In this mode, if all instances are restarted, a success message is returned. If an instance fails the verification, all instances fail to be restarted and an error message is returned.
  • *
  • SuccessFirst: In this mode, each instance is restarted separately. The response contains the operation results of each instance.
  • *
*

Default value: AllTogether.

* * example: *

AllTogether

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

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*
    *
  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and instance status. If the request fails the dry run, an error message is returned. If the request passes the dry run, DRYRUN.SUCCESS is returned.
  • *
*
*

If you set BatchOptimization to SuccessFirst and DryRun to true, only DRYRUN.SUCCESS is returned regardless of whether the request passes the dry run.

*
*
    *
  • false: performs a dry run and sends the request. If the request passes the dry run, the instance is restarted.
  • *
*

Default value: false.

* * example: *

false

*/ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** *

Specifies whether to forcefully restart the instance. Valid values:

*
    *
  • true: forcefully restarts the instance. This operation is equivalent to the typical power-off operation. Cache data that is not written to storage devices on the instance is lost.
  • *
  • false: normally restarts the instance.
  • *
*

Default value: false.

* * example: *

false

*/ public Builder forceReboot(Boolean forceReboot) { this.putQueryParameter("ForceReboot", forceReboot); this.forceReboot = forceReboot; return this; } /** *

The IDs of ECS instances. Valid values of N: 1 to 100.

*

This parameter is required.

* * example: *

i-bp67acfmxazb4p****

*/ public Builder instanceId(java.util.List instanceId) { this.putQueryParameter("InstanceId", instanceId); this.instanceId = instanceId; 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 region ID. You can call the DescribeRegions operation to query the most recent region list.

*

This parameter is required.

* * example: *

cn-hangzhou

*/ 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; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } @Override public RebootInstancesRequest build() { return new RebootInstancesRequest(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy