All Products
Search
Document Center

CloudOps Orchestration Service:CreatePatchBaseline

Last Updated:Aug 28, 2026

Creates a patch baseline for a specified operating system.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

oos:CreatePatchBaseline

create

*patchbaseline

acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName}

  • oos:TLSVersion
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

  • Ubuntu

  • CentOS

  • Debian

  • AliyunLinux

  • RedhatEnterpriseLinux

  • Anolis

  • AlmaLinux

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.