public static final class AllocateDedicatedHostsRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
AllocateDedicatedHostsRequest.Builder |
actionOnMaintenance(String actionOnMaintenance)
The policy used to migrate the instances deployed on the dedicated host when the dedicated host fails or needs to be repaired online.
|
AllocateDedicatedHostsRequest.Builder |
autoPlacement(String autoPlacement)
Specifies whether to add the dedicated host to the resource pool for automatic deployment.
|
AllocateDedicatedHostsRequest.Builder |
autoReleaseTime(String autoReleaseTime)
The time when to automatically release the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
autoRenew(Boolean autoRenew)
Specifies whether to automatically renew the subscription dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
autoRenewPeriod(Integer autoRenewPeriod)
The auto-renewal duration of the dedicated host.
|
AllocateDedicatedHostsRequest |
build() |
AllocateDedicatedHostsRequest.Builder |
chargeType(String chargeType)
The billing method of the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
AllocateDedicatedHostsRequest.Builder |
cpuOverCommitRatio(Float cpuOverCommitRatio)
The CPU overcommit ratio.
|
AllocateDedicatedHostsRequest.Builder |
dedicatedHostClusterId(String dedicatedHostClusterId)
The ID of the dedicated host cluster in which to create the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
dedicatedHostName(String dedicatedHostName)
The name of the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
dedicatedHostType(String dedicatedHostType)
The dedicated host type.
|
AllocateDedicatedHostsRequest.Builder |
description(String description)
The description of the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
minQuantity(Integer minQuantity)
The minimum number of dedicated hosts to create.
|
AllocateDedicatedHostsRequest.Builder |
networkAttributes(AllocateDedicatedHostsRequest.NetworkAttributes networkAttributes)
NetworkAttributes.
|
AllocateDedicatedHostsRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
AllocateDedicatedHostsRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
AllocateDedicatedHostsRequest.Builder |
period(Integer period)
The subscription duration of the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
periodUnit(String periodUnit)
The unit of the subscription duration of the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
quantity(Integer quantity)
The number of dedicated hosts that you want to create.
|
AllocateDedicatedHostsRequest.Builder |
regionId(String regionId)
The ID of the region in which to create the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
resourceGroupId(String resourceGroupId)
The ID of the resource group to which to assign the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
AllocateDedicatedHostsRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
AllocateDedicatedHostsRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
AllocateDedicatedHostsRequest.Builder |
tag(List<AllocateDedicatedHostsRequest.Tag> tag)
The tags to add to the dedicated host.
|
AllocateDedicatedHostsRequest.Builder |
zoneId(String zoneId)
The ID of the zone in which to create the dedicated host.
|
public AllocateDedicatedHostsRequest.Builder networkAttributes(AllocateDedicatedHostsRequest.NetworkAttributes networkAttributes)
public AllocateDedicatedHostsRequest.Builder sourceRegionId(String sourceRegionId)
public AllocateDedicatedHostsRequest.Builder actionOnMaintenance(String actionOnMaintenance)
* Migrate: The instances are migrated to another physical server and restarted. If cloud disks are attached to the dedicated host, the default value is Migrate. * Stop: The instances are stopped. If the dedicated host cannot be repaired, the instances are migrated to another physical machine and then restarted. If local disks are attached to the dedicated host, the default value is Stop.
public AllocateDedicatedHostsRequest.Builder autoPlacement(String autoPlacement)
* on: adds the dedicated host to the resource pool for automatic deployment. * off: does not add the dedicated host to the resource pool for automatic deployment. Default value: on. > If you do not want to add the dedicated host to the resource pool for automatic deployment, set this parameter to off.
public AllocateDedicatedHostsRequest.Builder autoReleaseTime(String autoReleaseTime)
> * It must be at least half an hour later than the current time. * It must be at most three years later than the current time. * If the value of seconds (ss) is not 00, it is automatically set to 00.
public AllocateDedicatedHostsRequest.Builder autoRenew(Boolean autoRenew)
> The **AutoRenew** parameter takes effect only when the **ChargeType** parameter is set to PrePaid. Default value: false
public AllocateDedicatedHostsRequest.Builder autoRenewPeriod(Integer autoRenewPeriod)
Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, and 12.
public AllocateDedicatedHostsRequest.Builder chargeType(String chargeType)
* PrePaid: subscription. If you set this parameter to PrePaid, make sure that you have sufficient account balance or credits. Otherwise, `InvalidPayMethod` is returned. * PostPaid: pay-as-you-go. Default value: PostPaid.
public AllocateDedicatedHostsRequest.Builder clientToken(String clientToken)
public AllocateDedicatedHostsRequest.Builder cpuOverCommitRatio(Float cpuOverCommitRatio)
The CPU overcommit ratio affects the number of available vCPUs on a dedicated host. You can use the following formula to calculate the number of available vCPUs on a dedicated host: Number of available vCPUs = Number of physical CPU cores × 2 × CPU overcommit ratio. For example, the number of physical CPU cores on each g6s dedicated host is 52. If you set the CPU overcommit ratio of a g6s dedicated host to 4, the number of available vCPUs on the dedicated host is 416. For scenarios that have minimal requirements on CPU stability or where CPU load is not heavy, such as development and test environments, you can increase the number of available vCPUs on a dedicated host by increasing the CPU overcommit ratio. This way, you can deploy more ECS instances of the same specifications on the dedicated host and reduce the unit deployment cost.
public AllocateDedicatedHostsRequest.Builder dedicatedHostClusterId(String dedicatedHostClusterId)
public AllocateDedicatedHostsRequest.Builder dedicatedHostName(String dedicatedHostName)
public AllocateDedicatedHostsRequest.Builder dedicatedHostType(String dedicatedHostType)
public AllocateDedicatedHostsRequest.Builder description(String description)
public AllocateDedicatedHostsRequest.Builder minQuantity(Integer minQuantity)
> If the number of available dedicated hosts is less than the minimum number of dedicated hosts to create, the dedicated hosts fail to be created.
public AllocateDedicatedHostsRequest.Builder ownerAccount(String ownerAccount)
public AllocateDedicatedHostsRequest.Builder ownerId(Long ownerId)
public AllocateDedicatedHostsRequest.Builder period(Integer period)
* Valid values when the PeriodUnit parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60. * Valid values when the PeriodUnit parameter is set to Year: 1, 2, 3, 4, and 5.
public AllocateDedicatedHostsRequest.Builder periodUnit(String periodUnit)
* Month * Year Default value: Month.
public AllocateDedicatedHostsRequest.Builder quantity(Integer quantity)
Default value: 1.
public AllocateDedicatedHostsRequest.Builder regionId(String regionId)
public AllocateDedicatedHostsRequest.Builder resourceGroupId(String resourceGroupId)
public AllocateDedicatedHostsRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public AllocateDedicatedHostsRequest.Builder resourceOwnerId(Long resourceOwnerId)
public AllocateDedicatedHostsRequest.Builder tag(List<AllocateDedicatedHostsRequest.Tag> tag)
public AllocateDedicatedHostsRequest.Builder zoneId(String zoneId)
This parameter is empty by default. If you do not specify a zone, the system selects a zone.
public AllocateDedicatedHostsRequest build()
Copyright © 2024. All rights reserved.