Skip to content

DedicatedHost

This class encapsulates and extends the ROS resource type ALIYUN::ECS::DedicatedHost.

Initializers

import ros_cdk_ecs
ros_cdk_ecs.DedicatedHost(
  scope: Construct,
  id: str,
  dedicated_host_type: typing.Union[str, IResolvable],
  action_on_maintenance: typing.Union[str, IResolvable] = None,
  auto_placement: typing.Union[str, IResolvable] = None,
  auto_release_time: typing.Union[str, IResolvable] = None,
  auto_renew: typing.Union[str, IResolvable] = None,
  auto_renew_period: typing.Union[typing.Union[int, float], IResolvable] = None,
  charge_type: typing.Union[str, IResolvable] = None,
  cpu_over_commit_ratio: typing.Union[typing.Union[int, float], IResolvable] = None,
  dedicated_host_cluster_id: typing.Union[str, IResolvable] = None,
  dedicated_host_name: typing.Union[str, IResolvable] = None,
  description: typing.Union[str, IResolvable] = None,
  min_quantity: typing.Union[typing.Union[int, float], IResolvable] = None,
  network_attributes_slb_udp_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  network_attributes_udp_timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  period: typing.Union[typing.Union[int, float], IResolvable] = None,
  period_unit: typing.Union[str, IResolvable] = None,
  quantity: typing.Union[typing.Union[int, float], IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  tags: typing.List[TagsProperty] = None,
  zone_id: typing.Union[str, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
dedicated_host_type typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostType: The dedicated host type.
action_on_maintenance typing.Union[str, ros_cdk_core.IResolvable] Property actionOnMaintenance: The policy for migrating the instances deployed on the dedicated host when the dedicated host fails or needs to be repaired online.
auto_placement typing.Union[str, ros_cdk_core.IResolvable] Property autoPlacement: Specifies whether the dedicated host is added to the resource pool for automatic deployment.
auto_release_time typing.Union[str, ros_cdk_core.IResolvable] Property autoReleaseTime: The time when to automatically release the dedicated host.
auto_renew typing.Union[str, ros_cdk_core.IResolvable] Property autoRenew: Whether renew the fee automatically?
auto_renew_period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property autoRenewPeriod: The time period of auto renew.
charge_type typing.Union[str, ros_cdk_core.IResolvable] Property chargeType: Instance Charge type, allowed value: Prepaid and Postpaid.
cpu_over_commit_ratio typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property cpuOverCommitRatio: The CPU overcommit ratio.
dedicated_host_cluster_id typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostClusterId: The ID of the dedicated host cluster.
dedicated_host_name typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostName: The name of the dedicated host.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of the dedicated host.
min_quantity typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property minQuantity: The minimum number of dedicated hosts to create.
network_attributes_slb_udp_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property networkAttributesSlbUdpTimeout: The duration of UDP timeout for sessions between Server Load Balancer (SLB) and the dedicated host.
network_attributes_udp_timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property networkAttributesUdpTimeout: The duration of UDP timeout for sessions between users and instances on the dedicated host.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: Prepaid time period.
period_unit typing.Union[str, ros_cdk_core.IResolvable] Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year.
quantity typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property quantity: The number of dedicated hosts that you want to create.
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: Resource group id.
tags typing.List[TagsProperty] Property tags: Tags to attach to DedicatedHost.
zone_id typing.Union[str, ros_cdk_core.IResolvable] Property zoneId: The ID of the zone in which to create the dedicated host.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

dedicated_host_typeRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dedicatedHostType: The dedicated host type.

You can call the DescribeDedicatedHostTypes operation to query the most recent list of dedicated host types.


action_on_maintenanceOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property actionOnMaintenance: The policy for migrating the instances deployed on the dedicated host when the dedicated host fails or needs to be repaired online.

Valid values:

  • Migrate: The instances are migrated to another physical machine and then 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.

auto_placementOptional

  • Type: typing.Union[str, 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.


auto_release_timeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property autoReleaseTime: The time when to automatically release the dedicated host.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

  • 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.

auto_renewOptional

  • Type: typing.Union[str, 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.


auto_renew_periodOptional

  • Type: typing.Union[typing.Union[int, float], 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.


charge_typeOptional

  • Type: typing.Union[str, 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.


cpu_over_commit_ratioOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property cpuOverCommitRatio: The CPU overcommit ratio.

You can configure CPU overcommit ratios only for the following dedicated host types: g6s, c6s, and r6s. Valid values: 1 to 5. 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.


dedicated_host_cluster_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dedicatedHostClusterId: The ID of the dedicated host cluster.


dedicated_host_nameOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dedicatedHostName: The name of the dedicated host.

The name must be 2 to 128 characters in length and can contain letters and digits. The name can contain colons (:), underscores (_), periods (.), and hyphens (-).


descriptionOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the dedicated host.

The description must be 2 to 256 characters in length and cannot start with http:\/\/ or https:\/\/.


min_quantityOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property minQuantity: The minimum number of dedicated hosts to create.

Valid values: 1 to 100.

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.


network_attributes_slb_udp_timeoutOptional

  • Type: typing.Union[typing.Union[int, float], 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.


network_attributes_udp_timeoutOptional

  • Type: typing.Union[typing.Union[int, float], 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: typing.Union[typing.Union[int, float], 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.


period_unitOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year.

Default value is Month.


quantityOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property quantity: The number of dedicated hosts that you want to create.

Valid values: 1 to 100.Default value: 1.


resource_group_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: Resource group id.


tagsOptional

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.


zone_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property zoneId: The ID of the zone in which to create the dedicated host.

This parameter is empty by default. If you do not specify a zone, the system selects a zone.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_ecs
ros_cdk_ecs.DedicatedHost.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_arn typing.Union[str, ros_cdk_core.IResolvable] Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attr_dedicated_host_ids typing.Union[str, ros_cdk_core.IResolvable] Attribute DedicatedHostIds: The host id list of created hosts.
attr_order_id typing.Union[str, ros_cdk_core.IResolvable] Attribute OrderId: The order id list of created instance.
props DedicatedHostProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_arnRequired

attr_arn: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Arn: The Alibaba Cloud Resource Name (ARN).


attr_dedicated_host_idsRequired

attr_dedicated_host_ids: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DedicatedHostIds: The host id list of created hosts.


attr_order_idRequired

attr_order_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute OrderId: The order id list of created instance.


propsRequired

props: DedicatedHostProps