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

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

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

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

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

DeleteInstancesRequest

*/ public class DeleteInstancesRequest extends Request { @Host @NameInMap("SourceRegionId") private String sourceRegionId; @Query @NameInMap("ClientToken") private String clientToken; @Query @NameInMap("DryRun") private Boolean dryRun; @Query @NameInMap("Force") private Boolean force; @Query @NameInMap("InstanceId") @Validation(required = true) private java.util.List < String > instanceId; @Query @NameInMap("OwnerAccount") private String ownerAccount; @Query @NameInMap("OwnerId") private Long ownerId; @Query @NameInMap("RegionId") @Validation(required = true) private String regionId; @Query @NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @Query @NameInMap("ResourceOwnerId") private Long resourceOwnerId; @Query @NameInMap("TerminateSubscription") private Boolean terminateSubscription; private DeleteInstancesRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.clientToken = builder.clientToken; this.dryRun = builder.dryRun; this.force = builder.force; this.instanceId = builder.instanceId; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.regionId = builder.regionId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.terminateSubscription = builder.terminateSubscription; } public static Builder builder() { return new Builder(); } public static DeleteInstancesRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return force */ public Boolean getForce() { return this.force; } /** * @return instanceId */ public java.util.List < String > 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; } /** * @return terminateSubscription */ public Boolean getTerminateSubscription() { return this.terminateSubscription; } public static final class Builder extends Request.Builder { private String sourceRegionId; private String clientToken; private Boolean dryRun; private Boolean force; private java.util.List < String > instanceId; private String ownerAccount; private Long ownerId; private String regionId; private String resourceOwnerAccount; private Long resourceOwnerId; private Boolean terminateSubscription; private Builder() { super(); } private Builder(DeleteInstancesRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.clientToken = request.clientToken; this.dryRun = request.dryRun; this.force = request.force; this.instanceId = request.instanceId; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.regionId = request.regionId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.terminateSubscription = request.terminateSubscription; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** * The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. **The token can contain only ASCII characters and cannot exceed 64 characters in length.** For more information, see [How to ensure idempotence](~~25693~~). */ public Builder clientToken(String clientToken) { this.putQueryParameter("ClientToken", clientToken); this.clientToken = clientToken; return this; } /** * Specifies whether to perform only a dry run without performing the actual request. Default value: false. Valid values: *

* * * true: performs only a dry run. The system checks whether your AccessKey pair is valid, whether RAM users are granted permissions, and whether the required parameters are specified. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DRYRUN.SUCCESS error code is returned. * * false: performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed. */ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** * Specifies whether to forcefully release the instance that is in the **Running** (`Running`) state. Default value: false. Valid values: *

* * * true: forcefully releases the instance that is in the **Running** (`Running`) state. When the Force parameter is set to true, this operation is equivalent to a power-off operation. Temporary data in the memory and storage of the instance is erased and cannot be restored. * * false: normally releases the instance. This value is valid only for instances that are in the **Stopped** (`Stopped`) state. */ public Builder force(Boolean force) { this.putQueryParameter("Force", force); this.force = force; return this; } /** * The IDs of instances. You can specify up to 100 instance IDs in a single request. */ public Builder instanceId(java.util.List < String > 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 of the instance. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list. */ 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; } /** * Specifies whether to release an expired subscription instance. *

* * Default value: false. */ public Builder terminateSubscription(Boolean terminateSubscription) { this.putQueryParameter("TerminateSubscription", terminateSubscription); this.terminateSubscription = terminateSubscription; return this; } @Override public DeleteInstancesRequest build() { return new DeleteInstancesRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy