Skip to content

get_patch_baseline

get_patch_baseline(
    baseline_id: BaselineId, *, config_overrides: Optional[SSMClientConfig] = None
) -> GetPatchBaselineResult

Retrieves information about a patch baseline.

Parameters:

  • baseline_id (BaselineId) –

    The ID of the patch baseline to retrieve.

    To retrieve information about an Amazon Web Services managed patch baseline, specify the full Amazon Resource Name (ARN) of the baseline. For example, for the baseline AWS-AmazonLinuxDefaultPatchBaseline, specify arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 instead of pb-0e392de35e7c563b7.

Raises:

  • 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 Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • InternalServerError –

    An error occurred on the server side.

  • InvalidResourceId –

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

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def get_patch_baseline(
    self,
    baseline_id: "capo_ssm.types.baseline_id.BaselineId",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.get_patch_baseline_result.GetPatchBaselineResult":
    """<p>Retrieves information about a patch baseline.</p>

    Args:
        baseline_id: <p>The ID of the patch baseline to retrieve.</p> <note> <p>To retrieve information about an Amazon Web Services managed patch baseline, specify the full Amazon Resource Name (ARN) of the baseline. For example, for the baseline <code>AWS-AmazonLinuxDefaultPatchBaseline</code>, specify <code>arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7</code> instead of <code>pb-0e392de35e7c563b7</code>.</p> </note>

    Raises:
        capo_ssm.errors.does_not_exist_exception.DoesNotExistException: <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p> <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_resource_id.InvalidResourceId: <p>The resource ID isn't valid. Verify that you entered the correct ID and try again.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.get_patch_baseline_request.GetPatchBaselineRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.get_patch_baseline_result.GetPatchBaselineResult"
    ]:
        import capo_ssm._operations.amazon_ssm.get_patch_baseline

        output, http_response = (
            capo_ssm._operations.amazon_ssm.get_patch_baseline.get_patch_baseline(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ssm.types.get_patch_baseline_result.GetPatchBaselineResult",
    ) -> dict[str, Any]:
        import capo_ssm.types.get_patch_baseline_result

        return capo_ssm.types.get_patch_baseline_result.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetPatchBaseline", redact_output=_redact_output),
    )
    input_: capo_ssm.types.get_patch_baseline_request.GetPatchBaselineRequest = {
        "baseline_id": baseline_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output