Skip to content

describe_effective_patches_for_patch_baseline

describe_effective_patches_for_patch_baseline(
    baseline_id: BaselineId,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    max_results: Optional[PatchBaselineMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeEffectivePatchesForPatchBaselineResult

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

Parameters:

  • baseline_id (BaselineId) –

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

  • max_results (Optional[PatchBaselineMaxResults], default: None ) –

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

  • next_token (Optional[NextToken], default: None ) –

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

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.

  • UnsupportedOperatingSystem –

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

  • UnknownServiceError –

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

Source code in docs_src/capo_ssm/_services/ssm.py
def describe_effective_patches_for_patch_baseline(
    self,
    baseline_id: "capo_ssm.types.baseline_id.BaselineId",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    max_results: Optional[
        "capo_ssm.types.patch_baseline_max_results.PatchBaselineMaxResults"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.describe_effective_patches_for_patch_baseline_result.DescribeEffectivePatchesForPatchBaselineResult":
    """<p>Retrieves the current effective patches (the patch and the approval state) for the specified patch baseline. Applies to patch baselines for Windows only.</p>

    Args:
        baseline_id: <p>The ID of the patch baseline to retrieve the effective patches for.</p>
        max_results: <p>The maximum number of patches to return (per page).</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>

    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.unsupported_operating_system.UnsupportedOperatingSystem: <p>The operating systems you specified isn't supported, or the operation isn't supported for the operating system.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.describe_effective_patches_for_patch_baseline_request.DescribeEffectivePatchesForPatchBaselineRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.describe_effective_patches_for_patch_baseline_result.DescribeEffectivePatchesForPatchBaselineResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_effective_patches_for_patch_baseline

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeEffectivePatchesForPatchBaseline"),
    )
    input_: capo_ssm.types.describe_effective_patches_for_patch_baseline_request.DescribeEffectivePatchesForPatchBaselineRequest = {
        "baseline_id": baseline_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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