Skip to content

MyBase

This class encapsulates and extends the ROS resource type ALIYUN::CDDC::MyBase.

Initializers

import ros_cdk_cddc
ros_cdk_cddc.MyBase(
  scope: Construct,
  id: str,
  ecs_class_list: typing.Union[IResolvable, typing.List[typing.Mapping[typing.Any]]],
  engine: typing.Union[str, IResolvable],
  pay_type: typing.Union[str, IResolvable],
  period: typing.Union[typing.Union[int, float], IResolvable],
  security_group_id: typing.Union[str, IResolvable],
  vpc_id: typing.Union[str, IResolvable],
  v_switch_id: typing.Union[str, IResolvable],
  zone_id: typing.Union[str, IResolvable],
  auto_renew: typing.Union[bool, IResolvable] = None,
  dedicated_host_group_description: typing.Union[str, IResolvable] = None,
  dedicated_host_group_id: typing.Union[str, IResolvable] = None,
  ecs_deployment_set_id: typing.Union[str, IResolvable] = None,
  ecs_host_name: typing.Union[str, IResolvable] = None,
  ecs_instance_name: typing.Union[str, IResolvable] = None,
  ecs_unique_suffix: typing.Union[bool, IResolvable] = None,
  image_id: typing.Union[str, IResolvable] = None,
  internet_charge_type: typing.Union[str, IResolvable] = None,
  internet_max_bandwidth_out: typing.Union[typing.Union[int, float], IResolvable] = None,
  key_pair_name: typing.Union[str, IResolvable] = None,
  os_password: typing.Union[str, IResolvable] = None,
  password_inherit: typing.Union[bool, IResolvable] = None,
  period_type: typing.Union[str, IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  user_data: typing.Union[str, IResolvable] = None,
  user_data_in_base64: typing.Union[bool, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
ecs_class_list typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Mapping[typing.Any]]] Property ecsClassList: ECS Class List.
engine typing.Union[str, ros_cdk_core.IResolvable] Property engine: The database type.
pay_type typing.Union[str, ros_cdk_core.IResolvable] Property payType: Payment type, currently only supports PrePaid.
period typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property period: The period of the subscription in months.
security_group_id typing.Union[str, ros_cdk_core.IResolvable] Property securityGroupId: The security group ID.
vpc_id typing.Union[str, ros_cdk_core.IResolvable] Property vpcId: The ID of the VPC.
v_switch_id typing.Union[str, ros_cdk_core.IResolvable] Property vSwitchId: Virtual switch ID.
zone_id typing.Union[str, ros_cdk_core.IResolvable] Property zoneId: Availability Zone ID.
auto_renew typing.Union[bool, ros_cdk_core.IResolvable] Property autoRenew: Whether to enable auto renew.
dedicated_host_group_description typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostGroupDescription: The name of the dedicated cluster.
dedicated_host_group_id typing.Union[str, ros_cdk_core.IResolvable] Property dedicatedHostGroupId: The ID of the dedicated cluster.
ecs_deployment_set_id typing.Union[str, ros_cdk_core.IResolvable] Property ecsDeploymentSetId: The ID of the deployment set.
ecs_host_name typing.Union[str, ros_cdk_core.IResolvable] Property ecsHostName: For Windows operating systems: The host name must be 2 to 15 characters in length and can contain uppercase letters, lowercase letters, and digits.
ecs_instance_name typing.Union[str, ros_cdk_core.IResolvable] Property ecsInstanceName: The instance name.
ecs_unique_suffix typing.Union[bool, ros_cdk_core.IResolvable] Property ecsUniqueSuffix: Automatically add a sequential suffix to the HostName and InstanceName when you create multiple instances.
image_id typing.Union[str, ros_cdk_core.IResolvable] Property imageId: The custom image ID.
internet_charge_type typing.Union[str, ros_cdk_core.IResolvable] Property internetChargeType: The network billing method.
internet_max_bandwidth_out typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property internetMaxBandwidthOut: The maximum outbound public bandwidth, in Mbit\/s.
key_pair_name typing.Union[str, ros_cdk_core.IResolvable] Property keyPairName: The name of the key pair.
os_password typing.Union[str, ros_cdk_core.IResolvable] Property osPassword: The logon password for the host.
password_inherit typing.Union[bool, ros_cdk_core.IResolvable] Property passwordInherit: Use the default password of the image.
period_type typing.Union[str, ros_cdk_core.IResolvable] Property periodType: Prepaid type, currently only supports Monthly (monthly subscription).
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: Resource group id.
user_data typing.Union[str, ros_cdk_core.IResolvable] Property userData: User-defined script data, the original data is up to 16KB.
user_data_in_base64 typing.Union[bool, ros_cdk_core.IResolvable] Property userDataInBase64: Indicates whether the custom data is Base64-encoded.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

ecs_class_listRequired

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Mapping[typing.Any]]]

