Skip to content

list_problems

list_problems(
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    account_id: Optional[AccountId] = None,
    resource_group_name: Optional[ResourceGroupName] = None,
    start_time: Optional[StartTime] = None,
    end_time: Optional[EndTime] = None,
    max_results: Optional[MaxEntities] = None,
    next_token: Optional[PaginationToken] = None,
    component_name: Optional[ComponentName] = None,
    visibility: Optional[Visibility] = None,
) -> ListProblemsResponse

Lists the problems with your application.

Parameters:

  • account_id (Optional[AccountId], default: None ) –

    The Amazon Web Services account ID for the resource group owner.

  • resource_group_name (Optional[ResourceGroupName], default: None ) –

    The name of the resource group.

  • start_time (Optional[StartTime], default: None ) –

    The time when the problem was detected, in epoch seconds. If you don't specify a time frame for the request, problems within the past seven days are returned.

  • end_time (Optional[EndTime], default: None ) –

    The time when the problem ended, in epoch seconds. If not specified, problems within the past seven days are returned.

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

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

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

    The token to request the next page of results.

  • component_name (Optional[ComponentName], default: None ) –

    The name of the component.

  • visibility (Optional[Visibility], default: None ) –

    Specifies whether or not you can view the problem. If not specified, visible and ignored problems are returned.

Raises:

Source code in docs_src/capo_application_insights/_services/application_insights.py
def list_problems(
    self,
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    account_id: Optional[
        "capo_application_insights.types.account_id.AccountId"
    ] = None,
    resource_group_name: Optional[
        "capo_application_insights.types.resource_group_name.ResourceGroupName"
    ] = None,
    start_time: Optional[
        "capo_application_insights.types.start_time.StartTime"
    ] = None,
    end_time: Optional["capo_application_insights.types.end_time.EndTime"] = None,
    max_results: Optional[
        "capo_application_insights.types.max_entities.MaxEntities"
    ] = None,
    next_token: Optional[
        "capo_application_insights.types.pagination_token.PaginationToken"
    ] = None,
    component_name: Optional[
        "capo_application_insights.types.component_name.ComponentName"
    ] = None,
    visibility: Optional[
        "capo_application_insights.types.visibility.Visibility"
    ] = None,
) -> "capo_application_insights.types.list_problems_response.ListProblemsResponse":
    """<p>Lists the problems with your application.</p>

    Args:
        account_id: <p>The Amazon Web Services account ID for the resource group owner.</p>
        resource_group_name: <p>The name of the resource group.</p>
        start_time: <p>The time when the problem was detected, in epoch seconds. If you don't specify a time frame for the request, problems within the past seven days are returned.</p>
        end_time: <p>The time when the problem ended, in epoch seconds. If not specified, problems within the past seven days are returned.</p>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
        next_token: <p>The token to request the next page of results.</p>
        component_name: <p> The name of the component. </p>
        visibility: <p>Specifies whether or not you can view the problem. If not specified, visible and ignored problems are returned.</p>

    Raises:
        capo_application_insights.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
        capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_insights.types.list_problems_request.ListProblemsRequest]",
    ) -> OperationResponse[
        "capo_application_insights.types.list_problems_response.ListProblemsResponse"
    ]:
        import capo_application_insights._operations.ec2_windows_barley_service.list_problems

        output, http_response = (
            capo_application_insights._operations.ec2_windows_barley_service.list_problems.list_problems(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProblems")
    )
    input_: capo_application_insights.types.list_problems_request.ListProblemsRequest = {}
    if account_id is not None:
        input_["account_id"] = account_id
    if resource_group_name is not None:
        input_["resource_group_name"] = resource_group_name
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if component_name is not None:
        input_["component_name"] = component_name
    if visibility is not None:
        input_["visibility"] = visibility

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