DescribeEffectivePatchesForPatchBaseline - AWS Systems Manager

DescribeEffectivePatchesForPatchBaseline

Retrieves the current effective patches (the patch and the approval state) for the specified patch baseline. Applies to patch baselines for Windows only.

Request Syntax

{ "BaselineId": "string", "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

BaselineId

The ID of the patch baseline to retrieve the effective patches for.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_\-:/]{20,128}$

Required: Yes

MaxResults

The maximum number of patches to return (per page).

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Required: No

Response Syntax

{ "EffectivePatches": [ { "Patch": { "AdvisoryIds": [ "string" ], "Arch": "string", "BugzillaIds": [ "string" ], "Classification": "string", "ContentUrl": "string", "CVEIds": [ "string" ], "Description": "string", "Epoch": number, "Id": "string", "KbNumber": "string", "Language": "string", "MsrcNumber": "string", "MsrcSeverity": "string", "Name": "string", "Product": "string", "ProductFamily": "string", "Release": "string", "ReleaseDate": number, "Repository": "string", "Severity": "string", "Title": "string", "Vendor": "string", "Version": "string" }, "PatchStatus": { "ApprovalDate": number, "ComplianceLevel": "string", "DeploymentStatus": "string" } } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

EffectivePatches

An array of patches and patch status.

Type: Array of EffectivePatch objects

NextToken

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

DoesNotExistException

Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.

For information about resource quotas in AWS Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

InvalidResourceId

The resource ID isn't valid. Verify that you entered the correct ID and try again.

HTTP Status Code: 400

UnsupportedOperatingSystem

The operating systems you specified isn't supported, or the operation isn't supported for the operating system.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of DescribeEffectivePatchesForPatchBaseline.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity Content-Length: 38 X-Amz-Target: AmazonSSM.DescribeEffectivePatchesForPatchBaseline X-Amz-Date: 20240309T061447Z User-Agent: aws-cli/1.11.180 Python/2.7.9 Windows/8 botocore/1.7.38 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240309/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE { "BaselineId": "pb-0c10e65780EXAMPLE" }

Sample Response

{ "EffectivePatches": [ { "Patch": { "Classification": "SecurityUpdates", "ContentUrl": "https://support.microsoft.com/en-us/kb/2032276", "Description": "A security issue has been identified that could allow an unauthenticated remote attacker to compromise your system and gain control over it. You can help protect your system by installing this update from Microsoft. After you install this update, you may have to restart your system.", "Id": "8692029b-a3a2-4a87-a73b-8ea881b4b4d6", "KbNumber": "KB2032276", "Language": "All", "MsrcNumber": "MS10-043", "MsrcSeverity": "Important", "Product": "WindowsServer2008R2", "ProductFamily": "Windows", "ReleaseDate": 1279040400, "Title": "Security Update for Windows Server 2008 R2 x64 Edition (KB2032276)", "Vendor": "Microsoft" }, "PatchStatus": { "ApprovalDate": 1279299600, "ComplianceLevel": "UNSPECIFIED", "DeploymentStatus": "APPROVED" } }, { "Patch": { "Classification": "SecurityUpdates", "ContentUrl": "https://support.microsoft.com/en-us/kb/2124261", "Description": "A security issue has been identified that could allow an unauthenticated remote attacker to compromise your system and gain control over it. You can help protect your system by installing this update from Microsoft. After you install this update, you may have to restart your system.", "Id": "12ef1bed-0dd2-4633-b3ac-60888aa8ba33", "KbNumber": "KB2124261", "Language": "All", "MsrcNumber": "MS10-065", "MsrcSeverity": "Important", "Product": "Windows7", "ProductFamily": "Windows", "ReleaseDate": 1284483600, "Title": "Security Update for Windows 7 (KB2124261)", "Vendor": "Microsoft" }, "PatchStatus": { "ApprovalDate": 1284742800, "ComplianceLevel": "UNSPECIFIED", "DeploymentStatus": "APPROVED" } }, { "Patch": { "Classification": "SecurityUpdates", "ContentUrl": "https://support.microsoft.com/en-us/kb/2124261", "Description": "A security issue has been identified that could allow an unauthenticated remote attacker to compromise your system and gain control over it. You can help protect your system by installing this update from Microsoft. After you install this update, you may have to restart your system.", "Id": "1b571637-30ed-48d6-b2f3-24d374fdebb8", "KbNumber": "KB2124261", "Language": "All", "MsrcNumber": "MS10-065", "MsrcSeverity": "Important", "Product": "WindowsServer2008R2", "ProductFamily": "Windows", "ReleaseDate": 1284483600, "Title": "Security Update for Windows Server 2008 R2 x64 Edition (KB2124261)", "Vendor": "Microsoft" }, "PatchStatus": { "ApprovalDate": 1284742800, "ComplianceLevel": "UNSPECIFIED", "DeploymentStatus": "APPROVED" } } // There may be more content here ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: