tencent cloud

Feedback

RollingUpdateApplicationByVersion

Last updated: 2022-09-23 18:16:48

1. API Description

Domain name for API request: tem.tencentcloudapi.com.

This API is used to configure the rolling update policy for an application.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: RollingUpdateApplicationByVersion.
Version Yes String Common Params. The value used for this API: 2021-07-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ApplicationId Yes String Application ID
EnvironmentId Yes String Environment ID
DeployVersion Yes String Update version. For image-based deployment, it is the value. For deployment with JAR/WAR files, it is Version.
PackageName No String JAR/WAR package name. It’s only required for deployment with JAR/WAR files.
From No String Request source. Options: IntelliJ, Coding
DeployStrategyType No String The deployment policy. Values: AUTO (automatically deploy), BETA (deploy a small batch first to test the result, and deploy the rest automatically) and MANUAL (manually deploy)
TotalBatchCount No Integer Total number of batches
BatchInterval No Integer Interval between the batches
BetaBatchNum No Integer Number of instances in a beta batch
MinAvailable No Integer Minimum number of available instances during the deployment

3. Output Parameters

Parameter Name Type Description
Result String Version ID
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 This examples deploys an application.

This examples deploys an application.

Input Example

POST / HTTP/1.1
Host: tem.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RollingUpdateApplicationByVersion
<Common request parameters>

{
    "ApplicationId": "xx",
    "EnvironmentId": "xx",
    "DeployVersion": "xx",
    "PackageName": "xxx"
}

Output Example

{
    "Response": {
        "RequestId": "81f74023-563c-437d-abf7-8139449ef178",
        "Result": "version-xxx"
    }
}

Example2 Deployed successfully.

Input Example

POST / HTTP/1.1
Host: tem.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RollingUpdateApplicationByVersion
<Common request parameters>

{
    "EnvironmentId": "env-qgnzgy8r",
    "TotalBatchCount": "2",
    "PackageName": "tem/pkg/1300555551/service-gn54vdy6/1641528220867/hello-world-0.0.1-SNAPSHOT.jar",
    "DeployStrategyType": "AUTO",
    "DeployVersion": "20220107122452",
    "BatchInterval": "60",
    "ApplicationId": "service-gn54vdy6",
    "BetaBatchNum": "1"
}

Output Example

{
    "Response": {
        "RequestId": "28fe46b2-dbd9-4ee6-b388-603acb6c9263",
        "Result": ""
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.DefaultInternalError The server is busy. Retry later.
InternalError.DeployVersionError Failed to invoke the version deployment
InvalidParameterValue.InvalidDeployVersion The version number is invalid.
InvalidParameterValue.NamespaceNotBelongToAppid The namespace does not belong to the current account.
InvalidParameterValue.ServiceNotBelongToAppid
InvalidParameterValue.ServicePodReachMaximum Failed to create the instance. The upper limit is reached.
InvalidParameterValue.TemIdInvalid
InvalidParameterValue.VersionLowerCase The version must be in lower case.
MissingParameter.NamespaceIdNull The environment ID can not be left empty.
ResourceNotFound.ServiceNotFound The application is not found.
ResourceNotFound.VersionNamespaceNotFound The environment corresponding to this version is not found.
ResourceUnavailable.WaitForKruise Waiting for the installation of addon
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support