You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Patch management
ListPatchPlans - Queries the list of patch plans
Copy page
Download PDF
ListPatchPlans - Queries the list of patch plans
Call ListPatchPlans to obtain patch plan information.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: ListPatchPlans​
The operation that you want to perform. Value: ListPatchPlans.​
​
Version string required Sample value: 2020-04-01​
The API version. Value: 2020-04-01.​
​
PatchPlanIds string[] Optional Sample value: ["id-abc123"]​
The patch plan ID list. You can obtain the patch plan ID by calling CreatePatchPlan. Value:​
  • Separate multiple patch plan IDs by ',' (English commas).​
  • You can pass in up to 20 patch plan IDs at a time.​
​
Status string Optional Sample value: Pending​
The status of the patch plan. Value:​
  • Pending: Pending.​
  • Running: Running.​
  • Completed: Completed.​
  • Failed: Failed.​
  • Expired: Expired.​
  • Cancelled: Cancelled.​
​
NextToken string Optional Sample value: token-abc123​
The pagination token used to mark the pagination position. For the current query, use the NextToken value returned by the previous API call.​
  • If a token is passed in the call, it must be obtained from the previous page response.​
  • If no token is passed in this call:​
  • If more pages are available, a valid pagination token is returned in the response.​
  • If the current page is the last page (no more data), an empty string is returned as the token.​
​
MaxResults integer Optional Sample value: 10​
The number of entries on each page in a pagination query. Value:​
  • Default value: 10​
  • Value range: 1 to 100.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
NextToken string Sample value: token-abc123​
The query token returned by this call.​
  • If a token is passed in the call, it must be obtained from the previous page response.​
  • If no token is passed in this call:​
  • If more pages are available, a valid pagination token is returned in the response.​
  • If the current page is the last page (no more data), an empty string is returned as the token.​
​
PatchPlans object[] Sample value: --​
The list of patch plans.​
Name string Sample value: PlanName​
The name of the patch plan.​
​
Status string Sample value: Pending​
The status of the patch plan.​
  • Pending: Pending.​
  • Running: Running.​
  • Completed: Completed.​
  • Failed: Failed.​
  • Expired: Expired.​
  • Cancelled: Cancelled.​
​
Description string Sample value: The description.​
The description of the patch plan.​
​
RepeatMode string Sample value: Once​
The execution mode of the patch plan. Value:​
  • Once: Immediate execution.​
  • Recurrence: Periodic execution.​
  • Scheduled: Scheduled execution.​
​
OperationType string Sample value: Scan​
The execution type of the patch plan. Value:​
  • Scan: Scan only.​
  • Install: Scan and install.​
​
UpdatedAt string Sample value: 2025-12-25T20:05:56Z​
The time when the patch plan is updated.​
​
CreatedAt string Sample value: 2025-12-25T20:05:56Z​
The time when the patch plan is created.​
​
MaxConcurrency string Sample value: 10​
During task execution, the maximum number of instances allowed to execute the command simultaneously.​
​
UseDefaultBaseline boolean Sample value: true​
Whether the default patch baseline is used. Value:​
  • true: The default patch baseline is used.​
  • false: A custom baseline is used.​
​
AutoCreateSnapshot boolean Sample value: true​
Whether to create a snapshot for the system volume. Value:​
  • false: Do not create a snapshot.​
  • true: Automatically create a snapshot for the system volume.​
​
AutoReboot boolean Sample value: true​
Whether the instance is automatically restarted.​
  • false: After patch installation is complete, the instance is not automatically restarted.​
  • true: After patch installation is complete, the instance is automatically restarted.​
​
ScheduledPolicy object Sample value: --​
The scheduled or periodic policy.​
tip​
This parameter is returned only when the task execution mode is scheduled or periodic execution.​
RecurrenceEndTime string Sample value: 2025-12-09T20:45Z​
The end time of the periodic task.​
​
RecurrenceType string Sample value: Daily​
The recurrence cycle of the periodic task. Valid values:​
  • Daily: Repeat at a daily interval, for example, execute every 2 days.​
  • Weekly: Repeat weekly, and execute once per day within the week.​
  • Monthly: Repeat monthly, for example, execute daily from the 2nd to the 8th of each month.​
  • Cron: Repeat based on the specified cron expression.​
​
LaunchTime string Sample value: 2022-04-01T16:00Z​
The trigger time of the task.​
tip​
  • If ScheduledPolicy.RecurrenceType is specified, this parameter specifies the start time of the periodic task.​
  • When RepeatMode is set to Once, this parameter is invalid.​
​
RecurrenceValue string Sample value: 1​
The value for recurring execution of periodic tasks. Valid value: String type, such as "10".​
​
​
PatchPlanId string Sample value: pp-yedfvyt41q5s2jax****​
The ID of the patch plan.​
​
BaselineId string Sample value: bl-yec3ciz6kb9vq4m****​
The ID of the patch baseline.​
​
MaxErrors string Sample value: 10​
The maximum number of failed instances allowed during task execution.​
tip​
When the number of failed instances exceeds this threshold, the system stops issuing commands to the remaining unexecuted instances.​
​
​
​
​
Sample request​
​
POST /?Version=2020-04-01&Action=ListPatchPlans HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
AccessKey: AK*****************​
SecretKey: TXpS***************​
ServiceName: ecs​
Region: cn-beijing​
X-Top-Account-Id: 21000*****​
Content-Type: application/json​
​
{​
"Status": "Running",​
"MaxResults": 20​
}​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "20260122100808080****",​
"Action": "ListPatchPlans",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"PatchPlans": [​
{​
"PatchPlanId": "pp-87654321zy****",​
"Name": "Weekly-Prod-Patching",​
"Status": "Running",​
"BaselineId": "bl-12345678abc****",​
"OperationType": "Install",​
"RepeatMode": "Recurrence",​
"ScheduledPolicy": {​
"RecurrenceType": "Cron",​
"RecurrenceValue": "0 2 * * 0",​
"LaunchTime": "2026-01-08T17:45Z",​
"RecurrenceEndTime": "2026-03-08T17:45Z"​
},​
"TargetType": "Tag",​
"UseDefaultBaseline": false,​
"AutoCreateSnapshot": true,​
"AutoReboot": true,​
"MaxConcurrency": "10",​
"MaxErrors": "5%",​
"CreatedAt": "2026-01-22T14:00:00Z",​
"UpdatedAt": "2026-01-22T14:00:00Z"​
}​
],​
"NextToken": ""​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
The specified argument is invalid.​
The specified parameter is invalid.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.03.30 11:55:54