Skip to content

DedicatedHost

This class encapsulates and extends the ROS resource type ALIYUN::ECS::DedicatedHost, which is used to create a dedicated host.

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,
  dedicated_host_name: typing.Union[str, IResolvable] = None,
  description: typing.Union[str, 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 instance type of host.
action_on_maintenance typing.Union[str, 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.
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: Auto release time for created host, Follow ISO8601 standard using UTC time.
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.
dedicated_host_name typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostName: The name of the dedicated host, [2, 128] English or Chinese characters.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of host.
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 zone to create the 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 instance type of host.


action_on_maintenanceOptional

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


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: 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


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.


dedicated_host_nameOptional

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

Property description: The description of host.


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 zone to create the host.


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

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.
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_dedicated_host_ids ros_cdk_core.IResolvable Attribute DedicatedHostIds: The host id list of created hosts.
attr_order_id ros_cdk_core.IResolvable Attribute OrderId: The order id list of created instance.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


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_dedicated_host_idsRequired

attr_dedicated_host_ids: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DedicatedHostIds: The host id list of created hosts.


attr_order_idRequired

attr_order_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute OrderId: The order id list of created instance.