com.aliyun.sdk.service.ecs20140526.models.DescribeAvailableResourceRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link DescribeAvailableResourceRequest} extends {@link RequestModel}
*
* DescribeAvailableResourceRequest
*/
public class DescribeAvailableResourceRequest 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("Cores")
private Integer cores;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DataDiskCategory")
private String dataDiskCategory;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DedicatedHostId")
private String dedicatedHostId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DestinationResource")
@com.aliyun.core.annotation.Validation(required = true)
private String destinationResource;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceChargeType")
private String instanceChargeType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceType")
private String instanceType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("IoOptimized")
private String ioOptimized;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Memory")
private Float memory;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("NetworkCategory")
private String networkCategory;
@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;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceType")
private String resourceType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Scope")
private String scope;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SpotDuration")
@com.aliyun.core.annotation.Validation(maximum = 6)
private Integer spotDuration;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SpotStrategy")
private String spotStrategy;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SystemDiskCategory")
private String systemDiskCategory;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ZoneId")
private String zoneId;
private DescribeAvailableResourceRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.cores = builder.cores;
this.dataDiskCategory = builder.dataDiskCategory;
this.dedicatedHostId = builder.dedicatedHostId;
this.destinationResource = builder.destinationResource;
this.instanceChargeType = builder.instanceChargeType;
this.instanceType = builder.instanceType;
this.ioOptimized = builder.ioOptimized;
this.memory = builder.memory;
this.networkCategory = builder.networkCategory;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.resourceType = builder.resourceType;
this.scope = builder.scope;
this.spotDuration = builder.spotDuration;
this.spotStrategy = builder.spotStrategy;
this.systemDiskCategory = builder.systemDiskCategory;
this.zoneId = builder.zoneId;
}
public static Builder builder() {
return new Builder();
}
public static DescribeAvailableResourceRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return cores
*/
public Integer getCores() {
return this.cores;
}
/**
* @return dataDiskCategory
*/
public String getDataDiskCategory() {
return this.dataDiskCategory;
}
/**
* @return dedicatedHostId
*/
public String getDedicatedHostId() {
return this.dedicatedHostId;
}
/**
* @return destinationResource
*/
public String getDestinationResource() {
return this.destinationResource;
}
/**
* @return instanceChargeType
*/
public String getInstanceChargeType() {
return this.instanceChargeType;
}
/**
* @return instanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
* @return ioOptimized
*/
public String getIoOptimized() {
return this.ioOptimized;
}
/**
* @return memory
*/
public Float getMemory() {
return this.memory;
}
/**
* @return networkCategory
*/
public String getNetworkCategory() {
return this.networkCategory;
}
/**
* @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 resourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
* @return scope
*/
public String getScope() {
return this.scope;
}
/**
* @return spotDuration
*/
public Integer getSpotDuration() {
return this.spotDuration;
}
/**
* @return spotStrategy
*/
public String getSpotStrategy() {
return this.spotStrategy;
}
/**
* @return systemDiskCategory
*/
public String getSystemDiskCategory() {
return this.systemDiskCategory;
}
/**
* @return zoneId
*/
public String getZoneId() {
return this.zoneId;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private Integer cores;
private String dataDiskCategory;
private String dedicatedHostId;
private String destinationResource;
private String instanceChargeType;
private String instanceType;
private String ioOptimized;
private Float memory;
private String networkCategory;
private String ownerAccount;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String resourceType;
private String scope;
private Integer spotDuration;
private String spotStrategy;
private String systemDiskCategory;
private String zoneId;
private Builder() {
super();
}
private Builder(DescribeAvailableResourceRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.cores = request.cores;
this.dataDiskCategory = request.dataDiskCategory;
this.dedicatedHostId = request.dedicatedHostId;
this.destinationResource = request.destinationResource;
this.instanceChargeType = request.instanceChargeType;
this.instanceType = request.instanceType;
this.ioOptimized = request.ioOptimized;
this.memory = request.memory;
this.networkCategory = request.networkCategory;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.resourceType = request.resourceType;
this.scope = request.scope;
this.spotDuration = request.spotDuration;
this.spotStrategy = request.spotStrategy;
this.systemDiskCategory = request.systemDiskCategory;
this.zoneId = request.zoneId;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The number of vCPUs of the instance type. For more information, see [Instance families](~~25378~~).
*
*
* The Cores parameter takes effect only when the DestinationResource parameter is set to InstanceType.
*/
public Builder cores(Integer cores) {
this.putQueryParameter("Cores", cores);
this.cores = cores;
return this;
}
/**
* The type of the data disk. Valid values:
*
*
* * cloud: basic disk.
* * cloud_efficiency: ultra disk.
* * cloud_ssd: standard SSD.
* * ephemeral_ssd: local SSD.
* * cloud_essd: ESSD.
*/
public Builder dataDiskCategory(String dataDiskCategory) {
this.putQueryParameter("DataDiskCategory", dataDiskCategory);
this.dataDiskCategory = dataDiskCategory;
return this;
}
/**
* The ID of the dedicated host.
*/
public Builder dedicatedHostId(String dedicatedHostId) {
this.putQueryParameter("DedicatedHostId", dedicatedHostId);
this.dedicatedHostId = dedicatedHostId;
return this;
}
/**
* The resource type to query. Valid values:
*
*
* * Zone: zone.
* * IoOptimized: I/O optimized resource.
* * InstanceType: instance type.
* * SystemDisk: system disk.
* * DataDisk: data disk.
* * Network: network type.
* * ddh: dedicated host.
*
* For more information about how to configure the DestinationResource parameter, see the **Description** section of this topic.
*/
public Builder destinationResource(String destinationResource) {
this.putQueryParameter("DestinationResource", destinationResource);
this.destinationResource = destinationResource;
return this;
}
/**
* The billing method of the resource. For more information, see [Billing overview](~~25398~~). Valid values:
*
*
* * PrePaid: subscription.
* * PostPaid: pay-as-you-go.
*
* Default value: PostPaid.
*/
public Builder instanceChargeType(String instanceChargeType) {
this.putQueryParameter("InstanceChargeType", instanceChargeType);
this.instanceChargeType = instanceChargeType;
return this;
}
/**
* The instance types. For more information, see [Instance families](~~25378~~) or call the [DescribeInstanceTypes](~~25620~~) operation to query the most recent instance type list.
*
*
* For more information about how to configure the InstanceType parameter, see the **Description** section of this topic.
*/
public Builder instanceType(String instanceType) {
this.putQueryParameter("InstanceType", instanceType);
this.instanceType = instanceType;
return this;
}
/**
* Specifies whether the instance is an I/O optimized instance. Valid values:
*
*
* * none: The instance is a non-I/O optimized instance.
* * optimized: The instance is an I/O optimized instance.
*
* Default value: optimized.
*/
public Builder ioOptimized(String ioOptimized) {
this.putQueryParameter("IoOptimized", ioOptimized);
this.ioOptimized = ioOptimized;
return this;
}
/**
* The memory size of the instance type. Unit: GiB. For more information, see [Instance families](~~25378~~).
*
*
* The Memory parameter takes effect only when the DestinationResource parameter is set to InstanceType.
*/
public Builder memory(Float memory) {
this.putQueryParameter("Memory", memory);
this.memory = memory;
return this;
}
/**
* The network type of the cluster. Valid values:
*
*
* * vpc
* * classic
*/
public Builder networkCategory(String networkCategory) {
this.putQueryParameter("NetworkCategory", networkCategory);
this.networkCategory = networkCategory;
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 ID of the region for which to query resources. 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;
}
/**
* The type of the resource. Valid values:
*
*
* * instance: ECS instance.
* * disk: cloud disk.
* * reservedinstance: reserved instance.
* * ddh: dedicated host.
*/
public Builder resourceType(String resourceType) {
this.putQueryParameter("ResourceType", resourceType);
this.resourceType = resourceType;
return this;
}
/**
* The scope of the reserved instance. Valid values:
*
*
* * Region: regional.
* * Zone: zonal.
*/
public Builder scope(String scope) {
this.putQueryParameter("Scope", scope);
this.scope = scope;
return this;
}
/**
* The protection period of the preemptible instance. Unit: hours. Default value: 1. Valid values:
*
*
* - 1: After a preemptible instance is created, Alibaba Cloud ensures that the instance is not automatically released within 1 hour. After the 1-hour protection period ends, the system compares the bidding price with the market price and checks the resource inventory to determine whether to retain or release the instance.
*
* - 0: After a preemptible instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system compares the biding price with the market price and checks the resource inventory to determine whether to retain or release the instance.
*
* Alibaba Cloud sends ECS system events to notify you 5 minutes before the instance is released. Preemptible instances are billed by the second. We recommend that you specify a protection period based on your business requirements.
*
* >If you set SpotStrategy to SpotWithPriceLimit or SpotAsPriceGo, this parameter takes effect.
*/
public Builder spotDuration(Integer spotDuration) {
this.putQueryParameter("SpotDuration", spotDuration);
this.spotDuration = spotDuration;
return this;
}
/**
* The bidding policy for pay-as-you-go instances. Valid values:
*
*
* * NoSpot: The instance is a pay-as-you-go instance.
* * SpotWithPriceLimit: The instance is a preemptible instance with a user-defined maximum hourly price.
* * SpotAsPriceGo: The instance is a preemptible instance for which the market price is automatically used as the bid price. The market price can be up to the pay-as-you-go price.
*
* Default value: NoSpot.
*
* The SpotStrategy parameter takes effect only when the InstanceChargeType parameter is set to PostPaid.
*/
public Builder spotStrategy(String spotStrategy) {
this.putQueryParameter("SpotStrategy", spotStrategy);
this.spotStrategy = spotStrategy;
return this;
}
/**
* The category of the system disk. Valid values:
*
*
* * cloud: basic disk.
* * cloud_efficiency: ultra disk.
* * cloud_ssd: standard SSD.
* * ephemeral_ssd: local SSD.
* * cloud_essd: enhanced SSD (ESSD).
*
* Default value: cloud_efficiency.
*
* > When the ResourceType parameter is set to instance and the DestinationResource parameter is set to DataDisk, you must set the SystemDiskCategory parameter. If you do not set this parameter, the default value takes effect.
*/
public Builder systemDiskCategory(String systemDiskCategory) {
this.putQueryParameter("SystemDiskCategory", systemDiskCategory);
this.systemDiskCategory = systemDiskCategory;
return this;
}
/**
* The ID of the zone where the instance resides.
*
*
* This parameter is empty by default. When this parameter is empty, the system returns resources that match the other criteria in all zones within the region specified by `RegionId`.
*/
public Builder zoneId(String zoneId) {
this.putQueryParameter("ZoneId", zoneId);
this.zoneId = zoneId;
return this;
}
@Override
public DescribeAvailableResourceRequest build() {
return new DescribeAvailableResourceRequest(this);
}
}
}