ContainerGroup
This class encapsulates and extends the ROS resource type ALIYUN::ECI::ContainerGroup
, which is used to create a container group.
A container group is an elastic container instance.
Initializers
import ros_cdk_eci
ros_cdk_eci.ContainerGroup(
scope: Construct,
id: str,
container: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ContainerProperty]]],
container_group_name: typing.Union[str, IResolvable],
acr_registry_info: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, AcrRegistryInfoProperty]]] = None,
active_deadline_seconds: typing.Union[typing.Union[int, float], IResolvable] = None,
auto_match_image_cache: typing.Union[bool, IResolvable] = None,
cpu: typing.Union[typing.Union[int, float], IResolvable] = None,
dns_config: typing.Union[IResolvable, DnsConfigProperty] = None,
eip_instance_id: typing.Union[str, IResolvable] = None,
host_aliase: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, HostAliaseProperty]]] = None,
image_registry_credential: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ImageRegistryCredentialProperty]]] = None,
image_snapshot_id: typing.Union[str, IResolvable] = None,
init_container: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, InitContainerProperty]]] = None,
instance_type: typing.Union[str, IResolvable] = None,
ipv6_address_count: typing.Union[typing.Union[int, float], IResolvable] = None,
memory: typing.Union[typing.Union[int, float], IResolvable] = None,
ram_role_name: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
restart_policy: typing.Union[str, IResolvable] = None,
security_context_sysctl: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, SecurityContextSysctlProperty]]] = None,
security_group_id: typing.Union[str, IResolvable] = None,
sls_enable: typing.Union[bool, IResolvable] = None,
spot_price_limit: typing.Union[typing.Union[int, float], IResolvable] = None,
spot_strategy: typing.Union[str, IResolvable] = None,
tag: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, RosTag]]] = None,
termination_grace_period_seconds: typing.Union[typing.Union[int, float], IResolvable] = None,
volume: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, VolumeProperty]]] = None,
v_switch_id: typing.Union[str, IResolvable] = 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. |
container |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ContainerProperty]]] |
Property container: The containers that constitute the container group. |
container_group_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property containerGroupName: The name of the container group. |
acr_registry_info |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, AcrRegistryInfoProperty]]] |
Property acrRegistryInfo: Enterprise Edition access credential configuration information. |
active_deadline_seconds |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property activeDeadlineSeconds: The validity period in seconds. |
auto_match_image_cache |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property autoMatchImageCache: Specifies whether to automatically match the image cache. |
cpu |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property cpu: CPU size. |
dns_config |
typing.Union[ros_cdk_core.IResolvable, DnsConfigProperty] |
Property dnsConfig: The information about DNS configurations. |
eip_instance_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property eipInstanceId: Elastic IP ID. |
host_aliase |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, HostAliaseProperty]]] |
Property hostAliase: Customize the hostname mapping of a container inside the pod. |
image_registry_credential |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ImageRegistryCredentialProperty]]] |
Property imageRegistryCredential: The information that you need to log on to the container image repository, including the server address, username, and password. |
image_snapshot_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property imageSnapshotId: Image cache ID or snapshot ID. |
init_container |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, InitContainerProperty]]] |
Property initContainer: The containers that constitute the container group for initializing. |
instance_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceType: The type of the ECS instance. |
ipv6_address_count |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property ipv6AddressCount: The number of IPv6 addresses. |
memory |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property memory: memory size. |
ram_role_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property ramRoleName: The RAM role that the container group assumes. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: Resource group id. |
restart_policy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property restartPolicy: The policy for restarting the instance. |
security_context_sysctl |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SecurityContextSysctlProperty]]] |
Property securityContextSysctl: ECI Sysctl is valid for every container in ECI. |
security_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityGroupId: The ID of the security group to which the instance belongs. |
sls_enable |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property slsEnable: Enable user log collection. |
spot_price_limit |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property spotPriceLimit: Set the hourly maximum price of the instance. |
spot_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotStrategy: Instance preemption strategy. |
tag |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ros_cdk_core.RosTag]]] |
Property tag: The list of container group tags in the form of key\/value pairs. |
termination_grace_period_seconds |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property terminationGracePeriodSeconds: The buffer time for the program to handle operations before it is stopped. |
volume |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, VolumeProperty]]] |
Property volume: The data volume. |
v_switch_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vSwitchId: The ID of the specified VSwitch. |
zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneId: The ID of the zone in which the instance resides. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
container
Required
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ContainerProperty]]]
Property container: The containers that constitute the container group.
container_group_name
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property containerGroupName: The name of the container group.
The length is [2,128] English lowercase letters, numbers or hyphens (-), cannot begin or end with a hyphens.
acr_registry_info
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, AcrRegistryInfoProperty]]]
Property acrRegistryInfo: Enterprise Edition access credential configuration information.
active_deadline_seconds
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property activeDeadlineSeconds: The validity period in seconds.
auto_match_image_cache
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property autoMatchImageCache: Specifies whether to automatically match the image cache.
cpu
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property cpu: CPU size.
dns_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, DnsConfigProperty]
Property dnsConfig: The information about DNS configurations.
eip_instance_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property eipInstanceId: Elastic IP ID.
host_aliase
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, HostAliaseProperty]]]
Property hostAliase: Customize the hostname mapping of a container inside the pod.
image_registry_credential
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ImageRegistryCredentialProperty]]]
Property imageRegistryCredential: The information that you need to log on to the container image repository, including the server address, username, and password.
image_snapshot_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property imageSnapshotId: Image cache ID or snapshot ID.
init_container
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, InitContainerProperty]]]
Property initContainer: The containers that constitute the container group for initializing.
instance_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceType: The type of the ECS instance.
ipv6_address_count
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property ipv6AddressCount: The number of IPv6 addresses.
memory
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property memory: memory size.
ram_role_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ramRoleName: The RAM role that the container group assumes.
ECI and ECS share the same RAM role.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group id.
restart_policy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restartPolicy: The policy for restarting the instance.
Default value: Always.
security_context_sysctl
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SecurityContextSysctlProperty]]]
Property securityContextSysctl: ECI Sysctl is valid for every container in ECI.
Currently only two Sysctl keyNames are supported: Kernel.shm_rmid_forced Kernel.msgmax
security_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityGroupId: The ID of the security group to which the instance belongs.
Instances in the same security group can access one another. If no security group is specified, the system automatically uses the default security group in the region you select. If you do not have a default security group in this region, the system automatically creates a default security group and adds the container protocol and port you declared to the inbound direction rules of this security group.
sls_enable
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property slsEnable: Enable user log collection.
The default is False.
spot_price_limit
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property spotPriceLimit: Set the hourly maximum price of the instance.
It supports a maximum of 3 decimal places. It takes effect when the value of the parameter SpotStrategy is SpotWithPriceLimit.
spot_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotStrategy: Instance preemption strategy.
Ranges: NoSpot (default): normal pay-as-you-go instances. SpotWithPriceLimit: Preemptive instance that sets a cap price. SpotAsPriceGo: The system automatically bids, following the current market actual price.
tag
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ros_cdk_core.RosTag]]]
Property tag: The list of container group tags in the form of key\/value pairs.
You can define a maximum of 20 tags for each container group.
termination_grace_period_seconds
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property terminationGracePeriodSeconds: The buffer time for the program to handle operations before it is stopped.
volume
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, VolumeProperty]]]
Property volume: The data volume.
You can specify a maximum of 20 data volumes.
v_switch_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The ID of the specified VSwitch.
If no switch is specified, the system automatically uses the default switch in the default VPC in the selected region. If no default VPC or default switch is available in the region, the system automatically creates a default VPC and a default switch
zone_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: The ID of the zone in which the instance resides.
If you leave the parameter blank, the system assigns a zone for you. The default value is blank.
enable_resource_property_constraint
Optional
- 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.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_eci
ros_cdk_eci.ContainerGroup.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- 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_container_group_id |
ros_cdk_core.IResolvable |
Attribute ContainerGroupId: The ID of the container group. |
attr_container_group_name |
ros_cdk_core.IResolvable |
Attribute ContainerGroupName: The name of the container group. |
attr_eni_instance_id |
ros_cdk_core.IResolvable |
Attribute EniInstanceId: ENI instance ID. |
attr_internet_ip |
ros_cdk_core.IResolvable |
Attribute InternetIp: Internet IP. |
attr_intranet_ip |
ros_cdk_core.IResolvable |
Attribute IntranetIp: Intranet IP. |
attr_ipv6_address |
ros_cdk_core.IResolvable |
Attribute Ipv6Address: Ipv6 address. |
attr_region_id |
ros_cdk_core.IResolvable |
Attribute RegionId: The ID of the region in which the instance resides. |
attr_security_group_id |
ros_cdk_core.IResolvable |
Attribute SecurityGroupId: The ID of the security group to which the instance belongs. |
attr_v_switch_id |
ros_cdk_core.IResolvable |
Attribute VSwitchId: The ID of the VSwitch. |
attr_zone_id |
ros_cdk_core.IResolvable |
Attribute ZoneId: The ID of the zone in which the instance resides. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_container_group_id
Required
attr_container_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ContainerGroupId: The ID of the container group.
attr_container_group_name
Required
attr_container_group_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ContainerGroupName: The name of the container group.
attr_eni_instance_id
Required
attr_eni_instance_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute EniInstanceId: ENI instance ID.
attr_internet_ip
Required
attr_internet_ip: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InternetIp: Internet IP.
attr_intranet_ip
Required
attr_intranet_ip: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute IntranetIp: Intranet IP.
attr_ipv6_address
Required
attr_ipv6_address: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Ipv6Address: Ipv6 address.
attr_region_id
Required
attr_region_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute RegionId: The ID of the region in which the instance resides.
attr_security_group_id
Required
attr_security_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute SecurityGroupId: The ID of the security group to which the instance belongs.
Instances in the same security group can access one another.
attr_v_switch_id
Required
attr_v_switch_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute VSwitchId: The ID of the VSwitch.
Currently, ECI instances can only be deployed in VPCs.
attr_zone_id
Required
attr_zone_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ZoneId: The ID of the zone in which the instance resides.
If you leave the parameter blank, the system assigns a zone for you. The default value is blank.