文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
GetPatchBaseline
搭配 CLI 使用
下列程式碼範例示範如何使用 GetPatchBaseline
。
- CLI
-
- AWS CLI
-
顯示修補程式基準
下列
get-patch-baseline
範例會擷取指定修補程式基準的詳細資訊。aws ssm get-patch-baseline \ --baseline-id
"pb-0123456789abcdef0"
輸出:
{ "BaselineId": "pb-0123456789abcdef0", "Name": "WindowsPatching", "OperatingSystem": "WINDOWS", "GlobalFilters": { "PatchFilters": [] }, "ApprovalRules": { "PatchRules": [ { "PatchFilterGroup": { "PatchFilters": [ { "Key": "PRODUCT", "Values": [ "WindowsServer2016" ] } ] }, "ComplianceLevel": "CRITICAL", "ApproveAfterDays": 0, "EnableNonSecurity": false } ] }, "ApprovedPatches": [], "ApprovedPatchesComplianceLevel": "UNSPECIFIED", "ApprovedPatchesEnableNonSecurity": false, "RejectedPatches": [], "RejectedPatchesAction": "ALLOW_AS_DEPENDENCY", "PatchGroups": [ "QA", "DEV" ], "CreatedDate": 1550244180.465, "ModifiedDate": 1550244180.465, "Description": "Patches for Windows Servers", "Sources": [] }
如需詳細資訊,請參閱 AWS Systems Manager 使用者指南中的關於修補程式基準。
-
如需 API 詳細資訊,請參閱 AWS CLI 命令參考中的 GetPatchBaseline
。
-
- PowerShell
-
- for PowerShell 工具
-
範例 1:此範例顯示修補程式基準的詳細資訊。
Get-SSMPatchBaselineDetail -BaselineId "pb-03da896ca3b68b639"
輸出:
ApprovalRules : Amazon.SimpleSystemsManagement.Model.PatchRuleGroup ApprovedPatches : {} BaselineId : pb-03da896ca3b68b639 CreatedDate : 3/3/2017 5:02:19 PM Description : Baseline containing all updates approved for production systems GlobalFilters : Amazon.SimpleSystemsManagement.Model.PatchFilterGroup ModifiedDate : 3/3/2017 5:02:19 PM Name : Production-Baseline PatchGroups : {} RejectedPatches : {}
-
如需 API 詳細資訊,請參閱 AWS Tools for PowerShell Cmdlet 參考中的 GetPatchBaseline。
-
GetParameters
GetPatchBaselineForPatchGroup