Creates a patch baseline for a specified operating system.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:CreatePatchBaseline |
create |
*patchbaseline
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| Name |
string |
Yes |
Patch baseline name. |
MyPatchBaseline |
| Description |
string |
No |
Patch baseline description. |
PatchBaseline |
| ClientToken |
string |
No |
Client token for idempotent requests. |
TF-CreatePatchBaseline-1638429101-845b22f9-f29b-4bb3-bf4b-e6b2da |
| OperationSystem |
string |
Yes |
Operating system type. Valid values:
|
Windows |
| ApprovalRules |
string |
Yes |
Patch scanning and installation rules for the operating system. |
{"PatchRules":[{"PatchFilterGroup":[{"Key":"PatchSet","Values":["OS"]},{"Key":"ProductFamily","Values":["Windows"]},{"Key":"Product","Values":["Windows 10","Windows 7"]},{"Key":"Classification","Values":["Security Updates","Updates","Update Rollups","Critical Updates"]},{"Key":"Severity","Values":["Critical","Important","Moderate"]}],"ApproveAfterDays":7,"EnableNonSecurity":true,"ComplianceLevel":"Medium"}]} |
| RejectedPatches |
array |
No |
The rejected patches. |
|
|
string |
No |
The name of the rejected patch. |
RejectedPatch1 |
|
| RejectedPatchesAction |
string |
No |
Action for rejected patches. |
ALLOW_AS_DEPENDENCY |
| ApprovedPatches |
array |
No |
The approved patches. |
|
|
string |
No |
The name of the approved patch. |
ApprovedPatch1 |
|
| ApprovedPatchesEnableNonSecurity |
boolean |
No |
Whether approved patches include non-security updates. |
true |
| Sources |
array |
No |
Patch source configurations. |
|
|
string |
No |
Patch source configuration. |
[main] name=MyCustomRepository baseurl=https://my-custom-repository enabled=1 |
|
| Tags |
array<object> |
No |
The tags. |
|
|
object |
No |
|||
| Key |
string |
No |
Tag key. |
key |
| Value |
string |
No |
Tag value. |
value |
| ResourceGroupId |
string |
No |
Resource group ID. |
rg-acfmxsn4m4****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
Request ID. |
A5173FF6-D10D-5E8C-8F71-943C2A3E25C0 |
| PatchBaseline |
object |
Patch baseline details. |
|
| OperationSystem |
string |
Operating system type. |
Windows |
| Description |
string |
Patch baseline description. |
PatchBaseline |
| UpdatedDate |
string |
Time when the patch baseline was last modified. |
2021-09-08T06:25:41Z |
| UpdatedBy |
string |
Alibaba Cloud account that last modified the patch baseline. |
root(130900000) |
| CreatedBy |
string |
Patch baseline creator. |
root(130900000) |
| CreatedDate |
string |
Time when the patch baseline was created. |
2021-09-08T06:25:41Z |
| Name |
string |
Patch baseline name. |
MyPatchBaseline |
| ApprovalRules |
string |
Patch scanning and installation rules for the operating system. |
{"PatchRules":[{"PatchFilterGroup":[{"Key":"PatchSet","Values":["OS"]},{"Key":"ProductFamily","Values":["Windows"]},{"Key":"Product","Values":["Windows 10","Windows 7"]},{"Key":"Classification","Values":["Security Updates","Updates","Update Rollups","Critical Updates"]},{"Key":"Severity","Values":["Critical","Important","Moderate"]}],"ApproveAfterDays":7,"EnableNonSecurity":true,"ComplianceLevel":"Medium"}]} |
| Id |
string |
Patch baseline ID. |
pb-0a0aeda72ed147eb97ea |
| ShareType |
string |
Patch baseline share type. |
Private |
| RejectedPatches |
array |
The rejected patches. |
|
|
string |
The name of the rejected patch. |
RejectedPatch1 |
|
| RejectedPatchesAction |
string |
Action for rejected patches. |
"ALLOW_AS_DEPENDENCY" |
| ApprovedPatches |
array |
The approved patches. |
|
|
string |
The name of the approved patch. |
ApprovedPatch1 |
|
| ApprovedPatchesEnableNonSecurity |
boolean |
Whether approved patches include non-security updates. |
true |
| Sources |
array |
Patch source configurations. |
|
|
string |
Patch source configuration. |
[main] name=MyCustomRepository baseurl=https://my-custom-repository enabled=1 |
|
| Tags |
array<object> |
The tags. |
|
|
object |
|||
| TagKey |
string |
Tag key. |
key |
| TagValue |
string |
Tag value. |
value |
| ResourceGroupId |
string |
Resource group ID. |
rg-acfm3comlufxpva |
Examples
Success response
JSON format
{
"RequestId": "A5173FF6-D10D-5E8C-8F71-943C2A3E25C0",
"PatchBaseline": {
"OperationSystem": "Windows",
"Description": "PatchBaseline",
"UpdatedDate": "2021-09-08T06:25:41Z",
"UpdatedBy": "root(130900000)",
"CreatedBy": "root(130900000)",
"CreatedDate": "2021-09-08T06:25:41Z",
"Name": "MyPatchBaseline",
"ApprovalRules": "{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}",
"Id": "pb-0a0aeda72ed147eb97ea",
"ShareType": "Private",
"RejectedPatches": [
"RejectedPatch1"
],
"RejectedPatchesAction": "\"ALLOW_AS_DEPENDENCY\"",
"ApprovedPatches": [
"ApprovedPatch1"
],
"ApprovedPatchesEnableNonSecurity": true,
"Sources": [
"[main]\nname=MyCustomRepository\nbaseurl=https://my-custom-repository\nenabled=1"
],
"Tags": [
{
"TagKey": "key",
"TagValue": "value"
}
],
"ResourceGroupId": "rg-acfm3comlufxpva"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.