Skip to content

ContainerGroupProps

Properties for defining a ContainerGroup.

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

Initializer

import { ContainerGroupProps } from '@alicloud/ros-cdk-eci'
const containerGroupProps: ContainerGroupProps = { ... }

Properties

Name Type Description
container @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ContainerProperty[] Property container: The containers that constitute the container group.
containerGroupName string | @alicloud/ros-cdk-core.IResolvable Property containerGroupName: The name of the container group.
acrRegistryInfo @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | AcrRegistryInfoProperty[] Property acrRegistryInfo: A list of ACR Enterprise instances.
activeDeadlineSeconds number | @alicloud/ros-cdk-core.IResolvable Property activeDeadlineSeconds: The validity period in seconds.
autoMatchImageCache boolean | @alicloud/ros-cdk-core.IResolvable Property autoMatchImageCache: Specifies whether to automatically match the image cache.
cpu number | @alicloud/ros-cdk-core.IResolvable Property cpu: CPU size.
dnsConfig @alicloud/ros-cdk-core.IResolvable | DnsConfigProperty Property dnsConfig: The information about DNS configurations.
eipInstanceId string | @alicloud/ros-cdk-core.IResolvable Property eipInstanceId: Elastic IP ID.
hostAliase @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | HostAliaseProperty[] Property hostAliase: Customize the hostname mapping of a container inside the pod.
imageRegistryCredential @alicloud/ros-cdk-core.IResolvable | @alicloud/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.
imageSnapshotId string | @alicloud/ros-cdk-core.IResolvable Property imageSnapshotId: The ID of the image cache.
initContainer @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | InitContainerProperty[] Property initContainer: The containers that constitute the container group for initializing.
instanceType string | @alicloud/ros-cdk-core.IResolvable Property instanceType: The ECS instance type.
ipv6AddressCount number | @alicloud/ros-cdk-core.IResolvable Property ipv6AddressCount: The number of IPv6 addresses.
memory number | @alicloud/ros-cdk-core.IResolvable Property memory: memory size.
ramRoleName string | @alicloud/ros-cdk-core.IResolvable Property ramRoleName: The RAM role that the container group assumes.
resourceGroupId string | @alicloud/ros-cdk-core.IResolvable Property resourceGroupId: Resource group id.
restartPolicy string | @alicloud/ros-cdk-core.IResolvable Property restartPolicy: The policy for restarting the instance.
securityContextSysctl @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | SecurityContextSysctlProperty[] Property securityContextSysctl: ECI Sysctl is valid for every container in ECI.
securityGroupId string | @alicloud/ros-cdk-core.IResolvable Property securityGroupId: The ID of the security group to which the instance belongs.
slsEnable boolean | @alicloud/ros-cdk-core.IResolvable Property slsEnable: Enable user log collection.
spotPriceLimit number | @alicloud/ros-cdk-core.IResolvable Property spotPriceLimit: Set the hourly maximum price of the instance.
spotStrategy string | @alicloud/ros-cdk-core.IResolvable Property spotStrategy: Instance preemption strategy.
tag @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.RosTag[] Property tag: The list of container group tags in the form of key\/value pairs.
terminationGracePeriodSeconds number | @alicloud/ros-cdk-core.IResolvable Property terminationGracePeriodSeconds: The buffer time for the program to handle operations before it is stopped.
volume @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | VolumeProperty[] Property volume: The data volume.
vSwitchId string | @alicloud/ros-cdk-core.IResolvable Property vSwitchId: The ID of the vSwitch to which the instance belongs.
zoneId string | @alicloud/ros-cdk-core.IResolvable Property zoneId: The ID of the zone in which the instance resides.

containerRequired

public readonly container: IResolvable | IResolvable | ContainerProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ContainerProperty[]

Property container: The containers that constitute the container group.


containerGroupNameRequired

public readonly containerGroupName: string | IResolvable;
  • Type: string | @alicloud/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.


acrRegistryInfoOptional

