Skip to content

list_investigation_groups

list_investigation_groups(
    *,
    config_overrides: Optional[AIOpsClientConfig] = None,
    next_token: Optional[SensitiveStringWithLengthLimits] = None,
    max_results: Optional[int] = None,
) -> ListInvestigationGroupsOutput

Returns the ARN and name of each investigation group in the account.

Parameters:

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

    Include this value, if it was returned by the previous operation, to get the next set of service operations.

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

    The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.

Raises:

Source code in docs_src/capo_aiops/_services/ai_ops.py
def list_investigation_groups(
    self,
    *,
    config_overrides: Optional[AIOpsClientConfig] = None,
    next_token: Optional[
        "capo_aiops.types.sensitive_string_with_length_limits.SensitiveStringWithLengthLimits"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_aiops.types.list_investigation_groups_output.ListInvestigationGroupsOutput":
    """<p>Returns the ARN and name of each investigation group in the account.</p>

    Args:
        next_token: <p>Include this value, if it was returned by the previous operation, to get the next set of service operations.</p>
        max_results: <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.</p>

    Raises:
        capo_aiops.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        capo_aiops.errors.conflict_exception.ConflictException: <p>This operation couldn't be completed because of a conflict in resource states.</p>
        capo_aiops.errors.forbidden_exception.ForbiddenException: <p>Access id denied for this operation, or this operation is not valid for the specified resource.</p>
        capo_aiops.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. You can try again later.</p>
        capo_aiops.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_aiops.errors.validation_exception.ValidationException: <p>This operation or its parameters aren't formatted correctly.</p>
        capo_aiops.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits. You can try again later.</p>
        capo_aiops.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_aiops.types.list_investigation_groups_input.ListInvestigationGroupsInput]",
    ) -> OperationResponse[
        "capo_aiops.types.list_investigation_groups_output.ListInvestigationGroupsOutput"
    ]:
        import capo_aiops._operations.ai_ops.list_investigation_groups

        output, http_response = (
            capo_aiops._operations.ai_ops.list_investigation_groups.list_investigation_groups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_aiops.types.list_investigation_groups_input.ListInvestigationGroupsInput",
    ) -> dict[str, Any]:
        import capo_aiops.types.list_investigation_groups_input

        return capo_aiops.types.list_investigation_groups_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_aiops.types.list_investigation_groups_output.ListInvestigationGroupsOutput",
    ) -> dict[str, Any]:
        import capo_aiops.types.list_investigation_groups_output

        return capo_aiops.types.list_investigation_groups_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListInvestigationGroups",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_aiops.types.list_investigation_groups_input.ListInvestigationGroupsInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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