CmdID

CmdID / aws / aws ssm

aws ssm describe-patch-baselines

Lists the patch baselines in your Amazon Web Services account. AWS CLI reference

3 examples 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To list all patch baselines

The following describe-patch-baselines example retrieves details for all patch baselines in your account in the current Region.

aws ssm describe-patch-baselinesIdentify
Its output
{
    "BaselineIdentities": [
        {
            "BaselineName": "AWS-SuseDefaultPatchBaseline",
            "DefaultBaseline": true,
            "BaselineDescription": "Default Patch Baseline for Suse Provided by AWS.",
            "BaselineId": "arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0123fdb36e334a3b2",
            "OperatingSystem": "SUSE"
        },
        {
            "BaselineName": "AWS-DefaultPatchBaseline",
            "DefaultBaseline": false,
            "BaselineDescription": "Default Patch Baseline Provided by AWS.",
            "BaselineId": "arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-020d361a05defe4ed",
            "OperatingSystem": "WINDOWS"
        },
        {
            "BaselineName": "MyWindowsPatchBaseline",
            "DefaultBaseline": true,
            "BaselineDescription": "My patch baseline for EC2 instances for Windows Server",
            "BaselineId": "pb-0ad00e0dd7EXAMPLE",
            "OperatingSystem": "WINDOWS"
        }
    ]
}

Example 2: To list all patch baselines provided by AWS

The following describe-patch-baselines example lists all patch baselines provided by AWS.

aws ssm describe-patch-baselines --filters "Key=OWNER,Values=[AWS]"Identify
--filtersEach element in the array is a structure containing a key-value pair.
Its output
{
    "BaselineIdentities": [
        {
            "BaselineName": "AWS-SuseDefaultPatchBaseline",
            "DefaultBaseline": true,
            "BaselineDescription": "Default Patch Baseline for Suse Provided by AWS.",
            "BaselineId": "arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0123fdb36e334a3b2",
            "OperatingSystem": "SUSE"
        },
        {
            "BaselineName": "AWS-DefaultPatchBaseline",
            "DefaultBaseline": false,
            "BaselineDescription": "Default Patch Baseline Provided by AWS.",
            "BaselineId": "arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-020d361a05defe4ed",
            "OperatingSystem": "WINDOWS"
        }
    ]
}

Example 3: To list all patch baselines that you own

The following describe-patch-baselines example lists all custom patch baselines created in your account in the current Region.

aws ssm describe-patch-baselines --filters "Key=OWNER,Values=[Self]"Identify
--filtersEach element in the array is a structure containing a key-value pair.
Its output
{
    "BaselineIdentities": [
        {
            "BaselineName": "MyWindowsPatchBaseline",
            "DefaultBaseline": true,
            "BaselineDescription": "My patch baseline for EC2 instances for Windows Server",
            "BaselineId": "pb-0ad00e0dd7EXAMPLE",
            "OperatingSystem": "WINDOWS"
        }
    ]
}

For more information, see About Predefined and Custom Patch Baselines in the AWS Systems Manager User Guide.

Options

3 in the AWS CLI reference
--filtersEach element in the array is a structure containing a key-value pair.
--max-resultsThe maximum number of patch baselines to return (per page).
--next-tokenThe token for the next set of items to return.