public readonly acrRegistryInfo: IResolvable | IResolvable | AcrRegistryInfoProperty[];

Property acrRegistryInfo: A list of ACR Enterprise instances.


activeDeadlineSecondsOptional

public readonly activeDeadlineSeconds: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property activeDeadlineSeconds: The validity period in seconds.


autoMatchImageCacheOptional

public readonly autoMatchImageCache: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

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

The default value is false.


cpuOptional

public readonly cpu: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property cpu: CPU size.


dnsConfigOptional

public readonly dnsConfig: IResolvable | DnsConfigProperty;

Property dnsConfig: The information about DNS configurations.


eipInstanceIdOptional

public readonly eipInstanceId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property eipInstanceId: Elastic IP ID.


hostAliaseOptional

public readonly hostAliase: IResolvable | IResolvable | HostAliaseProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | HostAliaseProperty[]

Property hostAliase: Customize the hostname mapping of a container inside the pod.


imageRegistryCredentialOptional

public readonly imageRegistryCredential: IResolvable | IResolvable | ImageRegistryCredentialProperty[];

Property imageRegistryCredential: The information that you need to log on to the container image repository, including the server address, username, and password.


imageSnapshotIdOptional

public readonly imageSnapshotId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property imageSnapshotId: The ID of the image cache.


initContainerOptional

public readonly initContainer: IResolvable | IResolvable | InitContainerProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | InitContainerProperty[]

Property initContainer: The containers that constitute the container group for initializing.


instanceTypeOptional

public readonly instanceType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property instanceType: The ECS instance type.

You can specify multiple instance types. For more information, see Create an instance by specifying an ECS instance type.


ipv6AddressCountOptional

public readonly ipv6AddressCount: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property ipv6AddressCount: The number of IPv6 addresses.

The value is fixed at 1, which indicates that one IPv6 address can be bound to an ECI instance.


memoryOptional

public readonly memory: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property memory: memory size.


ramRoleNameOptional

public readonly ramRoleName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property ramRoleName: The RAM role that the container group assumes.

ECI and ECS share the same RAM role.


resourceGroupIdOptional

public readonly resourceGroupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property resourceGroupId: Resource group id.


restartPolicyOptional

public readonly restartPolicy: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property restartPolicy: The policy for restarting the instance.

Default value: Always.


securityContextSysctlOptional

public readonly securityContextSysctl: IResolvable | 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


securityGroupIdOptional

public readonly securityGroupId: string | IResolvable;
  • Type: string | @alicloud/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.


slsEnableOptional

public readonly slsEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property slsEnable: Enable user log collection.

The default is False.


spotPriceLimitOptional

public readonly spotPriceLimit: number | IResolvable;
  • Type: number | @alicloud/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.


spotStrategyOptional

public readonly spotStrategy: string | IResolvable;
  • Type: string | @alicloud/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

public readonly tag: IResolvable | IResolvable | RosTag[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | @alicloud/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.


terminationGracePeriodSecondsOptional

public readonly terminationGracePeriodSeconds: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property terminationGracePeriodSeconds: The buffer time for the program to handle operations before it is stopped.


volumeOptional

public readonly volume: IResolvable | IResolvable | VolumeProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | VolumeProperty[]

Property volume: The data volume.

You can specify a maximum of 20 data volumes.


vSwitchIdOptional

public readonly vSwitchId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property vSwitchId: The ID of the vSwitch to which the instance belongs.

You can specify up to 10 vSwitch IDs. Separate multiple IDs with commas (,), for example, vsw-*,vsw-*. If you do not specify a vSwitch, the system uses the default vSwitch in the default VPC of the selected region. If you do not have a default VPC and a default vSwitch in the region, the system creates a default VPC and a default vSwitch.

The number of IP addresses in the vSwitch CIDR block determines the maximum number of ECI instances that can be created in the vSwitch. Plan the CIDR block in advance.


zoneIdOptional

public readonly zoneId: string | IResolvable;
  • Type: string | @alicloud/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.