Skip to content

search_organization_insights

search_organization_insights(
    account_ids: SearchInsightsAccountIdList,
    start_time_range: StartTimeRange,
    type: InsightType,
    *,
    config_overrides: Optional[DevOpsGuruClientConfig] = None,
    filters: Optional[SearchOrganizationInsightsFilters] = None,
    max_results: Optional[SearchOrganizationInsightsMaxResults] = None,
    next_token: Optional[UuidNextToken] = None,
) -> SearchOrganizationInsightsResponse

Returns a list of insights in your organization. You can specify which insights are returned by their start time, one or more statuses (ONGOING, CLOSED, and CLOSED), one or more severities (LOW, MEDIUM, and HIGH), and type (REACTIVE or PROACTIVE).

Use the Filters parameter to specify status and severity search parameters. Use the Type parameter to specify REACTIVE or PROACTIVE in your search.

Parameters:

  • account_ids (SearchInsightsAccountIdList) –

    The ID of the Amazon Web Services account.

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

    A SearchOrganizationInsightsFilters object that is used to set the severity and status filters on your insight search.

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

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

  • type (InsightType) –

    The type of insights you are searching for (REACTIVE or PROACTIVE).

Raises:

  • AccessDeniedException –

    You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

  • InternalServerException –

    An internal failure in an Amazon service occurred.

  • ThrottlingException –

    The request was denied due to a request throttling.

  • ValidationException –

    Contains information about data passed in to a field during a request that is not valid.

  • UnknownServiceError –

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

Source code in docs_src/capo_devops_guru/_services/dev_ops_guru.py
def search_organization_insights(
    self,
    account_ids: "capo_devops_guru.types.search_insights_account_id_list.SearchInsightsAccountIdList",
    start_time_range: "capo_devops_guru.types.start_time_range.StartTimeRange",
    type: "capo_devops_guru.types.insight_type.InsightType",
    *,
    config_overrides: Optional[DevOpsGuruClientConfig] = None,
    filters: Optional[
        "capo_devops_guru.types.search_organization_insights_filters.SearchOrganizationInsightsFilters"
    ] = None,
    max_results: Optional[
        "capo_devops_guru.types.search_organization_insights_max_results.SearchOrganizationInsightsMaxResults"
    ] = None,
    next_token: Optional[
        "capo_devops_guru.types.uuid_next_token.UuidNextToken"
    ] = None,
) -> "capo_devops_guru.types.search_organization_insights_response.SearchOrganizationInsightsResponse":
    """<p> Returns a list of insights in your organization. You can specify which insights are returned by their start time, one or more statuses (<code>ONGOING</code>, <code>CLOSED</code>, and <code>CLOSED</code>), one or more severities (<code>LOW</code>, <code>MEDIUM</code>, and <code>HIGH</code>), and type (<code>REACTIVE</code> or <code>PROACTIVE</code>). </p> <p> Use the <code>Filters</code> parameter to specify status and severity search parameters. Use the <code>Type</code> parameter to specify <code>REACTIVE</code> or <code>PROACTIVE</code> in your search. </p>

    Args:
        account_ids: <p>The ID of the Amazon Web Services account. </p>
        filters: <p> A <code>SearchOrganizationInsightsFilters</code> object that is used to set the severity and status filters on your insight search. </p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
        next_token: <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
        type: <p> The type of insights you are searching for (<code>REACTIVE</code> or <code>PROACTIVE</code>). </p>

    Raises:
        capo_devops_guru.errors.access_denied_exception.AccessDeniedException: <p> You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access Management</a> in the <i>IAM User Guide</i>. </p>
        capo_devops_guru.errors.internal_server_exception.InternalServerException: <p>An internal failure in an Amazon service occurred.</p>
        capo_devops_guru.errors.throttling_exception.ThrottlingException: <p>The request was denied due to a request throttling.</p>
        capo_devops_guru.errors.validation_exception.ValidationException: <p> Contains information about data passed in to a field during a request that is not valid. </p>
        capo_devops_guru.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_devops_guru.types.search_organization_insights_request.SearchOrganizationInsightsRequest]",
    ) -> OperationResponse[
        "capo_devops_guru.types.search_organization_insights_response.SearchOrganizationInsightsResponse"
    ]:
        import capo_devops_guru._operations.capstone_control_plane_service.search_organization_insights

        output, http_response = (
            capo_devops_guru._operations.capstone_control_plane_service.search_organization_insights.search_organization_insights(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SearchOrganizationInsights")
    )
    input_: capo_devops_guru.types.search_organization_insights_request.SearchOrganizationInsightsRequest = {
        "account_ids": account_ids,
        "start_time_range": start_time_range,
        "type": type,
    }
    if filters is not None:
        input_["filters"] = filters
    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