eci-20180808/main.tea (5,785 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = '';
checkConfig(config);
@endpoint = getEndpoint('eci', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model CommitContainerRequest {
acrRegistryInfo?: {
arnService?: string(name='ArnService', description='The Alibaba Cloud Resource Access (ARN) of the RAM role that is assigned to the user (the authorized account) in cross-account authorization scenarios.', example='acs:ram::1609982529******:role/role-test'),
arnUser?: string(name='ArnUser', description='The ARN of the RAM role that is assigned to the authorizer in cross-account authorization scenarios.', example='acs:ram::1298452580******:role/role-test'),
instanceId?: string(name='InstanceId', description='The ID of the Container Registry Enterprise Edition instance.', example='cri-nwj395hgf6f3****'),
regionId?: string(name='RegionId', description='The region ID of the Container Registry Enterprise Edition instance.', example='cn-hangzhou'),
}(name='AcrRegistryInfo', description='The access credential configurations of the Container Registry Enterprise Edition instance.
> If you use a Container Registry Personal Edition instance, you do not need to configure this parameter. If you use a Container Registry Enterprise Edition instance, you must configure this parameter.'),
arn?: {
roleArn?: string(name='RoleArn', description='The ARN of the authorized role.', example='acs:ram:xxx'),
roleType?: string(name='RoleType', description='The authorization type. A value of service indicates that RAM roles are used for authorization.', example='user'),
}(name='Arn', description='The details about the ARN that is required for authorization.'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the container group.
This parameter is required.', example='eci-bp1do4xz75fa5sd****'),
containerName?: string(name='ContainerName', description='The name of the container.
This parameter is required.', example='container-1'),
image?: {
author?: string(name='Author', description='The authorization of the image.', example='ECI'),
message?: string(name='Message', description='The message about the image.', example='test commit'),
repository?: string(name='Repository', description='The image repository.
This parameter is required.', example='registry-vpc.cn-hangzhou.aliyuncs.com/eastest/registry-test'),
tag?: string(name='Tag', description='The tag of the image. This parameter is empty by default, which indicates that the tag is not modified.
This parameter is required.', example='0.0.6'),
}(name='Image', description='The image of the container.'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model CommitContainerResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='CB8D2B22-D636-4182-****-1FC9DBDAD66F'),
taskId?: string(name='TaskId', description='The ID of the task.', example='t-bp18cwvrb3v9tjk0tekz'),
}
model CommitContainerResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CommitContainerResponseBody(name='body'),
}
/**
* @summary Creates an asynchronous task to store a specified container in an elastic container instance as an image and pushes the image to an image repository of Alibaba Cloud Container Registry.
*
* @description You must specify the Alibaba Cloud Resource Name (ARN) of the RAM role of the Container Registry Enterprise Edition instance to grant the elastic container instance to assume the RAM role to push images.
*
* @param request CommitContainerRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CommitContainerResponse
*/
async function commitContainerWithOptions(request: CommitContainerRequest, runtime: Util.RuntimeOptions): CommitContainerResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acrRegistryInfo)) {
query['AcrRegistryInfo'] = request.acrRegistryInfo;
}
if (!Util.isUnset(request.arn)) {
query['Arn'] = request.arn;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.containerName)) {
query['ContainerName'] = request.containerName;
}
if (!Util.isUnset(request.image)) {
query['Image'] = request.image;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CommitContainer',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates an asynchronous task to store a specified container in an elastic container instance as an image and pushes the image to an image repository of Alibaba Cloud Container Registry.
*
* @description You must specify the Alibaba Cloud Resource Name (ARN) of the RAM role of the Container Registry Enterprise Edition instance to grant the elastic container instance to assume the RAM role to push images.
*
* @param request CommitContainerRequest
* @return CommitContainerResponse
*/
async function commitContainer(request: CommitContainerRequest): CommitContainerResponse {
var runtime = new Util.RuntimeOptions{};
return commitContainerWithOptions(request, runtime);
}
model CopyDataCacheRequest {
bucket?: string(name='Bucket', description='The bucket in which the DataCache is stored.', example='default'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
dataCacheId?: string(name='DataCacheId', description='The ID of the DataCache in the source region.
This parameter is required.', example='edc-bp15l4vvys94oo******'),
destinationRegionId?: string(name='DestinationRegionId', description='The destination region of the DataCache.
This parameter is required.', example='cn-hangzhou'),
name?: string(name='Name', description='The DataCache name.', example='test'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
path?: string(name='Path', description='The storage path of the data.', example='/bucket-test'),
regionId?: string(name='RegionId', description='The source region of the DataCache.
This parameter is required.', example='cn-beijing'),
resourceGroupId?: string(name='ResourceGroupId', description='The resource group to which the DataCache belongs.', example='rg-2df3isufhi38****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
retentionDays?: int32(name='RetentionDays', description='The number of days for which the DataCache is retained.', example='7'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.', example='testkey'),
value?: string(name='Value', description='The value of the tag.', example='testvalue'),
}
](name='Tag', description='The tags of the DataCache.'),
}
model CopyDataCacheResponseBody = {
dataCacheId?: string(name='DataCacheId', description='The ID generated for the DataCache in the destination region.', example='edc-bp1423y6d7v7l6ua****'),
requestId?: string(name='RequestId', description='The request ID.', example='58EE0CB3-C864-5395-A4F7-24F425074839'),
}
model CopyDataCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CopyDataCacheResponseBody(name='body'),
}
/**
* @summary Copies a DataCache from one region to another region.
*
* @description You cannot directly use a DataCache across regions. You can call this operation to copy a DataCache from one region to another region. This operation is suitable for the following scenarios:
* * If you want to use a DataCache across regions and the DataCache exists in Region A, you can call this operation to quickly copy the DataCache to Region B.
* * If you directly pull data from a region outside China to a region inside the Chinese mainland when you create a DataCache, the data may be pulled at a slow speed due to network limits. In this case, you can create a DataCache in a region outside the Chinese mainland but inside China, such as the China (Hong Kong) region, and call this operation to copy the data to the region inside the Chinese mainland.
* > The process of copying a DataCache is equivalent to copying a snapshot. You are charged for the traffic generated during the copy process and the storage of the generated DataCache.
*
* @param request CopyDataCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CopyDataCacheResponse
*/
async function copyDataCacheWithOptions(request: CopyDataCacheRequest, runtime: Util.RuntimeOptions): CopyDataCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucket)) {
query['Bucket'] = request.bucket;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dataCacheId)) {
query['DataCacheId'] = request.dataCacheId;
}
if (!Util.isUnset(request.destinationRegionId)) {
query['DestinationRegionId'] = request.destinationRegionId;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.path)) {
query['Path'] = request.path;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CopyDataCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Copies a DataCache from one region to another region.
*
* @description You cannot directly use a DataCache across regions. You can call this operation to copy a DataCache from one region to another region. This operation is suitable for the following scenarios:
* * If you want to use a DataCache across regions and the DataCache exists in Region A, you can call this operation to quickly copy the DataCache to Region B.
* * If you directly pull data from a region outside China to a region inside the Chinese mainland when you create a DataCache, the data may be pulled at a slow speed due to network limits. In this case, you can create a DataCache in a region outside the Chinese mainland but inside China, such as the China (Hong Kong) region, and call this operation to copy the data to the region inside the Chinese mainland.
* > The process of copying a DataCache is equivalent to copying a snapshot. You are charged for the traffic generated during the copy process and the storage of the generated DataCache.
*
* @param request CopyDataCacheRequest
* @return CopyDataCacheResponse
*/
async function copyDataCache(request: CopyDataCacheRequest): CopyDataCacheResponse {
var runtime = new Util.RuntimeOptions{};
return copyDataCacheWithOptions(request, runtime);
}
model CreateContainerGroupRequest {
dnsConfig?: {
nameServer?: [ string ](name='NameServer', description='The IP addresses of DNS servers.', example='172.10.*.**'),
option?: [
{
name?: string(name='Name', description='The name of the option.', example='name'),
value?: string(name='Value', description='The value of the option.', example='value'),
}
](name='Option', description='Configuration options of the DNS server.'),
search?: [ string ](name='Search', description='The search domains of DNS servers.', example='svc.local.kubenetes'),
}(name='DnsConfig'),
hostSecurityContext?: {
sysctl?: [
{
name?: string(name='Name', description='The name of the unsafe sysctl when you modify sysctls by configuring a security context. Valid values:
* kernel.shm \\\\* (except kernel.shm_rmid_forced)
* kernel.msg\\\\*
* kernel.sem
* fs.mqueue.\\\\*
* net.\\\\*(except net.ipv4.tcp_syncookies, net.ipv4.ping_group_range, and net.ipv4.ip_unprivileged_port_start)', example='kernel.msgmax'),
value?: string(name='Value', description='The value of the unsafe sysctl when you modify sysctls by configuring a security context.', example='65536'),
}
](name='Sysctl', description='Configure a security context to modify unsafe sysctls. For more information, see [Configure a security context](https://help.aliyun.com/document_detail/462313.html).'),
}(name='HostSecurityContext'),
securityContext?: {
sysctl?: [
{
name?: string(name='Name', description='The name of the safe sysctl when you modify sysctls by configuring a security context. Valid values:
* net.ipv4.ping_group_range
* net.ipv4.ip_unprivileged_port_start', example='kernel.msgmax'),
value?: string(name='Value', description='The value of the safe sysctl when you modify sysctls by configuring a security context.', example='65536'),
}
](name='Sysctl', description='Configure a security context to modify safe sysctls. For more information, see [Configure a security context](https://help.aliyun.com/document_detail/462313.html).'),
}(name='SecurityContext'),
acrRegistryInfo?: [
{
arnService?: string(name='ArnService', description='The Alibaba Cloud Resource Name (ARN) of the RAM role in the Alibaba Cloud account to which the elastic container instance belongs.', example='acs:ram::1609982529******:role/role-assume'),
arnUser?: string(name='ArnUser', description='The ARN of the RAM role in the Alibaba Cloud account to which the Container Registry Enterprise Edition instance belongs.', example='acs:ram::1298452580******:role/role-acr'),
domain?: [ string ](name='Domain', description='The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify multiple domain names. Separate multiple domain names with commas (,).', example='*****-****-registry.cn-beijing.cr.aliyuncs.com'),
instanceId?: string(name='InstanceId', description='The ID of the Container Registry Enterprise Edition instance.', example='cri-nwj395hgf6f3****'),
instanceName?: string(name='InstanceName', description='The name of the Container Registry Enterprise Edition instance.', example='acr-test'),
regionId?: string(name='RegionId', description='The region ID of the Container Registry Enterprise Edition instance.', example='cn-beijing'),
}
](name='AcrRegistryInfo', description='The information about the Container Registry Enterprise Edition instance that provides the image for the creation of the elastic container instance. For more information, see [Pull images from a Container Registry Enterprise Edition instance without using a secret](https://help.aliyun.com/document_detail/194250.html).'),
activeDeadlineSeconds?: long(name='ActiveDeadlineSeconds', description='The active period of the elastic container instance. After this period expires, the instance is forced to exit. Unit: seconds.', example='1000'),
autoCreateEip?: boolean(name='AutoCreateEip', description='Specifies whether to automatically create an EIP and associate it with the elastic container instance.', example='true'),
autoMatchImageCache?: boolean(name='AutoMatchImageCache', description='Specifies whether to automatically match image caches. Default value: false.', example='false'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotency](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-xxxx-12d3-xxxx-426655440000'),
computeCategory?: [ string ](name='ComputeCategory', description='The compute category of the instance. For more information, see [Specify a compute category to create an elastic container instance](https://help.aliyun.com/document_detail/2638061.html).'),
container?: [
{
livenessProbe?: {
exec?: {
command?: [ string ](name='Command'),
}(name='Exec'),
failureThreshold?: int32(name='FailureThreshold'),
httpGet?: {
path?: string(name='Path'),
port?: int32(name='Port'),
scheme?: string(name='Scheme'),
}(name='HttpGet'),
initialDelaySeconds?: int32(name='InitialDelaySeconds'),
periodSeconds?: int32(name='PeriodSeconds'),
successThreshold?: int32(name='SuccessThreshold'),
tcpSocket?: {
port?: int32(name='Port'),
}(name='TcpSocket'),
timeoutSeconds?: int32(name='TimeoutSeconds'),
}(name='LivenessProbe'),
readinessProbe?: {
exec?: {
command?: [ string ](name='Command'),
}(name='Exec'),
failureThreshold?: int32(name='FailureThreshold'),
httpGet?: {
path?: string(name='Path'),
port?: int32(name='Port'),
scheme?: string(name='Scheme'),
}(name='HttpGet'),
initialDelaySeconds?: int32(name='InitialDelaySeconds'),
periodSeconds?: int32(name='PeriodSeconds'),
successThreshold?: int32(name='SuccessThreshold'),
tcpSocket?: {
port?: int32(name='Port'),
}(name='TcpSocket'),
timeoutSeconds?: int32(name='TimeoutSeconds'),
}(name='ReadinessProbe'),
securityContext?: {
capability?: {
add?: [ string ](name='Add'),
}(name='Capability'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem'),
runAsUser?: long(name='RunAsUser'),
}(name='SecurityContext'),
arg?: [ string ](name='Arg', description='The arguments that are passed to the startup command of the container. You can specify up to 10 arguments.', example='100'),
command?: [ string ](name='Command', description='The commands to be executed in the container when you use a CLI to perform health checks.
> When you configure ReadinessProbe-related parameters, you can select only one of the HttpGet, Exec, and TcpSocket check methods.', example='sleep'),
cpu?: float(name='Cpu', description='The number of vCPUs that you want to allocate to the container.', example='0.25'),
environmentVar?: [
{
fieldRef?: {
fieldPath?: string(name='FieldPath'),
}(name='FieldRef'),
key?: string(name='Key', description='The name of the environment variable. The name must be 1 to 128 characters in length and can contain letters, digits, and underscores (_). It cannot start with a digit.``', example='PATH'),
value?: string(name='Value', description='The value of the environment variable. The value can be up to 256 characters in length.', example='/usr/local/bin'),
}
](name='EnvironmentVar', description='The environment variables of the container.'),
environmentVarHide?: boolean(name='EnvironmentVarHide', description='Specifies whether to hide the information about environment variables when you query the details of an elastic container instance. Default value: false. Valid values:
* false
* true If environment variables contain sensitive information, you can set this parameter to true to improve security of the information.', example='false'),
gpu?: int32(name='Gpu', description='The number of GPUs that you want to allocate to the container.', example='1'),
image?: string(name='Image', description='The image of the container.
This parameter is required.', example='registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The policy that you want to use to pull images. Valid values:
* Always: Each time instances are created, image pulling is performed.
* IfNotPresent: On-premises images are preferentially used. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Always'),
lifecyclePostStartHandlerExec?: [ string ](name='LifecyclePostStartHandlerExec', description='The commands to be executed in containers when you use a CLI to specify a postStart hook.', example='["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]'),
lifecyclePostStartHandlerHttpGetHost?: string(name='LifecyclePostStartHandlerHttpGetHost', description='The IP address of the host that receives the HTTP GET request when you use an HTTP request to specify a postStart hook.', example='10.0.XX.XX'),
lifecyclePostStartHandlerHttpGetHttpHeader?: [
{
name?: string(name='Name', description='The name of the custom field in the HTTP GET request header when you use HTTP requests to specify a postStart hook.', example='Xiao-Custom-Header'),
value?: string(name='Value', description='The value of the custom field in the HTTP GET request header when you use HTTP requests to specify a postStart hook.', example='test-postStart'),
}
](name='LifecyclePostStartHandlerHttpGetHttpHeader', description='The HTTP GET request header.'),
lifecyclePostStartHandlerHttpGetPath?: string(name='LifecyclePostStartHandlerHttpGetPath', description='The path to which the system sends an HTTP GET request for a health check when you use an HTTP request to specify a postStart hook.', example='/healthyz'),
lifecyclePostStartHandlerHttpGetPort?: int32(name='LifecyclePostStartHandlerHttpGetPort', description='The port to which the system sends an HTTP GET request when you use an HTTP request to specify a postStart hook.', example='5050'),
lifecyclePostStartHandlerHttpGetScheme?: string(name='LifecyclePostStartHandlerHttpGetScheme', description='The protocol type of HTTP GET requests when you use HTTP requests to specify a postStart hook. Valid values:
* HTTP
* HTTPS', example='HTTPS'),
lifecyclePostStartHandlerTcpSocketHost?: string(name='LifecyclePostStartHandlerTcpSocketHost', description='The IP address of the host that receives the TCP socket request when you use a TCP socket request to specify a postStart hook.', example='10.0.XX.XX'),
lifecyclePostStartHandlerTcpSocketPort?: int32(name='LifecyclePostStartHandlerTcpSocketPort', description='The port to which the system sends a TCP socket request for a health check when you use TCP sockets to specify a postStart hook.', example='80'),
lifecyclePreStopHandlerExec?: [ string ](name='LifecyclePreStopHandlerExec', description='The commands to be executed in containers when you use a CLI to specify a preStop hook.', example='["/bin/sh", "-c","echo Hello from the preStop handler > /usr/share/message"]'),
lifecyclePreStopHandlerHttpGetHost?: string(name='LifecyclePreStopHandlerHttpGetHost', description='The IP address of the host that receives the HTTP GET request when you use an HTTP request to specify a preStop hook.', example='10.0.XX.XX'),
lifecyclePreStopHandlerHttpGetHttpHeader?: [
{
name?: string(name='Name', description='The name of the custom field in the HTTP GET request header when you use HTTP requests to specify a presto hook.', example='Xiao-Custom-Header'),
value?: string(name='Value', description='The value of the custom field in the HTTP GET request header when you use HTTP requests to specify a preStop hook.', example='test-preStop'),
}
](name='LifecyclePreStopHandlerHttpGetHttpHeader', description='The HTTP GET request header.'),
lifecyclePreStopHandlerHttpGetPath?: string(name='LifecyclePreStopHandlerHttpGetPath', description='The path to which the system sends an HTTP GET request for a health check when you use an HTTP request to specify a preSop hook.', example='/healthyz'),
lifecyclePreStopHandlerHttpGetPort?: int32(name='LifecyclePreStopHandlerHttpGetPort', description='The port to which the system sends an HTTP GET request for a health check when you use HTTP requests to specify a preStop hook.', example='88'),
lifecyclePreStopHandlerHttpGetScheme?: string(name='LifecyclePreStopHandlerHttpGetScheme', description='The protocol type of the HTTP GET request when you use an HTTP request to specify a preStop hook. Valid values:
* HTTP
* HTTPS', example='HTTP'),
lifecyclePreStopHandlerTcpSocketHost?: string(name='LifecyclePreStopHandlerTcpSocketHost', description='The IP address of the host that receives the TCP socket request when you use a TCP socket request to specify a preStop hook.', example='10.0.XX.XX'),
lifecyclePreStopHandlerTcpSocketPort?: int32(name='LifecyclePreStopHandlerTcpSocketPort', description='The port to which the system sends a TCP socket request for a health check when you use TCP sockets to specify a preStop hook.', example='90'),
memory?: float(name='Memory', description='The memory size of the container. Unit: GiB', example='0.5'),
name?: string(name='Name', description='The name of the container.
This parameter is required.', example='nginx'),
port?: [
{
port?: int32(name='Port', description='The port number. Valid values: 1 to 65535.', example='80'),
protocol?: string(name='Protocol', description='The type of the protocol. Valid values:
* TCP
* UDP', example='TCP'),
}
](name='Port', description='The port to which the system sends an HTTP GET request for a health check when you use HTTP requests to perform health checks.
> When you configure LivenessProbe-related parameters, you can select only one of the HttpGet, Exec, and TcpSocket check methods.'),
securityContextPrivileged?: boolean(name='SecurityContextPrivileged', description='Specifies whether to enable privileged mode for the container. That is, whether to run the container in privileged mode. Default value: false. Valid values:
* true
* false', example='true'),
securityContextRunAsGroup?: long(name='SecurityContextRunAsGroup', description='The user group that runs the container.', example='3000'),
securityContextRunAsNonRoot?: boolean(name='SecurityContextRunAsNonRoot', description='Specifies whether to run the container as a non-root user. Valid values:
* true
* false', example='true'),
stdin?: boolean(name='Stdin', description='Specifies whether the container allocates buffer resources to standard input streams when the container is running. If you do not specify this parameter, an end-of-file (EOF) error may occur when standard input streams in the container are read. Default value: false.', example='false'),
stdinOnce?: boolean(name='StdinOnce', description='Specifies whether standard input streams are disconnected from multiple sessions after a client is disconnected.\\\\
If StdinOnce is set to true, standard input streams are connected after the container is started, and remain idle until a client is connected to receive data. After the client is disconnected, standard input streams are also disconnected, and remain disconnected until the container restarts.', example='false'),
terminationMessagePath?: string(name='TerminationMessagePath', description='The path of the file from which the system retrieves termination messages of the container when the container exits.', example='/tmp/termination-log'),
terminationMessagePolicy?: string(name='TerminationMessagePolicy', description='The message notification policy. This parameter is empty by default. Only Message Service (MNS) queue message notifications can be sent.', example='FallbackToLogsOnError'),
tty?: boolean(name='Tty', description='Specifies whether to enable interaction. Default value: false.
If the command is a /bin/bash command, set the value to true.', example='false'),
volumeMount?: [
{
mountPath?: string(name='MountPath', description='The directory to which the volume is mounted.
> The data stored in this directory is overwritten by the data on the volume. Specify this parameter with caution.', example='/pod/data'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
* None: The volume mount does not receive subsequent mounts that are performed on this volume or subdirectories of this volume.
* HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume.
* Bidirectional: This value is similar to HostToContainer. The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume. In addition, all volume mounts that are mounted on the container are propagated back to the host and all containers of all pods that use the same volume.
Default value: None.', example='None'),
name?: string(name='Name', description='The name of the volume. The value of this parameter is the same as the name of the volume that is mounted to containers.', example='default-volume1'),
readOnly?: boolean(name='ReadOnly', description='Specifies whether the volume is read-only. Default value: false.', example='false'),
subPath?: string(name='SubPath', description='The subdirectory of the volume.', example='data2/'),
}
](name='VolumeMount', description='The information about the volume that you want to mount on the container.'),
workingDir?: string(name='WorkingDir', description='The working directory of the container.', example='/usr/local/'),
}
](name='Container', description='The information about the container.
This parameter is required.'),
containerGroupName?: string(name='ContainerGroupName', description='The name of the elastic container instance (container group). The name must meet the following requirements:
* The name must be 2 to 128 characters in length.
* The name can contain lowercase letters, digits, and hyphens (-). It cannot start or end with a hyphen (-).
This parameter is required.', example='nginx-test'),
containerResourceView?: boolean(name='ContainerResourceView', description='Specifies whether to enable container resource view. Container resource view displays the actual container resource data instead of data of the host. If the specifications of the generated elastic container instance are larger than the specifications that you request for when you create the instance, you can enable the ContainerResourceView feature to ensure that the resources that you view in the container are the same as the resources that you request for.', example='false'),
corePattern?: string(name='CorePattern', description='The path to core dump files. For more information, see [Save core files to volumes](https://help.aliyun.com/document_detail/167801.html).
> The path cannot start with |. You cannot use core dump files to configure executable programs.``', example='/xx/xx/core'),
cpu?: float(name='Cpu', description='The number of vCPUs that you want to allocate to the instance.', example='1.0'),
cpuArchitecture?: string(name='CpuArchitecture', description='The CPU architecture of the instance. Default value: AMD64. Valid values:
* AMD64
* ARM64', example='ARM64'),
cpuOptionsCore?: int32(name='CpuOptionsCore', description='The number of physical CPU cores. You can specify this parameter for only specific ECS instance types.', example='2'),
cpuOptionsNuma?: string(name='CpuOptionsNuma', description='This parameter is not available.', example='1'),
cpuOptionsThreadsPerCore?: int32(name='CpuOptionsThreadsPerCore', description='The number of threads per core. You can specify this parameter for only specific ECS instance types. A value of 1 specifies that Hyper-Threading is disabled.', example='2'),
dataCacheBucket?: string(name='DataCacheBucket', description='The bucket that stores the data cache.', example='default'),
dataCacheBurstingEnabled?: boolean(name='DataCacheBurstingEnabled', description='Specifies whether to enable the performance burst feature when ESSDs AutoPL are used to store data caches. For more information, see [ESSDs AutoPL](https://help.aliyun.com/document_detail/368372.html).', example='false'),
dataCachePL?: string(name='DataCachePL', description='The performance level (PL) of the disk that you want to use to store data caches.\\\\
Enhanced SSDs (ESSDs) are preferentially used to store data caches. The default performance level is PL1.', example='PL1'),
dataCacheProvisionedIops?: long(name='DataCacheProvisionedIops', description='The input/output operations per second (IOPS) provisioned for ESSDs AutoPL when ESSDs AutoPL are used to store data caches.\\\\
Valid values: 0 to min{50000, 1000 × Storage capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Storage capacity, 50,000}.\\\\
For more information, see [ESSDs AutoPL](https://help.aliyun.com/document_detail/368372.html).', example='40000'),
dnsPolicy?: string(name='DnsPolicy', description='The Domain Name System (DNS) policy. Valid values:
* None: uses the DNS that is specified by DnsConfig.
* Default: uses the DNS that is specified for the runtime environment.', example='Default'),
dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:
* true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, service limits, and available resources. If the request passes the dry run, the DryRunOperation error code is returned. Otherwise, an error message is returned.
* false (default): performs a dry run and performs the actual request. If the request passes the dry run, the elastic container instance is created.', example='false'),
egressBandwidth?: long(name='EgressBandwidth', description='The maximum outbound bandwidth. Unit: bit/s.', example='1024000'),
eipBandwidth?: int32(name='EipBandwidth', description='The maximum bandwidth value for the EIP. Unit: Mbit/s. Default value: 5.\\\\
This parameter is valid only when AutoCreateEip is set to true.', example='5'),
eipCommonBandwidthPackage?: string(name='EipCommonBandwidthPackage', description='The EIP bandwidth plan that you want to associate with the instance.', example='cbwp-2zeukbj916scmj51m****'),
eipISP?: string(name='EipISP', description='The line type of the EIP. Default value: BGP. Valid values:
* BGP: BGP (Multi-ISP) line
* BGP_PRO: BGP (Multi-ISP) Pro line', example='BPG'),
eipInstanceId?: string(name='EipInstanceId', description='The ID of the elastic IP address (EIP).', example='eip-uf66jeqopgqa9hdn****'),
ephemeralStorage?: int32(name='EphemeralStorage', description='The increased capacity of the temporary storage space. Unit: GiB.\\\\
For more information, see [Increase the size of the temporary storage space](https://help.aliyun.com/document_detail/204066.html).', example='20'),
fixedIp?: string(name='FixedIp', description='Specifies whether to configure the instance to use a fixed IP address. For more information, see [Configure an elastic container instance to use a fixed IP address](https://help.aliyun.com/document_detail/2381086.html).', example='true'),
fixedIpRetainHour?: int32(name='FixedIpRetainHour', description='The retention period of the fixed IP address after the original instance is released and the fixed IP address becomes idle. Unit: hours. Default value: 48.', example='24'),
gpuDriverVersion?: string(name='GpuDriverVersion', description='The version of the GPU driver. Default value: tesla=470.82.01. Valid values:
* tesla=470.82.01
* tesla=525.85.12
> You can switch the GPU driver version only for a few Elastic Compute Service (ECS) instance types. For more information, see [Specify GPU-accelerated ECS instance types to create an elastic container instance](https://help.aliyun.com/document_detail/2579486.html).', example='tesla=525.85.12'),
hostAliase?: [
{
hostname?: [ string ](name='Hostname', description='The hostnames of the elastic container instance.', example='hehe.com'),
ip?: string(name='Ip', description='The IP address of the elastic container instance.', example='1.1.1.1'),
}
](name='HostAliase', description='The alias of the elastic container instance.'),
hostName?: string(name='HostName', description='The hostname.', example='test'),
imageAccelerateMode?: string(name='ImageAccelerateMode', description='The image acceleration mode. Valid values:
* nydus: uses Nydus to accelerate image pulling. The images must support Nydus.
* dadi: uses DADI to accelerate image pulling. The images must support DADI.
* p2p: uses P2P to accelerate image pulling. The images must support p2p.
* imc: uses image caches to accelerate image pulling.', example='imc'),
imageRegistryCredential?: [
{
password?: string(name='Password', description='The password that you use to access the image repository.', example='yourpassword'),
server?: string(name='Server', description='The address of the image repository.', example='registry-vpc.cn-shanghai.aliyuncs.com'),
userName?: string(name='UserName', description='The username that you use to access the image repository.', example='yourusername'),
}
](name='ImageRegistryCredential', description='The information about the logon credentials.'),
imageSnapshotId?: string(name='ImageSnapshotId', description='The ID of the image cache. For more information, see [Use image caches to accelerate the creation of instances](https://help.aliyun.com/document_detail/141281.html).', example='imc-2zebxkiifuyzzlhl****'),
ingressBandwidth?: long(name='IngressBandwidth', description='The maximum inbound bandwidth. Unit: bit/s.', example='1024000'),
initContainer?: [
{
securityContext?: {
capability?: {
add?: [ string ](name='Add'),
}(name='Capability'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem'),
runAsUser?: long(name='RunAsUser'),
}(name='SecurityContext'),
arg?: [ string ](name='Arg', description='The arguments that are passed to the startup command of the init container.', example='10'),
command?: [ string ](name='Command', description='The startup commands of the init container.', example='sleep'),
cpu?: float(name='Cpu', description='The number of vCPUs that you want to allocate to the init container.', example='0.5'),
environmentVar?: [
{
fieldRef?: {
fieldPath?: string(name='FieldPath'),
}(name='FieldRef'),
key?: string(name='Key', description='The name of the environment variable. The name must be 1 to 128 bits in length and can contain letters, digits, and underscores (_). It cannot start with a digit.``', example='Path'),
value?: string(name='Value', description='The value of the environment variable. The value must be 0 to 256 bits in length.', example='/usr/bin/'),
}
](name='EnvironmentVar', description='The environment variable of the init container.'),
gpu?: int32(name='Gpu', description='The number of GPUs that you want to allocate to the init container.', example='1'),
image?: string(name='Image', description='The image of the init container.', example='nginx'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The policy that you want to use to pull images. Valid values:
* Always: Each time instances are created, image pulling is performed.
* IfNotPresent: On-premises images are preferentially used. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Always'),
memory?: float(name='Memory', description='The memory size that you want to allocate to the init container. Unit: GiB.', example='1.0'),
name?: string(name='Name', description='The name of the init container.', example='test-init'),
port?: [
{
port?: int32(name='Port', description='The port number. Valid values: 1 to 65535.', example='8888'),
protocol?: string(name='Protocol', description='The protocol type. Valid values:
* TCP
* UDP', example='TCP'),
}
](name='Port', description='The information about the port.'),
terminationMessagePath?: string(name='TerminationMessagePath', description='The path of the file from which the system retrieves termination messages of the init container when the init container exits.', example='/tmp/termination-log'),
terminationMessagePolicy?: string(name='TerminationMessagePolicy', description='The message notification policy. This parameter is empty by default.', example='*****'),
volumeMount?: [
{
mountPath?: string(name='MountPath', description='The directory to which the volume is mounted. The data stored in this directory is overwritten by the data on the volume. Specify this parameter with caution.', example='/usr/share/'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one init container to be shared with other init containers in the same pod, or even with other pods on the same node. Valid values:
* None: The volume mount does not receive subsequent mounts that are performed on this volume or subdirectories of this volume.
* HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume.
* Bidirectional: This value is similar to HostToContainer. The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume. In addition, all volume mounts that are mounted on the init container are propagated back to the host and all init containers of all pods that use the same volume.
Default value: None.', example='None'),
name?: string(name='Name', description='The name of the volume.', example='test-empty'),
readOnly?: boolean(name='ReadOnly', description='Specifies whether the mount path is read-only. Default value: false.', example='false'),
subPath?: string(name='SubPath', description='The subdirectory of the volume. The pod can mount different directories of the same volume to different subdirectories of init containers.', example='/usr/sub/'),
}
](name='VolumeMount', description='The information about the volumes that you want to mount to the init containers.'),
workingDir?: string(name='WorkingDir', description='The working directory of the init container.', example='/usr/local'),
}
](name='InitContainer', description='The information about the init containers.'),
insecureRegistry?: string(name='InsecureRegistry', description='The address of the self-managed image repository. When you create an elastic container instance by using an image in a self-managed image repository that uses a self-signed certificate, you must specify this parameter to skip the certificate authentication. This prevents image pull failures caused by certificate authentication failures.', example='"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"'),
instanceType?: string(name='InstanceType', description='The ECS instance types that you specify to create the elastic container instance. Multiple instance types are supported. For more information, see [Specify ECS instance types to create an elastic container instance](https://help.aliyun.com/document_detail/114664.html).', example='ecs.c5.xlarge'),
ipv6AddressCount?: int32(name='Ipv6AddressCount', description='The number of IPv6 addresses that are assigned to the instance. Set the value to 1. You can assign only one IPv6 address to an elastic container instance.', example='1'),
ipv6GatewayBandwidth?: string(name='Ipv6GatewayBandwidth', description='The maximum IPv6 Internet bandwidth when you set Ipv6GatewayBandwidthEnable to true. Valid values:
* If the billing method for IPv6 network usage is pay-by-bandwidth, the maximum IPv6 Internet bandwidth ranges from 1 to 2,000 Mbit/s.
* If the billing method for IPv6 network usage is pay-by-traffic, the maximum IPv6 Internet bandwidth varies based on the edition of the IPv6 gateway.
* If the IPv6 gateway is of Free Edition, the maximum IPv6 Internet bandwidth ranges from 1 to 200 Mbit/s.
* If the IPv6 gateway is of Enterprise Edition, the maximum IPv6 Internet bandwidth ranges from 1 to 500 Mbit/s.
* If the IPv6 gateway is of Enhanced Enterprise Edition, the maximum IPv6 Internet bandwidth ranges from 1 to 1000 Mbit/s.
The default value is the maximum value in the Internet bandwidth range of the IPv6 gateway.', example='100'),
ipv6GatewayBandwidthEnable?: boolean(name='Ipv6GatewayBandwidthEnable', description='Specifies whether to enable Internet access to the elastic container instance over IPv6 addresses.', example='true'),
memory?: float(name='Memory', description='The memory size that you want to allocate to the instance. Unit: GiB.', example='2.0'),
ntpServer?: [ string ](name='NtpServer', description='The endpoints of the Network Time Protocol (NTP) servers.', example='ntp.cloud.aliyuncs.com'),
osType?: string(name='OsType', description='The operating system of the elastic container instance. Default value: Linux. Valid values:
* Linux
* Windows
> Windows instances are in invitational preview. To use the operating system, submit a ticket.', example='Windows'),
overheadReservationOption?: {
enableOverheadReservation?: boolean(name='EnableOverheadReservation', description='Specify whether to enable the overhead reservation feature. Default: false. Valid values: true and false. After you enable the overhead reservation feature, the system automatically adds the overhead to the specification of the elastic container instance, and then adjusts the specification of the instance upward to the most approximate specification. You are charged based on the new specification after the adjustment.', example='true'),
}(name='OverheadReservationOption', description='The options that you can configure when you enable the overhead reservation feature.'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
plainHttpRegistry?: string(name='PlainHttpRegistry', description='The address of the self-managed image repository. When you create an elastic container instance by using an image in a self-managed image repository that uses the HTTP protocol, you must specify this parameter. This way, Elastic Container Instance pulls the image over the HTTP protocol instead of the default HTTPS protocol. This prevents image pull failures caused by different protocols.', example='"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"'),
privateIpAddress?: string(name='PrivateIpAddress', description='The private IP address of the elastic container instance. Only IPv4 addresses are supported. Make sure that the IP address is idle.', example='172.16.0.1'),
ramRoleName?: string(name='RamRoleName', description='The name of the instance Resource Access Management (RAM) role. You can use the same RAM role to access elastic container instances and ECS instances. For more information, see [Use an instance RAM role by calling API operations](https://help.aliyun.com/document_detail/61178.html).', example='RamTestRole'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-uf66jeqopgqa9hdn****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
restartPolicy?: string(name='RestartPolicy', description='The restart policy of the instance. Valid values:
* Always: Always restarts the instance if a container in the instance exits upon termination.
* Never: Never restarts the instance if a container in the instance exits upon termination.
* OnFailure: Restarts the instance only if a container in the instance exists upon failure with a status code of non-zero.
Default value: Always.', example='Always'),
scheduleStrategy?: string(name='ScheduleStrategy', description='The resource scheduling policy when you specify multiple zones to create an elastic container instance. To specify multiple zones, you can use the VSwitchId to specify multiple vSwitches. Valid values:
* VSwitchOrdered: The system schedules resources in the sequence of the vSwitches.
* VSwitchRandom: The system schedules resources at random.
For more information, see [Specify multiple zones to create an elastic container instance](https://help.aliyun.com/document_detail/157290.html).', example='VSwitchOrdered'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group to which the instance belongs. Instances in the same security group can access each other.
If you do not specify a security group, the system automatically uses the default security group in the region that you selected. Make sure that the inbound rules of the security group contain the container protocols and port numbers that you want to expose. If you do not have a default security group in the region, the system creates a default security group, and then adds the container protocols and port numbers that you specified to the inbound rules of the security group.', example='sg-uf66jeqopgqa9hdn****'),
shareProcessNamespace?: boolean(name='ShareProcessNamespace', description='Specifies whether to use a shared namespace. Default value: false.', example='false'),
spotDuration?: long(name='SpotDuration', description='The protection period of the preemptible elastic container instance. Unit: hours. Default value: 1. A value of 0 indicates no protection period.', example='1'),
spotPriceLimit?: float(name='SpotPriceLimit', description='The maximum hourly price of the preemptible elastic container instance. The value can be accurate to three decimal places.
If you set SpotStrategy to SpotWithPriceLimit, you must specify the SpotPriceLimit parameter.', example='0.025'),
spotStrategy?: string(name='SpotStrategy', description='The bid policy for the instance. Valid values:
* NoSpot: The instance is created as a pay-as-you-go instance.
* SpotWithPriceLimit: The instance is created as a preemptible instance for which you specify the maximum hourly price.
* SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.
Default value: NoSpot.', example='SpotWithPriceLimit'),
strictSpot?: boolean(name='StrictSpot', description='Specifies whether to enable periodical execution.
* true: enables periodical execution.
* false: disables periodical execution.', example='true'),
tag?: [
{
key?: string(name='Key', description='The tag key. The tag key cannot be an empty string and must be unique. The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `acs:` or `aliyun`.', example='version'),
value?: string(name='Value', description='The tag value. The tag value can be an empty string. The tag value can be up to 128 characters in length. It cannot start with `acs:` and cannot contain `http://` or `https://`.', example='3'),
}
](name='Tag', description='The tags that you want to add to the instance. You can bind a maximum of 20 tags. For more information, see [Use tags to manage elastic container instances](https://help.aliyun.com/document_detail/146608.html).'),
terminationGracePeriodSeconds?: long(name='TerminationGracePeriodSeconds', description='The buffer period of time during which the program handles operations before the program is stopped. Unit: seconds.', example='60'),
vSwitchId?: string(name='VSwitchId', description='The IDs of the vSwitches that connect to the instance. You can specify up to 10 vSwitch IDs at a time. Separate multiple vSwitch IDs with commas (,). Example: `vsw-***,vsw-***`.
If you do not specify a vSwitch, the system automatically uses the default vSwitch in the default VPC in the region that you selected. If you do not have a default VPC or a default vSwitch in the region, the system automatically creates a default VPC and a default vSwitch.
> The number of IP addresses in the vSwitch CIDR block determines the maximum number of elastic container instances that you can create for the vSwitch. Before you create elastic container instances, you must plan the CIDR block of the vSwitch.', example='vsw-bp1xpiowfm5vo8o3c****,vsw-bp1rkyjgr1xwoho6k****'),
volume?: [
{
configFileVolume?: {
configFileToPath?: [
{
content?: string(name='Content'),
mode?: int32(name='Mode'),
path?: string(name='Path'),
}
](name='ConfigFileToPath'),
defaultMode?: int32(name='DefaultMode'),
}(name='ConfigFileVolume'),
diskVolume?: {
diskId?: string(name='DiskId'),
diskSize?: int32(name='DiskSize'),
fsType?: string(name='FsType'),
}(name='DiskVolume'),
emptyDirVolume?: {
medium?: string(name='Medium'),
sizeLimit?: string(name='SizeLimit'),
}(name='EmptyDirVolume'),
flexVolume?: {
driver?: string(name='Driver'),
fsType?: string(name='FsType'),
options?: string(name='Options'),
}(name='FlexVolume'),
hostPathVolume?: {
path?: string(name='Path'),
type?: string(name='Type'),
}(name='HostPathVolume'),
NFSVolume?: {
path?: string(name='Path'),
readOnly?: boolean(name='ReadOnly'),
server?: string(name='Server'),
}(name='NFSVolume'),
name?: string(name='Name', description='The name of the volume.', example='default-volume1'),
type?: string(name='Type', description='The type of the HostPath volume. Valid values:
* Directory
* File
> Only users in the whitelist can mount HostPath volumes.', example='ConfigFileVolume'),
}
](name='Volume', description='The information about the volume that you want to mount to the container.'),
zoneId?: string(name='ZoneId', description='The zone ID of the instance. If you do not specify this parameter, the system selects a zone.
This parameter is empty by default.', example='cn-hangzhou-b'),
}
model CreateContainerGroupResponseBody = {
containerGroupId?: string(name='ContainerGroupId', description='The ID of the instance.', example='eci-uf6fonnghi50u374****'),
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model CreateContainerGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateContainerGroupResponseBody(name='body'),
}
/**
* @summary Creates an elastic container instance.
*
* @description When you call the CreateContainerGroup operation to create an elastic container instance, the system automatically creates a service-linked role named AliyunServiceRoleForECI. You can assume the service-linked role to access relevant cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud (VPC). For more information, see [Elastic Container Instance service-linked role](https://help.aliyun.com/document_detail/212914.html).
* When you create an elastic container instance, you can configure features that are related to instances, images, and storage based on your business requirements. For information about parameters configured for the features and the description of the parameters, see the following documents:
* **Instances**
* You can use one of the following methods to create an elastic container instance:
* * [Specify the number of vCPUs and memory size to create an elastic container instance](https://help.aliyun.com/document_detail/114662.html)
* * [Specify ECS instance types to create an elastic container instance](https://help.aliyun.com/document_detail/114664.html)
* Both the preceding creation methods support the following features:
* * [Create a preemptible elastic container instance](https://help.aliyun.com/document_detail/157759.html)
* * [Configure multiple zones](https://help.aliyun.com/document_detail/157290.html)
* * [Configure multiple specifications](https://help.aliyun.com/document_detail/146468.html)
* * [Use tags to manage elastic container instances](https://help.aliyun.com/document_detail/146608.html)
* **Images**
* * [Configure a container image](https://help.aliyun.com/document_detail/461311.html)
* * [Use the image cache feature to accelerate the creation of an elastic container instance](https://help.aliyun.com/document_detail/141281.html)
* * [Specify a Container Registry Enterprise Edition instance](https://help.aliyun.com/document_detail/194250.html)
* * [Use self-managed image repositories](https://help.aliyun.com/document_detail/378059.html)
* **Networking**
* * [Create and Associate an EIP](https://help.aliyun.com/document_detail/99146.html)
* * [Assign a security group](https://help.aliyun.com/document_detail/176237.html)
* * [Assign an IPv6 address to an elastic container instance](https://help.aliyun.com/document_detail/451282.html)
* * [Configure maximum bandwidth](https://help.aliyun.com/document_detail/190635.html)
* **Storage**
* * [Mount a disk volume](https://help.aliyun.com/document_detail/144571.html)
* * [Mount a NAS volume](https://help.aliyun.com/document_detail/464075.html)
* * [Mount an OSS bucket to an elastic container instance as a volume](https://help.aliyun.com/document_detail/464076.html)
* * [Mount an emptyDir volume](https://help.aliyun.com/document_detail/464078.html)
* * [Mount a ConfigFile volume](https://help.aliyun.com/document_detail/464080.html)
* * [Increase the size of the temporary storage space](https://help.aliyun.com/document_detail/204066.html)
* **Container configuration**
* * [Configure startup commands and arguments for a container](https://help.aliyun.com/document_detail/94593.html)
* * [Use probes to perform health checks on a container](https://help.aliyun.com/document_detail/99053.html)
* * [Obtain metadata by using environment variables](https://help.aliyun.com/document_detail/141788.html)
* * [Configure a security context for an elastic container instance or a container](https://help.aliyun.com/document_detail/462313.html)
* * [Configure the NTP service](https://help.aliyun.com/document_detail/462768.html)
* **Logging and O\\&M**
* * [Use environment variables to configure log collection](https://help.aliyun.com/document_detail/121973.html)
* * [Save core files to volumes](https://help.aliyun.com/document_detail/167801.html)
*
* @param request CreateContainerGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateContainerGroupResponse
*/
async function createContainerGroupWithOptions(request: CreateContainerGroupRequest, runtime: Util.RuntimeOptions): CreateContainerGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acrRegistryInfo)) {
query['AcrRegistryInfo'] = request.acrRegistryInfo;
}
if (!Util.isUnset(request.activeDeadlineSeconds)) {
query['ActiveDeadlineSeconds'] = request.activeDeadlineSeconds;
}
if (!Util.isUnset(request.autoCreateEip)) {
query['AutoCreateEip'] = request.autoCreateEip;
}
if (!Util.isUnset(request.autoMatchImageCache)) {
query['AutoMatchImageCache'] = request.autoMatchImageCache;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.computeCategory)) {
query['ComputeCategory'] = request.computeCategory;
}
if (!Util.isUnset(request.container)) {
query['Container'] = request.container;
}
if (!Util.isUnset(request.containerGroupName)) {
query['ContainerGroupName'] = request.containerGroupName;
}
if (!Util.isUnset(request.containerResourceView)) {
query['ContainerResourceView'] = request.containerResourceView;
}
if (!Util.isUnset(request.corePattern)) {
query['CorePattern'] = request.corePattern;
}
if (!Util.isUnset(request.cpu)) {
query['Cpu'] = request.cpu;
}
if (!Util.isUnset(request.cpuArchitecture)) {
query['CpuArchitecture'] = request.cpuArchitecture;
}
if (!Util.isUnset(request.cpuOptionsCore)) {
query['CpuOptionsCore'] = request.cpuOptionsCore;
}
if (!Util.isUnset(request.cpuOptionsNuma)) {
query['CpuOptionsNuma'] = request.cpuOptionsNuma;
}
if (!Util.isUnset(request.cpuOptionsThreadsPerCore)) {
query['CpuOptionsThreadsPerCore'] = request.cpuOptionsThreadsPerCore;
}
if (!Util.isUnset(request.dataCacheBucket)) {
query['DataCacheBucket'] = request.dataCacheBucket;
}
if (!Util.isUnset(request.dataCacheBurstingEnabled)) {
query['DataCacheBurstingEnabled'] = request.dataCacheBurstingEnabled;
}
if (!Util.isUnset(request.dataCachePL)) {
query['DataCachePL'] = request.dataCachePL;
}
if (!Util.isUnset(request.dataCacheProvisionedIops)) {
query['DataCacheProvisionedIops'] = request.dataCacheProvisionedIops;
}
if (!Util.isUnset(request.dnsPolicy)) {
query['DnsPolicy'] = request.dnsPolicy;
}
if (!Util.isUnset(request.dryRun)) {
query['DryRun'] = request.dryRun;
}
if (!Util.isUnset(request.egressBandwidth)) {
query['EgressBandwidth'] = request.egressBandwidth;
}
if (!Util.isUnset(request.eipBandwidth)) {
query['EipBandwidth'] = request.eipBandwidth;
}
if (!Util.isUnset(request.eipCommonBandwidthPackage)) {
query['EipCommonBandwidthPackage'] = request.eipCommonBandwidthPackage;
}
if (!Util.isUnset(request.eipISP)) {
query['EipISP'] = request.eipISP;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.ephemeralStorage)) {
query['EphemeralStorage'] = request.ephemeralStorage;
}
if (!Util.isUnset(request.fixedIp)) {
query['FixedIp'] = request.fixedIp;
}
if (!Util.isUnset(request.fixedIpRetainHour)) {
query['FixedIpRetainHour'] = request.fixedIpRetainHour;
}
if (!Util.isUnset(request.gpuDriverVersion)) {
query['GpuDriverVersion'] = request.gpuDriverVersion;
}
if (!Util.isUnset(request.hostAliase)) {
query['HostAliase'] = request.hostAliase;
}
if (!Util.isUnset(request.hostName)) {
query['HostName'] = request.hostName;
}
if (!Util.isUnset(request.imageAccelerateMode)) {
query['ImageAccelerateMode'] = request.imageAccelerateMode;
}
if (!Util.isUnset(request.imageRegistryCredential)) {
query['ImageRegistryCredential'] = request.imageRegistryCredential;
}
if (!Util.isUnset(request.imageSnapshotId)) {
query['ImageSnapshotId'] = request.imageSnapshotId;
}
if (!Util.isUnset(request.ingressBandwidth)) {
query['IngressBandwidth'] = request.ingressBandwidth;
}
if (!Util.isUnset(request.initContainer)) {
query['InitContainer'] = request.initContainer;
}
if (!Util.isUnset(request.insecureRegistry)) {
query['InsecureRegistry'] = request.insecureRegistry;
}
if (!Util.isUnset(request.instanceType)) {
query['InstanceType'] = request.instanceType;
}
if (!Util.isUnset(request.ipv6AddressCount)) {
query['Ipv6AddressCount'] = request.ipv6AddressCount;
}
if (!Util.isUnset(request.ipv6GatewayBandwidth)) {
query['Ipv6GatewayBandwidth'] = request.ipv6GatewayBandwidth;
}
if (!Util.isUnset(request.ipv6GatewayBandwidthEnable)) {
query['Ipv6GatewayBandwidthEnable'] = request.ipv6GatewayBandwidthEnable;
}
if (!Util.isUnset(request.memory)) {
query['Memory'] = request.memory;
}
if (!Util.isUnset(request.ntpServer)) {
query['NtpServer'] = request.ntpServer;
}
if (!Util.isUnset(request.osType)) {
query['OsType'] = request.osType;
}
if (!Util.isUnset(request.overheadReservationOption)) {
query['OverheadReservationOption'] = request.overheadReservationOption;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.plainHttpRegistry)) {
query['PlainHttpRegistry'] = request.plainHttpRegistry;
}
if (!Util.isUnset(request.privateIpAddress)) {
query['PrivateIpAddress'] = request.privateIpAddress;
}
if (!Util.isUnset(request.ramRoleName)) {
query['RamRoleName'] = request.ramRoleName;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.restartPolicy)) {
query['RestartPolicy'] = request.restartPolicy;
}
if (!Util.isUnset(request.scheduleStrategy)) {
query['ScheduleStrategy'] = request.scheduleStrategy;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.shareProcessNamespace)) {
query['ShareProcessNamespace'] = request.shareProcessNamespace;
}
if (!Util.isUnset(request.spotDuration)) {
query['SpotDuration'] = request.spotDuration;
}
if (!Util.isUnset(request.spotPriceLimit)) {
query['SpotPriceLimit'] = request.spotPriceLimit;
}
if (!Util.isUnset(request.spotStrategy)) {
query['SpotStrategy'] = request.spotStrategy;
}
if (!Util.isUnset(request.strictSpot)) {
query['StrictSpot'] = request.strictSpot;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.terminationGracePeriodSeconds)) {
query['TerminationGracePeriodSeconds'] = request.terminationGracePeriodSeconds;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.volume)) {
query['Volume'] = request.volume;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
if (!Util.isUnset(request.dnsConfig)) {
query['DnsConfig'] = request.dnsConfig;
}
if (!Util.isUnset(request.hostSecurityContext)) {
query['HostSecurityContext'] = request.hostSecurityContext;
}
if (!Util.isUnset(request.securityContext)) {
query['SecurityContext'] = request.securityContext;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateContainerGroup',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates an elastic container instance.
*
* @description When you call the CreateContainerGroup operation to create an elastic container instance, the system automatically creates a service-linked role named AliyunServiceRoleForECI. You can assume the service-linked role to access relevant cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud (VPC). For more information, see [Elastic Container Instance service-linked role](https://help.aliyun.com/document_detail/212914.html).
* When you create an elastic container instance, you can configure features that are related to instances, images, and storage based on your business requirements. For information about parameters configured for the features and the description of the parameters, see the following documents:
* **Instances**
* You can use one of the following methods to create an elastic container instance:
* * [Specify the number of vCPUs and memory size to create an elastic container instance](https://help.aliyun.com/document_detail/114662.html)
* * [Specify ECS instance types to create an elastic container instance](https://help.aliyun.com/document_detail/114664.html)
* Both the preceding creation methods support the following features:
* * [Create a preemptible elastic container instance](https://help.aliyun.com/document_detail/157759.html)
* * [Configure multiple zones](https://help.aliyun.com/document_detail/157290.html)
* * [Configure multiple specifications](https://help.aliyun.com/document_detail/146468.html)
* * [Use tags to manage elastic container instances](https://help.aliyun.com/document_detail/146608.html)
* **Images**
* * [Configure a container image](https://help.aliyun.com/document_detail/461311.html)
* * [Use the image cache feature to accelerate the creation of an elastic container instance](https://help.aliyun.com/document_detail/141281.html)
* * [Specify a Container Registry Enterprise Edition instance](https://help.aliyun.com/document_detail/194250.html)
* * [Use self-managed image repositories](https://help.aliyun.com/document_detail/378059.html)
* **Networking**
* * [Create and Associate an EIP](https://help.aliyun.com/document_detail/99146.html)
* * [Assign a security group](https://help.aliyun.com/document_detail/176237.html)
* * [Assign an IPv6 address to an elastic container instance](https://help.aliyun.com/document_detail/451282.html)
* * [Configure maximum bandwidth](https://help.aliyun.com/document_detail/190635.html)
* **Storage**
* * [Mount a disk volume](https://help.aliyun.com/document_detail/144571.html)
* * [Mount a NAS volume](https://help.aliyun.com/document_detail/464075.html)
* * [Mount an OSS bucket to an elastic container instance as a volume](https://help.aliyun.com/document_detail/464076.html)
* * [Mount an emptyDir volume](https://help.aliyun.com/document_detail/464078.html)
* * [Mount a ConfigFile volume](https://help.aliyun.com/document_detail/464080.html)
* * [Increase the size of the temporary storage space](https://help.aliyun.com/document_detail/204066.html)
* **Container configuration**
* * [Configure startup commands and arguments for a container](https://help.aliyun.com/document_detail/94593.html)
* * [Use probes to perform health checks on a container](https://help.aliyun.com/document_detail/99053.html)
* * [Obtain metadata by using environment variables](https://help.aliyun.com/document_detail/141788.html)
* * [Configure a security context for an elastic container instance or a container](https://help.aliyun.com/document_detail/462313.html)
* * [Configure the NTP service](https://help.aliyun.com/document_detail/462768.html)
* **Logging and O\\&M**
* * [Use environment variables to configure log collection](https://help.aliyun.com/document_detail/121973.html)
* * [Save core files to volumes](https://help.aliyun.com/document_detail/167801.html)
*
* @param request CreateContainerGroupRequest
* @return CreateContainerGroupResponse
*/
async function createContainerGroup(request: CreateContainerGroupRequest): CreateContainerGroupResponse {
var runtime = new Util.RuntimeOptions{};
return createContainerGroupWithOptions(request, runtime);
}
model CreateDataCacheRequest {
bucket?: string(name='Bucket', description='The bucket in which the data is stored. By default, the default bucket is used. You can use a custom bucket for business grouping and to prevent path conflicts.
> eci-system is the reserved bucket of the ECI and cannot be used.', example='default'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-****-12d3-****-426655440000'),
dataSource?: {
options?: map[string]string(name='Options', description='The parameters that are configured for the data source.'),
type?: string(name='Type', description='The type of the data source. Valid values:
* URL
* NAS
* OSS
* SNAPSHOT', example='NAS'),
}(name='DataSource', description='The data source.'),
eipCreateParam?: {
bandwidth?: int32(name='Bandwidth', description='The bandwidth of the EIP. Unit: Mbit/s. Default value: 5.', example='10'),
commonBandwidthPackage?: string(name='CommonBandwidthPackage', description='The EIP bandwidth plan to be associated.', example='cbwp-2zeukbj916scmj51m****'),
ISP?: string(name='ISP', description='The line type of the EIP. Valid values:
* BGP: BGP (Multi-ISP) line
* BGP_PRO: BGP (Multi-ISP) Pro line', example='BGP'),
internetChargeType?: string(name='InternetChargeType', description='The metering method of the EIP. Valid values:
* PayByBandwidth: pay-by-bandwidth
* PayByTraffic: pay-by-data-transfer', example='PayByTraffic'),
publicIpAddressPoolId?: string(name='PublicIpAddressPoolId', description='The ID of the IP address pool. The EIP is allocated from the IP address pool. You cannot use the IP address pool feature by default. To use this feature, you must apply for the privilege in the Quota Center console.', example='pippool-2vc4xdtjhwl4t0go5****'),
}(name='EipCreateParam', description='The elastic IP address (EIP) to be created and associated. If no NAT gateway is configured for the virtual private cloud (VPC), you can associate an EIP to pull data from the Internet.'),
eipInstanceId?: string(name='EipInstanceId', description='The existing elastic IP address (EIP) to be associated. If no NAT gateway is configured for the virtual private cloud (VPC), you can associate an EIP to pull data from the Internet.', example='eip-uf66jeqopgqa9hdn****'),
name?: string(name='Name', description='The DataCache name.', example='test'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
path?: string(name='Path', description='The storage path of the data.', example='/model/test'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-2df3isufhi38****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
retentionDays?: int32(name='RetentionDays', description='The number of days for which the DataCache is retained. When the retention days end, the DataCache is deleted. By default, DataCaches do not expire.', example='7'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group to which the generated ECI belongs during the creation of the data cache.', example='sg-2ze81zoc3yl7a3we****'),
size?: int32(name='Size', description='The size of the data cache. Unit: GiB. Default value: 20. Evaluate the required size based on the actual data size.', example='30'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.', example='testkey'),
value?: string(name='Value', description='The value of the tag.', example='testvalue'),
}
](name='Tag', description='The tags to be bound to the data cache.'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the generated ECI belongs during the creation of the data cache.', example='vsw-bp1jrgfqqy54kg5hc****'),
}
model CreateDataCacheResponseBody = {
dataCacheId?: string(name='DataCacheId', description='The DataCache ID.', example='edc-bp15l4vvys94oo******'),
requestId?: string(name='RequestId', description='The request ID.', example='D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC'),
}
model CreateDataCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateDataCacheResponseBody(name='body'),
}
/**
* @summary Creates a DataCache.
*
* @description * You are charged for the creation of image caches. We recommend that you learn the relevant billing information in advance. For more information, see [DataCaches](https://help.aliyun.com/document_detail/2503093.html).
* * Before you create an image cache, you must evaluate the size of the data to be cached. If the size of the data exceeds the specified cache size, the image cache fails to be created.
* * When a data cache is being created, the system automatically creates a temporary elastic container instance (ECI) and an enhanced SSD (ESSD) for the data cache. During the creation, do not delete the ECI and ESSD. Otherwise, the data cache fails to be created.
* * When a data cache is being created, a snapshot is generated for the data cache. Do not delete the snapshot. Otherwise, the data cache becomes invalid.
*
* @param request CreateDataCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateDataCacheResponse
*/
async function createDataCacheWithOptions(request: CreateDataCacheRequest, runtime: Util.RuntimeOptions): CreateDataCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucket)) {
query['Bucket'] = request.bucket;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dataSource)) {
query['DataSource'] = request.dataSource;
}
if (!Util.isUnset(request.eipCreateParam)) {
query['EipCreateParam'] = request.eipCreateParam;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.path)) {
query['Path'] = request.path;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.size)) {
query['Size'] = request.size;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDataCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a DataCache.
*
* @description * You are charged for the creation of image caches. We recommend that you learn the relevant billing information in advance. For more information, see [DataCaches](https://help.aliyun.com/document_detail/2503093.html).
* * Before you create an image cache, you must evaluate the size of the data to be cached. If the size of the data exceeds the specified cache size, the image cache fails to be created.
* * When a data cache is being created, the system automatically creates a temporary elastic container instance (ECI) and an enhanced SSD (ESSD) for the data cache. During the creation, do not delete the ECI and ESSD. Otherwise, the data cache fails to be created.
* * When a data cache is being created, a snapshot is generated for the data cache. Do not delete the snapshot. Otherwise, the data cache becomes invalid.
*
* @param request CreateDataCacheRequest
* @return CreateDataCacheResponse
*/
async function createDataCache(request: CreateDataCacheRequest): CreateDataCacheResponse {
var runtime = new Util.RuntimeOptions{};
return createDataCacheWithOptions(request, runtime);
}
model CreateImageCacheRequest {
acrRegistryInfo?: [
{
arnService?: string(name='ArnService', description='The Alibaba Cloud Resource Name (ARN) of the RAM roles in the Alibaba Cloud account to which the elastic container instance belongs.', example='acs:ram::1609982529******:role/role-assume'),
arnUser?: string(name='ArnUser', description='The ARN of the RAM roles in the Alibaba Cloud account to which the Container Registry Enterprise Edition instance belongs.', example='acs:ram::1298452580******:role/role-acr'),
domain?: [ string ](name='Domain', description='The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify multiple domain names. Separate multiple domain names with commas (,).', example='test****-registry.cn-beijing.cr.aliyuncs.com'),
instanceId?: string(name='InstanceId', description='The ID of Container Registry Enterprise Edition instance N.', example='cri-nwj395hgf6f3****'),
instanceName?: string(name='InstanceName', description='The name of Container Registry Enterprise Edition instance N.', example='test****'),
regionId?: string(name='RegionId', description='The region ID of Container Registry Enterprise Edition instance N.', example='cn-beijing'),
}
](name='AcrRegistryInfo', description='Information about the Container Registry Enterprise Edition instance. For more information, see [Pull images from a Container Registry Enterprise Edition instance without using secrets](https://help.aliyun.com/document_detail/194250.html).'),
annotations?: string(name='Annotations', description='Comments.', example='hide'),
autoMatchImageCache?: boolean(name='AutoMatchImageCache', description='Specifies whether to enable reuse of image cache layers. If you enable this feature, and the image cache that you want to create and an existing image cache contain duplicate image layers, the system reuses the duplicate image layers to create the new image cache. This accelerates the creation of the image cache. Valid values:
* true: enables reuse of image cache layers.
* false: disables reuse of image cache layers.
Default value: false.', example='true'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence of a request](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-xxx-xxx-xxxx-42665544xxxx'),
eipInstanceId?: string(name='EipInstanceId', description='The ID of the elastic IP address (EIP). If you want to pull images over the Internet, make sure that the elastic container instance can access the Internet. You can configure an EIP or a NAT gateway for the elastic container instance to access the Internet.', example='eip-2zedsm5mfl3uhdj2d****'),
eliminationStrategy?: string(name='EliminationStrategy', description='The elimination policy of the image cache. This parameter is empty by default, which indicates that the image cache is always retained.
You can set this parameter to LRU, which indicates that the image cache can be automatically deleted. When the number of image caches reaches the quota, the system automatically deletes the image caches whose EliminationStrategy parameter is set to LRU and that are least commonly used.', example='LRU'),
flash?: boolean(name='Flash', description='Specifies whether to enable the instant image cache feature. The feature can accelerate the creation of image caches. Valid values:
* true
* false
Default value: false.', example='true'),
flashCopyCount?: int32(name='FlashCopyCount', description='The number of temporary local snapshots. By default, the system creates one snapshot for each image cache. If an image cache is used to create multiple elastic container instances at a time, we recommend that you set this parameter to create multiple snapshots for the image cache. We recommend that you create one snapshot for creation of every 1,000 elastic container instances.
> If you set the Flash parameter to true, instant image cache is enabled. During the creation of the image cache, the system first creates a temporary local snapshot for you to instantly use the snapshot. After the temporary local snapshot is created, the system begins to create a regular snapshot. After the regular snapshot is created, the temporary local snapshot is automatically deleted.', example='7'),
image?: [ string ](name='Image', description='Container image N that is used to create the image cache.
This parameter is required.', example='registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl'),
imageCacheName?: string(name='ImageCacheName', description='The name of the image cache.
This parameter is required.', example='testcache'),
imageCacheSize?: int32(name='ImageCacheSize', description='The size of the image cache. Unit: GiB. Default value: 20.', example='20'),
imageRegistryCredential?: [
{
password?: string(name='Password', description='The password that is used to log on to image repository N.', example='password'),
server?: string(name='Server', description='The address of the image repository without the `http://` or `https://` prefix.', example='registry-vpc.cn-hangzhou.aliyuncs.com'),
userName?: string(name='UserName', description='The username that is used to log on to image repository N.', example='username'),
}
](name='ImageRegistryCredential', description='The image repository.'),
insecureRegistry?: string(name='InsecureRegistry', description='The address of the self-managed image repository.
When you create an image cache by using an image in a self-managed image repository that uses a self-signed certificate, you must specify this parameter to skip the certificate authentication. This can prevent the image from failing to pull due to certificate authentication failures.', example='"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"'),
osType?: string(name='OsType'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
plainHttpRegistry?: string(name='PlainHttpRegistry', description='The address of the self-managed image repository. When you create an image cache by using an image in a self-managed image repository that uses the HTTP protocol, you must specify this parameter. This way, Elastic Container Instance uses the HTTP protocol instead of the default HTTPS protocol to pull the image. This can prevent the image from failing to pull due to different protocols.', example='"harbor***.pre.com,192.168.XX.XX:5000,reg***.test.com:80"'),
regionId?: string(name='RegionId', description='The region ID of the image cache.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aekzh43v*****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
retentionDays?: int32(name='RetentionDays', description='The retention period of the image cache. Unit: days. When the retention period ends, the image cache expires and is deleted. By default, image caches never expire.
> The image caches that fail to be created are only retained for one day.', example='7'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group.', example='sg-uf66jeqopgqa9hdn****'),
standardCopyCount?: int32(name='StandardCopyCount', description='The number of regular snapshots. By default, the system creates one snapshot for each image cache. If an image cache is used to create multiple elastic container instances at a time, we recommend that you set this parameter to create multiple snapshots for the image cache. We recommend that you create one snapshot for creation of every 1,000 elastic container instances.
> If you set the Flash parameter to false, instant image cache is disabled. In this case, only regular snapshots are generated during the creation of the image cache.', example='7'),
tag?: [
{
key?: string(name='Key', description='The key of tag N of the image cache. Valid values of N: 1 to 20.', example='imc'),
value?: string(name='Value', description='The value of tag N of the image cache. Valid values of N: 1 to 20.', example='test'),
}
](name='Tag', description='The tag of the image cache.'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch. You can specify up to 10 vSwitch IDs. Separate multiple vSwitch IDs with commas (,). Example: `vsw-***,vsw-***`.', example='vsw-uf6h3rbwbm90urjwa****'),
zoneId?: string(name='ZoneId', description='The zone ID of the image cache.', example='cn-hangzhou-g'),
}
model CreateImageCacheResponseBody = {
containerGroupId?: string(name='ContainerGroupId', description='The ID of the intermediate elastic container instance that is used to create the image cache.', example='eci-2zebxkiifuyzzlhl****'),
imageCacheId?: string(name='ImageCacheId', description='The ID of the image cache.', example='imc-2zebxkiifuyzzlhl****'),
requestId?: string(name='RequestId', description='The ID of the request.', example='0E234675-3465-4CC3-9D0F-9A864BC391DD'),
}
model CreateImageCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateImageCacheResponseBody(name='body'),
}
/**
* @summary Creates an image cache. The image cache can accelerate image pulling and reduce the instance startup time when you create an elastic container instance later.
*
* @description * **Precautions**
* * You are charged for creation of image caches. We recommend that you learn the relevant billing information in advance. For more information about billing of image caches, see [Image caches](https://help.aliyun.com/document_detail/447682.html).
* * Before you create an image cache, you must estimate the total size of the images that you want to cache. If the total size of the images exceeds the specified cache size, the image cache cannot be created.
* * When an image cache is being created, the system creates an intermediate elastic container instance and an intermediate enhanced SSD (ESSD) at performance level 1 (PL1). Do not delete the intermediate instance and the ESSD while the image cache is being created. If you delete the intermediate instance or the ESSD, the image cache cannot be created.
* * A temporary local snapshot and a specific number of regular snapshots are generated during the creation of the image cache. Do not delete these snapshots. If you delete these snapshots, the image cache becomes invalid.
* * If you use SDKs, SDK for Java 1.0.10 or later and SDK for Python 1.0.7 or later are supported.
* * **Usage notes**
* * For images that are created based on Container Registry Enterprise Edition instances and use custom domain names, if you want to configure password-free access to the image caches, you must use AcrRegistryInfo-related parameters to specify Container Registry instances. When you configure AcrRegistryInfo-related parameters, you must set the AcrRegistryInfo.N.InstanceId parameter.
* * If the image cache that you created will be used to create more than 1,000 elastic container instances at a time, we recommend that you use the StandardCopyCount and FlashCopyCount parameters to create multiple temporary local snapshots and regular snapshots of the image. The multiple snapshots are billed based on incremental data. If no incremental data exists on the multiple snapshots, you are not charged for the multiple snapshots.
* > When you call the CreateImageCache operation to create an image cache, the system automatically creates a service-linked role named AliyunServiceRoleForECI. The role is used to access other Alibaba Cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud (VPC). For more information, see [Elastic Container Instance service-linked role](https://help.aliyun.com/document_detail/212914.html).
*
* @param request CreateImageCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateImageCacheResponse
*/
async function createImageCacheWithOptions(request: CreateImageCacheRequest, runtime: Util.RuntimeOptions): CreateImageCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acrRegistryInfo)) {
query['AcrRegistryInfo'] = request.acrRegistryInfo;
}
if (!Util.isUnset(request.annotations)) {
query['Annotations'] = request.annotations;
}
if (!Util.isUnset(request.autoMatchImageCache)) {
query['AutoMatchImageCache'] = request.autoMatchImageCache;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.eliminationStrategy)) {
query['EliminationStrategy'] = request.eliminationStrategy;
}
if (!Util.isUnset(request.flash)) {
query['Flash'] = request.flash;
}
if (!Util.isUnset(request.flashCopyCount)) {
query['FlashCopyCount'] = request.flashCopyCount;
}
if (!Util.isUnset(request.image)) {
query['Image'] = request.image;
}
if (!Util.isUnset(request.imageCacheName)) {
query['ImageCacheName'] = request.imageCacheName;
}
if (!Util.isUnset(request.imageCacheSize)) {
query['ImageCacheSize'] = request.imageCacheSize;
}
if (!Util.isUnset(request.imageRegistryCredential)) {
query['ImageRegistryCredential'] = request.imageRegistryCredential;
}
if (!Util.isUnset(request.insecureRegistry)) {
query['InsecureRegistry'] = request.insecureRegistry;
}
if (!Util.isUnset(request.osType)) {
query['OsType'] = request.osType;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.plainHttpRegistry)) {
query['PlainHttpRegistry'] = request.plainHttpRegistry;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.standardCopyCount)) {
query['StandardCopyCount'] = request.standardCopyCount;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateImageCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates an image cache. The image cache can accelerate image pulling and reduce the instance startup time when you create an elastic container instance later.
*
* @description * **Precautions**
* * You are charged for creation of image caches. We recommend that you learn the relevant billing information in advance. For more information about billing of image caches, see [Image caches](https://help.aliyun.com/document_detail/447682.html).
* * Before you create an image cache, you must estimate the total size of the images that you want to cache. If the total size of the images exceeds the specified cache size, the image cache cannot be created.
* * When an image cache is being created, the system creates an intermediate elastic container instance and an intermediate enhanced SSD (ESSD) at performance level 1 (PL1). Do not delete the intermediate instance and the ESSD while the image cache is being created. If you delete the intermediate instance or the ESSD, the image cache cannot be created.
* * A temporary local snapshot and a specific number of regular snapshots are generated during the creation of the image cache. Do not delete these snapshots. If you delete these snapshots, the image cache becomes invalid.
* * If you use SDKs, SDK for Java 1.0.10 or later and SDK for Python 1.0.7 or later are supported.
* * **Usage notes**
* * For images that are created based on Container Registry Enterprise Edition instances and use custom domain names, if you want to configure password-free access to the image caches, you must use AcrRegistryInfo-related parameters to specify Container Registry instances. When you configure AcrRegistryInfo-related parameters, you must set the AcrRegistryInfo.N.InstanceId parameter.
* * If the image cache that you created will be used to create more than 1,000 elastic container instances at a time, we recommend that you use the StandardCopyCount and FlashCopyCount parameters to create multiple temporary local snapshots and regular snapshots of the image. The multiple snapshots are billed based on incremental data. If no incremental data exists on the multiple snapshots, you are not charged for the multiple snapshots.
* > When you call the CreateImageCache operation to create an image cache, the system automatically creates a service-linked role named AliyunServiceRoleForECI. The role is used to access other Alibaba Cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud (VPC). For more information, see [Elastic Container Instance service-linked role](https://help.aliyun.com/document_detail/212914.html).
*
* @param request CreateImageCacheRequest
* @return CreateImageCacheResponse
*/
async function createImageCache(request: CreateImageCacheRequest): CreateImageCacheResponse {
var runtime = new Util.RuntimeOptions{};
return createImageCacheWithOptions(request, runtime);
}
model CreateInstanceOpsTaskRequest {
containerGroupId?: string(name='ContainerGroupId', description='The ID of the container group.
This parameter is required.', example='eci-bp1dvysdafbh00t7****'),
opsType?: string(name='OpsType', description='The type of the O&M task. Valid values:
* coredump
* tcpdump
This parameter is required.', example='coredump'),
opsValue?: string(name='OpsValue', description='The value of the O\\\\&M task. You can set this parameter based on the value of OpsType.
* If OpsType is set to coredump, the valid values of OpsValue are:
* enable: enables coredump.
* disable: disables coredump.
* If OpsType is set to tcpdump, the value of OpsValue is a JSON-formatted parameter string. Example: `{"Enable":true, "IfDeviceName":"eth0"}`. The value may contain the following parameters:
* Enable: specifies whether to enable tcpdump. You must specify this parameter. Valid values: true and false.
* Protocol: the network protocol. Valid values: tcp, udp, and icmpv4.
* SourceIp: the source IP address.
* SourceCidr: the source CIDR block. If you specify both an IP address and a CIDR block, the IP address is ignored if the CIDR block is valid.
* SourcePort: the source port. Valid values: 1 to 65535.
* DestIp: the destination IP address.
* DestCidr: the destination CIDR block. If you specify both an IP address and a CIDR block, the IP address is ignored if the CIDR block is valid.
* DestPort: the destination port. Valid values: 1 to 65535.
* IfDeviceName: the destination network interface controller. Default value: eth0.
* Snaplen: the length to be captured. Default value: 65535. Unit: bytes.
* Duration: the captured period. Unit: seconds.
* PacketNum: the number of packets to be captured.
* FileSize: the size of the destination files on packets. Unit: bytes. Maximum value: 1073741824. 1073741824 bytes is equal to 1 GB.
This parameter is required.', example='enable'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the O&M task.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model CreateInstanceOpsTaskResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='89945DD3-9072-47D0-A318-353284CFC7B'),
result?: string(name='Result', description='The creation result of the O&M task.', example='Coredump settings has been configured successfully.'),
}
model CreateInstanceOpsTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateInstanceOpsTaskResponseBody(name='body'),
}
/**
* @summary Creates an O&M task.
*
* @description O&M tasks are classified into:
* * coredump: After you enable coredump, the system generates a core dump file when a container unexpectedly stops. You can use the core dump file to analyze the exception and find out the cause of the problem. For more information, see [Enable coredump](https://help.aliyun.com/document_detail/167801.html).
* * tcpdump: After you enable tcpdump, the system captures network packets when a container unexpectedly stops. You can analyze the packets and locate network problems. For more information, see Enable [tcpdump](https://help.aliyun.com/document_detail/429749.html).
*
* @param request CreateInstanceOpsTaskRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateInstanceOpsTaskResponse
*/
async function createInstanceOpsTaskWithOptions(request: CreateInstanceOpsTaskRequest, runtime: Util.RuntimeOptions): CreateInstanceOpsTaskResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.opsType)) {
query['OpsType'] = request.opsType;
}
if (!Util.isUnset(request.opsValue)) {
query['OpsValue'] = request.opsValue;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateInstanceOpsTask',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates an O&M task.
*
* @description O&M tasks are classified into:
* * coredump: After you enable coredump, the system generates a core dump file when a container unexpectedly stops. You can use the core dump file to analyze the exception and find out the cause of the problem. For more information, see [Enable coredump](https://help.aliyun.com/document_detail/167801.html).
* * tcpdump: After you enable tcpdump, the system captures network packets when a container unexpectedly stops. You can analyze the packets and locate network problems. For more information, see Enable [tcpdump](https://help.aliyun.com/document_detail/429749.html).
*
* @param request CreateInstanceOpsTaskRequest
* @return CreateInstanceOpsTaskResponse
*/
async function createInstanceOpsTask(request: CreateInstanceOpsTaskRequest): CreateInstanceOpsTaskResponse {
var runtime = new Util.RuntimeOptions{};
return createInstanceOpsTaskWithOptions(request, runtime);
}
model CreateVirtualNodeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
clusterDNS?: string(name='ClusterDNS', description='The IP address of the DNS server. If dnsPolicy=ClusterFirst is configured for the Elastic Container Instance pod, Elastic Container Instance uses the configuration to provide DNS services to containers. You can configure multiple IP addresses. Separate multiple IP addresses with commas (,).', example='100.1.XX.XX'),
clusterDomain?: string(name='ClusterDomain', description='The domain name of the cluster. If this parameter is specified, in addition to the search domain of the host, Kubelet configures all containers to search for the specified domain name.', example='example.com'),
customResources?: string(name='CustomResources', description='The custom resources that are supported by the virtual node. If a custom resource is specified in the request of an Elastic Container Instance pod, the pod is scheduled to run on the virtual node that supports the custom resource. You can use the Resource name = Number of resources format to specify custom resources. Separate multiple resources with commas (,).', example='example1.com=100,example2.com=200'),
eipInstanceId?: string(name='EipInstanceId', description='The ID of the elastic IP address (EIP).', example='eip-uf66jeqopgqa9hdn****'),
enablePublicNetwork?: boolean(name='EnablePublicNetwork', description='Specifies whether to enable Internet access for the VNode. Default value: false.
If the value of this parameter is true, the VNode exposes a public IP address to external services.', example='false'),
kubeConfig?: string(name='KubeConfig', description='The KubeConfig of the Kubernetes cluster with which the VNode is connected. The value must be Base64-encoded.', example='JTVDbmFwaVZlcnNpb24lM0ElMjB2MSU1Q25jbHVzdGVycyUzQSU1Q24tJTIwY2x1c3RlciUzQSU1Q24uLi******'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the virtual node.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-uf66jeqopgqa9hdn****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group. The VNode and the elastic container instances in the VNode are added to the security group.
This parameter is required.', example='sg-2ze81zoc3yl7a3we****'),
tag?: [
{
key?: string(name='Key', description='The tag key.', example='name'),
value?: string(name='Value', description='The tag value.', example='test'),
}
](name='Tag', description='The tags to add to the VNode. You can add up to 20 tags.'),
taint?: [
{
effect?: string(name='Effect', description='The effect of the taint. Valid values:
* NoSchedule: does not schedule pods to run on the VNodes that have the taint.
* NoExecute: evicts existing pods on the VNodes that have the taint while not scheduling pods to run on the VNodes.
* PreferNoSchedule: avoids scheduling pods to run on the VNodes that have the taint.', example='NoSchedule'),
key?: string(name='Key', description='The key of the taint.', example='testKey'),
value?: string(name='Value', description='The value of the taint.', example='testValue'),
}
](name='Taint', description='The taints of the VNode. You can configure up to 20 taints.'),
tlsBootstrapEnabled?: boolean(name='TlsBootstrapEnabled', description='Specifies whether to enable TLS bootstrapping. If you set this parameter to true, use the KubeConfig certificate for TLS bootstrapping. Valid values:
- true
- false
Default value: false.', example='false'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch. The vSwitch is connected to the VNode and the elastic container instances in the VNode.
You can specify 1 to 10 vSwitches for a VPC.
This parameter is required.', example='vsw-2ze23nqzig8inprou****'),
virtualNodeName?: string(name='VirtualNodeName', description='The name of the VNode. The name must be 2 to 128 characters in length, and can contain lowercase letters, digits, periods (.), and hyphens (-).', example='testNode'),
zoneId?: string(name='ZoneId', description='The zone ID of the VNode.', example='cn-hangzhou-b'),
}
model CreateVirtualNodeResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='89164E78-FC82-4684-BE97-DCDD85D26546'),
virtualNodeId?: string(name='VirtualNodeId', description='The ID of the VNode.', example='vnd-2ze960zkdqrldeaw****'),
}
model CreateVirtualNodeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateVirtualNodeResponseBody(name='body'),
}
/**
* @summary Creates a VNode to connect self-managed Kubernetes clusters to elastic container instances.
*
* @description * When you call this operation to create a virtual node, the system automatically creates a service-linked role AliyunServiceRoleForECIVnode. This way, you can use the service-linked role to access relevant cloud services such as Elastic Container Instance, Elastic Compute Service (ECS), and Virtual Private Cloud (VPC). For more information, see [Service-linked role for virtual nodes](https://help.aliyun.com/document_detail/311014.html).
* * You are charged for virtual nodes based on number of virtual nodes that you use. Each virtual node has a resident node, which is equivalent to an ECI instance with 2 vCPU cores and 8 GiB memory. You are charged for virtual nodes based on elastic container instances.
*
* @param request CreateVirtualNodeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateVirtualNodeResponse
*/
async function createVirtualNodeWithOptions(request: CreateVirtualNodeRequest, runtime: Util.RuntimeOptions): CreateVirtualNodeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.clusterDNS)) {
query['ClusterDNS'] = request.clusterDNS;
}
if (!Util.isUnset(request.clusterDomain)) {
query['ClusterDomain'] = request.clusterDomain;
}
if (!Util.isUnset(request.customResources)) {
query['CustomResources'] = request.customResources;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.enablePublicNetwork)) {
query['EnablePublicNetwork'] = request.enablePublicNetwork;
}
if (!Util.isUnset(request.kubeConfig)) {
query['KubeConfig'] = request.kubeConfig;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.taint)) {
query['Taint'] = request.taint;
}
if (!Util.isUnset(request.tlsBootstrapEnabled)) {
query['TlsBootstrapEnabled'] = request.tlsBootstrapEnabled;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.virtualNodeName)) {
query['VirtualNodeName'] = request.virtualNodeName;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateVirtualNode',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a VNode to connect self-managed Kubernetes clusters to elastic container instances.
*
* @description * When you call this operation to create a virtual node, the system automatically creates a service-linked role AliyunServiceRoleForECIVnode. This way, you can use the service-linked role to access relevant cloud services such as Elastic Container Instance, Elastic Compute Service (ECS), and Virtual Private Cloud (VPC). For more information, see [Service-linked role for virtual nodes](https://help.aliyun.com/document_detail/311014.html).
* * You are charged for virtual nodes based on number of virtual nodes that you use. Each virtual node has a resident node, which is equivalent to an ECI instance with 2 vCPU cores and 8 GiB memory. You are charged for virtual nodes based on elastic container instances.
*
* @param request CreateVirtualNodeRequest
* @return CreateVirtualNodeResponse
*/
async function createVirtualNode(request: CreateVirtualNodeRequest): CreateVirtualNodeResponse {
var runtime = new Util.RuntimeOptions{};
return createVirtualNodeWithOptions(request, runtime);
}
model DeleteContainerGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence of a request?](https://help.aliyun.com/document_detail/25693.html)', example='123e4567-e89b-12d3-a456-426655440000'),
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.
This parameter is required.', example='eci-2zelg8vwnlzdhf8hv****'),
force?: boolean(name='Force', description='Specifies whether to forcibly delete resources. Default value: false. Valid values:
* true: forcibly deletes resources without waiting for the timeout period for graceful terminations.
* false: waits for the timeout period for graceful terminations to delete resources.', example='true'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DeleteContainerGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='45D5B0AD-3B00-4A9B-9911-6D5303B06712'),
}
model DeleteContainerGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteContainerGroupResponseBody(name='body'),
}
/**
* @summary Deletes a container group.
*
* @description You can delete a container group that you no longer need. Before you delete a container group, make sure that you understand the lifecycle of container groups. For more information, see [Lifecycle of an elastic container instance](https://help.aliyun.com/document_detail/122385.html).
*
* @param request DeleteContainerGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteContainerGroupResponse
*/
async function deleteContainerGroupWithOptions(request: DeleteContainerGroupRequest, runtime: Util.RuntimeOptions): DeleteContainerGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.force)) {
query['Force'] = request.force;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteContainerGroup',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a container group.
*
* @description You can delete a container group that you no longer need. Before you delete a container group, make sure that you understand the lifecycle of container groups. For more information, see [Lifecycle of an elastic container instance](https://help.aliyun.com/document_detail/122385.html).
*
* @param request DeleteContainerGroupRequest
* @return DeleteContainerGroupResponse
*/
async function deleteContainerGroup(request: DeleteContainerGroupRequest): DeleteContainerGroupResponse {
var runtime = new Util.RuntimeOptions{};
return deleteContainerGroupWithOptions(request, runtime);
}
model DeleteDataCacheRequest {
bucket?: string(name='Bucket', description='The bucket that stores the DataCache. By default, the bucket is named default.', example='default'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence](https://help.aliyun.com/document_detail/25693.html).', example='5e74729e-ce21-4c3e-9163-cbaf0f02768e'),
dataCacheId?: string(name='DataCacheId', description='The ID of the DataCache.', example='edc-bp1a7n7uawwwol******'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
path?: string(name='Path', description='The directory in which the virtual host of the DataCache is located.', example='/data/models/'),
regionId?: string(name='RegionId', description='The region ID of the DataCache.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DeleteDataCacheResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C0F8A012-1426-5EB2-96F5-B4416DEB5B78'),
}
model DeleteDataCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteDataCacheResponseBody(name='body'),
}
/**
* @summary Deletes a DataCache.
*
* @param request DeleteDataCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteDataCacheResponse
*/
async function deleteDataCacheWithOptions(request: DeleteDataCacheRequest, runtime: Util.RuntimeOptions): DeleteDataCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucket)) {
query['Bucket'] = request.bucket;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dataCacheId)) {
query['DataCacheId'] = request.dataCacheId;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.path)) {
query['Path'] = request.path;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteDataCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a DataCache.
*
* @param request DeleteDataCacheRequest
* @return DeleteDataCacheResponse
*/
async function deleteDataCache(request: DeleteDataCacheRequest): DeleteDataCacheResponse {
var runtime = new Util.RuntimeOptions{};
return deleteDataCacheWithOptions(request, runtime);
}
model DeleteImageCacheRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
imageCacheId?: string(name='ImageCacheId', description='The ID of the image cache.
This parameter is required.', example='imc-2zebxkiifuyzzlhl****'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the image cache.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DeleteImageCacheResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A218-354284CFC7A2'),
}
model DeleteImageCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteImageCacheResponseBody(name='body'),
}
/**
* @summary Deletes an image cache.
*
* @param request DeleteImageCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteImageCacheResponse
*/
async function deleteImageCacheWithOptions(request: DeleteImageCacheRequest, runtime: Util.RuntimeOptions): DeleteImageCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.imageCacheId)) {
query['ImageCacheId'] = request.imageCacheId;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteImageCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes an image cache.
*
* @param request DeleteImageCacheRequest
* @return DeleteImageCacheResponse
*/
async function deleteImageCache(request: DeleteImageCacheRequest): DeleteImageCacheResponse {
var runtime = new Util.RuntimeOptions{};
return deleteImageCacheWithOptions(request, runtime);
}
model DeleteVirtualNodeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotency of requests](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the virtual node.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
virtualNodeId?: string(name='VirtualNodeId', description='The ID of the virtual node.
This parameter is required.', example='vnd-2ze960zkdqrldeaw****'),
}
model DeleteVirtualNodeResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model DeleteVirtualNodeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteVirtualNodeResponseBody(name='body'),
}
/**
* @summary Deletes a virtual node.
*
* @param request DeleteVirtualNodeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteVirtualNodeResponse
*/
async function deleteVirtualNodeWithOptions(request: DeleteVirtualNodeRequest, runtime: Util.RuntimeOptions): DeleteVirtualNodeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.virtualNodeId)) {
query['VirtualNodeId'] = request.virtualNodeId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteVirtualNode',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a virtual node.
*
* @param request DeleteVirtualNodeRequest
* @return DeleteVirtualNodeResponse
*/
async function deleteVirtualNode(request: DeleteVirtualNodeRequest): DeleteVirtualNodeResponse {
var runtime = new Util.RuntimeOptions{};
return deleteVirtualNodeWithOptions(request, runtime);
}
model DescribeAvailableResourceRequest {
destinationResource?: {
category?: string(name='Category', description='The type of the resource. Valid values:
* InstanceTypeFamily: queries instance families. If you use this parameter value, you must also specify the Value parameter.
* InstanceType: queries instance types. If you use this parameter value, you must also specify the Value, Cores, and Memory parameters.
This parameter is required.', example='InstanceTypeFamily'),
cores?: float(name='Cores', description='The number of vCPUs. This parameter is available only when the Category parameter is set to InstanceType.', example='2'),
memory?: float(name='Memory', description='The size of the memory. Unit: GiB. This parameter is available only when the Category parameter is set to InstanceType.', example='4'),
value?: string(name='Value', description='Instance families or instance types.
* If you set Category to InstanceTypeFamily, you must set this parameter to instance families such as ecs.c5.
* If you set Category to InstanceType, you must set this parameter to instance types such as ecs.c5.large.', example='ecs.c6'),
}(name='DestinationResource', description='The information about the resource that you want to query.
This parameter is required.'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the ECS instance families.
You can call the [DescribeRegions](https://help.aliyun.com/document_detail/146965.html) operation to query the most recent list of regions.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
spotResource?: {
spotDuration?: int32(name='SpotDuration', description='The protection period of the preemptible instance. Unit: hours. Default value: 1. The value of 0 indicates no protection period.', example='1'),
spotPriceLimit?: double(name='SpotPriceLimit', description='The maximum hourly price of the preemptible elastic container instance. The value can be accurate to three decimal places. If you set SpotStrategy to SpotWithPriceLimit, you must specify the SpotPriceLimit parameter.', example='0.2'),
spotStrategy?: string(name='SpotStrategy', description='The bidding policy for the elastic container instance. Valid values:
* NoSpot: The instance is created as a regular pay-as-you-go instance.
* SpotWithPriceLimit: The instance is created as a preemptible instance with a user-defined maximum hourly price.
* SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.
Default value: NoSpot.
> If you set this parameter to SpotWithPriceLimit or SpotAsPriceGo to query preemptible instances, you must set Category to InstanceType. You must also use the Value parameter to specify instance types, or use the Cores and Memory parameters to specify the number of vCPUs and memory size.', example='SpotAsPriceGo'),
}(name='SpotResource', description='The information about the preemptible instances that you want to query.'),
zoneId?: string(name='ZoneId', description='The zone ID of the ECS instance families.
This parameter is empty by default, which indicates that ECS instance families available in all zones in the specified region are queried.', example='cn-hangzhou-e'),
}
model DescribeAvailableResourceResponseBody = {
availableZones?: {
availableZone?: [
{
availableResources?: {
availableResource?: [
{
supportedResources?: {
supportedResource?: [
{
statusCategory?: string(name='StatusCategory', description='The category of resources based on stock status. Valid values:
* WithStock: Resources are in sufficient stock.
* ClosedWithStock: Resources are insufficient. We recommend that you use instance types that are in sufficient stock.
* WithoutStock: Resources are sold out and will be replenished. We recommend that you use instance types that are in sufficient stock.
* ClosedWithoutStock: Resources are sold out and will not be replenished. We recommend that you use instance types that are in sufficient stock.', example='WithStock'),
value?: string(name='Value', description='The ECS instance types or instance families that are available in the zones.
* If the return value of the Type parameter is InstanceTypeFamily, this parameter indicates instance families that are returned.
* If the return value of the Type parameter is InstanceType, this parameter indicates instance types that are returned.', example='ecs.c6'),
}
](name='SupportedResource')
}(name='SupportedResources', description='The information about the resources that are available in the zones.'),
type?: string(name='Type', description='The type of the resource. Valid values:
* InstanceTypeFamily: instance families.
* InstanceType: instance types.', example='InstanceTypeFamily'),
}
](name='AvailableResource')
}(name='AvailableResources', description='The resources that are available in the specified zone.'),
regionId?: string(name='RegionId', description='The region ID of the resources.', example='cn-hangzhou'),
zoneId?: string(name='ZoneId', description='The zone ID of the resources.', example='cn-hangzhou-e'),
}
](name='AvailableZone')
}(name='AvailableZones', description='The zones in which the specified resources are available.'),
requestId?: string(name='RequestId', description='The request ID.', example='6829735A-FF76-58C6-AECB-27CBF135A7AA'),
}
model DescribeAvailableResourceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeAvailableResourceResponseBody(name='body'),
}
/**
* @summary Queries the Elastic Compute Service (ECS) instance families that are available in a specified region and zone.
*
* @description When you call the CreateContainerGroup operation to create an elastic container instance, you can use the InstanceType parameter to specify ECS instance types that fit your specific needs. To ensure that the elastic container instance can be created, you can call the DescribeAvailableResource operation to query which ECS instance types and instance families are available in the specified region and zone before you create the elastic container instance.
*
* @param request DescribeAvailableResourceRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeAvailableResourceResponse
*/
async function describeAvailableResourceWithOptions(request: DescribeAvailableResourceRequest, runtime: Util.RuntimeOptions): DescribeAvailableResourceResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.destinationResource)) {
query['DestinationResource'] = request.destinationResource;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.spotResource)) {
query['SpotResource'] = request.spotResource;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeAvailableResource',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the Elastic Compute Service (ECS) instance families that are available in a specified region and zone.
*
* @description When you call the CreateContainerGroup operation to create an elastic container instance, you can use the InstanceType parameter to specify ECS instance types that fit your specific needs. To ensure that the elastic container instance can be created, you can call the DescribeAvailableResource operation to query which ECS instance types and instance families are available in the specified region and zone before you create the elastic container instance.
*
* @param request DescribeAvailableResourceRequest
* @return DescribeAvailableResourceResponse
*/
async function describeAvailableResource(request: DescribeAvailableResourceRequest): DescribeAvailableResourceResponse {
var runtime = new Util.RuntimeOptions{};
return describeAvailableResourceWithOptions(request, runtime);
}
model DescribeCommitContainerTaskRequest {
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance on which the CommitContainer task is executed.\\\\
You must enter the instance ID, the task ID, or both for the request.', example='eci-2zelg8vwnlzdhf8hv****'),
maxResults?: int32(name='MaxResults', description='The number of entries to return on each page.\\\\
Maximum value: 50.\\\\
Default value: 10.', example='20'),
nextToken?: string(name='NextToken', description='The token that determines the start point of the query. Set the value to the value of NextToken that is returned from the last request.', example='AAAAAdDWBF2****'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The ID of the region.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
taskId?: [ string ](name='TaskId', description='The ID of the task.'),
taskStatus?: string(name='TaskStatus', description='The status of the task. Valid values:
* Running
* Succeeded
* Failed', example='Running'),
}
model DescribeCommitContainerTaskResponseBody = {
commitTasks?: [
{
commitPhaseInfos?: [
{
message?: string(name='Message', description='The message about the phase.', example='Pull base image for container container-1 successfully'),
phase?: string(name='Phase', description='The phase name. Valid values:
* PullBaseImage: Pull the original container image.
* CommitContainer: Commit the container to generate an image.
* PushCommittedImage: Push the image to Container Registry.', example='PullBaseImage'),
recordTime?: string(name='RecordTime', description='The record time of the phase.', example='2023-01-05T14:06:40.920005316+08:00'),
status?: string(name='Status', description='The state of the phase.', example='Success'),
}
](name='CommitPhaseInfos', description='The information about the phase that the task arrives.'),
containerName?: string(name='ContainerName', description='The container name.', example='worker0'),
statusMessage?: string(name='StatusMessage', description='The message about the state.', example='Commit container -xxxxxx'),
taskCreationTime?: string(name='TaskCreationTime', description='The time when the task was started.', example='2023-03-06T08:22:40Z'),
taskFinishedTime?: string(name='TaskFinishedTime', description='The time when the task was complete.', example='2023-03-06T08:23:40Z'),
taskId?: string(name='TaskId', description='The task ID.', example='t-2zej6nstkg744qc3****'),
taskProgress?: string(name='TaskProgress', description='The progress of the task in percentage.', example='50%'),
taskStatus?: string(name='TaskStatus', description='The state of the task. Valid values:
* Running
* Succeeded
* Failed', example='Running'),
}
](name='CommitTasks', description='Details of the task.'),
maxResults?: string(name='MaxResults', description='The number of entries returned per page.', example='20'),
nextToken?: string(name='NextToken', description='The query token that is returned in this request.', example='AAAAAdDWBF2****'),
requestId?: string(name='RequestId', description='The ID of the request.', example='45D5B0AD-3B00-4A9B-9911-6D5303B06712'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='5'),
}
model DescribeCommitContainerTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeCommitContainerTaskResponseBody(name='body'),
}
/**
* @summary Queries the details of a CommitContainer task.
*
* @param request DescribeCommitContainerTaskRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeCommitContainerTaskResponse
*/
async function describeCommitContainerTaskWithOptions(request: DescribeCommitContainerTaskRequest, runtime: Util.RuntimeOptions): DescribeCommitContainerTaskResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.taskId)) {
query['TaskId'] = request.taskId;
}
if (!Util.isUnset(request.taskStatus)) {
query['TaskStatus'] = request.taskStatus;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeCommitContainerTask',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of a CommitContainer task.
*
* @param request DescribeCommitContainerTaskRequest
* @return DescribeCommitContainerTaskResponse
*/
async function describeCommitContainerTask(request: DescribeCommitContainerTaskRequest): DescribeCommitContainerTaskResponse {
var runtime = new Util.RuntimeOptions{};
return describeCommitContainerTaskWithOptions(request, runtime);
}
model DescribeContainerGroupEventsRequest {
containerGroupIds?: string(name='ContainerGroupIds', description='The IDs of the elastic container instances. You can specify up to 20 IDs. Each ID must be a JSON string.', example='["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]'),
eventSource?: string(name='EventSource', description='The event source. Valid values:
* EciService
* K8sAgent
This parameter is empty by default. This indicates that all events are queried.', example='K8sAgent'),
limit?: int32(name='Limit', description='The maximum number of elastic container instances to be returned for this request. Default value: 200.
> The number of elastic container instances to be returned is no greater than this parameter value.', example='200'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.
You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='d78f2dd8-5979-42fe-xaee-b16db43be5bc'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-uf66jeqopgqa9hdn****'),
sinceSecond?: int32(name='SinceSecond', description='A relative time in seconds before the current time from which to show event information. This parameter is used to poll incremental events.', example='60'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.', example='test'),
value?: string(name='Value', description='The value of the tag.', example='name'),
}
](name='Tag', description='The tag that is added to the elastic container instances.'),
vSwitchId?: string(name='VSwitchId', description='The vSwitch ID.', example='vsw-uf6h3rbwbm90urjwa****'),
zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-hangzhou-k'),
}
model DescribeContainerGroupEventsResponseBody = {
data?: [
{
annotations?: string(name='Annotations', description='The annotations of the elastic container instance.', example='"{\\\\"tenancy.x-k8s.io/namespace\\\\":\\\\"redis\\\\"}"'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.', example='eci-uf6fonnghi50v6nq****'),
events?: [
{
count?: int32(name='Count', description='The number of events.', example='10'),
firstTimestamp?: string(name='FirstTimestamp', description='The first occurrence time of the event.', example='2021-10-04T09:08:04Z'),
lastTimestamp?: string(name='LastTimestamp', description='The most recent occurrence time of the event.', example='2021-10-04T09:08:04Z'),
message?: string(name='Message', description='The message about the event.', example='Started container'),
metadata?: {
name?: string(name='Name', description='The event name.', example='eci-uto-created-eci-for-ubuntu.167e3fb73cc7f9cb'),
namespace?: string(name='Namespace', description='The namespace.', example='default'),
}(name='Metadata', description='The metadata of the event.'),
reason?: string(name='Reason', description='The cause of the event.', example='Started'),
reportingComponent?: string(name='ReportingComponent', description='The component from which the event is reported.', example='test'),
reportingInstance?: string(name='ReportingInstance', description='The instance from which the event is reported.', example='test'),
source?: {
component?: string(name='Component', description='The component.', example='kubelet'),
host?: string(name='Host', description='The host.', example='eci'),
}(name='Source', description='The source.'),
type?: string(name='Type', description='The event type. Valid values:
* Normal
* Warning', example='Normal'),
involvedObject?: {
apiVersion?: string(name='ApiVersion', description='The version of Kubernetes.', example='v1'),
kind?: string(name='Kind', description='The resource type.', example='Pod'),
name?: string(name='Name', description='The resource name.', example='test'),
namespace?: string(name='Namespace', description='The namespace where the resource resides.', example='default'),
uid?: string(name='Uid', description='The resource ID.', example='eci-8vb5nkcq3a5cu0p3****'),
}(name='involvedObject', description='The resource object that the event is about.'),
}
](name='Events', description='The events.'),
name?: string(name='Name', description='The name of the elastic container instance.', example='test'),
namespace?: string(name='Namespace', description='The namespace where the elastic container instance resides.', example='redis'),
uuid?: string(name='uuid', description='The UUID of the elastic container instance.', example='3fc6b309-****-****'),
}
](name='Data', description='Details of the events.'),
requestId?: string(name='RequestId', description='The request ID.', example='1340C38D-6189-54D1-86F6-7D5ECF3E0088'),
totalCount?: int32(name='TotalCount', description='The total number of entries of returned events.', example='10'),
}
model DescribeContainerGroupEventsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerGroupEventsResponseBody(name='body'),
}
/**
* @summary Queries event information about multiple container groups at a time.
*
* @description You can call this operation to query the event information about multiple elastic container instances at a time. By default, the most recent 50 entries of events of each elastic container instance are returned.
*
* @param request DescribeContainerGroupEventsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerGroupEventsResponse
*/
async function describeContainerGroupEventsWithOptions(request: DescribeContainerGroupEventsRequest, runtime: Util.RuntimeOptions): DescribeContainerGroupEventsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupIds)) {
query['ContainerGroupIds'] = request.containerGroupIds;
}
if (!Util.isUnset(request.eventSource)) {
query['EventSource'] = request.eventSource;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.sinceSecond)) {
query['SinceSecond'] = request.sinceSecond;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerGroupEvents',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries event information about multiple container groups at a time.
*
* @description You can call this operation to query the event information about multiple elastic container instances at a time. By default, the most recent 50 entries of events of each elastic container instance are returned.
*
* @param request DescribeContainerGroupEventsRequest
* @return DescribeContainerGroupEventsResponse
*/
async function describeContainerGroupEvents(request: DescribeContainerGroupEventsRequest): DescribeContainerGroupEventsResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerGroupEventsWithOptions(request, runtime);
}
model DescribeContainerGroupMetricRequest {
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.
This parameter is required.', example='eci-bp17da5olmkuagfr****'),
endTime?: string(name='EndTime', description='The end of the time range to query. The default value is the current time.
Specify the time in RFC 3339 format.', example='2019-09-12T01:05:00.000Z'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
period?: string(name='Period', description='The data aggregation period. Unit: seconds. Valid values: 15, 30, 60, and 600. Default value: 60.
> If the StartTime and EndTime parameters are not specified, the system returns the monitoring data generated in the last 5 minutes with a data aggregation period of 15s. The Period parameter is ignored.', example='15'),
regionId?: string(name='RegionId', description='The region ID of the instance.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
startTime?: string(name='StartTime', description='The beginning of the time range to query. The beginning of the time range must be a time point in the last 30 days. The default value is 5 minutes before the value of EndTime.
Specify the time in RFC 3339 format. For example, to query the data starting from March 12, 2019, 09:00 UTC+8, you can set the parameter to 2019-03-12T09:00:00.000+08:00 or 2019-03-12T01:00:00.000Z.', example='2019-03-12T01:00:00.000Z'),
}
model DescribeContainerGroupMetricResponseBody = {
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.', example='eci-bp1dqpye03ke5s6p****'),
records?: [
{
CPU?: {
limit?: long(name='Limit', description='The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.', example='2000'),
load?: long(name='Load', description='The average load in the last 10 seconds.', example='0'),
usageCoreNanoSeconds?: long(name='UsageCoreNanoSeconds', description='The cumulative usage of vCPUs.', example='70769883'),
usageNanoCores?: long(name='UsageNanoCores', description='The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.', example='0'),
}(name='CPU', description='The monitoring data of vCPUs.'),
containers?: [
{
CPU?: {
limit?: long(name='Limit', description='The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.', example='1024'),
load?: long(name='Load', description='The average load in the last 10 seconds.', example='0'),
usageCoreNanoSeconds?: long(name='UsageCoreNanoSeconds', description='The cumulative usage of vCPUs.', example='40876694'),
usageNanoCores?: long(name='UsageNanoCores', description='The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.', example='0'),
}(name='CPU', description='The vCPU monitoring data of the container.'),
memory?: {
availableBytes?: long(name='AvailableBytes', description='The size of the available memory. Unit: bytes.', example='4285091840'),
cache?: long(name='Cache', description='The size of the cache. Unit: bytes.', example='9289728'),
rss?: long(name='Rss', description='The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.', example='9289728'),
usageBytes?: long(name='UsageBytes', description='The size of the used memory. Unit: bytes.', example='9289728'),
workingSet?: long(name='WorkingSet', description='The usage of the working set. Unit: bytes.', example='9289728'),
}(name='Memory', description='The memory monitoring data of the container.'),
name?: string(name='Name', description='The name of the container.', example='u1'),
}
](name='Containers', description='The monitoring data of containers.'),
disk?: [
{
device?: string(name='Device', description='The name of the disk.', example='/dev/vda'),
readBytes?: long(name='ReadBytes', description='The amount of data that was read from the disk. Unit: bytes.', example='210714112'),
readIO?: long(name='ReadIO', description='This parameter is unavailable for public use.', example='123'),
writeBytes?: long(name='WriteBytes', description='The amount of data that was written to the disk. Unit: bytes.', example='1375109120'),
writeIO?: long(name='WriteIO', description='This parameter is unavailable for public use.', example='123'),
}
](name='Disk', description='The monitoring data of disks.'),
filesystem?: [
{
available?: long(name='Available', description='The size of the available space.', example='35319836672'),
capacity?: long(name='Capacity', description='The total file system space.', example='41610981376'),
category?: string(name='Category', description='The type of the partition. Valid values:
* System
* Volume
* Other', example='System'),
fsName?: string(name='FsName', description='The name of the partition.', example='/dev/root'),
usage?: long(name='Usage', description='The size of used space.', example='4368744448'),
}
](name='Filesystem', description='The monitoring data of file system partitions.'),
memory?: {
availableBytes?: long(name='AvailableBytes', description='The size of the available memory. Unit: bytes.', example='4285091840'),
cache?: long(name='Cache', description='The size of the cache. Unit: bytes.', example='9289728'),
rss?: long(name='Rss', description='The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.', example='9289728'),
usageBytes?: long(name='UsageBytes', description='The size of the used memory. Unit: bytes.', example='9289728'),
workingSet?: long(name='WorkingSet', description='The usage of the working set. Unit: bytes.', example='9289728'),
}(name='Memory', description='The monitoring data of the memory.'),
network?: {
interfaces?: [
{
name?: string(name='Name', description='The name of the NIC.', example='eth0'),
rxBytes?: long(name='RxBytes', description='The number of bytes received by the NIC.', example='505001954'),
rxDrops?: long(name='RxDrops', description='The number of received packets dropped on the NIC.', example='0'),
rxErrors?: long(name='RxErrors', description='The number of received packet errors on the NIC.', example='0'),
rxPackets?: long(name='RxPackets', description='The number of packets received by the NIC.', example='4800583'),
txBytes?: long(name='TxBytes', description='The number of bytes transmitted by the NIC.', example='1381805699'),
txDrops?: long(name='TxDrops', description='The number of transmitted packets dropped on the NIC.', example='0'),
txErrors?: long(name='TxErrors', description='The number of transmitted packet errors on the NIC.', example='0'),
txPackets?: long(name='TxPackets', description='The number of packets transmitted by the NIC.', example='5158427'),
}
](name='Interfaces', description='The monitoring data of network interface controllers (NICs).'),
}(name='Network', description='The monitoring data of the network.'),
timestamp?: string(name='Timestamp', description='The time when the monitoring data entry was collected. The time follows the RFC 3339 format.', example='2021-08-25T16:22:00.000+08:00'),
}
](name='Records', description='The monitoring data of the elastic container instance.'),
requestId?: string(name='RequestId', description='The request ID.', example='D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC'),
}
model DescribeContainerGroupMetricResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerGroupMetricResponseBody(name='body'),
}
/**
* @summary Queries the monitoring data of an elastic container instance.
*
* @description * A maximum of 50 monitoring data entries can be returned. If the number of monitoring data entries exceeds this limit, an error message is returned.
* * You can query real-time monitoring data (data generated within the last 5 minutes) and historical data (data generated more than 5 minutes ago). If the time range to query starts or ends later than the current time, historical monitoring data generated more than 5 minutes ago is returned.
* * The elastic container instance whose monitoring data you want to query must be created after April 3, 2019, 15:00 UTC+8.
*
* @param request DescribeContainerGroupMetricRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerGroupMetricResponse
*/
async function describeContainerGroupMetricWithOptions(request: DescribeContainerGroupMetricRequest, runtime: Util.RuntimeOptions): DescribeContainerGroupMetricResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.period)) {
query['Period'] = request.period;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerGroupMetric',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the monitoring data of an elastic container instance.
*
* @description * A maximum of 50 monitoring data entries can be returned. If the number of monitoring data entries exceeds this limit, an error message is returned.
* * You can query real-time monitoring data (data generated within the last 5 minutes) and historical data (data generated more than 5 minutes ago). If the time range to query starts or ends later than the current time, historical monitoring data generated more than 5 minutes ago is returned.
* * The elastic container instance whose monitoring data you want to query must be created after April 3, 2019, 15:00 UTC+8.
*
* @param request DescribeContainerGroupMetricRequest
* @return DescribeContainerGroupMetricResponse
*/
async function describeContainerGroupMetric(request: DescribeContainerGroupMetricRequest): DescribeContainerGroupMetricResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerGroupMetricWithOptions(request, runtime);
}
model DescribeContainerGroupPriceRequest {
computeCategory?: string(name='ComputeCategory', description='The computing power type. A value of economy specifies economic instances.', example='economy'),
cpu?: float(name='Cpu', description='The number of vCPUs. For information about the vCPU and memory specifications that are supported by Elastic Container Instance, see [vCPU and memory specifications](https://help.aliyun.com/document_detail/114662.html).', example='2.0'),
ephemeralStorage?: int32(name='EphemeralStorage', description='The storage size of the temporary storage space. Unit: GiB.', example='20'),
instanceType?: string(name='InstanceType', description='The instance type of the Elastic Compute Service (ECS) instance that is used to create the elastic container instance. For information about the ECS instance types that are supported by Elastic Container Instance, see [ECS instance types that are supported by Elastic Container Instance](https://help.aliyun.com/document_detail/114664.html).
> If you specify this parameter, the specified specifications of vCPUs and memory are ignored. Only the price of the ECS instance type is returned.', example='ecs.c5.large'),
memory?: float(name='Memory', description='The size of the memory. Unit: GiB. For information about the vCPU and memory specifications that are supported by Elastic Container Instance, see [vCPU and memory specifications](https://help.aliyun.com/document_detail/114662.html).', example='4.0'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/146965.html) operation to query the most recent region and zone list.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
spotDuration?: int32(name='SpotDuration', description='The protection period of the preemptible instance. Unit: hours. Default value: 1. The value of 0 indicates no protection period.', example='1'),
spotPriceLimit?: float(name='SpotPriceLimit', description='The maximum hourly price of the preemptible elastic container instance. The value can contain up to three decimal places. If you set SpotStrategy to SpotWithPriceLimit, you must specify SpotPriceLimit.', example='0.2'),
spotStrategy?: string(name='SpotStrategy', description='The bidding policy for the elastic container instance. Valid values:
* NoSpot: The instance is a regular pay-as-you-go instance.
* SpotWithPriceLimit: The instance is a preemptible instance with a user-defined maximum hourly price.
* SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.
Default value: NoSpot.', example='SpotWithPriceLimit'),
zoneId?: string(name='ZoneId', description='The zone ID of the instance. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/146965.html) operation to query the most recent region and zone list.', example='cn-hangzhou-g'),
}
model DescribeContainerGroupPriceResponseBody = {
priceInfo?: {
price?: {
currency?: string(name='Currency', description='The currency unit. Valid values:
* CNY: This value only applies to the China site (aliyun.com).
* USD: This value only applies to the International site (alibabacloud.com).', example='CNY'),
detailInfos?: {
detailInfo?: [
{
discountPrice?: float(name='DiscountPrice', description='The discount.', example='0'),
originalPrice?: float(name='OriginalPrice', description='The original price.', example='0.000098'),
resource?: string(name='Resource', description='The name of the resource.', example='cpu'),
rules?: {
rule?: [
{
description?: string(name='Description', description='The description of the rule.', example='Receive a 15% discount on a 1-year subscription'),
ruleId?: long(name='RuleId', description='The rule ID.', example='123456'),
}
](name='Rule')
}(name='Rules', description='Details about the pricing rules.'),
tradePrice?: float(name='TradePrice', description='The transaction price.', example='0.000098'),
}
](name='DetailInfo')
}(name='DetailInfos', description='The information about the price.'),
discountPrice?: float(name='DiscountPrice', description='The discount.', example='0'),
originalPrice?: float(name='OriginalPrice', description='The original price.', example='0.00012252'),
tradePrice?: float(name='TradePrice', description='The transaction price, which is equal to the original price minus the discount.', example='0.00012252'),
}(name='Price', description='The price.'),
rules?: {
rule?: [
{
description?: string(name='Description', description='The description of the promotion rule.', example='Receive a 15% discount on a 1-year subscription'),
ruleId?: long(name='RuleId', description='The ID of the promotion rule.', example='123456'),
}
](name='Rule')
}(name='Rules', description='Details about the promotion rules.'),
spotPrices?: {
spotPrice?: [
{
instanceType?: string(name='InstanceType', description='The ECS instance type.', example='ecs.c5.large'),
originPrice?: float(name='OriginPrice', description='The original price.', example='0.622'),
spotPrice?: float(name='SpotPrice', description='The prices of preemptible elastic container instances.', example='0.056'),
zoneId?: string(name='ZoneId', description='The zone ID of the instance.', example='cn-hangzhou-i'),
}
](name='SpotPrice')
}(name='SpotPrices', description='The information about the prices of preemptible elastic container instances.'),
}(name='PriceInfo', description='The information about the prices and discount rules.'),
requestId?: string(name='RequestId', description='The request ID.', example='7A872585-33C7-4D69-AB8E-412E81EBA387'),
}
model DescribeContainerGroupPriceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerGroupPriceResponseBody(name='body'),
}
/**
* @summary Queries the price of an elastic container instance.
*
* @description * When you call this operation, you cannot use resource groups to control the permissions of a RAM user.
* * You can create an elastic container instance by specifying vCPU and memory resource specifications or by specifying ECS instance types. When you call this operation to query the prices of elastic container instances, pass in specifications of the elastic container instances.
* * [vCPU and memory specifications](https://help.aliyun.com/document_detail/114662.html).
* * [ECS instance types that are supported by Elastic Container Instance](https://help.aliyun.com/document_detail/114664.html).
*
* @param request DescribeContainerGroupPriceRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerGroupPriceResponse
*/
async function describeContainerGroupPriceWithOptions(request: DescribeContainerGroupPriceRequest, runtime: Util.RuntimeOptions): DescribeContainerGroupPriceResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.computeCategory)) {
query['ComputeCategory'] = request.computeCategory;
}
if (!Util.isUnset(request.cpu)) {
query['Cpu'] = request.cpu;
}
if (!Util.isUnset(request.ephemeralStorage)) {
query['EphemeralStorage'] = request.ephemeralStorage;
}
if (!Util.isUnset(request.instanceType)) {
query['InstanceType'] = request.instanceType;
}
if (!Util.isUnset(request.memory)) {
query['Memory'] = request.memory;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.spotDuration)) {
query['SpotDuration'] = request.spotDuration;
}
if (!Util.isUnset(request.spotPriceLimit)) {
query['SpotPriceLimit'] = request.spotPriceLimit;
}
if (!Util.isUnset(request.spotStrategy)) {
query['SpotStrategy'] = request.spotStrategy;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerGroupPrice',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the price of an elastic container instance.
*
* @description * When you call this operation, you cannot use resource groups to control the permissions of a RAM user.
* * You can create an elastic container instance by specifying vCPU and memory resource specifications or by specifying ECS instance types. When you call this operation to query the prices of elastic container instances, pass in specifications of the elastic container instances.
* * [vCPU and memory specifications](https://help.aliyun.com/document_detail/114662.html).
* * [ECS instance types that are supported by Elastic Container Instance](https://help.aliyun.com/document_detail/114664.html).
*
* @param request DescribeContainerGroupPriceRequest
* @return DescribeContainerGroupPriceResponse
*/
async function describeContainerGroupPrice(request: DescribeContainerGroupPriceRequest): DescribeContainerGroupPriceResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerGroupPriceWithOptions(request, runtime);
}
model DescribeContainerGroupStatusRequest {
containerGroupIds?: string(name='ContainerGroupIds', description='The IDs of the instances. You can specify up to 20 IDs. Each ID must be a string in the JSON format.', example='["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]'),
limit?: int32(name='Limit', description='Specifies the maximum number of elastic container instances to be returned for this request. Default value: 200.
> The number of returned resources can be less than or equal to the value of this parameter.', example='200'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.\\\\
You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='d78f2dd8-5979-42fe-xaee-b16db43be5bc'),
regionId?: string(name='RegionId', description='The region ID of the instances.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the instances belong.', example='rg-uf66jeqopgqa9hdn****'),
sinceSecond?: int32(name='SinceSecond', description='A relative time in seconds before the current time from which to show elastic container instances whose status changes. This parameter is used to poll status of elastic container instances.', example='60'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.', example='testKey'),
value?: string(name='Value', description='The value of the tag.', example='testValue'),
}
](name='Tag', description='The tag that is bound to the instances.'),
vSwitchId?: string(name='VSwitchId', description='The vSwitch ID.', example='vsw-uf6h3rbwbm90urjwa****'),
zoneId?: string(name='ZoneId', description='The zone ID of the instances.', example='cn-hangzhou-k'),
}
model DescribeContainerGroupStatusResponseBody = {
data?: [
{
annotations?: string(name='Annotations', description='Annotations that are added to the container groups.', example='"{\\\\"tenancy.x-k8s.io/namespace\\\\":\\\\"redis\\\\"}"'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the container group.', example='eci-bp1jrgfqqy54kg5hc****'),
name?: string(name='Name', description='The name of the container group.', example='nginx'),
namespace?: string(name='Namespace', description='The namespace in which the container group resides.', example='default'),
podStatus?: {
conditions?: [
{
message?: string(name='Message', description='The message about the event.', example='Completed'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Completed'),
lastTransitionTime?: string(name='lastTransitionTime', description='The time when the status last changed.', example='2021-05-12T07:02:47Z'),
status?: string(name='status', description='The status of the condition.', example='True'),
type?: string(name='type', description='The type of the condition. Valid values:
* PodReadyToStartContainers
* Initialized
* Ready
* ContainersReady
* PodScheduled
* ContainerHasSufficientDisk
* ContainerInstanceCreated
* Unschedulable', example='Ready'),
}
](name='Conditions', description='The conditions of the container group.'),
containerStatuses?: [
{
image?: string(name='Image', description='The image of the container.', example='registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu:18.04'),
imageID?: string(name='ImageID', description='The image ID.', example='registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu@sha256:134c7fe821b9d359490cd009ce7ca322453f4f2d018623f849e580a89a685e5d'),
lastState?: {
running?: {
startedAtstartedAt?: string(name='StartedAtstartedAt', description='The time when the container started to run.', example='2021-05-23T20:49:31Z'),
}(name='Running', description='The container is created and running.'),
terminated?: {
containerID?: string(name='ContainerID', description='The container ID.', example='containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******'),
exitCode?: int32(name='ExitCode', description='The exit code.', example='0'),
finishedAt?: string(name='FinishedAt', description='The time when the container ends running.', example='2021-05-23T20:49:31Z'),
message?: string(name='Message', description='The message about the event.', example='Completed'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Completed'),
signal?: int32(name='Signal', description='The signal code.', example='1'),
startedAt?: string(name='StartedAt', description='The time when the container started to run.', example='2021-05-12T07:02:52Z'),
}(name='Terminated', description='The container is terminated and exits after a successful or failed running.'),
waiting?: {
message?: string(name='Message', description='The message about the event.', example='Back-off'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Started'),
}(name='Waiting', description='The container is waiting for being created.'),
}(name='LastState', description='The last status of the container.'),
name?: string(name='Name', description='The name of the container.', example='ubuntu'),
ready?: boolean(name='Ready', description='Indicates whether the container is ready.', example='true'),
restartCount?: int32(name='RestartCount', description='The number of times that the container restarted.', example='1'),
started?: boolean(name='Started', description='Indicates whether the container is started.', example='true'),
state?: {
running?: {
startedAtstartedAt?: string(name='StartedAtstartedAt', description='The time when the container started to run.', example='2021-05-23T20:49:31Z'),
}(name='Running', description='The container is created and running.'),
terminated?: {
containerID?: string(name='ContainerID', description='The container ID.', example='containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******'),
exitCode?: int32(name='ExitCode', description='The exit code.', example='0'),
finishedAt?: string(name='FinishedAt', description='The time when the container ends running.', example='2021-05-23T20:55:31Z'),
message?: string(name='Message', description='The message about the event.', example='Completed'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Completed'),
signal?: int32(name='Signal', description='The signal code.', example='1'),
startedAt?: string(name='StartedAt', description='The time when the container started to run.', example='2021-05-23T20:49:31Z'),
}(name='Terminated', description='The container is terminated and exits after a successful or failed running.'),
waiting?: {
message?: string(name='Message', description='The message about the event.', example='Back-off'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Started'),
}(name='Waiting', description='The container is waiting for being created.'),
}(name='State', description='The status of the container. Valid values:
* Waiting
* Running
* Terminated'),
}
](name='ContainerStatuses', description='The statuses about the containers.'),
hostIp?: string(name='HostIp', description='The IP address of the host.', example='192.168.XX.XX'),
phase?: string(name='Phase', description='The lifecycle phase of the container group.', example='Running'),
podIp?: string(name='PodIp', description='The IP address of the container group.', example='192.168.XX.XX'),
podIps?: [
{
ip?: string(name='Ip', description='The IP address of the container group.', example='192.168.XX.XX'),
}
](name='PodIps', description='The IP addresses of the container groups.'),
qosClass?: string(name='QosClass', description='The quality of service (QoS) of the container group.', example='Guaranteed'),
startTime?: string(name='StartTime', description='The time when the container started to run.', example='2021-05-12T07:02:47Z'),
}(name='PodStatus', description='The status of the container group.'),
status?: string(name='Status', description='The status of the container group.', example='Running'),
uuid?: string(name='uuid', description='The universally unique identifier (UUID) of the container group, which is similar to the unique identifier (UID) of the Kubernetes pod in terms of the concept and usage.', example='78ee0657-987g-b8b2-1f507dic4****'),
}
](name='Data', description='The collection of the statuses of the container groups.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
requestId?: string(name='RequestId', description='The request ID.', example='1340C38D-6189-54D1-86F6-7D5ECF3E0088'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
}
model DescribeContainerGroupStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerGroupStatusResponseBody(name='body'),
}
/**
* @summary Queries the statuses of multiple container groups at a time.
*
* @param request DescribeContainerGroupStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerGroupStatusResponse
*/
async function describeContainerGroupStatusWithOptions(request: DescribeContainerGroupStatusRequest, runtime: Util.RuntimeOptions): DescribeContainerGroupStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupIds)) {
query['ContainerGroupIds'] = request.containerGroupIds;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.sinceSecond)) {
query['SinceSecond'] = request.sinceSecond;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerGroupStatus',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the statuses of multiple container groups at a time.
*
* @param request DescribeContainerGroupStatusRequest
* @return DescribeContainerGroupStatusResponse
*/
async function describeContainerGroupStatus(request: DescribeContainerGroupStatusRequest): DescribeContainerGroupStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerGroupStatusWithOptions(request, runtime);
}
model DescribeContainerGroupsRequest {
computeCategory?: string(name='ComputeCategory', description='The compute category of the instance. Valid values:
* economy
* general', example='economy'),
containerGroupIds?: string(name='ContainerGroupIds', description='The IDs of the elastic container instances in JSON format. You can specify up to 20 IDs.', example='["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]'),
containerGroupName?: string(name='ContainerGroupName', description='The name of the elastic container instance.', example='test'),
limit?: int32(name='Limit', description='The maximum number of resources to return. Default value: 20. Maximum value: 20.
> The number of returned resources is less than or equal to the specified number.', example='20'),
nextToken?: string(name='NextToken', description='The token that determines the start point of the query. If this parameter is left empty, all results have been returned.
> You do not need to specify this parameter in the first request. Starting from the second request, you can obtain the token from the result returned by the previous request.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the instance belongs.', example='rg-aekzh43v*****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group to which the instance belongs.', example='sg-uf66jeqopgqa9hdn****'),
status?: string(name='Status', description='The status of the elastic container instance. Valid values:
* Pending: The instance is being started.
* Running: The instance is running.
* Succeeded: The instance runs successfully.
* Failed: The instance fails to run.
* Scheduling: The instance is being created.
* ScheduleFailed: The instance fails to be created.
* Restarting: The instance is being restarted.
* Updating: The instance is being updated.
* Terminating: The instance is being terminated.
* Expired: The instance expires.', example='Running'),
tag?: [
{
key?: string(name='Key', description='The tag key of the instances.', example='name'),
value?: string(name='Value', description='The tag value of the instances.', example='test'),
}
](name='Tag', description='The tag of the instances.'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the elastic container instances are connected.', example='vsw-bp1jrgfqqy54kg5hc****'),
withEvent?: boolean(name='WithEvent', description='Specify whether to return event information.', example='true'),
zoneId?: string(name='ZoneId', description='The ID of the zone in which the elastic container instances are deployed. If you do not specify this parameter, the system selects a zone.
This parameter is empty by default.', example='cn-hangzhou-h'),
}
model DescribeContainerGroupsResponseBody = {
containerGroups?: [
{
computeCategory?: string(name='ComputeCategory', description='The computing power type of the elastic container instance. Valid values:
* economy: economic computing power.
* general: general-purpose computing power.', example='economy'),
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.', example='eci-bp1jrgfqqy54kg5hc****'),
containerGroupName?: string(name='ContainerGroupName', description='The instance name.', example='test'),
containers?: [
{
args?: [ string ](name='Args', description='The arguments that are passed to the startup commands of the container.'),
commands?: [ string ](name='Commands', description='The startup commands of the container.'),
cpu?: float(name='Cpu', description='The number of vCPUs that are allocated to the container.', example='2.0'),
currentState?: {
detailStatus?: string(name='DetailStatus', description='The details of the container status.', example='working'),
exitCode?: int32(name='ExitCode', description='The exit code of the container.', example='0'),
finishTime?: string(name='FinishTime', description='The time when the container stopped running.', example='2018-08-02T15:00:00Z'),
message?: string(name='Message', description='The message about the container status.', example='Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)'),
reason?: string(name='Reason', description='The reason why the container is in this status.', example='Started'),
signal?: int32(name='Signal', description='The code of the container status.', example='1'),
startTime?: string(name='StartTime', description='The time when the container started to run.', example='2019-12-19T12:05:02Z'),
state?: string(name='State', description='The container status. Valid values:
* Waiting
* Running
* Terminated', example='Terminated'),
}(name='CurrentState', description='The current container status.'),
environmentVars?: [
{
key?: string(name='Key', description='The name of the environment variable.', example='PATH'),
value?: string(name='Value', description='The value of the environment variable.', example='/usr/bin/'),
valueFrom?: {
fieldRef?: {
fieldPath?: string(name='FieldPath', description='The path of the field.', example='status.podIP'),
}(name='FieldRef', description='The specified field.'),
}(name='ValueFrom', description='The source of the environment variable value. This parameter has a value only when the Value parameter is left empty.'),
}
](name='EnvironmentVars', description='The environment variables of the container.'),
gpu?: int32(name='Gpu', description='The number of GPUs.', example='1'),
image?: string(name='Image', description='The image in the container.', example='mysql'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The image pulling policy. Valid values:
* Always: Each time the instance is updated, image pulling is performed.
* IfNotPresent: On-premises images are preferentially used. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Always'),
livenessProbe?: {
execs?: [ string ](name='Execs', description='The commands that are used to check the containers.'),
failureThreshold?: int32(name='FailureThreshold', description='The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.', example='3'),
httpGet?: {
path?: string(name='Path', description='The path to which the system sends an HTTP GET request for a health check.', example='/usr/nginx/'),
port?: int32(name='Port', description='The port to which the system sends an HTTP GET request for a health check.', example='80'),
scheme?: string(name='Scheme', description='The protocol type supported by the method. Valid values: HTTP and HTTPS.', example='HTTP'),
}(name='HttpGet', description='The HTTP GET method that is used to check the container.'),
initialDelaySeconds?: int32(name='InitialDelaySeconds', description='The number of seconds between the time when the startup of the container ends and the time when the probe starts.', example='10'),
periodSeconds?: int32(name='PeriodSeconds', description='The interval at which the health check is performed. Default value: 10. Minimum value: 1. Unit: seconds.', example='5'),
successThreshold?: int32(name='SuccessThreshold', description='The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. The value must be 1.', example='1'),
tcpSocket?: {
host?: string(name='Host', description='The hostname.', example='1.2.3.4'),
port?: int32(name='Port', description='The port number.', example='80'),
}(name='TcpSocket', description='The TCP socket method that is used to check the container.'),
timeoutSeconds?: int32(name='TimeoutSeconds', description='The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.', example='10'),
}(name='LivenessProbe', description='The liveness probe of the container.'),
memory?: float(name='Memory', description='The memory size of the container. Unit: GiB.', example='2.0'),
name?: string(name='Name', description='The name of the container.', example='nginx'),
ports?: [
{
port?: int32(name='Port', description='The port number. Valid values: 1 to 65535.', example='8080'),
protocol?: string(name='Protocol', description='The protocol type.', example='TCP'),
}
](name='Ports', description='The exposed port and protocol of the container.'),
previousState?: {
detailStatus?: string(name='DetailStatus', description='The details of the container status.', example='working'),
exitCode?: int32(name='ExitCode', description='The exit code of the container.', example='0'),
finishTime?: string(name='FinishTime', description='The time when the container stopped running.', example='2018-08-02T15:00:00Z'),
message?: string(name='Message', description='The message about the container status.', example='Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)'),
reason?: string(name='Reason', description='The reason why the container is in this status.', example='Completed'),
signal?: int32(name='Signal', description='The code of the container status.', example='1'),
startTime?: string(name='StartTime', description='The time when the container started to run.', example='2018-08-02T15:00:00Z'),
state?: string(name='State', description='The container status. Valid values:
* Waiting: The container is being started.
* Running: The container is running.
* Terminated: The container stops running.', example='Terminated'),
}(name='PreviousState', description='The previous state of the container.'),
readinessProbe?: {
execs?: [ string ](name='Execs', description='The commands that are run in the container when you use a CLI to perform health checks.'),
failureThreshold?: int32(name='FailureThreshold', description='The minimum number of consecutive failures that must occur for the check to be considered failed. Default value: 3.', example='3'),
httpGet?: {
path?: string(name='Path', description='The path to which the system sends an HTTP GET request for a health check.', example='/usr/local'),
port?: int32(name='Port', description='The port to which the system sends an HTTP GET request for a health check.', example='8080'),
scheme?: string(name='Scheme', description='The protocol type supported by the method. Valid values: HTTP and HTTPS.', example='HTTP'),
}(name='HttpGet', description='The HTTP GET method that is used to check the container.'),
initialDelaySeconds?: int32(name='InitialDelaySeconds', description='The number of seconds between the time when the startup of the container ends and the time when the probe starts.', example='5'),
periodSeconds?: int32(name='PeriodSeconds', description='The interval at which the health check is performed. Default value: 10. Minimum value: 1. Unit: seconds.', example='1'),
successThreshold?: int32(name='SuccessThreshold', description='The minimum number of consecutive successes that must occur for the check to be considered successful. Default value: 1. The value must be 1.', example='1'),
tcpSocket?: {
host?: string(name='Host', description='The hostname.', example='1.2.3.4'),
port?: int32(name='Port', description='The port number.', example='8888'),
}(name='TcpSocket', description='The TCP socket method that is used to check the container.'),
timeoutSeconds?: int32(name='TimeoutSeconds', description='The timeout period of the check. Default value: 1. Minimum value: 1. Unit: seconds.', example='1'),
}(name='ReadinessProbe', description='The readiness probe that is used to check whether the container is ready to serve a request.'),
ready?: boolean(name='Ready', description='Indicates whether the container passed the readiness probe.', example='true'),
restartCount?: int32(name='RestartCount', description='The number of times that the container restarted.', example='0'),
securityContext?: {
capability?: {
adds?: [ string ](name='Adds', description='The permissions specific to the process in the container.'),
}(name='Capability', description='The permissions specific to the processes in the container.'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem', description='Indicates whether permissions on the root file system are read-only. Valid value: true.', example='true'),
runAsUser?: long(name='RunAsUser', description='The user ID (UID) that is used to run the container.', example='1000'),
}(name='SecurityContext', description='The security context of the elastic container instance.'),
stdin?: boolean(name='Stdin', description='Indicates whether the container allocates buffer resources to standard input streams when the container is running. If you do not specify this parameter, an end-of-file (EOF) error may occur when standard input streams in the container are read. Default value: false.', example='true'),
stdinOnce?: boolean(name='StdinOnce', description='Indicates whether standard input streams are disconnected after a client is disconnected. If Stdin is set to true, standard input streams remain connected among multiple sessions. If StdinOnce is set to true, standard input streams are connected after the container is started, and remain idle until a client is connected to receive data. After the client is disconnected, streams are also disconnected, and remain disconnected until the container restarts.', example='true'),
tty?: boolean(name='Tty', description='Indicates whether interaction is enabled. Default value: false. If the value of the Command parameter is `/bin/bash`, the value of this parameter is true.', example='false'),
volumeMounts?: [
{
mountPath?: string(name='MountPath', description='The directory of the volume that is mounted to the container. The data in this directory is overwritten by the data on the volume.', example='/usr/share/'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation setting of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
* None: The volume mount does not receive subsequent mounts that are performed on this volume or on the subdirectories of this volume.
* HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or on the subdirectories of this volume.
* Bidirectional: This value is similar to HostToCotainer. The volume mount receives subsequent mounts that are performed on this volume or on the subdirectories of this volume. In addition, all volume mounts that are performed on the container are propagated back to the host and all containers of all pods that use the same volume.', example='None'),
name?: string(name='Name', description='The volume name.', example='test-empty'),
readOnly?: boolean(name='ReadOnly', description='Indicates whether the volume is read-only.', example='false'),
subPath?: string(name='SubPath', description='The subdirectory of the volume. You can use this parameter to mount the same volume to different subdirectories of the container.', example='/usr/sub'),
}
](name='VolumeMounts', description='Information about the mounted volumes.'),
workingDir?: string(name='WorkingDir', description='The working directory of the container.', example='/usr/local/nginx'),
}
](name='Containers', description='The information about containers in the elastic container instance.'),
cpu?: float(name='Cpu', description='The number of vCPUs that are allocated to the elastic container instance.', example='2.0'),
creationTime?: string(name='CreationTime', description='The time when the instance was created. The time follows the RFC 3339 standard. The time is displayed in UTC.', example='2018-08-02T15:00:00Z'),
discount?: int32(name='Discount', description='The discount.', example='9'),
dnsConfig?: {
nameServers?: [ string ](name='NameServers', description='The IP addresses of DNS servers.'),
options?: [
{
name?: string(name='Name', description='The variable name of the option.', example='name'),
value?: string(name='Value', description='The variable value of the option.', example='value'),
}
](name='Options', description='The options. Each option is a name-value pair. The value in the name-value pair is optional.'),
searches?: [ string ](name='Searches', description='The search domains of DNS servers.'),
}(name='DnsConfig', description='The Domain Name System (DNS) settings.'),
dnsPolicy?: string(name='DnsPolicy'),
eciSecurityContext?: {
sysctls?: [
{
name?: string(name='Name', description='The name of the Sysctl parameter.', example='kernel.msgmax'),
value?: string(name='Value', description='The value of the Sysctl parameter.', example='65536'),
}
](name='Sysctls', description='sysctl parameters.'),
}(name='EciSecurityContext', description='The security context of the elastic container instance.'),
eniInstanceId?: string(name='EniInstanceId', description='The ID of the elastic network interface (ENI).', example='eni-bp14rzqi6fd8satm****'),
ephemeralStorage?: int32(name='EphemeralStorage', description='The size of the temporary storage space. Unit: GiB.', example='20'),
events?: [
{
count?: int32(name='Count', description='The number of the events.', example='20'),
firstTimestamp?: string(name='FirstTimestamp', description='The start time of the event.', example='2018-08-02T15:00:00Z'),
lastTimestamp?: string(name='LastTimestamp', description='The end time of the event.', example='2018-08-02T15:00:00Z'),
message?: string(name='Message', description='The event message.', example='Started container'),
name?: string(name='Name', description='The category to which the event belongs.', example='test-xxx'),
reason?: string(name='Reason', description='The event name.', example='Created'),
type?: string(name='Type', description='The type of the event. Valid values:
* Normal
* Warning', example='Normal'),
}
](name='Events', description='The events of the elastic container instance. A maximum of 50 events can be returned.'),
expiredTime?: string(name='ExpiredTime', description='The time when the elastic container instance failed to run due to overdue payments. The time follows the RFC 3339 standard. The time is displayed in UTC.', example='2018-08-02T15:00:00Z'),
failedTime?: string(name='FailedTime', description='The time when the instance failed to run. The time follows the RFC 3339 standard. The time is displayed in UTC.', example='2018-08-02T15:00:00Z'),
hostAliases?: [
{
hostnames?: [ string ](name='Hostnames', description='The information about the hosts.'),
ip?: string(name='Ip', description='The IP address of the instance.', example='192.0.XX.XX'),
}
](name='HostAliases', description='The hostnames and IP addresses for a container that are added to the hosts file of the elastic container instance.'),
initContainers?: [
{
args?: [ string ](name='Args', description='The arguments that are passed to the startup commands of the container.'),
command?: [ string ](name='Command', description='The startup commands of the containers.'),
cpu?: float(name='Cpu', description='The number of vCPUs that are allocated to the container.', example='1.0'),
currentState?: {
detailStatus?: string(name='DetailStatus', description='The details of the container status.', example='working'),
exitCode?: int32(name='ExitCode', description='The exit code of the container.', example='0'),
finishTime?: string(name='FinishTime', description='The time when the container stopped running.', example='2018-08-02T15:00:00Z'),
message?: string(name='Message', description='The event message.', example='Created container'),
reason?: string(name='Reason', description='The reason why the container is in this status.', example='Started'),
signal?: int32(name='Signal', description='The code of the container status.', example='1'),
startTime?: string(name='StartTime', description='The time when the container started to run.', example='2018-08-02T15:00:00Z'),
state?: string(name='State', description='The container status. Valid values:
* Waiting
* Running
* Terminated', example='Running'),
}(name='CurrentState', description='The current container status.'),
environmentVars?: [
{
key?: string(name='Key', description='The name of the environment variable.', example='PATH'),
value?: string(name='Value', description='The value of the environment variable.', example='/usr/local/bin'),
valueFrom?: {
fieldRef?: {
fieldPath?: string(name='FieldPath', description='The path of the field. Only `status.podIP` is supported.', example='status.podIP'),
}(name='FieldRef', description='The specified fields.'),
}(name='ValueFrom', description='The source of the environment variable value. This parameter has a value only when the Value parameter is left empty.'),
}
](name='EnvironmentVars', description='The environment variables of the init container.'),
gpu?: int32(name='Gpu', description='The number of GPUs.', example='1'),
image?: string(name='Image', description='The image of the container.', example='nginx'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The image pulling policy. Valid values:
* Always: Each time the instance is updated, image pulling is performed.
* IfNotPresent: On-premises images are preferentially used. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Always'),
memory?: float(name='Memory', description='The memory size of the init container. Unit: GiB.', example='2.0'),
name?: string(name='Name', description='The name of the init container.', example='Init-xxx'),
ports?: [
{
port?: int32(name='Port', description='The port number. Valid values: 1 to 65535.', example='8888'),
protocol?: string(name='Protocol', description='The protocol type.', example='TCP'),
}
](name='Ports', description='The exposed port and protocol of the container.'),
previousState?: {
detailStatus?: string(name='DetailStatus', description='The details of the container status.', example='working'),
exitCode?: int32(name='ExitCode', description='The exit code of the container.', example='0'),
finishTime?: string(name='FinishTime', description='The time when the container stopped running.', example='2019-12-24T05:35:44Z'),
message?: string(name='Message', description='The message about the container status.', example='Started container'),
reason?: string(name='Reason', description='The reason why the container is in this status.', example='completed'),
signal?: int32(name='Signal', description='The code of the container status.', example='1'),
startTime?: string(name='StartTime', description='The time when the container started to run.', example='2019-12-24T05:35:44Z'),
state?: string(name='State', description='The container status. Valid values: Waiting, Running, and Terminated.', example='Terminated'),
}(name='PreviousState', description='The previous state of the container.'),
ready?: boolean(name='Ready', description='Indicates whether the container passed the readiness probe.', example='true'),
restartCount?: int32(name='RestartCount', description='The number of times that the container restarted.', example='5'),
securityContext?: {
capability?: {
adds?: [ string ](name='Adds', description='The permissions specific to the processes in the container.'),
}(name='Capability', description='The permissions specific to the processes in the container.'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem', description='Indicates whether permissions on the root file system are read-only.', example='true'),
runAsUser?: long(name='RunAsUser', description='The UID that is used to run the entry point of the container process.', example='1557'),
}(name='SecurityContext', description='The security context of the container.'),
volumeMounts?: [
{
mountPath?: string(name='MountPath', description='The directory of the volume that is mounted to the container. The data in this directory is overwritten by the data on the volume.', example='/usr/share/'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation setting of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
* None: The volume mount does not receive subsequent mounts that are performed on this volume or on the subdirectories of this volume.
* HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or on the subdirectories of this volume.
* Bidirectional: This value is similar to HostToCotainer. The volume mount receives subsequent mounts that are performed on this volume or on the subdirectories of this volume. In addition, all volume mounts that are performed on the container are propagated back to the host and all containers of all pods that use the same volume.', example='None'),
name?: string(name='Name', description='The name of the volume. The value of this parameter is the same as the name of the volume that you selected when you purchased the container.', example='test-empty'),
readOnly?: boolean(name='ReadOnly', description='Indicates whether the volume is read-only.', example='false'),
}
](name='VolumeMounts', description='The information about the volumes that are mounted to the init container.'),
workingDir?: string(name='WorkingDir', description='The working directory of the container.', example='/usr/test'),
}
](name='InitContainers', description='The information about the init containers.'),
instanceType?: string(name='InstanceType', description='The instance type of the specified Elastic Compute Service (ECS) instance.', example='ecs.g5.large'),
internetIp?: string(name='InternetIp', description='The public IP address.', example='192.0.XX.XX'),
intranetIp?: string(name='IntranetIp', description='The private IP address.', example='172.16.XX.XX'),
ipv6Address?: string(name='Ipv6Address', description='The IPv6 address of the instance.', example='2001:XXXX:4:4:4:4:4:4'),
memory?: float(name='Memory', description='The memory size of the instance. Unit: GiB.', example='4.0'),
ramRoleName?: string(name='RamRoleName', description='The name of the instance RAM role. The elastic container instance and the ECS instance share a RAM role. For more information, see [Use an instance RAM role by calling API operations](https://help.aliyun.com/document_detail/61178.html).', example='ram:PassRole'),
regionId?: string(name='RegionId', description='The region ID of the instance.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-8db03793gfrz****'),
restartPolicy?: string(name='RestartPolicy', description='The restart policy of the elastic container instance. Valid values:
* Never: Never restarts the instance if a container in the instance exits upon termination.
* Always: Always restarts the instance if a container in the instance exits upon termination.
* OnFailure: Restarts the instance only if a container in the instance exists upon failure with a status code of non-zero.', example='Never'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group to which the instances belong.', example='sg-bp12ujq5zpxuyjfo3o8r'),
spotPriceLimit?: double(name='SpotPriceLimit', description='The maximum hourly price for the preemptible elastic container instance.
This parameter is returned only when SpotStrategy is set to SpotWithPriceLimit.', example='0.025'),
spotStrategy?: string(name='SpotStrategy', description='The bid policy for the instance. Default value: NoSpot. Valid values:
* NoSpot: The instance is a regular pay-as-you-go instance.
* SpotWithPriceLimit: The instance is a preemptible instance that has a user-defined maximum hourly price.
* SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.', example='NoSpot'),
status?: string(name='Status', description='The status of the instance. Valid values:
* Pending: The instance is being started.
* Running: The instance is running.
* Succeeded: The instance successfully runs.
* Failed: The instance fails to run.
* Scheduling: The instance is being created.
* ScheduleFailed: The instance fails to be created.
* Restarting: The instance is being restarted.
* Updating: The instance is being updated.
* Terminating: The instance is being terminated.
* Expired: The instance is expired.', example='Running'),
succeededTime?: string(name='SucceededTime', description='The time when all containers exited on success. The time follows the RFC 3339 standard. The time is displayed in UTC.', example='2019-12-11T04:33:42Z'),
tags?: [
{
key?: string(name='Key', description='The tag key.', example='name'),
value?: string(name='Value', description='The tag value.', example='test-xh'),
}
](name='Tags', description='The tags that are added to the instance.'),
tenantEniInstanceId?: string(name='TenantEniInstanceId', description='This parameter is not publicly available.', example='i-xxx'),
tenantEniIp?: string(name='TenantEniIp', description='This parameter is not publicly available.', example='10.10.XX.XX'),
tenantSecurityGroupId?: string(name='TenantSecurityGroupId', description='This parameter is not publicly available.', example='sg-xxx'),
tenantVSwitchId?: string(name='TenantVSwitchId', description='This parameter is not publicly available.', example='vsw-xxx'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the instance is connected.', example='vsw-bp1vzjjflab6wvjox****'),
volumes?: [
{
configFileVolumeConfigFileToPaths?: [
{
content?: string(name='Content', description='The content of the ConfigFile volume. Maximum size: 32 KB.', example='hello world'),
path?: string(name='Path', description='The relative path of the ConfigFile volume.', example='/usr/bin/'),
}
](name='ConfigFileVolumeConfigFileToPaths', description='The path of the ConfigFile volume.'),
diskVolumeDiskId?: string(name='DiskVolumeDiskId', description='The ID of the disk when you set Type to DiskVolume.', example='d-xxxx'),
diskVolumeFsType?: string(name='DiskVolumeFsType', description='The file system type of the disk volume.', example='xfs'),
emptyDirVolumeMedium?: string(name='EmptyDirVolumeMedium', description='The storage media for the emptyDir volume. This parameter is empty by default, indicating that the node file system is used as the storage media. Valid values:
* Memory: Memory is used as the storage media.
* LocalRaid0: Local disks are formed into RAID 0. This value is valid only if an elastic container instance that has local disks mounted is created. For more information, see [Create an elastic container instance that has local disks mounted](https://help.aliyun.com/document_detail/114664.html).', example='Memory'),
emptyDirVolumeSizeLimit?: string(name='EmptyDirVolumeSizeLimit', description='The storage size of the emptyDir volume.', example='256Mi'),
flexVolumeDriver?: string(name='FlexVolumeDriver', description='The name of the driver when you set the Type parameter to FlexVolume.', example='flexvolume'),
flexVolumeFsType?: string(name='FlexVolumeFsType', description='The file system type when you set the Type parameter to FlexVolume. The default value varies based on the script of the FlexVolume plug-in.', example='ntfs'),
flexVolumeOptions?: string(name='FlexVolumeOptions', description='The options when you set the Type parameter to FlexVolume.', example='[nolock,tcp,noresvport]'),
NFSVolumePath?: string(name='NFSVolumePath', description='The path of the NFS volume.', example='/eci'),
NFSVolumeReadOnly?: boolean(name='NFSVolumeReadOnly', description='Indicates whether the NFS volume is read-only.', example='false'),
NFSVolumeServer?: string(name='NFSVolumeServer', description='The address of the NFS server.', example='0eafxxxxx-xxxxx.cn-hangzhou.nas.aliyuncs.com'),
name?: string(name='Name', description='The volume name.', example='test-empty'),
type?: string(name='Type', description='The type of the volume. Valid values:
* EmptyDirVolume
* NFSVolume
* ConfigFileVolume
* FlexVolume', example='EmptyDirVolume'),
}
](name='Volumes', description='The information about the volumes.'),
vpcId?: string(name='VpcId', description='The ID of the VPC to which the instance belongs.', example='vpc-1vzjjflab6wvjox****'),
zoneId?: string(name='ZoneId', description='The zone to which the instance belongs.', example='cn-hangzhou-h'),
}
](name='ContainerGroups', description='Details about the queried elastic container instances.'),
nextToken?: string(name='NextToken', description='The token that determines the start point of the query.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
requestId?: string(name='RequestId', description='The ID of the request. The value is unique.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
totalCount?: int32(name='TotalCount', description='The number of queried instances.', example='1'),
}
model DescribeContainerGroupsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerGroupsResponseBody(name='body'),
}
/**
* @summary Queries information about multiple elastic container instances at a time.
*
* @description * After an elastic container instance is terminated, its underlying computing resources are recycled. By default, other resources, such as elastic IP addresses (EIPs), that are created together with the instance are released together with the instance.
* * The metadata of an instance in the final status (Failed, Succeeded, or Expired) is retained based on the following rules:
* * All metadata information is retained within 1 hour since the instance enters the final status.
* * One hour after the instance enters the final status, only the latest 100 entries of metadata information in each region are retained.
*
* @param request DescribeContainerGroupsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerGroupsResponse
*/
async function describeContainerGroupsWithOptions(request: DescribeContainerGroupsRequest, runtime: Util.RuntimeOptions): DescribeContainerGroupsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.computeCategory)) {
query['ComputeCategory'] = request.computeCategory;
}
if (!Util.isUnset(request.containerGroupIds)) {
query['ContainerGroupIds'] = request.containerGroupIds;
}
if (!Util.isUnset(request.containerGroupName)) {
query['ContainerGroupName'] = request.containerGroupName;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
if (!Util.isUnset(request.withEvent)) {
query['WithEvent'] = request.withEvent;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerGroups',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries information about multiple elastic container instances at a time.
*
* @description * After an elastic container instance is terminated, its underlying computing resources are recycled. By default, other resources, such as elastic IP addresses (EIPs), that are created together with the instance are released together with the instance.
* * The metadata of an instance in the final status (Failed, Succeeded, or Expired) is retained based on the following rules:
* * All metadata information is retained within 1 hour since the instance enters the final status.
* * One hour after the instance enters the final status, only the latest 100 entries of metadata information in each region are retained.
*
* @param request DescribeContainerGroupsRequest
* @return DescribeContainerGroupsResponse
*/
async function describeContainerGroups(request: DescribeContainerGroupsRequest): DescribeContainerGroupsResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerGroupsWithOptions(request, runtime);
}
model DescribeContainerLogRequest {
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.
This parameter is required.', example='eci-uf6fonnghi50v6nq****'),
containerName?: string(name='ContainerName', description='The name of the container.
This parameter is required.', example='nginx'),
lastTime?: boolean(name='LastTime', description='Specifies whether to query the logs of the previous container if the container exits and restarts. Valid values:
* true
* false
Default value: false.', example='false'),
limitBytes?: long(name='LimitBytes', description='The limit on the total size of logs. Unit: bytes. Valid values: 1 to 1048576(1 MB).', example='123798'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the elastic container instance.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
sinceSeconds?: int32(name='SinceSeconds', description='A relative time in seconds before the current time from which to show logs. Examples: 10, 20, and 30.', example='10'),
startTime?: string(name='StartTime', description='The beginning of the time range to query. Specify the time in the RFC 3339 standard. The time must be in UTC.', example='2018-08-02T15:00:00Z'),
tail?: int32(name='Tail', description='The number of the most recent log entries that you want to query. Default value: 500. Maximum value: 2000.\\\\
A maximum of 1 MB log data can be returned.', example='500'),
timestamps?: boolean(name='Timestamps', description='Specifies whether to return the timestamps of logs. Valid values:
* true
* false
Default value: false.', example='false'),
}
model DescribeContainerLogResponseBody = {
containerName?: string(name='ContainerName', description='The container name.', example='nginx'),
content?: string(name='Content', description='The content of the log.', example='{}'),
requestId?: string(name='RequestId', description='The request ID.', example='CA850ADA-****-4AC8-****-5B5990EAB7D0'),
}
model DescribeContainerLogResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeContainerLogResponseBody(name='body'),
}
/**
* @summary Queries the logs of a container in a container group.
*
* @param request DescribeContainerLogRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeContainerLogResponse
*/
async function describeContainerLogWithOptions(request: DescribeContainerLogRequest, runtime: Util.RuntimeOptions): DescribeContainerLogResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.containerName)) {
query['ContainerName'] = request.containerName;
}
if (!Util.isUnset(request.lastTime)) {
query['LastTime'] = request.lastTime;
}
if (!Util.isUnset(request.limitBytes)) {
query['LimitBytes'] = request.limitBytes;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.sinceSeconds)) {
query['SinceSeconds'] = request.sinceSeconds;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.tail)) {
query['Tail'] = request.tail;
}
if (!Util.isUnset(request.timestamps)) {
query['Timestamps'] = request.timestamps;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeContainerLog',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the logs of a container in a container group.
*
* @param request DescribeContainerLogRequest
* @return DescribeContainerLogResponse
*/
async function describeContainerLog(request: DescribeContainerLogRequest): DescribeContainerLogResponse {
var runtime = new Util.RuntimeOptions{};
return describeContainerLogWithOptions(request, runtime);
}
model DescribeDataCachesRequest {
bucket?: string(name='Bucket', description='The bucket that stores the data cache. Default value: default.', example='default'),
dataCacheId?: [ string ](name='DataCacheId', description='The data cache IDs.'),
limit?: int32(name='Limit', description='The maximum entries of query results that are allowed to be displayed. Valid values: 1 to 20. Default value: 20.', example='20'),
nextToken?: string(name='NextToken', description='The query token. Set the value to the NextToken value that is returned in the previous call.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
path?: string(name='Path', description='The virtual host (vHost) directory in which the data cache resides.', example='/data/models/'),
regionId?: string(name='RegionId', description='The region ID of the data caches that you want to query.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the data cache belongs.', example='rg-acfmzw2jz2z****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
tag?: [
{
key?: string(name='Key', description='The tag key.', example='testkey'),
value?: string(name='Value', description='The tag value.', example='testvalue'),
}
](name='Tag', description='The tags that are attached to the data cache.'),
}
model DescribeDataCachesResponseBody = {
dataCaches?: [
{
bucket?: string(name='Bucket', description='The bucket that stores the data cache.', example='default'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance that was generated when the data cache was created.', example='eci-8vb1y2w1dv7zeirn****'),
creationTime?: string(name='CreationTime', description='The time when the data cache was created.', example='2023-06-16T02:43Z'),
dataCacheId?: string(name='DataCacheId', description='The ID of the data cache.', example='edc-bp15l4vvys94oo******'),
dataSource?: {
options?: string(name='Options', description='The parameters that are configured for the data source.', example='{
"options": {
"path": "/",
"server": "0ce1f4****-or***.cn-hangzhou.nas.aliyuncs.com",
"vers": "3",
"options": "nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport"
},
"type": "NAS"
}'),
type?: string(name='Type', description='The type of the data source. Valid values:
* NAS
* OSS
* URL
* SNAPSHOT', example='URL'),
}(name='DataSource', description='The information about the data source.'),
events?: [
{
count?: int32(name='Count', description='The number of times that the event occurred.', example='1'),
firstTimestamp?: string(name='FirstTimestamp', description='The time when the event started.', example='2021-06-16T02:14:48Z'),
lastTimestamp?: string(name='LastTimestamp', description='The time when the event ended.', example='2021-06-16T02:24:48Z'),
message?: string(name='Message', description='The message about the event.', example='Successfully check data cache resource.'),
name?: string(name='Name', description='The event name.', example='datacache'),
reason?: string(name='Reason', description='The reason for the transition into the current status of the event.', example='Started'),
type?: string(name='Type', description='The type of the event. Valid values:
* Normal
* Warning', example='Normal'),
}
](name='Events', description='The events.'),
expireDateTime?: string(name='ExpireDateTime', description='The time when the data cache expires.', example='2023-06-26T02:43Z'),
flashSnapshotId?: string(name='FlashSnapshotId', description='The ID of the on-premises snapshot.', example='s-bp12w3v37sit96t6****'),
lastMatchedTime?: string(name='LastMatchedTime', description='The time when the data cache was last matched.', example='2023-06-18T02:43Z'),
name?: string(name='Name', description='The name of the data cache.', example='test'),
path?: string(name='Path', description='The directory in which the virtual host of the data cache resides.', example='/data/models/'),
progress?: string(name='Progress', description='The creation progress of the data cache.', example='100%'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek2hlt3ux4****'),
size?: int32(name='Size', description='The size of the data cache. Unit: GiB.', example='20'),
snapshotId?: string(name='SnapshotId', description='The snapshot ID.', example='s-2zec5oj8e1yhxijt****'),
status?: string(name='Status', description='The status of the data cache. Valid values:
* Loading: The data cache is loading data.
* Creating: The data cache is being created.
* Available: The data cache is created.
* Failed: The data cache failed to be created.
* Updating: The data cache is being updated.
* UpdateFailed: The data cache failed to be updated.
If the data cache is in the Available state, the data cache can be used.', example='Available'),
tags?: [
{
key?: string(name='Key', description='The tag key.', example='testkey'),
value?: string(name='Value', description='The tag value.', example='testvalue'),
}
](name='Tags', description='The tags that are attached to the data cache.'),
}
](name='DataCaches', description='The information about the data caches.'),
nextToken?: string(name='NextToken', description='The query token. Set the value to the NextToken value that is returned in the previous call.', example='d78f2dd8-5979-42fe-xaee-b16db43be5bc'),
requestId?: string(name='RequestId', description='The request ID.', example='B8756BA0-6452-419C-9727-37A6209C85E0'),
totalCount?: int32(name='TotalCount', description='The number of entries returned.', example='2'),
}
model DescribeDataCachesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataCachesResponseBody(name='body'),
}
/**
* @summary Queries the information about data caches.
*
* @param request DescribeDataCachesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataCachesResponse
*/
async function describeDataCachesWithOptions(request: DescribeDataCachesRequest, runtime: Util.RuntimeOptions): DescribeDataCachesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucket)) {
query['Bucket'] = request.bucket;
}
if (!Util.isUnset(request.dataCacheId)) {
query['DataCacheId'] = request.dataCacheId;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.path)) {
query['Path'] = request.path;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataCaches',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the information about data caches.
*
* @param request DescribeDataCachesRequest
* @return DescribeDataCachesResponse
*/
async function describeDataCaches(request: DescribeDataCachesRequest): DescribeDataCachesResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataCachesWithOptions(request, runtime);
}
model DescribeImageCachesRequest {
image?: string(name='Image', description='The container images.', example='nginx'),
imageCacheId?: string(name='ImageCacheId', description='The IDs of the image caches.', example='imc-bp195erqe9o2pb09****'),
imageCacheName?: string(name='ImageCacheName', description='The names of the image caches.', example='testcache'),
imageFullMatch?: boolean(name='ImageFullMatch', description='Specifies whether the image layers of the image caches must contain all image layers of the container image.\\\\
If you configure MatchImage, you can configure this parameter to further filter query results.', example='true'),
imageMatchCountRequest?: int32(name='ImageMatchCountRequest', description='The quantity of image caches whose image layers contain all image layers of the container image.\\\\
If you configure MatchImage, you can configure this parameter to further filter query results.', example='3'),
limit?: int32(name='Limit', description='The maximum entries of query results that are allowed to be displayed.', example='20'),
matchImage?: [ string ](name='MatchImage', description='The container images used to match the image caches that you want to query. You can specify a maximum of 100 container images.', example='registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAdDWBF2****'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the image caches.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the image caches belong.', example='rg-2df3isufhi38****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
snapshotId?: string(name='SnapshotId', description='The IDs of the snapshots that correspond to the image caches.', example='s-2zec5oj8e1yhxijt****'),
tag?: [
{
key?: string(name='Key', description='The key of tag N of the image cache.', example='imc'),
value?: string(name='Value', description='The value of tag N of the image cache.', example='test'),
}
](name='Tag', description='The tags to add to the image caches.'),
}
model DescribeImageCachesResponseBody = {
imageCaches?: [
{
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.', example='eci-bp18oq3m15prd9jb****'),
creationTime?: string(name='CreationTime', description='The time when the image cache was created.', example='2021-02-09T02:24:07Z'),
eliminationStrategy?: string(name='EliminationStrategy', description='The elimination policy of the image cache. This parameter is empty by default, which indicates that the image cache is always retained.
You can set this parameter to LRU, which indicates that the image cache can be automatically deleted. When the number of image caches reaches the quota, the system automatically deletes the image caches whose EliminationStrategy parameter is set to LRU and that are least regularly used.', example='LRU'),
events?: [
{
count?: int32(name='Count', description='The number of events.', example='1'),
firstTimestamp?: string(name='FirstTimestamp', description='The time when the event started.', example='2021-02-09T02:24:48Z'),
lastTimestamp?: string(name='LastTimestamp', description='The time when the event ended.', example='2021-02-09T02:24:48Z'),
message?: string(name='Message', description='The message about the event.', example='Successfully check image cache resource.'),
name?: string(name='Name', description='The name of the event.', example='imagetest.1661f31f851a****'),
reason?: string(name='Reason', description='The cause of the event.', example='Started'),
type?: string(name='Type', description='The type of the event. Valid values:', example='Normal'),
}
](name='Events', description='The events of pulling an image to create the image cache.'),
expireDateTime?: string(name='ExpireDateTime', description='The time when the image cache expires.', example='2019-11-10T09:00:48Z'),
flashSnapshotId?: string(name='FlashSnapshotId', description='The ID of the local snapshot. A temporary local snapshot is created if the instant image cache feature is enabled.', example='s-bp12w3v37sit96t6****'),
imageCacheId?: string(name='ImageCacheId', description='The ID of the image cache.', example='imc-bp195erqe9o2pb09****'),
imageCacheName?: string(name='ImageCacheName', description='The name of the image cache.', example='imagetest'),
imageCacheSize?: int32(name='ImageCacheSize', description='The size of the image cache. Unit: GiB.', example='20'),
images?: [ string ](name='Images', description='The images contained in the image cache.'),
lastMatchedTime?: string(name='LastMatchedTime', description='The time when the image cache was last matched.', example='2021-08-18T03:48:10Z'),
progress?: string(name='Progress', description='The progress of creating the snapshot that is used to create the image cache.
> If the instant image cache feature is enabled, the system creates a temporary local snapshot and then a regular snapshot. In this case, this parameter indicates the progress of creating the regular snapshot.', example='100%'),
regionId?: string(name='RegionId', description='The region ID of the image cache.', example='cn-beijing'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the image cache belongs.', example='rg-2df3isufhi38****'),
snapshotId?: string(name='SnapshotId', description='The ID of the snapshot that corresponds to the image cache.', example='s-2zec5oj8e1yhxijt****'),
status?: string(name='Status', description='The status of the image cache. Valid values:
* Preparing: The image cache is being prepared.
* Creating: The image is being created.
* Ready: The image cache is created.
* Failed: The image cache failed to be created.
* Updating: The image cache is being updated.
* UpdateFailed: The image cache failed to be updated.
The image cache is ready for use when it is in the Ready state.', example='Ready'),
tags?: [
{
key?: string(name='Key', description='The tag key.', example='imc'),
value?: string(name='Value', description='The tag value.', example='test'),
}
](name='Tags', description='The tags of the image cache.'),
}
](name='ImageCaches', description='The information about image caches.'),
nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2****'),
requestId?: string(name='RequestId', description='The request ID.', example='39FC2E43-3DD7-4CEF-9EF4-E4AD6E635301'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='15'),
}
model DescribeImageCachesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeImageCachesResponseBody(name='body'),
}
/**
* @summary Queries information about image caches.
*
* @param request DescribeImageCachesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeImageCachesResponse
*/
async function describeImageCachesWithOptions(request: DescribeImageCachesRequest, runtime: Util.RuntimeOptions): DescribeImageCachesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.image)) {
query['Image'] = request.image;
}
if (!Util.isUnset(request.imageCacheId)) {
query['ImageCacheId'] = request.imageCacheId;
}
if (!Util.isUnset(request.imageCacheName)) {
query['ImageCacheName'] = request.imageCacheName;
}
if (!Util.isUnset(request.imageFullMatch)) {
query['ImageFullMatch'] = request.imageFullMatch;
}
if (!Util.isUnset(request.imageMatchCountRequest)) {
query['ImageMatchCountRequest'] = request.imageMatchCountRequest;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.matchImage)) {
query['MatchImage'] = request.matchImage;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeImageCaches',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries information about image caches.
*
* @param request DescribeImageCachesRequest
* @return DescribeImageCachesResponse
*/
async function describeImageCaches(request: DescribeImageCachesRequest): DescribeImageCachesResponse {
var runtime = new Util.RuntimeOptions{};
return describeImageCachesWithOptions(request, runtime);
}
model DescribeInstanceOpsRecordsRequest {
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.
This parameter is required.', example='eci-bp1dvysdafbh00t7****'),
opsType?: string(name='OpsType', description='The type of the O\\\\&M task. Valid values:
* coredump
* tcpdump
This parameter is required.', example='coredump'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DescribeInstanceOpsRecordsResponseBody = {
records?: [
{
createTime?: string(name='CreateTime', description='The time when the O\\\\&M task was created.', example='2021-12-29T15:00:00Z'),
expireTime?: string(name='ExpireTime', description='The time when the O\\\\&M task expires.', example='2099-12-29T15:00:00Z'),
opsStatus?: string(name='OpsStatus', description='The status of the O\\\\&M task.
- Ready
- Failed
- Expired
- Closed
- Success', example='Ready'),
opsType?: string(name='OpsType', description='The type of the O\\\\&M task.', example='coredump'),
resultContent?: string(name='ResultContent', description='The content of the O\\\\&M result. The value is the download URL of the files that are generated for the O\\\\&M task. This parameter is returned only when the value of the OpsStatus parameter is Success.', example='https://******'),
resultType?: string(name='ResultType', description='The type of the O\\\\&M result. This parameter is returned only when the value of the OpsStatus parameter is Success.\\\\
The only value of the parameter is Oss. The value indicates that the files generated for the O\\\\&M task are saved to Object Storage Service (OSS) buckets.', example='OSS'),
}
](name='Records', description='The details of the queried O\\\\&M tasks.'),
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model DescribeInstanceOpsRecordsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeInstanceOpsRecordsResponseBody(name='body'),
}
/**
* @summary Queries the information about operations and maintenance tasks of an elastic container instance.
*
* @param request DescribeInstanceOpsRecordsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeInstanceOpsRecordsResponse
*/
async function describeInstanceOpsRecordsWithOptions(request: DescribeInstanceOpsRecordsRequest, runtime: Util.RuntimeOptions): DescribeInstanceOpsRecordsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.opsType)) {
query['OpsType'] = request.opsType;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeInstanceOpsRecords',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the information about operations and maintenance tasks of an elastic container instance.
*
* @param request DescribeInstanceOpsRecordsRequest
* @return DescribeInstanceOpsRecordsResponse
*/
async function describeInstanceOpsRecords(request: DescribeInstanceOpsRecordsRequest): DescribeInstanceOpsRecordsResponse {
var runtime = new Util.RuntimeOptions{};
return describeInstanceOpsRecordsWithOptions(request, runtime);
}
model DescribeMultiContainerGroupMetricRequest {
containerGroupIds?: string(name='ContainerGroupIds', description='The instance ID. The value is a JSON array. You can specify up to 20 instance IDs at a time.
This parameter is required.', example='["eci-2zegym1qhbmdfr1s****","eci-2ze39w5svzj5ic34****"]'),
metricType?: string(name='MetricType', description='The type of the monitoring data. Set the value to summary. This value indicates that records are returned.', example='summary'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the elastic container instances belong.', example='rg-acfmzw2jz2z****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DescribeMultiContainerGroupMetricResponseBody = {
monitorDatas?: [
{
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.', example='eci-bp15oolgorelvhfb****'),
records?: [
{
CPU?: {
limit?: long(name='Limit', description='The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.', example='2000'),
load?: long(name='Load', description='The average load in the last 10 seconds.', example='0'),
usageCoreNanoSeconds?: long(name='UsageCoreNanoSeconds', description='The cumulative usage of vCPUs.', example='70769883'),
usageNanoCores?: long(name='UsageNanoCores', description='The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.', example='0'),
}(name='CPU', description='The monitoring data of vCPUs.'),
containers?: [
{
CPU?: {
limit?: long(name='Limit', description='The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.', example='321234'),
load?: long(name='Load', description='The average load in the last 10 seconds.', example='12341'),
usageCoreNanoSeconds?: long(name='UsageCoreNanoSeconds', description='The cumulative usage of vCPUs.', example='40876694'),
usageNanoCores?: long(name='UsageNanoCores', description='The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.', example='0'),
}(name='CPU', description='The vCPU monitoring data of the container.'),
memory?: {
availableBytes?: long(name='AvailableBytes', description='The size of the available memory. Unit: bytes.', example='4285091840'),
cache?: long(name='Cache', description='The size of the cache. Unit: bytes.', example='9289728'),
rss?: long(name='Rss', description='The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.', example='9289728'),
usageBytes?: long(name='UsageBytes', description='The size of the used memory. Unit: bytes.', example='9289728'),
workingSet?: long(name='WorkingSet', description='The usage of the working set. Unit: bytes.', example='9289728'),
}(name='Memory', description='The memory monitoring data of the container.'),
name?: string(name='Name', description='The name.', example='test1'),
}
](name='Containers', description='The monitoring data of containers.'),
disk?: [
{
device?: string(name='Device', description='The name of the disk.', example='/dev/vda'),
readBytes?: long(name='ReadBytes', description='The amount of data that was read from the disk. Unit: bytes.', example='210714112'),
readIo?: long(name='ReadIo', description='This parameter is unavailable for public use.', example='123'),
writeBytes?: long(name='WriteBytes', description='The amount of data that was written to the disk. Unit: bytes.', example='1375109120'),
writeIo?: long(name='WriteIo', description='This parameter is unavailable for public use.', example='123'),
}
](name='Disk', description='The monitoring data of disks.'),
filesystem?: [
{
available?: long(name='Available', description='The size of the available space.', example='35319836672'),
capacity?: long(name='Capacity', description='The total file system space.', example='41610981376'),
fsName?: string(name='FsName', description='The name of the partition.', example='/dev/root'),
usage?: long(name='Usage', description='The size of used space.', example='4368744448'),
}
](name='Filesystem', description='The monitoring data of file system partitions.'),
memory?: {
availableBytes?: long(name='AvailableBytes', description='The size of the available memory. Unit: bytes.', example='4289445888'),
cache?: long(name='Cache', description='The size of the cache. Unit: bytes.', example='7028736'),
rss?: long(name='Rss', description='The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.', example='1593344'),
usageBytes?: long(name='UsageBytes', description='The size of the used memory. Unit: bytes.', example='11153408'),
workingSet?: long(name='WorkingSet', description='The usage of the working set. Unit: bytes.', example='5521408'),
}(name='Memory', description='The monitoring data of the memory.'),
network?: {
interfaces?: [
{
name?: string(name='Name', description='The name of the NIC.', example='eth0'),
rxBytes?: long(name='RxBytes', description='The total number of bytes received.', example='505001954'),
rxDrops?: long(name='RxDrops', description='The number of packets that fail to be received.', example='0'),
rxErrors?: long(name='RxErrors', description='The number of receipt errors.', example='0'),
rxPackets?: long(name='RxPackets', description='The total number of packets received.', example='4800583'),
txBytes?: long(name='TxBytes', description='The total number of bytes sent.', example='1381805699'),
txDrops?: long(name='TxDrops', description='The number of packets that fail to arrive at their destination.', example='0'),
txErrors?: long(name='TxErrors', description='The total number of sending errors.', example='0'),
txPackets?: long(name='TxPackets', description='The total number of packets sent.', example='5158427'),
}
](name='Interfaces', description='The monitoring data of network interface controllers (NICs).'),
}(name='Network', description='The monitoring data of the network.'),
timestamp?: string(name='Timestamp', description='The time when the entry of monitoring data was collected. The time follows the RFC 3339 format.', example='2019-12-19T02:31:54Z'),
}
](name='Records', description='The details about monitoring data.'),
}
](name='MonitorDatas', description='The monitoring data of the elastic container instances.'),
requestId?: string(name='RequestId', description='The request ID.', example='B8756BA0-6452-419C-9727-37A6209C85E0'),
}
model DescribeMultiContainerGroupMetricResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeMultiContainerGroupMetricResponseBody(name='body'),
}
/**
* @summary Queries the monitoring data of elastic container instances.
*
* @description * Only the latest entry of monitoring data of each elastic container instance is returned.
* * You can query only the monitoring data of elastic container instances that are created after April 3, 2019 15:00:00 UTC+8.
*
* @param request DescribeMultiContainerGroupMetricRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeMultiContainerGroupMetricResponse
*/
async function describeMultiContainerGroupMetricWithOptions(request: DescribeMultiContainerGroupMetricRequest, runtime: Util.RuntimeOptions): DescribeMultiContainerGroupMetricResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.containerGroupIds)) {
query['ContainerGroupIds'] = request.containerGroupIds;
}
if (!Util.isUnset(request.metricType)) {
query['MetricType'] = request.metricType;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeMultiContainerGroupMetric',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the monitoring data of elastic container instances.
*
* @description * Only the latest entry of monitoring data of each elastic container instance is returned.
* * You can query only the monitoring data of elastic container instances that are created after April 3, 2019 15:00:00 UTC+8.
*
* @param request DescribeMultiContainerGroupMetricRequest
* @return DescribeMultiContainerGroupMetricResponse
*/
async function describeMultiContainerGroupMetric(request: DescribeMultiContainerGroupMetricRequest): DescribeMultiContainerGroupMetricResponse {
var runtime = new Util.RuntimeOptions{};
return describeMultiContainerGroupMetricWithOptions(request, runtime);
}
model DescribeRegionsRequest {
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model DescribeRegionsResponseBody = {
regions?: [
{
recommendZones?: [ string ](name='RecommendZones', description='The recommended zones. Recommended zones are zones that have relatively sufficient resources in the current region.'),
regionEndpoint?: string(name='RegionEndpoint', description='The endpoint for the region.', example='eci.aliyuncs.com'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
unavailableZones?: [ string ](name='UnavailableZones'),
zones?: [ string ](name='Zones', description='The queried zones.'),
}
](name='Regions', description='The queried regions.'),
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model DescribeRegionsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeRegionsResponseBody(name='body'),
}
/**
* @summary Queries the regions and zones in which Elastic Container Instance is available.
*
* @param request DescribeRegionsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeRegionsResponse
*/
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeRegions',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the regions and zones in which Elastic Container Instance is available.
*
* @param request DescribeRegionsRequest
* @return DescribeRegionsResponse
*/
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
var runtime = new Util.RuntimeOptions{};
return describeRegionsWithOptions(request, runtime);
}
model DescribeVirtualNodesRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotency of requests?](https://help.aliyun.com/document_detail/25693.html)', example='123e4567-e89b-12d3-a456-426655440000'),
limit?: long(name='Limit', description='The maximum number of resources that are allowed to return for this request. Default value: 20. Maximum value: 20.
> The number of returned resources is less than or equal to the specified number.', example='20'),
nextToken?: string(name='NextToken', description='The token that determines the start point of the next query. If this parameter is empty, all results have been returned.
You do not need to specify this parameter in the first request. From the second request, you can obtain the token from the result returned by the previous request.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the virtual nodes.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-uf66jeqopgqa9hdn****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
status?: string(name='Status', description='The status of the virtual node. Valid values:
* Pending
* Ready
* Failed', example='Ready'),
tag?: [
{
key?: string(name='Key', description='The key of tag N.', example='name'),
value?: string(name='Value', description='The value of tag N.', example='test'),
}
](name='Tag', description='The tags that are bound to the virtual node.'),
virtualNodeIds?: string(name='VirtualNodeIds', description='The IDs of the virtual nodes. You can specify up to 20 IDs. Each ID must be a string in the JSON format.', example='["vnd-2ze960zkdqrldeaw****","vnd-3ebzcviqbwt25dsz****"]'),
virtualNodeName?: string(name='VirtualNodeName', description='The names of the virtual nodes.', example='testNode'),
}
model DescribeVirtualNodesResponseBody = {
nextToken?: string(name='NextToken', description='The token that determines the start point of the next query.', example='d78f2dd8-5979-42fe-****-b16db43be5bc'),
requestId?: string(name='RequestId', description='The ID of the request.', example='9C9B9917-ED22-50D5-ADE6-9FA9D58AD05F'),
totalCount?: int32(name='TotalCount', description='The number of virtual nodes that were queried.', example='1'),
virtualNodes?: [
{
creationTime?: string(name='CreationTime', description='The time when the virtual node was created. The time follows the RFC 3339 standard and is displayed in UTC.', example='2021-09-08T15:00:00Z'),
events?: [
{
count?: int32(name='Count', description='The number of events.', example='1'),
firstTimestamp?: string(name='FirstTimestamp', description='The time when the event started.', example='2021-09-08T02:24:48Z'),
lastTimestamp?: string(name='LastTimestamp', description='The time when the event ended.', example='2021-09-08T02:24:52Z'),
message?: string(name='Message', description='The message of the event.', example='Successfully'),
name?: string(name='Name', description='The name of the object to which the event belongs.', example='test'),
reason?: string(name='Reason', description='The name of the event.', example='Created'),
type?: string(name='Type', description='The type of the event. Valid values:
* Normal
* Warning', example='Normal'),
}
](name='Events', description='The events about the virtual node.'),
internetIp?: string(name='InternetIp', description='The public IP address of the virtual node.', example='192.0.XX.XX'),
intranetIp?: string(name='IntranetIp', description='The private IP address of the virtual node.', example='10.19.XX.XX'),
regionId?: string(name='RegionId', description='The ID of the region in which the virtual node resides.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the virtual node belongs.', example='rg-uf66jeqopgqa9hdn****'),
status?: string(name='Status', description='The status of the virtual node. Valid values:
* Pending
* Ready
* Failed', example='Ready'),
tags?: [
{
key?: string(name='Key', description='The key of the tag.', example='name'),
value?: string(name='Value', description='The value of the tag.', example='test'),
}
](name='Tags', description='The tags that are bound to the virtual node.'),
virtualNodeId?: string(name='VirtualNodeId', description='The ID of the virtual node.', example='vnd-2ze960zkdqrldeaw****'),
virtualNodeName?: string(name='VirtualNodeName', description='The name of the virtual node.', example='testNode'),
virtualNodeSecurityGroupId?: string(name='VirtualNodeSecurityGroupId', description='The ID of the security group to which the virtual node belongs.', example='sg-2zeeyaaxlkq9sppl****'),
virtualNodeVSwitchId?: string(name='VirtualNodeVSwitchId', description='The ID of the vSwitch with which the virtual node is associated.', example='vsw-2ze23nqzig8inprou****'),
vpcId?: string(name='VpcId', description='The ID of the VPC to which the virtual node belongs.', example='vpc-1vzjjflab6wvjox****'),
}
](name='VirtualNodes', description='The virtual nodes that were queried.'),
}
model DescribeVirtualNodesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeVirtualNodesResponseBody(name='body'),
}
/**
* @summary Queries information about virtual nodes.
*
* @param request DescribeVirtualNodesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeVirtualNodesResponse
*/
async function describeVirtualNodesWithOptions(request: DescribeVirtualNodesRequest, runtime: Util.RuntimeOptions): DescribeVirtualNodesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.virtualNodeIds)) {
query['VirtualNodeIds'] = request.virtualNodeIds;
}
if (!Util.isUnset(request.virtualNodeName)) {
query['VirtualNodeName'] = request.virtualNodeName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeVirtualNodes',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries information about virtual nodes.
*
* @param request DescribeVirtualNodesRequest
* @return DescribeVirtualNodesResponse
*/
async function describeVirtualNodes(request: DescribeVirtualNodesRequest): DescribeVirtualNodesResponse {
var runtime = new Util.RuntimeOptions{};
return describeVirtualNodesWithOptions(request, runtime);
}
model ExecContainerCommandRequest {
command?: string(name='Command', description='The commands to run in the container. You can specify up to 20 commands. Each command can be up to 256 characters in length.\\\\
The strings must be in the JSON format. Example: `["/bin/sh", "-c", "ls -a"]`.
This parameter is required.', example='["/bin/sh", "-c", "ls -a"]'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.
This parameter is required.', example='eci-2zebxkiifulhl****'),
containerName?: string(name='ContainerName', description='The name of the container.
This parameter is required.', example='nginx'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
stdin?: boolean(name='Stdin', description='Specifies whether to read the commands from standard input (stdin). Default value: true.', example='true'),
sync?: boolean(name='Sync', description='Specifies whether to immediately run the command and synchronously return the result. Default value: false.\\\\
If this parameter is set to true, TTY must be set to false. Command cannot be set to `/bin/bash`.', example='false'),
TTY?: boolean(name='TTY', description='Specifies whether to enable interaction. Default value: false.\\\\
If the Command parameter is set to `/bin/bash`, set this parameter to true.', example='false'),
}
model ExecContainerCommandResponseBody = {
httpUrl?: string(name='HttpUrl', description='The HTTP URL. You can use this URL to enter the container within 30 seconds after this operation is called. For more information, see [Use and integrate the Elastic Container Instance terminal](https://help.aliyun.com/document_detail/202846.html).', example='https://eci.console.aliyun.com/terminal?param=X32a****'),
requestId?: string(name='RequestId', description='The request ID.', example='28B583A8-313D-4383-7817-B5A9F7E0****'),
syncResponse?: string(name='SyncResponse', description='The output of the command. This parameter is returned only if Sync is set to true.', example='Hello'),
webSocketUri?: string(name='WebSocketUri', description='The WebSocket URL. You can use this URL to establish a WebSocket connection with the container.', example='wss://eci-cn-shanghai.aliyun.com/exec/?s=ktHPx****'),
}
model ExecContainerCommandResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ExecContainerCommandResponseBody(name='body'),
}
/**
* @summary Runs commands in a container.
*
* @param request ExecContainerCommandRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ExecContainerCommandResponse
*/
async function execContainerCommandWithOptions(request: ExecContainerCommandRequest, runtime: Util.RuntimeOptions): ExecContainerCommandResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.command)) {
query['Command'] = request.command;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.containerName)) {
query['ContainerName'] = request.containerName;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.stdin)) {
query['Stdin'] = request.stdin;
}
if (!Util.isUnset(request.sync)) {
query['Sync'] = request.sync;
}
if (!Util.isUnset(request.TTY)) {
query['TTY'] = request.TTY;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ExecContainerCommand',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Runs commands in a container.
*
* @param request ExecContainerCommandRequest
* @return ExecContainerCommandResponse
*/
async function execContainerCommand(request: ExecContainerCommandRequest): ExecContainerCommandResponse {
var runtime = new Util.RuntimeOptions{};
return execContainerCommandWithOptions(request, runtime);
}
model ListTagResourcesRequest {
limit?: string(name='Limit', description='The maximum number of entries to return.', example='20'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAdDWBF2****'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the resource.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The IDs of the resources.'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* ContainerGroup: elastic container instance
* ImageCache: image cache
* DataCache: data cache
* VirtualNode: virtual node
This parameter is required.', example='ContainerGroup'),
tag?: [
{
key?: string(name='Key', description='The tag key.', example='testkey'),
value?: string(name='Value', description='The tag value.', example='testvalue'),
}
](name='Tag', description='The tags that are added to the resource.'),
}
model ListTagResourcesResponseBody = {
nextToken?: string(name='NextToken', description='The returned pagination token which can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2****'),
requestId?: string(name='RequestId', description='The request ID.', example='1340C38D-6189-54D1-86F6-7D5ECF3E0088'),
tagResources?: [
{
resourceId?: string(name='ResourceId', description='The resource ID.', example='eci-2zelg8vwnlzdhf8hv****'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* ContainerGroup: elastic container instance
* ImageCache: image cache
* DataCache: data cache
* VirtualNode: virtual node', example='ContainerGroup'),
tagKey?: string(name='TagKey', description='The key of the tag that is added to the resource.', example='testkey'),
tagValue?: string(name='TagValue', description='The value of the tag that is added to the resource.', example='testvalue'),
}
](name='TagResources', description='The queried resources.'),
}
model ListTagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListTagResourcesResponseBody(name='body'),
}
/**
* @summary Queries the tags that are added to an Elastic Container Instance resource.
*
* @param request ListTagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListTagResourcesResponse
*/
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.limit)) {
query['Limit'] = request.limit;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTagResources',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the tags that are added to an Elastic Container Instance resource.
*
* @param request ListTagResourcesRequest
* @return ListTagResourcesResponse
*/
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return listTagResourcesWithOptions(request, runtime);
}
model ListUsageRequest {
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model ListUsageResponseBody = {
attributes?: map[string]any(name='Attributes', description='The information about the used amounts and upper limits of privileges and quotas that you have in the specified region. The information contains the following items:
* UsedCpu: the number of existing vCPUs.
* MaxCpu: the upper limit of vCPUs.
* MaxImageCacheCount: the upper limit of manually created image caches.
* UsedImageCacheCount: the number of existing image caches that are manually created.
* MaxAutoImageCacheCount: the upper limit of automatically created image caches.
* UsedAutoImageCacheCount: the number of existing image caches that are automatically created.
* MaxDataCacheCount: the upper limit of DataCaches.
* UsedDataCacheCount: the number of existing DataCaches.', example='{"UsedCpu": 11,"MaxCpu": 1000,"MaxImageCacheCount": 50,"UsedImageCacheCount": 0}'),
requestId?: string(name='RequestId', description='The request ID.', example='89164E78-FC82-4684-BE97-DCDD85D26546'),
}
model ListUsageResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListUsageResponseBody(name='body'),
}
/**
* @summary Queries the used amounts and upper limits of privileges and quotas that you have in a specified region.
*
* @description This operation does not support resource group authentication.
*
* @param request ListUsageRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListUsageResponse
*/
async function listUsageWithOptions(request: ListUsageRequest, runtime: Util.RuntimeOptions): ListUsageResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListUsage',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the used amounts and upper limits of privileges and quotas that you have in a specified region.
*
* @description This operation does not support resource group authentication.
*
* @param request ListUsageRequest
* @return ListUsageResponse
*/
async function listUsage(request: ListUsageRequest): ListUsageResponse {
var runtime = new Util.RuntimeOptions{};
return listUsageWithOptions(request, runtime);
}
model ResizeContainerGroupVolumeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance.
This parameter is required.', example='eci-2zelg8vwnlzdhf8hv****'),
newSize?: long(name='NewSize', description='The size of the volume after the volume is scaled up. Unit: GiB. Valid values:
* Ultra disk (cloud_efficiency): 20 to 32768
* Standard SSD (cloud_ssd): 20 to 32768
* Enhanced SSD (cloud_essd): 20 to 32768
* Basic disk (cloud): 5 to 2000
> The capacity of the volume after the volume is scaled up must be greater than the original capacity of the volume. If the new capacity is equal to the original capacity of the volume, only the file system is scaled up.
This parameter is required.', example='100'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
volumeName?: string(name='VolumeName', description='The name of the volume that is mounted to the elastic container instance. Only disk volumes can be scaled up.
This parameter is required.', example='default-volume1'),
}
model ResizeContainerGroupVolumeResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model ResizeContainerGroupVolumeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ResizeContainerGroupVolumeResponseBody(name='body'),
}
/**
* @summary Scales up a disk volume that is mounted to an elastic container instance.
*
* @description ## [](#)Usage notes
* * You can scale up volumes by calling this operation. You cannot scale down volumes by calling this operation.
* * Only volumes of the disk type can be scaled up. Volumes of other types cannot be scaled up.
*
* @param request ResizeContainerGroupVolumeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ResizeContainerGroupVolumeResponse
*/
async function resizeContainerGroupVolumeWithOptions(request: ResizeContainerGroupVolumeRequest, runtime: Util.RuntimeOptions): ResizeContainerGroupVolumeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.newSize)) {
query['NewSize'] = request.newSize;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.volumeName)) {
query['VolumeName'] = request.volumeName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ResizeContainerGroupVolume',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Scales up a disk volume that is mounted to an elastic container instance.
*
* @description ## [](#)Usage notes
* * You can scale up volumes by calling this operation. You cannot scale down volumes by calling this operation.
* * Only volumes of the disk type can be scaled up. Volumes of other types cannot be scaled up.
*
* @param request ResizeContainerGroupVolumeRequest
* @return ResizeContainerGroupVolumeResponse
*/
async function resizeContainerGroupVolume(request: ResizeContainerGroupVolumeRequest): ResizeContainerGroupVolumeResponse {
var runtime = new Util.RuntimeOptions{};
return resizeContainerGroupVolumeWithOptions(request, runtime);
}
model RestartContainerGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence of a request?](https://help.aliyun.com/document_detail/25693.html)', example='123e4567-e89b-12d3-a456-426655440000'),
containerGroupId?: string(name='ContainerGroupId', description='The instance ID.
This parameter is required.', example='eci-2zelg8vwnlzdhf8hv****'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
}
model RestartContainerGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='45D5B0AD-3B00-4A9B-9911-6D5303B06712'),
}
model RestartContainerGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: RestartContainerGroupResponseBody(name='body'),
}
/**
* @summary Restarts an elastic container instance.
*
* @description * Only elastic container instances that are in the Pending or Running state can be restarted. Instances that are in the Succeeded or Failed state cannot be restarted.
* * Elastic container instances that were created before 15:00:00 on March 7, 2019 cannot be restarted.
* * When an elastic container instance is being restarted, its status changes into Restarting.
*
* @param request RestartContainerGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return RestartContainerGroupResponse
*/
async function restartContainerGroupWithOptions(request: RestartContainerGroupRequest, runtime: Util.RuntimeOptions): RestartContainerGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'RestartContainerGroup',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Restarts an elastic container instance.
*
* @description * Only elastic container instances that are in the Pending or Running state can be restarted. Instances that are in the Succeeded or Failed state cannot be restarted.
* * Elastic container instances that were created before 15:00:00 on March 7, 2019 cannot be restarted.
* * When an elastic container instance is being restarted, its status changes into Restarting.
*
* @param request RestartContainerGroupRequest
* @return RestartContainerGroupResponse
*/
async function restartContainerGroup(request: RestartContainerGroupRequest): RestartContainerGroupResponse {
var runtime = new Util.RuntimeOptions{};
return restartContainerGroupWithOptions(request, runtime);
}
model TagResourcesRequest {
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the resource.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The IDs of the resources.
This parameter is required.'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* ContainerGroup: elastic container instance
* ImageCache: image cache
* DataCache: data cache
* VirtualNode: virtual node
This parameter is required.', example='ContainerGroup'),
tag?: [
{
key?: string(name='Key', description='The tag key. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `acs:` or `aliyun`.', example='testkey'),
value?: string(name='Value', description='The tag value. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`.', example='testvalue'),
}
](name='Tag', description='The tags that you want to add to the resource. A maximum of 20 tags can be added to a resource.
This parameter is required.'),
}
model TagResourcesResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='0E234675-3465-4CC3-9D0F-9A864BC391DD'),
}
model TagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TagResourcesResponseBody(name='body'),
}
/**
* @summary Adds tags to an Elastic Container Instance resource.
*
* @param request TagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return TagResourcesResponse
*/
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'TagResources',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Adds tags to an Elastic Container Instance resource.
*
* @param request TagResourcesRequest
* @return TagResourcesResponse
*/
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return tagResourcesWithOptions(request, runtime);
}
model UntagResourcesRequest {
all?: boolean(name='All', description='Specifies whether to remove all tags from the resource. This parameter is valid only when the `TagKey` parameter is not specified in the request. Valid values:
* true
* false
Default value: false.', example='false'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-xxx-xxx-xxxx-42665544xxxx'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the resource.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The IDs of the resources.
This parameter is required.'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* ContainerGroup: elastic container instance
* ImageCache: image cache
* DataCache: data cache
* VirtualNode: virtual node
This parameter is required.', example='ContainerGroup'),
tagKey?: [ string ](name='TagKey', description='The keys of the tags that you want to remove from the resource. You can enter up to 20 tag keys.'),
}
model UntagResourcesResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B'),
}
model UntagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UntagResourcesResponseBody(name='body'),
}
/**
* @summary Removes tags from an Elastic Container Instance resource.
*
* @param request UntagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UntagResourcesResponse
*/
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.all)) {
query['All'] = request.all;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tagKey)) {
query['TagKey'] = request.tagKey;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UntagResources',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Removes tags from an Elastic Container Instance resource.
*
* @param request UntagResourcesRequest
* @return UntagResourcesResponse
*/
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return untagResourcesWithOptions(request, runtime);
}
model UpdateContainerGroupRequest {
dnsConfig?: {
nameServer?: [ string ](name='NameServer', description='The IP addresses of DNS servers.', example='1.2.3.4'),
option?: [
{
name?: string(name='Name', description='The option name of DNS configurations.', example='ndots'),
value?: string(name='Value', description='The option value of DNS configurations.', example='2'),
}
](name='Option', description='The configurations of DNS.'),
search?: [ string ](name='Search', description='The search domains of the Domain Name System (DNS) server.', example='my.dns.search.suffix'),
}(name='DnsConfig'),
acrRegistryInfo?: [
{
domain?: [ string ](name='Domain', description='The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify specific domain names. Separate multiple domain names with commas (,).'),
instanceId?: string(name='InstanceId', description='The ID of the Container Registry Enterprise Edition instance.', example='cri-nwj395hgf6f3****'),
instanceName?: string(name='InstanceName', description='The name of the Container Registry Enterprise Edition instance.', example='acr-test'),
regionId?: string(name='RegionId', description='The ID of the region where the Container Registry Enterprise Edition instance resides.', example='cn-beijing'),
}
](name='AcrRegistryInfo', description='Details of the Container Registry Enterprise Edition instance that hosts the image of the init container.'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotency](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-426655440000'),
container?: [
{
livenessProbe?: {
exec?: {
command?: [ string ](name='Command'),
}(name='Exec'),
failureThreshold?: int32(name='FailureThreshold'),
httpGet?: {
path?: string(name='Path'),
port?: int32(name='Port'),
scheme?: string(name='Scheme'),
}(name='HttpGet'),
initialDelaySeconds?: int32(name='InitialDelaySeconds'),
periodSeconds?: int32(name='PeriodSeconds'),
successThreshold?: int32(name='SuccessThreshold'),
tcpSocket?: {
port?: int32(name='Port'),
}(name='TcpSocket'),
timeoutSeconds?: int32(name='TimeoutSeconds'),
}(name='LivenessProbe'),
readinessProbe?: {
exec?: {
command?: [ string ](name='Command'),
}(name='Exec'),
failureThreshold?: int32(name='FailureThreshold'),
httpGet?: {
path?: string(name='Path'),
port?: int32(name='Port'),
scheme?: string(name='Scheme'),
}(name='HttpGet'),
initialDelaySeconds?: int32(name='InitialDelaySeconds'),
periodSeconds?: int32(name='PeriodSeconds'),
successThreshold?: int32(name='SuccessThreshold'),
tcpSocket?: {
port?: int32(name='Port'),
}(name='TcpSocket'),
timeoutSeconds?: int32(name='TimeoutSeconds'),
}(name='ReadinessProbe'),
securityContext?: {
capability?: {
add?: [ string ](name='Add'),
}(name='Capability'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem'),
runAsUser?: long(name='RunAsUser'),
}(name='SecurityContext'),
arg?: [ string ](name='Arg', description='The arguments that you want to pass to the startup command of the container. You can specify up to 10 arguments.', example='hello'),
command?: [ string ](name='Command', description='The commands that you want to run to perform the health check.', example='echo'),
cpu?: float(name='Cpu', description='The number of vCPUs that you want to allocate to the container', example='1.0'),
environmentVar?: [
{
fieldRef?: {
fieldPath?: string(name='FieldPath'),
}(name='FieldRef'),
key?: string(name='Key', description='The name of the environment variable for the container.', example='PATH'),
value?: string(name='Value', description='The value of the environment variable for the container.', example='/usr/bin/local/'),
}
](name='EnvironmentVar', description='The environment variables for the container.'),
gpu?: int32(name='Gpu', description='The number of GPUs that you want to allocate to the container.', example='1'),
image?: string(name='Image', description='The image of the container.', example='jenkins'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The image pulling policy. Valid values:
* Always: Each time the instance is updated, image pulling is performed.
* IfNotPresent: On-premises images are used first. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Never'),
lifecyclePostStartHandlerExec?: [ string ](name='LifecyclePostStartHandlerExec', description='The commands to be executed in the container when you use the CLI to specify the postStart callback function.', example='hide'),
lifecyclePostStartHandlerHttpGetHost?: string(name='LifecyclePostStartHandlerHttpGetHost', description='The IP address of the host that receives the HTTP GET request when you use an HTTP request to specify the postStart callback function.', example='hide'),
lifecyclePostStartHandlerHttpGetHttpHeaders?: [
{
name?: string(name='Name', description='The request parameter of the HTTP GET request when you use an HTTP request to specify the postStart callback function.', example='testValue'),
value?: string(name='Value', description='The request parameter value of the HTTP GET request when you use an HTTP request to specify the postStart callback function.', example='test'),
}
](name='LifecyclePostStartHandlerHttpGetHttpHeaders', description='The information about the valid HTTP request headers among the generated HTTP request headers.'),
lifecyclePostStartHandlerHttpGetPath?: string(name='LifecyclePostStartHandlerHttpGetPath', description='The path to which the system sends an HTTP GET request for a health check when you use an HTTP request to specify the postStart callback function.', example='/healthyz'),
lifecyclePostStartHandlerHttpGetPort?: int32(name='LifecyclePostStartHandlerHttpGetPort', description='The port to which the system sends the HTTP GET request when you use an HTTP request to specify the postStart callback function.', example='1'),
lifecyclePostStartHandlerHttpGetScheme?: string(name='LifecyclePostStartHandlerHttpGetScheme', description='The path to which the system sends an HTTP GET request for a health check when you use an HTTP request to specify the postStart callback function.', example='/healthyz'),
lifecyclePostStartHandlerTcpSocketHost?: string(name='LifecyclePostStartHandlerTcpSocketHost', description='The IP address of the host that receives the TCP socket request when you use a TCP socket request to specify the postStart callback function.', example='10.0.XX.XX'),
lifecyclePostStartHandlerTcpSocketPort?: int32(name='LifecyclePostStartHandlerTcpSocketPort', description='The port to which the system sends a TCP socket request for a health check when you use TCP sockets to specify the postStart callback function.', example='1'),
lifecyclePreStopHandlerExec?: [ string ](name='LifecyclePreStopHandlerExec', description='The commands to be executed in the container when you use the CLI to specify the preStop callback function.', example='hide'),
lifecyclePreStopHandlerHttpGetHost?: string(name='LifecyclePreStopHandlerHttpGetHost', description='The IP address of the host that receives the HTTP GET request when you use an HTTP request to specify the preStop callback function.', example='10.0.XX.XX'),
lifecyclePreStopHandlerHttpGetHttpHeader?: [
{
name?: string(name='Name', description='The request parameter of the HTTP GET request when you use an HTTP request to specify the preStop callback function.', example='test'),
value?: string(name='Value', description='The request parameter value of the HTTP GET request when you use an HTTP request to specify the preStop callback function.', example='testValue'),
}
](name='LifecyclePreStopHandlerHttpGetHttpHeader', description='The information about the generated HTTP request header.'),
lifecyclePreStopHandlerHttpGetPath?: string(name='LifecyclePreStopHandlerHttpGetPath', description='The path to which the system sends an HTTP GET request for a health check when you use an HTTP request to specify the preSop callback function.', example='/healthyz'),
lifecyclePreStopHandlerHttpGetPort?: int32(name='LifecyclePreStopHandlerHttpGetPort', description='The port to which the system sends the HTTP GET request for a health check when you use an HTTP request to specify the preStop callback function.', example='1'),
lifecyclePreStopHandlerHttpGetScheme?: string(name='LifecyclePreStopHandlerHttpGetScheme', description='The protocol type of the HTTP GET request when you use an HTTP request to specify the preStop callback function. Valid values:
* HTTP
* HTTPS', example='HTTP'),
lifecyclePreStopHandlerTcpSocketHost?: string(name='LifecyclePreStopHandlerTcpSocketHost', description='The IP address of the host that receives the TCP socket request when you use a TCP socket request to specify the preStop callback function.', example='10.0.XX.XX'),
lifecyclePreStopHandlerTcpSocketPort?: int32(name='LifecyclePreStopHandlerTcpSocketPort', description='The port to which the system sends a TCP socket request for a health check when you use TCP sockets to specify the preStop callback function.', example='80'),
memory?: float(name='Memory', description='The memory size of the container.', example='2.0'),
name?: string(name='Name', description='The name of the container.', example='jenkins'),
port?: [
{
port?: int32(name='Port', description='The port number. Valid values: 1 to 65535.', example='8080'),
protocol?: string(name='Protocol', description='The protocol of the container. Valid values: TCP and UDP.', example='TCP'),
}
](name='Port', description='The port to which the system sends an HTTP GET request for a health check.'),
stdin?: boolean(name='Stdin', description='Specifies whether the container allocates buffer resources to standard input streams when the container is running. If you do not specify this parameter, an end-of-file (EOF) error may occur when standard input streams in the container are read. Default value: false.', example='false'),
stdinOnce?: boolean(name='StdinOnce', description='Specifies whether standard input streams are disconnected after a client is disconnected. If Stdin is set to true, standard input streams remain connected among multiple sessions. If StdinOnce is set to true, standard input streams are connected after the container is started, and remain idle until a client is connected to receive data. After the client is disconnected, streams are also disconnected, and remain disconnected until the container restarts.', example='true'),
tty?: boolean(name='Tty', description='Specifies whether to enable interaction. Default value: false. If the command is a /bin/bash command, set the value to true.', example='false'),
volumeMount?: [
{
mountPath?: string(name='MountPath', description='The directory of the volume that is mounted to the container. The data in this directory is overwritten by the data on the volume. Specify this parameter with caution.', example='/usr/share/'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
* None: This volume mount does not receive subsequent mounts that are performed on this volume or subdirectories of this volume.
* HostToCotainer: The volume mount receives subsequent mounts that are performed on this volume or the subdirectories of this volume.
* Bidirectional: The volume mount behaves the same as the HostToContainer mount. The volume mount receives subsequent mounts that are performed on the volume or the subdirectories of the volume. In addition, all volume mounts that are mounted on the container are propagated back to the host and all containers of all pods that use the same volume.
Default value: None.', example='None'),
name?: string(name='Name', description='The name of the volume that is mounted to the container. Valid values: the values of Volume.N.Name, which are the names of volumes that are mounted to the elastic container instance.', example='test-empty'),
readOnly?: boolean(name='ReadOnly', description='Specifies whether the volume is read-only. Default value: false.', example='false'),
subPath?: string(name='SubPath', description='The subdirectory of the volume that is mounted to the container. You can use this parameter to mount the same volume to different subdirectories of the container.', example='/usr/share/sub/'),
}
](name='VolumeMount', description='Pod volumes that you want to mount into the filesystem of the container.'),
workingDir?: string(name='WorkingDir', description='The working directory of the container.', example='/usr/share/'),
}
](name='Container', description='The new configurations of the container group.'),
containerGroupId?: string(name='ContainerGroupId', description='The ID of the elastic container instance that you want to update.
This parameter is required.', example='eci-2zelg8vwnlzdhf8hv****'),
cpu?: float(name='Cpu', description='The number of vCPUs that are allocated to the elastic container instance.', example='2.0'),
imageRegistryCredential?: [
{
password?: string(name='Password', description='The password that you use to access the image repository.', example='yourpassword'),
server?: string(name='Server', description='The address of the image repository. This address does not contain `http://` or `https://`.', example='registry.cn-shanghai.aliyuncs.com/ecitest/nginx:alpine'),
userName?: string(name='UserName', description='The username that you use to access the image repository.', example='yourname'),
}
](name='ImageRegistryCredential', description='The information about the credentials of the image repository.'),
initContainer?: [
{
securityContext?: {
capability?: {
add?: [ string ](name='Add'),
}(name='Capability'),
readOnlyRootFilesystem?: boolean(name='ReadOnlyRootFilesystem'),
runAsUser?: long(name='RunAsUser'),
}(name='SecurityContext'),
arg?: [ string ](name='Arg', description='The arguments that you want to pass to the startup command of the init container.', example='10'),
command?: [ string ](name='Command', description='The commands that are used to start the init container.', example='/bin/sh sleep'),
cpu?: float(name='Cpu', description='The number of vCPUs that you want to allocate to the init container.', example='2.0'),
environmentVar?: [
{
fieldRef?: {
fieldPath?: string(name='FieldPath'),
}(name='FieldRef'),
key?: string(name='Key', description='The name of the environment variable for the init container.', example='PATH'),
value?: string(name='Value', description='The value of the environment variable for the init container.', example='/usr/local/bin'),
}
](name='EnvironmentVar', description='The environment variable of the init container.'),
gpu?: int32(name='Gpu', description='The number of GPUs you want to allocate to the init container.', example='1'),
image?: string(name='Image', description='The image of the init container.', example='nginx'),
imagePullPolicy?: string(name='ImagePullPolicy', description='The image pulling policy. Valid values:
* Always: Each time the instance is updated, image pulling is performed.
* IfNotPresent: On-premises images are used first. If no on-premises images are available, image pulling is performed.
* Never: On-premises images are always used. Image pulling is not performed.', example='Onfailure'),
memory?: float(name='Memory', description='The memory size of the init container.', example='4.0'),
name?: string(name='Name', description='The name of the init container.', example='init-nginx'),
port?: [
{
port?: int32(name='Port', description='The port number of the init container. Valid values: 1 to 65535.', example='9000'),
protocol?: string(name='Protocol', description='The protocol of the init container. Valid values: TCP and UDP.', example='TCP'),
}
](name='Port', description='The port number. Valid values: 1 to 65535.'),
stdin?: boolean(name='Stdin', description='Specifies whether the init container allocates buffer resources to standard input streams when the init container is running. If you do not specify this parameter, an EOF error may occur when standard input streams in the init container are read. Default value: false.', example='false'),
stdinOnce?: boolean(name='StdinOnce', description='Specifies whether standard input streams are disconnected after a client is disconnected. If Stdin is set to true, standard input streams remain connected among multiple sessions. If StdinOnce is set to true, standard input streams are connected after the init container is started, and remain idle until a client is connected to receive data. After the client is disconnected, streams are also disconnected, and remain disconnected until the init container restarts.', example='true'),
tty?: boolean(name='Tty', description='Specifies whether to enable interaction. Default value: false. If the command is a /bin/bash command, set the value to true.', example='true'),
volumeMount?: [
{
mountPath?: string(name='MountPath', description='The mount directory of the init container. The data in this directory is overwritten by the data on the volume. Specify this parameter with caution.', example='/pod/data'),
mountPropagation?: string(name='MountPropagation', description='The mount propagation settings of the volume. Mount propagation allows volumes that are mounted on one container to be shared with other containers in the same pod, or even with other pods on the same node. Valid values:
* None: The volume mount does not receive subsequent mounts that are performed on this volume or subdirectories of this volume.
* HostToContainer: The volume mount receives all subsequent mounts that are performed on this volume or subdirectories of this volume.
* Bidirectional: The volume mount behaves the same as the HostToContainer mount. The volume mount receives subsequent mounts that are performed on the volume or the subdirectories of the volume. In addition, all volume mounts that are mounted on the container are propagated back to the host and all containers of all pods that use the same volume.
Default value: None.', example='None'),
name?: string(name='Name', description='The name of the volume that is mounted to the init container. Valid values: the values of Volume.N.Name, which are the names of volumes that are mounted to the elastic container instance.', example='default-volume1'),
readOnly?: boolean(name='ReadOnly', description='Specifies whether the volume is read-only. Default value: false.', example='false'),
subPath?: string(name='SubPath', description='The subdirectory of the volume that is mounted to the init container. You can use this parameter to mount the same volume to different subdirectories of the init container.', example='data2/'),
}
](name='VolumeMount', description='The information about the volume that you want to mount on the init container.'),
workingDir?: string(name='WorkingDir', description='The working directory of the init container.', example='/bin/local/'),
}
](name='InitContainer', description='The information about the new init container.'),
memory?: float(name='Memory', description='The size of the memory that is allocated to the elastic container instance. Unit: GiB.', example='4.0'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the instance.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-2df3isufhi38****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
restartPolicy?: string(name='RestartPolicy', description='The restart policy of the elastic container instance. Valid values:
* Always: Always restarts the instance if a container in the instance exits upon termination.
* Never: Never restarts the instance if a container in the instance exits upon termination.
* OnFailure: Restarts the instance only if a container in the instance exists upon failure with a status code of non-zero.', example='Always'),
tag?: [
{
key?: string(name='Key', description='The tag key.', example='name'),
value?: string(name='Value', description='The tag value.', example='hxh'),
}
](name='Tag', description='The tags that are bound to the instance.'),
updateType?: string(name='UpdateType', description='The update type. Valid values:
* RenewUpdate: full updates. You must specify all relevant parameters to update the elastic container instance. For a parameter of the list type, you must specify all the items contained in the parameter even if you want to update only some of the items. For a parameter of the struct type, you must specify all the members even if you want to update only some of the members.
* IncrementalUpdate: incremental updates. You may specify only the parameter that you want to update. Other related parameters remain unchanged.
Default value: RenewUpdate.', example='RenewUpdate'),
volume?: [
{
configFileVolume?: {
configFileToPath?: [
{
content?: string(name='Content'),
path?: string(name='Path'),
}
](name='ConfigFileToPath'),
}(name='ConfigFileVolume'),
emptyDirVolume?: {
medium?: string(name='Medium'),
sizeLimit?: string(name='SizeLimit'),
}(name='EmptyDirVolume'),
flexVolume?: {
driver?: string(name='Driver'),
fsType?: string(name='FsType'),
options?: string(name='Options'),
}(name='FlexVolume'),
hostPathVolume?: {
path?: string(name='Path'),
type?: string(name='Type'),
}(name='HostPathVolume'),
NFSVolume?: {
path?: string(name='Path'),
readOnly?: boolean(name='ReadOnly'),
server?: string(name='Server'),
}(name='NFSVolume'),
name?: string(name='Name', description='The volume name.', example='test-empty'),
type?: string(name='Type', description='The type of the HostPath volume. Valid values:
* Directory
* File
> This parameter is not publicly available.', example='EmptyDirVolume'),
}
](name='Volume', description='The volumes that are mounted to the instance.'),
}
model UpdateContainerGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='CB8D2B22-D636-4182-****-1FC9DBDAD66F'),
}
model UpdateContainerGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateContainerGroupResponseBody(name='body'),
}
/**
* @summary Updates an elastic container instance.
*
* @description * Only elastic container instances that are in the Pending or Running state can be updated. After you call this operation to update an elastic container instance, the instance enters the Updating state.
* * If the RestartPolicy parameter is set to Never for the elastic container instance that you are updating, the containers of the instance may fail. Exercise caution if you want to update the kind of instances.
*
* @param request UpdateContainerGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateContainerGroupResponse
*/
async function updateContainerGroupWithOptions(request: UpdateContainerGroupRequest, runtime: Util.RuntimeOptions): UpdateContainerGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acrRegistryInfo)) {
query['AcrRegistryInfo'] = request.acrRegistryInfo;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.container)) {
query['Container'] = request.container;
}
if (!Util.isUnset(request.containerGroupId)) {
query['ContainerGroupId'] = request.containerGroupId;
}
if (!Util.isUnset(request.cpu)) {
query['Cpu'] = request.cpu;
}
if (!Util.isUnset(request.imageRegistryCredential)) {
query['ImageRegistryCredential'] = request.imageRegistryCredential;
}
if (!Util.isUnset(request.initContainer)) {
query['InitContainer'] = request.initContainer;
}
if (!Util.isUnset(request.memory)) {
query['Memory'] = request.memory;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.restartPolicy)) {
query['RestartPolicy'] = request.restartPolicy;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.updateType)) {
query['UpdateType'] = request.updateType;
}
if (!Util.isUnset(request.volume)) {
query['Volume'] = request.volume;
}
if (!Util.isUnset(request.dnsConfig)) {
query['DnsConfig'] = request.dnsConfig;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateContainerGroup',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Updates an elastic container instance.
*
* @description * Only elastic container instances that are in the Pending or Running state can be updated. After you call this operation to update an elastic container instance, the instance enters the Updating state.
* * If the RestartPolicy parameter is set to Never for the elastic container instance that you are updating, the containers of the instance may fail. Exercise caution if you want to update the kind of instances.
*
* @param request UpdateContainerGroupRequest
* @return UpdateContainerGroupResponse
*/
async function updateContainerGroup(request: UpdateContainerGroupRequest): UpdateContainerGroupResponse {
var runtime = new Util.RuntimeOptions{};
return updateContainerGroupWithOptions(request, runtime);
}
model UpdateDataCacheRequest {
bucket?: string(name='Bucket', description='The bucket in which the data cache is stored. Default value: default.', example='default'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate a token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence](https://help.aliyun.com/document_detail/25693.html).', example='2f22dc16-cad0-4d3f-87e5-91e604756547'),
dataCacheId?: string(name='DataCacheId', description='The data cache ID.', example='edc-bp1a7n7uawwwol******'),
dataSource?: {
options?: map[string]string(name='Options', description='The parameters that are configured for the data source.'),
type?: string(name='Type', description='The type of the data source. Valid values:
* URL
* NAS
* OSS
* SNAPSHOT', example='NAS'),
}(name='DataSource', description='The information about the data source.'),
eipCreateParam?: {
bandwidth?: int32(name='Bandwidth', description='The bandwidth of the EIP. Unit: Mbit/s. Default value: 5.', example='10'),
commonBandwidthPackage?: string(name='CommonBandwidthPackage', description='The EIP bandwidth plan to be associated.', example='cbwp-2zeukbj916scmj51m****'),
ISP?: string(name='ISP', description='The line type of the EIP. Valid values:
* BGP (default): BGP (Multi-ISP) line
* BGP_PRO: BGP (Multi-ISP) Pro line', example='BGP'),
internetChargeType?: string(name='InternetChargeType', description='The metering method of the EIP. Valid values:
* PayByBandwidth: pay-by-bandwidth
* PayByTraffic: pay-by-data-transfer', example='PayByTraffic'),
publicIpAddressPoolId?: string(name='PublicIpAddressPoolId', description='The ID of the IP address pool. The EIP is allocated from the IP address pool. You cannot use the IP address pool feature by default. To use this feature, you must apply for the privilege in the Quota Center console.', example='pippool-bp187arfugi543y1s****'),
}(name='EipCreateParam', description='The elastic IP address (EIP) to be created and associated. If no NAT gateway is configured for the virtual private cloud (VPC), you can associate an EIP to pull data from the Internet.'),
eipInstanceId?: string(name='EipInstanceId', description='The ID of the elastic IP address (EIP). If no NAT gateway is configured for the virtual private cloud (VPC), you can bind an EIP to the elastic container instance to pull data from the Internet.', example='eip-2zedsm5mfl3uhdj2d****'),
name?: string(name='Name', description='The data cache name.', example='test'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmzw2jz2z****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
retentionDays?: int32(name='RetentionDays', description='The retention period for the data cache. The data cache is deleted after the retention period expires. By default, the data cache does not expire.', example='7'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group.', example='sg-2ze81zoc3yl7a3we****'),
size?: int32(name='Size', description='The data cache size.', example='20'),
tag?: [
{
key?: string(name='Key', description='The tag key.', example='testkey'),
value?: string(name='Value', description='The tag value.', example='testvalue'),
}
](name='Tag', description='The tags that are added to the data cache.'),
vSwitchId?: string(name='VSwitchId', description='The vSwitch ID.', example='vsw-2ze23nqzig8inprou****'),
}
model UpdateDataCacheResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='BD8BBB43-8E05-5F46-89A9-2512D8A324A2'),
}
model UpdateDataCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateDataCacheResponseBody(name='body'),
}
/**
* @summary Updates a data cache.
*
* @param request UpdateDataCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateDataCacheResponse
*/
async function updateDataCacheWithOptions(request: UpdateDataCacheRequest, runtime: Util.RuntimeOptions): UpdateDataCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucket)) {
query['Bucket'] = request.bucket;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dataCacheId)) {
query['DataCacheId'] = request.dataCacheId;
}
if (!Util.isUnset(request.dataSource)) {
query['DataSource'] = request.dataSource;
}
if (!Util.isUnset(request.eipCreateParam)) {
query['EipCreateParam'] = request.eipCreateParam;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.size)) {
query['Size'] = request.size;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateDataCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Updates a data cache.
*
* @param request UpdateDataCacheRequest
* @return UpdateDataCacheResponse
*/
async function updateDataCache(request: UpdateDataCacheRequest): UpdateDataCacheResponse {
var runtime = new Util.RuntimeOptions{};
return updateDataCacheWithOptions(request, runtime);
}
model UpdateImageCacheRequest {
acrRegistryInfo?: [
{
domain?: [ string ](name='Domain', description='The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify multiple domain names. Separate multiple domain names with commas (,).', example='test****-registry.cn-hangzhou.cr.aliyuncs.com'),
instanceId?: string(name='InstanceId', description='The ID of the Container Registry Enterprise Edition instance.', example='cri-nwj395hgf6f3****'),
instanceName?: string(name='InstanceName', description='The name of the Container Registry Enterprise Edition instance.', example='test****'),
regionId?: string(name='RegionId', description='The region ID of the Container Registry Enterprise Edition instance.', example='cn-hangzhou'),
}
](name='AcrRegistryInfo', description='The information about the Container Registry Enterprise Edition instance.'),
autoMatchImageCache?: boolean(name='AutoMatchImageCache', description='Specifies whether to enable reuse of image cache layers. If you enable this feature and the image cache that you want to create and an existing image cache contain duplicate image layers, the system reuses the duplicate image layers to create the new image cache. This accelerates the creation of the image cache. Valid values:
* true
* false
Default value: false.', example='true'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure the idempotence of a request?](https://help.aliyun.com/document_detail/25693.html)', example='123e4567-xxx-xxx-xxxx-42665544xxxx'),
eipInstanceId?: string(name='EipInstanceId', description='The ID of the elastic IP address (EIP). If you want to pull public images, you must make sure that the elastic container instance can access the Internet. To enable Internet access, you can configure an EIP or a NAT gateway for the instance.', example='eip-2zedsm5mfl3uhdj2d****'),
eliminationStrategy?: string(name='EliminationStrategy', description='The elimination policy for the image cache. This parameter is empty by default, which indicates that the image cache is always retained.
You can set this parameter to LRU, which indicates that the image cache can be automatically deleted. When the number of image caches reaches the quota, the system automatically deletes the image caches whose EliminationStrategy parameter is set to LRU and that are least recently used.', example='LRU'),
flash?: boolean(name='Flash', description='Specifies whether to enable the instant image cache feature. The feature can accelerate the creation of image caches. Valid values:
* true
* false
Default value: false.', example='true'),
flashCopyCount?: int32(name='FlashCopyCount', description='The number of duplicates of temporary local snapshots. By default, the system creates one snapshot for each image cache. If you use the image cache to create multiple elastic container instances at a time, we recommend that you configure this parameter to create multiple snapshot duplicates for the image cache. We recommend that you create one snapshot duplicate for creation of every 1,000 elastic container instances.
> If you enable the instant image cache feature by setting Flash to true, a local snapshot is first created during the creation of the image cache. After the local snapshot is created, regular snapshots start to be created. After the regular snapshots are created, the local snapshot is automatically deleted.', example='7'),
image?: [ string ](name='Image', description='Container images that are used to create the image cache.', example='registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl'),
imageCacheId?: string(name='ImageCacheId', description='The ID of the image cache.
This parameter is required.', example='imc-bp195erqe9o2pb09****'),
imageCacheName?: string(name='ImageCacheName', description='The name of the image cache.', example='testcache'),
imageCacheSize?: int32(name='ImageCacheSize', description='The size of the image cache. Unit: GiB. Default value: 20.', example='20'),
imageRegistryCredential?: [
{
password?: string(name='Password', description='The password that is used to access the image repository.', example='password'),
server?: string(name='Server', description='The image repository address without `http://` or `https://` as a prefix.', example='registry-vpc.cn-hangzhou.aliyuncs.com'),
userName?: string(name='UserName', description='The username that is used to access the image repository.', example='username'),
}
](name='ImageRegistryCredential', description='The information about the image repository.'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the image cache.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the image cache belongs.', example='rg-aekzh43v*****'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
retentionDays?: int32(name='RetentionDays', description='The retention period of the image cache. Unit: days. When the retention period elapses, the image cache expires and is deleted. By default, image caches never expire.
> The image caches that fail to be created are retained for only 1 day.', example='7'),
securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group to which the image cache belongs.', example='sg-uf66jeqopgqa9hdn****'),
standardCopyCount?: int32(name='StandardCopyCount', description='The number of duplicates of regular snapshots. By default, the system creates one snapshot for each image cache. If you use the image cache to create multiple elastic container instances at a time, we recommend that you configure this parameter to create multiple snapshot duplicates for the image cache. We recommend that you create one snapshot duplicate for creation of every 1,000 elastic container instances.
> If you disable the instant image cache feature by setting Flash to false, only regular snapshots are generated when you create an image cache.', example='7'),
tag?: [
{
key?: string(name='Key', description='The key of tag N to add to the image cache.', example='imc'),
value?: string(name='Value', description='The value of tag N to add to the image cache.', example='test'),
}
](name='Tag', description='The tags to add to the image cache. A maximum of 20 tags can be added to the image cache.'),
vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the image cache is connected.', example='vsw-uf6h3rbwbm90urjwa****'),
}
model UpdateImageCacheResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='0E234675-3465-4CC3-9D0F-9A864BC391DD'),
}
model UpdateImageCacheResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateImageCacheResponseBody(name='body'),
}
/**
* @summary Updates an image cache.
*
* @description Only image caches that are in the Ready or UpdateFailed state can be updated.
*
* @param request UpdateImageCacheRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateImageCacheResponse
*/
async function updateImageCacheWithOptions(request: UpdateImageCacheRequest, runtime: Util.RuntimeOptions): UpdateImageCacheResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acrRegistryInfo)) {
query['AcrRegistryInfo'] = request.acrRegistryInfo;
}
if (!Util.isUnset(request.autoMatchImageCache)) {
query['AutoMatchImageCache'] = request.autoMatchImageCache;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.eipInstanceId)) {
query['EipInstanceId'] = request.eipInstanceId;
}
if (!Util.isUnset(request.eliminationStrategy)) {
query['EliminationStrategy'] = request.eliminationStrategy;
}
if (!Util.isUnset(request.flash)) {
query['Flash'] = request.flash;
}
if (!Util.isUnset(request.flashCopyCount)) {
query['FlashCopyCount'] = request.flashCopyCount;
}
if (!Util.isUnset(request.image)) {
query['Image'] = request.image;
}
if (!Util.isUnset(request.imageCacheId)) {
query['ImageCacheId'] = request.imageCacheId;
}
if (!Util.isUnset(request.imageCacheName)) {
query['ImageCacheName'] = request.imageCacheName;
}
if (!Util.isUnset(request.imageCacheSize)) {
query['ImageCacheSize'] = request.imageCacheSize;
}
if (!Util.isUnset(request.imageRegistryCredential)) {
query['ImageRegistryCredential'] = request.imageRegistryCredential;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.securityGroupId)) {
query['SecurityGroupId'] = request.securityGroupId;
}
if (!Util.isUnset(request.standardCopyCount)) {
query['StandardCopyCount'] = request.standardCopyCount;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.vSwitchId)) {
query['VSwitchId'] = request.vSwitchId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateImageCache',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Updates an image cache.
*
* @description Only image caches that are in the Ready or UpdateFailed state can be updated.
*
* @param request UpdateImageCacheRequest
* @return UpdateImageCacheResponse
*/
async function updateImageCache(request: UpdateImageCacheRequest): UpdateImageCacheResponse {
var runtime = new Util.RuntimeOptions{};
return updateImageCacheWithOptions(request, runtime);
}
model UpdateVirtualNodeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotency of requests?](https://help.aliyun.com/document_detail/25693.html)', example='123e4567-e89b-12d3-a456-426655440000'),
clusterDNS?: string(name='ClusterDNS', description='The IP address of the DNS server. If `dnsPolicy=ClusterFirst` is configured for the Elastic Container Instance pod, Elastic Container Instance uses the configuration to provide DNS services to containers. You can configure multiple IP addresses. Separate multiple IP addresses with commas (,).', example='100.1.XX.XX'),
clusterDomain?: string(name='ClusterDomain', description='The domain name of the cluster. If this parameter is specified, in addition to the search domain of the host, Kubelet configures all containers to search for the specified domain name.', example='example.com'),
customResources?: string(name='CustomResources', description='The custom resources that are supported by the virtual node. If a custom resource is specified in the request of an Elastic Container Instance pod, the pod is scheduled to run on the virtual node that supports the custom resource. You can use the `Resource name = Number of resources` format to specify custom resources. Separate multiple resources with commas (,).', example='example1.com=100,example2.com=200'),
ownerAccount?: string(name='OwnerAccount'),
ownerId?: long(name='OwnerId'),
regionId?: string(name='RegionId', description='The region ID of the virtual node.
This parameter is required.', example='cn-hangzhou'),
resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
resourceOwnerId?: long(name='ResourceOwnerId'),
tag?: [
{
key?: string(name='Key', description='The key of tag N to add to the virtual node.', example='name'),
value?: string(name='Value', description='The value of tag N to add to the virtual node.', example='test'),
}
](name='Tag', description='The tags to add to the virtual node.'),
virtualNodeId?: string(name='VirtualNodeId', description='The ID of the virtual node.
This parameter is required.', example='vnd-2ze960zkdqrldeaw****'),
virtualNodeName?: string(name='VirtualNodeName', description='The name of the virtual node.', example='testNode'),
}
model UpdateVirtualNodeResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='89945DD3-9072-47D0-A318-353284CFC7B3'),
}
model UpdateVirtualNodeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateVirtualNodeResponseBody(name='body'),
}
/**
* @summary Updates attributes of a virtual node.
*
* @description ## Usage notes
* Only virtual nodes that are in the Ready state can be updated.
*
* @param request UpdateVirtualNodeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateVirtualNodeResponse
*/
async function updateVirtualNodeWithOptions(request: UpdateVirtualNodeRequest, runtime: Util.RuntimeOptions): UpdateVirtualNodeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.clusterDNS)) {
query['ClusterDNS'] = request.clusterDNS;
}
if (!Util.isUnset(request.clusterDomain)) {
query['ClusterDomain'] = request.clusterDomain;
}
if (!Util.isUnset(request.customResources)) {
query['CustomResources'] = request.customResources;
}
if (!Util.isUnset(request.ownerAccount)) {
query['OwnerAccount'] = request.ownerAccount;
}
if (!Util.isUnset(request.ownerId)) {
query['OwnerId'] = request.ownerId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceOwnerAccount)) {
query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
}
if (!Util.isUnset(request.resourceOwnerId)) {
query['ResourceOwnerId'] = request.resourceOwnerId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.virtualNodeId)) {
query['VirtualNodeId'] = request.virtualNodeId;
}
if (!Util.isUnset(request.virtualNodeName)) {
query['VirtualNodeName'] = request.virtualNodeName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateVirtualNode',
version = '2018-08-08',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Updates attributes of a virtual node.
*
* @description ## Usage notes
* Only virtual nodes that are in the Ready state can be updated.
*
* @param request UpdateVirtualNodeRequest
* @return UpdateVirtualNodeResponse
*/
async function updateVirtualNode(request: UpdateVirtualNodeRequest): UpdateVirtualNodeResponse {
var runtime = new Util.RuntimeOptions{};
return updateVirtualNodeWithOptions(request, runtime);
}