Updates an O&M window.
Operation description
Modifies the attributes of an O&M window. When the TargetResource parameter of an O&M window is set to associate ECS instances and underlying hardware risks are detected that require scheduled O&M to mitigate, the execution time of the scheduled O&M is determined based on the time range specified by the TimePeriod parameter of the O&M window. When the execution time of an O&M event is reached, the platform automatically performs the corresponding O&M operation based on the type of the O&M event.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyPlanMaintenanceWindow |
update |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PlanWindowId |
string |
Yes |
The ID of the O&M window to modify. This parameter is required. |
pw-bp1au1w8v8a1yer65g5k |
| PlanWindowName |
string |
No |
The name of the O&M window. Leave this parameter empty if no modification is needed. |
WIndowName |
| Enable |
boolean |
No |
Specifies whether to enable or disable the O&M window. Leave this parameter empty if no modification is needed. |
false |
| SupportMaintenanceAction |
string |
No |
The supported O&M actions. Leave this parameter empty if no modification is needed. |
Reboot |
| RegionId |
string |
Yes |
The region ID of the instance. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| TimePeriod |
object |
No |
The recurring cycle of the O&M window. Leave this parameter empty if no modification is needed. |
|
| PeriodUnit |
string |
No |
The cycle type. Valid values: Daily and Weekly. |
Year |
| RangeList |
array<object> |
No |
The time ranges of the O&M window recurring cycle (UTC time zone). |
|
|
object |
No |
|||
| StartTime |
string |
No |
The start time of the O&M window.
|
Monday,22:00 |
| EndTime |
string |
No |
The end time of the O&M window.
|
Tuesday,03:00 |
| TargetResource |
object |
No |
The resource to which the O&M window applies. Leave this parameter empty if no modification is needed. |
|
| Scope |
string |
No |
The resource type for the O&M window configuration. |
Tag |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the O&M window applies. This parameter is required only when Scope is set to ResourceGroup. |
rg-acfmy4cc27vsvia |
| Tags |
array<object> |
No |
The tags to which the O&M window applies. This parameter is required only when Scope is set to Tag. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of the tag to which the O&M window applies. |
tagKey |
| Value |
string |
No |
The value of the tag to which the O&M window applies. |
tagValue |
| MinMaintenanceInterval |
integer |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
F3CD6886-D8D0-4FEE-B93E-1B732396**** |
Examples
Success response
JSON format
{
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | Internal error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | You are not authorized to use the specified resource. |
| 403 | InvalidParameter.TimePeriod | Invalid Parameter Time Period. | Time Period property error. |
| 403 | InvalidParameter.TargetResource | Invalid Parameter Target Resource. | TargetResource property setting error |
| 403 | InvalidParameter.SupportMaintenanceAction | Invalid Parameter SupportMaintenanceAction. | SupportMaintenanceAction property setting error. |
| 403 | InvalidParameter.MinMaintenanceInterval | Invalid Parameter MinMaintenanceInterval. | MinMaintenanceInterval parameter setting error |
| 404 | InvalidResource.NotFound | The specified resource not exists. | The specified resource does not exist |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.