Configures the Tomcat container for an application or application instance group in an Elastic Compute Service (ECS) cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/app/container_config HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
AppId String Query Yes c627c157-560d-43ff-************

The ID of the application.

GroupId String Query No 8123db90-880f-**************

The ID of the application instance group.

  • If an ID is specified, this operation configures the Tomcat container for the specified application instance group.
  • If you set this parameter to "", this operation configures the Tomcat container for the application.
ContextPath String Query No /

The context path of the Tomcat container. It can be an empty string, null WAR package name, root directory, or other custom non-empty strings.

It can contain letters, digits, hyphens (-), and underscores (_).

  • If this parameter is not specified in the configuration of the application instance group, the configuration of the application is applied.
  • If this parameter is not specified in the configuration of the application, the root directory / is applied.
HttpPort Integer Query No 8080

The application port number for the Tomcat container.

  • If this parameter is not specified in the configuration of the application instance group, the configuration of the application is applied.
  • If this parameter is not specified in the configuration of the application, port 8080 is applied.
MaxThreads Integer Query No 20

The maximum number of threads in the Tomcat container.

  • If this parameter is not specified in the configuration of the application instance group, the configuration of the application is applied.
  • If this parameter is not specified in the configuration of the application, the default value 250 is applied.
URIEncoding String Query No ISO-8859-1

The uniform resource identifier (URI) encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.

  • If this parameter is not specified in the configuration of the application instance group, the configuration of the application is applied.
  • If this parameter is not specified in the configuration of the application, the default URI encoding scheme in the Tomcat container is applied.
UseBodyEncoding Boolean Query No true

Specifies whether useBodyEncodingForURI is enabled.

  • If this parameter is not specified in the configuration of the application instance group, the configuration of the application is applied.
  • If this parameter is not specified in the configuration of the application, the default value false is applied.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

ContainerConfiguration Struct

The returned parameters of the Tomcat container.

ContextPath String /

The context path of the Tomcat container.

HttpPort Integer 8080

The application port number for the Tomcat container.

MaxThreads Integer 20

The maximum number of threads in the Tomcat container.

URIEncoding String ISO-8859-1

The URI encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.

UseBodyEncoding Boolean true

Indicates whether useBodyEncodingForURI is enabled.

Message String success

The returned message that indicates whether the request is successful.

RequestId String D16979DC-4D42-***************

The ID of the request.

Examples

Sample requests

POST /pop/v5/app/container_config HTTP/1.1
Common request header
{
  "AppId": ""
}

Sample success responses

XML format

<Message>success</Message>
<ContainerConfiguration>
    <UseBodyEncoding>true</UseBodyEncoding>
    <MaxThreads>20</MaxThreads>
    <HttpPort>8080</HttpPort>
    <URIEncoding>ISO-8859-1</URIEncoding>
</ContainerConfiguration>
<Code>200</Code>

JSON format

{
    "Message": "success",
    "ContainerConfiguration": {
        "UseBodyEncoding": true,
        "MaxThreads": 20,
        "HttpPort": 8080,
        "URIEncoding": "ISO-8859-1"
    },
    "Code": 200
}

Error codes

For a list of error codes, visit the API Error Center.