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 com.aliyun.ros.cdk.eci.ContainerGroup;
ContainerGroup.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.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();
| Name | Type | Description |
|---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
container |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
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.List |
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.List |
Property hostAliase: Customize the hostname mapping of a container inside the pod. |
imageRegistryCredential |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
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.List |
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.List |
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.List |
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. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
containerRequired
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ContainerProperty>
Property container: The containers that constitute the container group.
containerGroupNameRequired
- 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
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
AcrRegistryInfoProperty>
Property acrRegistryInfo: Enterprise Edition access credential configuration information.
activeDeadlineSecondsOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property activeDeadlineSeconds: The validity period in seconds.
autoMatchImageCacheOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoMatchImageCache: Specifies whether to automatically match the image cache.
cpuOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property cpu: CPU size.
dnsConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR DnsConfigProperty
Property dnsConfig: The information about DNS configurations.
eipInstanceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property eipInstanceId: Elastic IP ID.
hostAliaseOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
HostAliaseProperty>
Property hostAliase: Customize the hostname mapping of a container inside the pod.
imageRegistryCredentialOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ImageRegistryCredentialProperty>
Property imageRegistryCredential: The information that you need to log on to the container image repository, including the server address, username, and password.
imageSnapshotIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageSnapshotId: Image cache ID or snapshot ID.
initContainerOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
InitContainerProperty>
Property initContainer: The containers that constitute the container group for initializing.
instanceTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceType: The type of the ECS instance.
ipv6AddressCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6AddressCount: The number of IPv6 addresses.
memoryOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property memory: memory size.
ramRoleNameOptional
- 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
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
restartPolicyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property restartPolicy: The policy for restarting the instance.
Default value: Always.
securityContextSysctlOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
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
- 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
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property slsEnable: Enable user log collection.
The default is False.
spotPriceLimitOptional
- 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
- 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
- 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
- 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
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
VolumeProperty>
Property volume: The data volume.
You can specify a maximum of 20 data volumes.
vSwitchIdOptional
- 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
- 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.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
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: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.eci.ContainerGroup;
ContainerGroup.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrContainerGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ContainerGroupId: The ID of the container group. |
attrContainerGroupName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ContainerGroupName: The name of the container group. |
attrEniInstanceId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute EniInstanceId: ENI instance ID. |
attrInternetIp |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InternetIp: Internet IP. |
attrIntranetIp |
com.aliyun.ros.cdk.core.IResolvable |
Attribute IntranetIp: Intranet IP. |
attrIpv6Address |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Ipv6Address: Ipv6 address. |
attrRegionId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RegionId: The ID of the region in which the instance resides. |
attrSecurityGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SecurityGroupId: The ID of the security group to which the instance belongs. |
attrVSwitchId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VSwitchId: The ID of the VSwitch. |
attrZoneId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ZoneId: The ID of the zone in which the instance resides. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrContainerGroupIdRequired
public IResolvable getAttrContainerGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ContainerGroupId: The ID of the container group.
attrContainerGroupNameRequired
public IResolvable getAttrContainerGroupName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ContainerGroupName: The name of the container group.
attrEniInstanceIdRequired
public IResolvable getAttrEniInstanceId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute EniInstanceId: ENI instance ID.
attrInternetIpRequired
public IResolvable getAttrInternetIp();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InternetIp: Internet IP.
attrIntranetIpRequired
public IResolvable getAttrIntranetIp();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute IntranetIp: Intranet IP.
attrIpv6AddressRequired
public IResolvable getAttrIpv6Address();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Ipv6Address: Ipv6 address.
attrRegionIdRequired
public IResolvable getAttrRegionId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RegionId: The ID of the region in which the instance resides.
attrSecurityGroupIdRequired
public IResolvable getAttrSecurityGroupId();
- Type: com.aliyun.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.
attrVSwitchIdRequired
public IResolvable getAttrVSwitchId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VSwitchId: The ID of the VSwitch.
Currently, ECI instances can only be deployed in VPCs.
attrZoneIdRequired
public IResolvable getAttrZoneId();
- Type: com.aliyun.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.