Skip to content

Instance

This class encapsulates and extends the ROS resource type ALIYUN::ENS::Instance, which is used to create an Edge Node Service (ENS) instance.

Initializers

import ros_cdk_ens
ros_cdk_ens.Instance(
  scope: Construct,
  id: str,
  data_disk_size: typing.Union[typing.Union[int, float], IResolvable],
  ens_region_id: typing.Union[str, IResolvable],
  image_id: typing.Union[str, IResolvable],
  instance_type: typing.Union[str, IResolvable],
  period: typing.Union[typing.Union[int, float], IResolvable],
  quantity: typing.Union[typing.Union[int, float], IResolvable],
  system_disk_size: typing.Union[typing.Union[int, float], IResolvable],
  auto_renew: typing.Union[str, IResolvable] = None,
  auto_renew_period: typing.Union[typing.Union[int, float], IResolvable] = None,
  host_name: typing.Union[str, IResolvable] = None,
  instance_name: typing.Union[str, IResolvable] = None,
  internet_charge_type: typing.Union[str, IResolvable] = None,
  ip_type: typing.Union[str, IResolvable] = None,
  key_pair_name: typing.Union[str, IResolvable] = None,
  password: typing.Union[str, IResolvable] = None,
  payment_type: typing.Union[str, IResolvable] = None,
  private_ip_address: typing.Union[str, IResolvable] = None,
  unique_suffix: typing.Union[bool, IResolvable] = None,
  user_data: typing.Union[str, IResolvable] = None,
  v_switch_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.
data_disk_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property dataDiskSize: Disk size of the system disk, range from 20 to 500 GB.
ens_region_id typing.Union[str, ros_cdk_core.IResolvable] Property ensRegionId: ENS Region Id.
image_id typing.Union[str, ros_cdk_core.IResolvable] Property imageId: Image ID to create ens instance.
instance_type typing.Union[str, ros_cdk_core.IResolvable] Property instanceType: ENS instance supported instance type, make sure it should be correct.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: Prepaid time period.
quantity typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property quantity: number of instances to create.
system_disk_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property systemDiskSize: Disk size of the system disk.
auto_renew typing.Union[str, ros_cdk_core.IResolvable] Property autoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
auto_renew_period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property autoRenewPeriod: The time period of auto renew.
host_name typing.Union[str, ros_cdk_core.IResolvable] Property hostName: The hostname of the instance.
instance_name typing.Union[str, ros_cdk_core.IResolvable] Property instanceName: Instance name.
internet_charge_type typing.Union[str, ros_cdk_core.IResolvable] Property internetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
ip_type typing.Union[str, ros_cdk_core.IResolvable] Property ipType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
key_pair_name typing.Union[str, ros_cdk_core.IResolvable] Property keyPairName: SSH key pair name.
password typing.Union[str, ros_cdk_core.IResolvable] Property password: Password of created ens instance.
payment_type typing.Union[str, ros_cdk_core.IResolvable] Property paymentType: Payment Type.only support value Subscription.
private_ip_address typing.Union[str, ros_cdk_core.IResolvable] Property privateIpAddress: Private IP for the instance created.
unique_suffix typing.Union[bool, ros_cdk_core.IResolvable] Property uniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.
user_data typing.Union[str, ros_cdk_core.IResolvable] Property userData: User data to pass to instance.
v_switch_id typing.Union[str, ros_cdk_core.IResolvable] Property vSwitchId: The vSwitch Id to create ens instance.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

data_disk_sizeRequired

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

Property dataDiskSize: Disk size of the system disk, range from 20 to 500 GB.

If you specify with your own image, make sure the system disk size bigger than image size.


ens_region_idRequired

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

Property ensRegionId: ENS Region Id.


image_idRequired

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

Property imageId: Image ID to create ens instance.


instance_typeRequired

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

Property instanceType: ENS instance supported instance type, make sure it should be correct.


periodRequired

  • 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. Default value is 1.


quantityRequired

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

Property quantity: number of instances to create.


system_disk_sizeRequired

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

Property systemDiskSize: Disk size of the system disk.


auto_renewOptional

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

Property autoRenew: Whether renew the fee automatically?it could be True,FalseDefault 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.

it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.


host_nameOptional

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

Property hostName: The hostname of the instance.


instance_nameOptional

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

Property instanceName: Instance name.


internet_charge_typeOptional

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

Property internetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.


ip_typeOptional

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

Property ipType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.


key_pair_nameOptional

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

Property keyPairName: SSH key pair name.


passwordOptional

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

Property password: Password of created ens instance.

Must contain at least 3 types of special character, lower character, upper character, number.


payment_typeOptional

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

Property paymentType: Payment Type.only support value Subscription.


private_ip_addressOptional

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

Property privateIpAddress: Private IP for the instance created.


unique_suffixOptional

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

Property uniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.

The sequential suffix ranges from 001 to 999. Valid values: true false Default value: false.


user_dataOptional

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

Property userData: User data to pass to instance.

[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.


v_switch_idOptional

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

Property vSwitchId: The vSwitch Id to create ens instance.


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_ens
ros_cdk_ens.Instance.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_auto_renew ros_cdk_core.IResolvable Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
attr_auto_renew_period ros_cdk_core.IResolvable Attribute AutoRenewPeriod: The time period of auto renew.
attr_data_disk_size ros_cdk_core.IResolvable Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB.
attr_ens_region_id ros_cdk_core.IResolvable Attribute EnsRegionId: ENS Region Id.
attr_host_name ros_cdk_core.IResolvable Attribute HostName: The hostname of the instance.
attr_image_id ros_cdk_core.IResolvable Attribute ImageId: Image ID to create ens instance.
attr_instance_id ros_cdk_core.IResolvable Attribute InstanceId: InstanceId.
attr_instance_name ros_cdk_core.IResolvable Attribute InstanceName: Instance name.
attr_instance_type ros_cdk_core.IResolvable Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.
attr_internet_charge_type ros_cdk_core.IResolvable Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
attr_ip_type ros_cdk_core.IResolvable Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
attr_key_pair_name ros_cdk_core.IResolvable Attribute KeyPairName: SSH key pair name.
attr_payment_type ros_cdk_core.IResolvable Attribute PaymentType: Payment Type.only support value Subscription.
attr_period ros_cdk_core.IResolvable Attribute Period: Prepaid time period.
attr_private_ip_address ros_cdk_core.IResolvable Attribute PrivateIpAddress: Private IP for the instance created.
attr_private_ips ros_cdk_core.IResolvable Attribute PrivateIps: Private IP.
attr_public_ips ros_cdk_core.IResolvable Attribute PublicIps: Public IP.
attr_quantity ros_cdk_core.IResolvable Attribute Quantity: number of instances to create.
attr_system_disk_size ros_cdk_core.IResolvable Attribute SystemDiskSize: Disk size of the system disk.
attr_unique_suffix ros_cdk_core.IResolvable Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.
attr_user_data ros_cdk_core.IResolvable Attribute UserData: User data to pass to instance.
attr_v_switch_id ros_cdk_core.IResolvable Attribute VSwitchId: The vSwitch Id to create ens 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_auto_renewRequired

attr_auto_renew: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.


attr_auto_renew_periodRequired

attr_auto_renew_period: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute AutoRenewPeriod: The time period of auto renew.

it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.


attr_data_disk_sizeRequired

attr_data_disk_size: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB.

If you specify with your own image, make sure the system disk size bigger than image size.


attr_ens_region_idRequired

attr_ens_region_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute EnsRegionId: ENS Region Id.


attr_host_nameRequired

attr_host_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute HostName: The hostname of the instance.


attr_image_idRequired

attr_image_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute ImageId: Image ID to create ens instance.


attr_instance_idRequired

attr_instance_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InstanceId: InstanceId.


attr_instance_nameRequired

attr_instance_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InstanceName: Instance name.


attr_instance_typeRequired

attr_instance_type: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.


attr_internet_charge_typeRequired

attr_internet_charge_type: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.


attr_ip_typeRequired

attr_ip_type: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.


attr_key_pair_nameRequired

attr_key_pair_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute KeyPairName: SSH key pair name.


attr_payment_typeRequired

attr_payment_type: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute PaymentType: Payment Type.only support value Subscription.


attr_periodRequired

attr_period: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Period: Prepaid time period.

Unit is month, it could be from 1 to 9 or 12. Default value is 1.


attr_private_ip_addressRequired

attr_private_ip_address: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute PrivateIpAddress: Private IP for the instance created.


attr_private_ipsRequired

attr_private_ips: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute PrivateIps: Private IP.


attr_public_ipsRequired

attr_public_ips: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute PublicIps: Public IP.


attr_quantityRequired

attr_quantity: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Quantity: number of instances to create.


attr_system_disk_sizeRequired

attr_system_disk_size: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute SystemDiskSize: Disk size of the system disk.


attr_unique_suffixRequired

attr_unique_suffix: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.

The sequential suffix ranges from 001 to 999. Valid values: true false Default value: false.


attr_user_dataRequired

attr_user_data: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute UserData: User data to pass to instance.

[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.


attr_v_switch_idRequired

attr_v_switch_id: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute VSwitchId: The vSwitch Id to create ens instance.