Skip to content

ContainerGroupProps

Properties for defining a ContainerGroup.

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

Initializer

import com.aliyun.ros.cdk.eci.ContainerGroupProps;
ContainerGroupProps.builder()
    .container(IResolvable)
    .container(java.util.List<IResolvable)
    .container(ContainerProperty>)
    .containerGroupName(java.lang.String)
    .containerGroupName(IResolvable)
//  .acrRegistryInfo(IResolvable)
//  .acrRegistryInfo(java.util.List<IResolvable)
//  .acrRegistryInfo(AcrRegistryInfoProperty>)
//  .activeDeadlineSeconds(java.lang.Number)
//  .activeDeadlineSeconds(IResolvable)
//  .autoMatchImageCache(java.lang.Boolean)
//  .autoMatchImageCache(IResolvable)
//  .cpu(java.lang.Number)
//  .cpu(IResolvable)
//  .dnsConfig(IResolvable)
//  .dnsConfig(DnsConfigProperty)
//  .eipInstanceId(java.lang.String)
//  .eipInstanceId(IResolvable)
//  .hostAliase(IResolvable)
//  .hostAliase(java.util.List<IResolvable)
//  .hostAliase(HostAliaseProperty>)
//  .imageRegistryCredential(IResolvable)
//  .imageRegistryCredential(java.util.List<IResolvable)
//  .imageRegistryCredential(ImageRegistryCredentialProperty>)
//  .imageSnapshotId(java.lang.String)
//  .imageSnapshotId(IResolvable)
//  .initContainer(IResolvable)
//  .initContainer(java.util.List<IResolvable)
//  .initContainer(InitContainerProperty>)
//  .instanceType(java.lang.String)
//  .instanceType(IResolvable)
//  .ipv6AddressCount(java.lang.Number)
//  .ipv6AddressCount(IResolvable)
//  .memory(java.lang.Number)
//  .memory(IResolvable)
//  .ramRoleName(java.lang.String)
//  .ramRoleName(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .restartPolicy(java.lang.String)
//  .restartPolicy(IResolvable)
//  .securityContextSysctl(IResolvable)
//  .securityContextSysctl(java.util.List<IResolvable)
//  .securityContextSysctl(SecurityContextSysctlProperty>)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .slsEnable(java.lang.Boolean)
//  .slsEnable(IResolvable)
//  .spotPriceLimit(java.lang.Number)
//  .spotPriceLimit(IResolvable)
//  .spotStrategy(java.lang.String)
//  .spotStrategy(IResolvable)
//  .tag(IResolvable)
//  .tag(java.util.List<IResolvable)
//  .tag(RosTag>)
//  .terminationGracePeriodSeconds(java.lang.Number)
//  .terminationGracePeriodSeconds(IResolvable)
//  .volume(IResolvable)
//  .volume(java.util.List<IResolvable)
//  .volume(VolumeProperty>)
//  .vSwitchId(java.lang.String)
//  .vSwitchId(IResolvable)
//  .zoneId(java.lang.String)
//  .zoneId(IResolvable)
    .build();

Properties