Property ecsClassList: ECS Class List.


engineRequired

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

Property engine: The database type.

Valid values:

  • mysql
  • tair

pay_typeRequired

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

Property payType: Payment type, currently only supports PrePaid.


periodRequired

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

Property period: The period of the subscription in months.


security_group_idRequired

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

Property securityGroupId: The security group ID.

Specify multiple security groups, separated by commas (,). Format: sg-t4neld965n89ocvt,sg-t4neld965n89ocvu


vpc_idRequired

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

Property vpcId: The ID of the VPC.


v_switch_idRequired

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

Property vSwitchId: Virtual switch ID.


zone_idRequired

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

Property zoneId: Availability Zone ID.


auto_renewOptional

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

Property autoRenew: Whether to enable auto renew.


dedicated_host_group_descriptionOptional

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

Property dedicatedHostGroupDescription: The name of the dedicated cluster.


dedicated_host_group_idOptional

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

Property dedicatedHostGroupId: The ID of the dedicated cluster.


ecs_deployment_set_idOptional

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

Property ecsDeploymentSetId: The ID of the deployment set.


ecs_host_nameOptional

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

Property ecsHostName: For Windows operating systems: The host name must be 2 to 15 characters in length and can contain uppercase letters, lowercase letters, and digits.

It cannot consist of only digits. For other operating systems (such as Linux): The host name must be 2 to 64 characters in length and can contain periods (.) to separate multiple segments. Each segment can contain uppercase letters, lowercase letters, and digits. Consecutive periods (.) are not allowed. The host name cannot start or end with a period (.).


ecs_instance_nameOptional

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

Property ecsInstanceName: The instance name.

It must be 2 to 128 characters in length. It must start with an uppercase letter, a lowercase letter, or a Chinese character. It cannot start with http:// or https://. It can contain Chinese characters, English letters, digits, colons (:), underscores (_), periods (.), or hyphens (-). The default value is the instance ID.


ecs_unique_suffixOptional

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

Property ecsUniqueSuffix: Automatically add a sequential suffix to the HostName and InstanceName when you create multiple instances.

The sequential suffix starts from 001 and increments up to 999. Valid values:

  • true: Add.
  • false (default): Do not add. If HostName or InstanceName is set in a specific sorting format, and the name_suffix is not set (i.e., the naming format is name_prefix[begin_number,bits]), UniqueSuffix does not take effect. The names are sorted only in the specified order.

image_idOptional

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

Property imageId: The custom image ID.

If you want to use the default image, do not specify this parameter.


internet_charge_typeOptional

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

Property internetChargeType: The network billing method.

Valid values include the following:


internet_max_bandwidth_outOptional

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

Property internetMaxBandwidthOut: The maximum outbound public bandwidth, in Mbit\/s.

Valid values: 0 to 100. Default value: 0. If you set this parameter to a value greater than 0, a public IP address is automatically created.


key_pair_nameOptional

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

Property keyPairName: The name of the key pair.


os_passwordOptional

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

Property osPassword: The logon password for the host.

You can set it later. The password must meet the following requirements:

  • It must be 8 to 30 characters in length.
  • It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
  • Special characters: ()\~!@#$%^&*-_+=|{}[]:;'<>,.?/`
  • If you want to set the logon password later, leave this parameter empty.
  • If you want to set the logon password, use HTTPS to send requests to prevent password leakage.

password_inheritOptional

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

Property passwordInherit: Use the default password of the image.

  • false (default): Do not use.
  • true: Use.

If you use the default password of the image, do not specify the OSPassword parameter.


period_typeOptional

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

Property periodType: Prepaid type, currently only supports Monthly (monthly subscription).


resource_group_idOptional

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

Property resourceGroupId: Resource group id.


user_dataOptional

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

Property userData: User-defined script data, the original data is up to 16KB.


user_data_in_base64Optional

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

Property userDataInBase64: Indicates whether the custom data is Base64-encoded.


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_cddc
ros_cdk_cddc.MyBase.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_instance_ids typing.Union[str, ros_cdk_core.IResolvable] Attribute InstanceIds: The instance id list of created ecs instances.
attr_order_ids typing.Union[str, ros_cdk_core.IResolvable] Attribute OrderIds: The order id list.
props MyBaseProps 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_instance_idsRequired

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

Attribute InstanceIds: The instance id list of created ecs instances.


attr_order_idsRequired

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

Attribute OrderIds: The order id list.


propsRequired

props: MyBaseProps