Skip to content

get_patch_baseline_for_patch_group async

get_patch_baseline_for_patch_group(
    patch_group: PatchGroup,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    operating_system: Optional[OperatingSystem] = None,
) -> GetPatchBaselineForPatchGroupResult

Retrieves the patch baseline that should be used for the specified patch group.

Parameters:

  • patch_group (PatchGroup) –

    The name of the patch group whose patch baseline should be retrieved.

  • operating_system (Optional[OperatingSystem], default: None ) –

    Returns the operating system rule specified for patch groups using the patch baseline. The default value is WINDOWS.

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def get_patch_baseline_for_patch_group(
    self,
    patch_group: "capo_ssm.types.patch_group.PatchGroup",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    operating_system: Optional[
        "capo_ssm.types.operating_system.OperatingSystem"
    ] = None,
) -> "capo_ssm.types.get_patch_baseline_for_patch_group_result.GetPatchBaselineForPatchGroupResult":
    """<p>Retrieves the patch baseline that should be used for the specified patch group.</p>

    Args:
        patch_group: <p>The name of the patch group whose patch baseline should be retrieved.</p>
        operating_system: <p>Returns the operating system rule specified for patch groups using the patch baseline. The default value is <code>WINDOWS</code>. </p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.get_patch_baseline_for_patch_group_request.GetPatchBaselineForPatchGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.get_patch_baseline_for_patch_group_result.GetPatchBaselineForPatchGroupResult"
    ]:
        import capo_ssm._operations.amazon_ssm.get_patch_baseline_for_patch_group

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.get_patch_baseline_for_patch_group.async_get_patch_baseline_for_patch_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPatchBaselineForPatchGroup")
    )
    input_: capo_ssm.types.get_patch_baseline_for_patch_group_request.GetPatchBaselineForPatchGroupRequest = {
        "patch_group": patch_group
    }
    if operating_system is not None:
        input_["operating_system"] = operating_system

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output