Name Type Description
container com.aliyun.ros.cdk.core.IResolvable OR java.util.ListContainerProperty> Property container: The containers that constitute the container group.
containerGroupName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property containerGroupName: The name of the container group.
acrRegistryInfo com.aliyun.ros.cdk.core.IResolvable OR java.util.ListAcrRegistryInfoProperty> Property acrRegistryInfo: Enterprise Edition access credential configuration information.
activeDeadlineSeconds java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property activeDeadlineSeconds: The validity period in seconds.
autoMatchImageCache java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoMatchImageCache: Specifies whether to automatically match the image cache.
cpu java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property cpu: CPU size.
dnsConfig com.aliyun.ros.cdk.core.IResolvable OR DnsConfigProperty Property dnsConfig: The information about DNS configurations.
eipInstanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property eipInstanceId: Elastic IP ID.
hostAliase com.aliyun.ros.cdk.core.IResolvable OR java.util.ListHostAliaseProperty> Property hostAliase: Customize the hostname mapping of a container inside the pod.
imageRegistryCredential com.aliyun.ros.cdk.core.IResolvable OR java.util.ListImageRegistryCredentialProperty> Property imageRegistryCredential: The information that you need to log on to the container image repository, including the server address, username, and password.
imageSnapshotId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageSnapshotId: Image cache ID or snapshot ID.
initContainer com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInitContainerProperty> Property initContainer: The containers that constitute the container group for initializing.
instanceType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceType: The type of the ECS instance.
ipv6AddressCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property ipv6AddressCount: The number of IPv6 addresses.
memory java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property memory: memory size.
ramRoleName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ramRoleName: The RAM role that the container group assumes.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: Resource group id.
restartPolicy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property restartPolicy: The policy for restarting the instance.
securityContextSysctl com.aliyun.ros.cdk.core.IResolvable OR java.util.ListSecurityContextSysctlProperty> Property securityContextSysctl: ECI Sysctl is valid for every container in ECI.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: The ID of the security group to which the instance belongs.
slsEnable java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property slsEnable: Enable user log collection.
spotPriceLimit java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property spotPriceLimit: Set the hourly maximum price of the instance.
spotStrategy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property spotStrategy: Instance preemption strategy.
tag com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property tag: The list of container group tags in the form of key\/value pairs.
terminationGracePeriodSeconds java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property terminationGracePeriodSeconds: The buffer time for the program to handle operations before it is stopped.
volume com.aliyun.ros.cdk.core.IResolvable OR java.util.ListVolumeProperty> Property volume: The data volume.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The ID of the specified VSwitch.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The ID of the zone in which the instance resides.

containerRequired

public java.lang.Object getContainer();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListContainerProperty>

Property container: The containers that constitute the container group.


containerGroupNameRequired

public java.lang.Object getContainerGroupName();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getAcrRegistryInfo();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListAcrRegistryInfoProperty>

Property acrRegistryInfo: Enterprise Edition access credential configuration information.


activeDeadlineSecondsOptional

public java.lang.Object getActiveDeadlineSeconds();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property activeDeadlineSeconds: The validity period in seconds.


autoMatchImageCacheOptional

public java.lang.Object getAutoMatchImageCache();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

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


cpuOptional

public java.lang.Object getCpu();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property cpu: CPU size.


dnsConfigOptional

public java.lang.Object getDnsConfig();

Property dnsConfig: The information about DNS configurations.


eipInstanceIdOptional

public java.lang.Object getEipInstanceId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property eipInstanceId: Elastic IP ID.


hostAliaseOptional

public java.lang.Object getHostAliase();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListHostAliaseProperty>

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


imageRegistryCredentialOptional

public java.lang.Object getImageRegistryCredential();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListImageRegistryCredentialProperty>

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


imageSnapshotIdOptional

public java.lang.Object getImageSnapshotId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageSnapshotId: Image cache ID or snapshot ID.


initContainerOptional

public java.lang.Object getInitContainer();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInitContainerProperty>

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


instanceTypeOptional

public java.lang.Object getInstanceType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceType: The type of the ECS instance.


ipv6AddressCountOptional

public java.lang.Object getIpv6AddressCount();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property ipv6AddressCount: The number of IPv6 addresses.


memoryOptional

public java.lang.Object getMemory();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property memory: memory size.


ramRoleNameOptional

public java.lang.Object getRamRoleName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

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

ECI and ECS share the same RAM role.


resourceGroupIdOptional

public java.lang.Object getResourceGroupId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: Resource group id.


restartPolicyOptional

public java.lang.Object getRestartPolicy();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property restartPolicy: The policy for restarting the instance.

Default value: Always.


securityContextSysctlOptional

public java.lang.Object getSecurityContextSysctl();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListSecurityContextSysctlProperty>

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 java.lang.Object getSecurityGroupId();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getSlsEnable();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property slsEnable: Enable user log collection.

The default is False.


spotPriceLimitOptional

public java.lang.Object getSpotPriceLimit();
  • Type: java.lang.Number OR com.aliyun.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 java.lang.Object getSpotStrategy();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getTag();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

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 java.lang.Object getTerminationGracePeriodSeconds();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

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


volumeOptional

public java.lang.Object getVolume();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListVolumeProperty>

Property volume: The data volume.

You can specify a maximum of 20 data volumes.


vSwitchIdOptional

public java.lang.Object getVSwitchId();
  • Type: java.lang.String OR com.aliyun.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


zoneIdOptional

public java.lang.Object getZoneId();
  • Type: java.lang.String OR com.aliyun.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.