DedicatedHost
This class encapsulates and extends the ROS resource type ALIYUN::ECS::DedicatedHost, which is used to create a dedicated host.
Initializers
import com.aliyun.ros.cdk.ecs.DedicatedHost;
DedicatedHost.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .dedicatedHostType(java.lang.String)
    .dedicatedHostType(IResolvable)
//  .actionOnMaintenance(java.lang.String)
//  .actionOnMaintenance(IResolvable)
//  .autoPlacement(java.lang.String)
//  .autoPlacement(IResolvable)
//  .autoReleaseTime(java.lang.String)
//  .autoReleaseTime(IResolvable)
//  .autoRenew(java.lang.String)
//  .autoRenew(IResolvable)
//  .autoRenewPeriod(java.lang.Number)
//  .autoRenewPeriod(IResolvable)
//  .chargeType(java.lang.String)
//  .chargeType(IResolvable)
//  .dedicatedHostName(java.lang.String)
//  .dedicatedHostName(IResolvable)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .networkAttributesSlbUdpTimeout(java.lang.Number)
//  .networkAttributesSlbUdpTimeout(IResolvable)
//  .networkAttributesUdpTimeout(java.lang.Number)
//  .networkAttributesUdpTimeout(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodUnit(java.lang.String)
//  .periodUnit(IResolvable)
//  .quantity(java.lang.Number)
//  .quantity(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .zoneId(java.lang.String)
//  .zoneId(IResolvable)
    .build();
