Skip to content

describe_instance_patch_states_for_patch_group async

describe_instance_patch_states_for_patch_group(
    patch_group: PatchGroup,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[InstancePatchStateFilterList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[PatchComplianceMaxResults] = None,
) -> DescribeInstancePatchStatesForPatchGroupResult

Retrieves the high-level patch state for the managed nodes in the specified patch group.

Parameters:

  • patch_group (PatchGroup) –

    The name of the patch group for which the patch state information should be retrieved.

  • filters (Optional[InstancePatchStateFilterList], default: None ) –

    Each entry in the array is a structure containing:

    • Key (string between 1 and 200 characters)

    • Values (array containing a single string)

    • Type (string "Equal", "NotEqual", "LessThan", "GreaterThan")

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

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

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

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

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def describe_instance_patch_states_for_patch_group(
    self,
    patch_group: "capo_ssm.types.patch_group.PatchGroup",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[
        "capo_ssm.types.instance_patch_state_filter_list.InstancePatchStateFilterList"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_ssm.types.patch_compliance_max_results.PatchComplianceMaxResults"
    ] = None,
) -> "capo_ssm.types.describe_instance_patch_states_for_patch_group_result.DescribeInstancePatchStatesForPatchGroupResult":
    """<p>Retrieves the high-level patch state for the managed nodes in the specified patch group.</p>

    Args:
        patch_group: <p>The name of the patch group for which the patch state information should be retrieved.</p>
        filters: <p>Each entry in the array is a structure containing:</p> <ul> <li> <p>Key (string between 1 and 200 characters)</p> </li> <li> <p>Values (array containing a single string)</p> </li> <li> <p>Type (string "Equal", "NotEqual", "LessThan", "GreaterThan")</p> </li> </ul>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        max_results: <p>The maximum number of patches to return (per page).</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_filter.InvalidFilter: <p>The filter name isn't valid. Verify that you entered the correct name and try again.</p>
        capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.describe_instance_patch_states_for_patch_group_request.DescribeInstancePatchStatesForPatchGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.describe_instance_patch_states_for_patch_group_result.DescribeInstancePatchStatesForPatchGroupResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_instance_patch_states_for_patch_group

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

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

        return capo_ssm.types.describe_instance_patch_states_for_patch_group_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeInstancePatchStatesForPatchGroup", redact_output=_redact_output
        ),
    )
    input_: capo_ssm.types.describe_instance_patch_states_for_patch_group_request.DescribeInstancePatchStatesForPatchGroupRequest = {
        "patch_group": patch_group
    }
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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