Skip to content

ContainerGroupProps

Properties for defining a ContainerGroup.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-eci-containergroup

Initializer

import ros_cdk_eci
ros_cdk_eci.ContainerGroupProps(
  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
)

Properties

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

containerRequired

container: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ContainerProperty]]]
  • 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_nameRequired

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

acr_registry_info: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, AcrRegistryInfoProperty]]]
  • 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_secondsOptional

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

Property activeDeadlineSeconds: The validity period in seconds.


auto_match_image_cacheOptional

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

Property autoMatchImageCache: Specifies whether to automatically match the image cache.


cpuOptional

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

Property cpu: CPU size.


dns_configOptional

dns_config: typing.Union[IResolvable, DnsConfigProperty]

Property dnsConfig: The information about DNS configurations.


eip_instance_idOptional

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

Property eipInstanceId: Elastic IP ID.


host_aliaseOptional

host_aliase: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, HostAliaseProperty]]]
  • 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_credentialOptional

image_registry_credential: typing.Union[IResolvable, typing.List[typing.Union[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_idOptional

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

Property imageSnapshotId: Image cache ID or snapshot ID.


init_containerOptional

init_container: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, InitContainerProperty]]]
  • 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_typeOptional

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

Property instanceType: The type of the ECS instance.


ipv6_address_countOptional

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

Property ipv6AddressCount: The number of IPv6 addresses.


memoryOptional

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

Property memory: memory size.


ram_role_nameOptional

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

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

Property resourceGroupId: Resource group id.


restart_policyOptional

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

Property restartPolicy: The policy for restarting the instance.

Default value: Always.


security_context_sysctlOptional

security_context_sysctl: typing.Union[IResolvable, typing.List[typing.Union[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_idOptional

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

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

Property slsEnable: Enable user log collection.

The default is False.


spot_price_limitOptional

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

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


tagOptional

tag: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, RosTag]]]
  • 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_secondsOptional

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


volumeOptional

volume: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, VolumeProperty]]]
  • 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_idOptional

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

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