All Products
Search
Document Center

CloudOps Orchestration Service:UpdatePatchBaseline

Last Updated:Oct 14, 2024

Updates a patch baseline.

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
oos:UpdatePatchBaselineupdate
  • patchbaseline
    acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
NamestringYes

The name of the patch baseline.

MyPatchBaseline
DescriptionstringNo

The description of the patch baseline.

UpdatePatchBaseline
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

-
ApprovalRulesstringYes

The rules of scanning and installing patches for the specified 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,"ApproveUntilDate":"","EnableNonSecurity":true,"ComplianceLevel":"Medium"}]}
RejectedPatchesarrayNo

The rejected patches.

stringNo

The name of the rejected patch.

RejectedPatch1
RejectedPatchesActionstringNo

The action of the rejected patch.

ALLOW_AS_DEPENDENCY
ApprovedPatchesarrayNo

The approved patches.

stringNo

The name of the approved patch.

ApprovedPatch1
ApprovedPatchesEnableNonSecuritybooleanNo

Indicates whether the approved patch involves updates other than security-related updates.

true
SourcesarrayNo

The patch source configurations.

stringNo

The configuration of the patch source.

[main] name=MyCustomRepository baseurl=https://my-custom-repository enabled=1
Tagsarray<object>No

The tags.

objectNo
KeystringNo

The key of the tag.

key
ValuestringNo

The value of the tag.

value
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxsn4m4******

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

1457F46C-7AAE-59FA-BD12-0BDB3751E6F8
PatchBaselineobject

The details of the patch baseline.

OperationSystemstring

The operating system.

Windows
Descriptionstring

The description of the patch baseline.

UpdatePatchBaseline
UpdatedDatestring

The time when the patch baseline was updated.

2021-09-08T07:26:37Z
UpdatedBystring

The user who updated the patch baseline.

root(130900000)
CreatedBystring

The creator of the patch baseline.

root(130900000)
CreatedDatestring

The time when the patch baseline was created.

2021-09-07T03:42:56Z
Namestring

The name of the patch baseline.

MyPatchBaseline
ApprovalRulesstring

The rules of scanning and installing patches for the specified 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,"ApproveUntilDate":"","EnableNonSecurity":true,"ComplianceLevel":"Medium"}]}
Idstring

The ID of the patch baseline.

pb-445340b5c6504a85a300
ShareTypestring

The share type of the patch baseline.

Private
RejectedPatchesarray

The rejected patches.

RejectedPatchesstring

The name of the rejected patch.

RejectedPatch1
RejectedPatchesActionstring

The action of the rejected patch.

ALLOW_AS_DEPENDENCY
ApprovedPatchesarray

The approved patches.

ApprovedPatchesstring

The name of the approved patch.

ApprovedPatch1
ApprovedPatchesEnableNonSecurityboolean

Indicates whether the approved patch involves updates other than security-related updates.

true
Sourcesarray

The patch source configurations.

Sourcesstring

The configuration of the patch source.

[main] name=MyCustomRepository baseurl=https://my-custom-repository enabled=1
Tagsarray<object>

The tags.

Tagsobject
TagKeystring

The key of the tag.

key
TagValuestring

The value of the tag.

value
ResourceGroupIdstring

The ID of the resource group.

rg-acfmy2zdbbjplii

Examples

Sample success responses

JSONformat

{
  "RequestId": "1457F46C-7AAE-59FA-BD12-0BDB3751E6F8",
  "PatchBaseline": {
    "OperationSystem": "Windows",
    "Description": "UpdatePatchBaseline",
    "UpdatedDate": "2021-09-08T07:26:37Z",
    "UpdatedBy": "root(130900000)",
    "CreatedBy": "root(130900000)",
    "CreatedDate": "2021-09-07T03:42:56Z",
    "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,\"ApproveUntilDate\":\"\",\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}",
    "Id": "pb-445340b5c6504a85a300",
    "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-acfmy2zdbbjplii"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-08-11The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-07-21The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-04-06The request parameters of the API has changed. The response structure of the API has changedView Change Details