| Name | Type | Description | 
|---|---|---|
| scope | com.aliyun.ros.cdk.core.Construct | No description. | 
| id | java.lang.String | No description. | 
| enableResourcePropertyConstraint | java.lang.Boolean | No description. | 
| dedicatedHostType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dedicatedHostType: The instance type of host. | 
| actionOnMaintenance | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property actionOnMaintenance: The policy used to migrate the instances from the dedicated hostwhen the dedicated host fails or needs to be repaired online.Valid values: Migrate: Instances are migrated to another physical server and restarted.If the dedicated host is attached with disks that are not local disks, the default value is Migrate.Stop: Instances on the dedicated host are stopped. If the dedicated host cannot be repaired,the instances are migrated to another physical server and restarted.If the dedicated host is attached with local disks, the default value is Stop. | 
| autoPlacement | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoPlacement: Specifies whether the dedicated host is added to the resource pool for automatic deployment. | 
| autoReleaseTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoReleaseTime: Auto release time for created host, Follow ISO8601 standard using UTC time. | 
| autoRenew | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Whether renew the fee automatically? | 
| autoRenewPeriod | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenewPeriod: The time period of auto renew. | 
| chargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property chargeType: Instance Charge type, allowed value: Prepaid and Postpaid. | 
| dedicatedHostName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dedicatedHostName: The name of the dedicated host, [2, 128] English or Chinese characters. | 
| description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of host. | 
| networkAttributesSlbUdpTimeout | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property networkAttributesSlbUdpTimeout: The duration of UDP timeout for sessions between Server Load Balancer (SLB) and the dedicated host. | 
| networkAttributesUdpTimeout | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property networkAttributesUdpTimeout: The duration of UDP timeout for sessions between users and instances on the dedicated host. | 
| period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: Prepaid time period. | 
| periodUnit | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year. | 
| quantity | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property quantity: The number of dedicated hosts that you want to create. | 
| resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. | 
| tags | java.util.List<TagsProperty> | Property tags: Tags to attach to DedicatedHost. | 
| zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: The zone to create the host. | 
scopeRequired 
- Type: com.aliyun.ros.cdk.core.Construct
idRequired 
- Type: java.lang.String
enableResourcePropertyConstraintOptional 
- Type: java.lang.Boolean
dedicatedHostTypeRequired 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dedicatedHostType: The instance type of host.
actionOnMaintenanceOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property actionOnMaintenance: The policy used to migrate the instances from the dedicated hostwhen the dedicated host fails or needs to be repaired online.Valid values: Migrate: Instances are migrated to another physical server and restarted.If the dedicated host is attached with disks that are not local disks, the default value is Migrate.Stop: Instances on the dedicated host are stopped. If the dedicated host cannot be repaired,the instances are migrated to another physical server and restarted.If the dedicated host is attached with local disks, the default value is Stop.
autoPlacementOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoPlacement: Specifies whether the dedicated host is added to the resource pool for automatic deployment.
If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. For more information, see Automatic deployment. Valid values:on: The dedicated host is added to the resource pool for automatic deployment.off: The dedicated host is not added to the resource pool for automatic deployment.Default value: on.Note When you create a dedicated host: If you do not specify this parameter, the dedicated host is added to the automatic deployment resource pool.If you do not want to add the dedicated host to the automatic deployment resource pool, set the value to off.
autoReleaseTimeOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoReleaseTime: Auto release time for created host, Follow ISO8601 standard using UTC time.
format is 'yyyy-MM-ddTHH:mm:ssZ'. Not bigger than 3 years from this day onwards
autoRenewOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Whether renew the fee automatically?
When the parameter InstanceChargeType is PrePaid, it will take effect. Range of value:True: automatic renewal.False: no automatic renewal. Default value is False.
autoRenewPeriodOptional 
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenewPeriod: The time period of auto renew.
When the parameter InstanceChargeType is PrePaid, it will take effect.It could be 1, 2, 3, 6, 12, 24, 36, 48, 60. Default value is 1.
chargeTypeOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property chargeType: Instance Charge type, allowed value: Prepaid and Postpaid.
If specified Prepaid, please ensure you have sufficient balance in your account. Or instance creation will be failure. Default value is Postpaid.
dedicatedHostNameOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dedicatedHostName: The name of the dedicated host, [2, 128] English or Chinese characters.
It must begin with an uppercase/lowercase letter or a Chinese character, and may contain numbers, '_' or '-'. It cannot begin with http:// or https://.
descriptionOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of host.
networkAttributesSlbUdpTimeoutOptional 
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property networkAttributesSlbUdpTimeout: The duration of UDP timeout for sessions between Server Load Balancer (SLB) and the dedicated host.
Unit: seconds. Valid values: 15 to 310.
networkAttributesUdpTimeoutOptional 
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property networkAttributesUdpTimeout: The duration of UDP timeout for sessions between users and instances on the dedicated host.
Unit: seconds. Valid values: 15 to 310.
periodOptional 
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: Prepaid time period.
Unit is month, it could be from 1 to 9 or 12, 24, 36, 48, 60. Default value is 1.
periodUnitOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year.
Default value is Month.
quantityOptional 
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property quantity: The number of dedicated hosts that you want to create.
Valid values: 1 to 100.Default value: 1.
resourceGroupIdOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
tagsOptional 
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to DedicatedHost.
Max support 20 tags to add during create DedicatedHost. Each tag with two properties Key and Value, and Key is required.
zoneIdOptional 
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The zone to create the host.
Methods
| Name | Description | 
|---|---|
| toString | Returns a string representation of this construct. | 
| synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. | 
| addCondition | No description. | 
| addCount | No description. | 
| addDependency | No description. | 
| addResourceDesc | No description. | 
| applyRemovalPolicy | No description. | 
| getAtt | No description. | 
| setMetadata | No description. | 
toString 
public java.lang.String toString()
Returns a string representation of this construct.
synthesize 
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition 
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount 
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency 
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc 
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy 
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt 
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata 
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description | 
|---|---|
| isConstruct | Return whether the given object is a Construct. | 
isConstruct 
import com.aliyun.ros.cdk.ecs.DedicatedHost;
DedicatedHost.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description | 
|---|---|---|
| node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. | 
| ref | java.lang.String | No description. | 
| stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. | 
| resource | com.aliyun.ros.cdk.core.RosResource | No description. | 
| attrDedicatedHostIds | com.aliyun.ros.cdk.core.IResolvable | Attribute DedicatedHostIds: The host id list of created hosts. | 
| attrOrderId | com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: The order id list of created instance. | 
nodeRequired 
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired 
public java.lang.String getRef();
- Type: java.lang.String
stackRequired 
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional 
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrDedicatedHostIdsRequired 
public IResolvable getAttrDedicatedHostIds();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DedicatedHostIds: The host id list of created hosts.
attrOrderIdRequired 
public IResolvable getAttrOrderId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: The order id list of created instance.