tencent cloud

Feedback

RollingUpdateApplicationByVersion

Last updated: 2023-12-04 16:38:13

    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
    Force No Boolean Whether to enable force release

    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 Deploying an application

    This example shows you how to deploy an application.

    Input Example

    POST / HTTP/1.1
    Host: tem.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: RollingUpdateApplicationByVersion
    <Common request parameters>
    
    {
        "ApplicationId": "abc",
        "EnvironmentId": "abc",
        "DeployVersion": "abc",
        "PackageName": "abc",
        "From": "abc",
        "DeployStrategyType": "abc",
        "TotalBatchCount": 0,
        "BatchInterval": 0,
        "BetaBatchNum": 0,
        "MinAvailable": 0,
        "Force": true
    }
    

    Output Example

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

    Example2 Deployed successfully.

    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.ApmNotBind The APM is not bound with the current environment.
    InvalidParameterValue.InvalidDeployVersion The version number is invalid.
    InvalidParameterValue.InvalidEnvName Invalid environment parameter name. It must be a combination of [a-z], [A-Z], [0-9] and [._-]. It cannot start with a digit.
    InvalidParameterValue.InvalidMountPath Invalid mounting path. It cannot be /app.
    InvalidParameterValue.JdkVersionRequired The JDK version is required.
    InvalidParameterValue.NamespaceNotBelongToAppid The namespace does not belong to the current account.
    InvalidParameterValue.OsNotSupport The operating system is not supported.
    InvalidParameterValue.RegistryNotBind The registry is not associated with the current environment.
    InvalidParameterValue.ServiceNotBelongToAppid You are not the owner of this application.
    InvalidParameterValue.ServicePodReachMaximum Failed to create the instance. The upper limit is reached.
    InvalidParameterValue.TemIdInvalid The TEM ID is incorrect.
    InvalidParameterValue.VersionLengthLimit The value of version cannot exceed 128 characters.
    InvalidParameterValue.VersionLowerCase The version must be in lower case.
    MissingParameter.DeployModeNull The deployment method is required.
    MissingParameter.DeployVersionNull The deployment version cannot be empty.
    MissingParameter.LogsetOrTopicNull The logset and topic are required.
    MissingParameter.NamespaceIdNull The environment ID can not be left empty.
    MissingParameter.SvcRepoNotReady The image repository is not ready.
    ResourceInUse.ServiceDeploying The application is being deployed.
    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
    UnauthorizedOperation.MissingEksLogRole TKE does not have the permission to access CLS. Please assign the permission first.
    UnauthorizedOperation.UnauthorizedOperation Not authorized