调用CreatePatchBaseline创建一个补丁基线。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreatePatchBaseline

系统规定参数。取值:CreatePatchBaseline。

ApprovalRules String {"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"}]}

接受规则。

Name String MyPatchBaseline

补丁基线名称。

OperationSystem String Windows

操作系统类型。支持:

  • Windows
  • Ubuntu
  • Centos
  • Debian
  • AliyunLinux
  • RedhatEnterpriseLinux
  • Anolis
RegionId String cn-hangzhou

地域ID。

Description String PatchBaseline

补丁基线描述信息。

ClientToken String -

幂等Token。

返回数据

名称 类型 示例值 描述
PatchBaseline Struct

补丁基线详细信息。

ApprovalRules String {"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"}]}

接受规则。

CreatedBy String root(130900000)

补丁基线创建者。

CreatedDate String 2021-09-08T06:25:41Z

创建时间。

Description String PatchBaseline

补丁基线描述信息。

Id String pb-0a0aeda72ed147eb97ea

补丁基线ID。

Name String MyPatchBaseline

补丁基线名称。

OperationSystem String Windows

操作系统类型。

ShareType String Private

补丁基线共享类型。

UpdatedBy String root(130900000)

补丁基线更新者。

UpdatedDate String 2021-09-08T06:25:41Z

更新时间。

RequestId String A5173FF6-D10D-5E8C-8F71-943C2A3E25C0

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=CreatePatchBaseline
&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"}]}
&Name=MyPatchBaseline
&OperationSystem=Windows
&<公共请求参数>

正常返回示例

XML格式

<PatchBaseline>
    <UpdatedBy>root(130900000)</UpdatedBy>
    <CreatedBy>root(130900000)</CreatedBy>
    <Description>PatchBaseline</Description>
    <UpdatedDate>2021-09-08T06:25:41Z</UpdatedDate>
    <CreatedDate>2021-02-18T03:33:50Z</CreatedDate>
    <Id>pb-0a0aeda72ed147eb97ea</Id>
    <OperationSystem>Windows</OperationSystem>
    <ApprovalRules>
        <PatchRules>
            <ApproveUntilDate/>
            <EnableNonSecurity>true</EnableNonSecurity>
            <PatchFilterGroup>
                <Values>OS</Values>
                <Key>PatchSet</Key>
            </PatchFilterGroup>
            <PatchFilterGroup>
                <Values>Windows</Values>
                <Key>ProductFamily</Key>
            </PatchFilterGroup>
            <PatchFilterGroup>
                <Values>Windows 10</Values>
                <Values>Windows 7</Values>
                <Key>Product</Key>
            </PatchFilterGroup>
            <PatchFilterGroup>
                <Values>Security Updates</Values>
                <Values>Updates</Values>
                <Values>Update Rollups</Values>
                <Values>Critical Updates</Values>
                <Key>Classification</Key>
            </PatchFilterGroup>
            <PatchFilterGroup>
                <Values>Critical</Values>
                <Values>Important</Values>
                <Values>Moderate</Values>
                <Key>Severity</Key>
            </PatchFilterGroup>
            <ApproveAfterDays>7</ApproveAfterDays>
            <ComplianceLevel>Medium</ComplianceLevel>
        </PatchRules>
    </ApprovalRules>
    <Name>MyPatchBaseline</Name>
    <ShareType>Private</ShareType>
</PatchBaseline>
<RequestId>A5173FF6-D10D-5E8C-8F71-943C2A3E25C0</RequestId>

JSON格式

{
    "PatchBaseline": {
        "UpdatedBy": "root(130900000)",
        "CreatedBy": "root(130900000)",
        "Description": "PatchBaseline",
        "UpdatedDate": "2021-09-08T06:25:41Z",
        "CreatedDate": "2021-02-18T03:33:50Z",
        "Id": "pb-0a0aeda72ed147eb97ea",
        "OperationSystem": "Windows",
        "ApprovalRules": {
            "PatchRules": [
                {
                    "ApproveUntilDate": "",
                    "EnableNonSecurity": true,
                    "PatchFilterGroup": [
                        {
                            "Values": [
                                "OS"
                            ],
                            "Key": "PatchSet"
                        },
                        {
                            "Values": [
                                "Windows"
                            ],
                            "Key": "ProductFamily"
                        },
                        {
                            "Values": [
                                "Windows 10",
                                "Windows 7"
                            ],
                            "Key": "Product"
                        },
                        {
                            "Values": [
                                "Security Updates",
                                "Updates",
                                "Update Rollups",
                                "Critical Updates"
                            ],
                            "Key": "Classification"
                        },
                        {
                            "Values": [
                                "Critical",
                                "Important",
                                "Moderate"
                            ],
                            "Key": "Severity"
                        }
                    ],
                    "ApproveAfterDays": 7,
                    "ComplianceLevel": "Medium"
                }
            ]
        },
        "Name": "MyPatchBaseline",
        "ShareType": "Private"
    },
    "RequestId": "A5173FF6-D10D-5E8C-8F71-943C2A3E25C0"
}

错误码

访问错误中心查看更多错误码。