All Products
Search
Document Center

ENS:UpgradeApplication

Last Updated:Nov 18, 2024

Updates the container in an asynchronous manner. You can configure multiple canary release policies.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:UpgradeApplicationupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application.

a2bac6f4-75dc-455e-8389-2dc8e47526d3
TemplatestringYes

The information template for phased update. The value must be a JSON string and contain the following information:

  • Version range that you want to update
  • Configuration information of the target version
  • Canary release policy for resources
  • Intelligent upgrade policy that contains information such as the time window and resource usage limit
{\"fromAppVersions\":{ \"operator\":\"In\", \"values\":[ \"v1\", \"v2\" ] }, \"toAppVersion\":\"v3\", \"descrip\":\"xxx\", \"workload\":[ { \"name\":\"nginx\", \"podSpec\":{ } } ], \"upgradeStrategy\":{ \"name\":\"ScheduleToISP\", \"parameters\":{ \"operator\":\"In\", \"values\":[ \"telecom\" ] } }, \"autoUpgradeStrategy\":{ \"name\":\"AdjustToPodUsage\", \"checkInterval\":600, \"startTime\":\"2021-02-19 00:00:00\", \"startHourPoint\":\"0\", \"endHourPoint\":\"8\", \"endTime\":\"2021-02-19 08:00:00\", \"level\":\"RegionId\", \"rules\":[ { \"regionCodes\":[ \"cn-wuxi-telecom_unicom_cmcc\", \"cn-shijiazhuang-telecom_unicom_cmcc\" ], \"usageRatioLimit\":{ \"maxPodUsageRatio\":50 }, \"maxUpgradingRatio\":50 }, { \"regionCodes\":[ \"cn-wuhan-telecom_unicom_cmcc\" ], \"usageRatioLimit\":{ \"maxPodUsageRatio\":30 }, \"maxUpgradingRatio\":20 }, { \"regionCodes\":[ \"All\" ], \"usageRatioLimit\":{ \"maxPodUsageRatio\":20 }, \"maxUpgradingRatio\":50, \"maxUpgradingCount\":2 } ] }}
TimeoutintegerNo

The timeout period for asynchronous upgrade. Unit: seconds. Default value: 300.

1800

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TaskIdstring

The task ID. You can use the task ID to query the upgrade progress or status.

6f24a774-6bd5-4026-bb7d-deffb1dad875

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TaskId": "6f24a774-6bd5-4026-bb7d-deffb1dad875"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter that is mandatory for processing this request is not supplied.-
400NoPermissionPermission denied.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-
400InvalidParameterThe errorMessage is %s. Please check it again.-
400ens.interface.errorAn error occurred while calling the API.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-11The Error code has changed. The response structure of the API has changedView Change Details
2023-12-21API Description Update. The Error code has changedView Change Details