Skip to content

list_app_assessments

list_app_assessments(
    *,
    config_overrides: Optional[resiliencehubClientConfig] = None,
    app_arn: Optional[Arn] = None,
    assessment_name: Optional[EntityName] = None,
    assessment_status: Optional[AssessmentStatusList] = None,
    compliance_status: Optional[ComplianceStatus] = None,
    invoker: Optional[AssessmentInvoker] = None,
    reverse_order: Optional[BooleanOptional] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAppAssessmentsResponse

Lists the assessments for an Resilience Hub application. You can use request parameters to refine the results for the response object.

Parameters:

  • app_arn (Optional[Arn], default: None ) –

    Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

  • assessment_name (Optional[EntityName], default: None ) –

    The name for the assessment.

  • assessment_status (Optional[AssessmentStatusList], default: None ) –

    The current status of the assessment for the resiliency policy.

  • compliance_status (Optional[ComplianceStatus], default: None ) –

    The current status of compliance for the resiliency policy.

  • invoker (Optional[AssessmentInvoker], default: None ) –

    Specifies the entity that invoked a specific assessment, either a User or the System.

  • reverse_order (Optional[BooleanOptional], default: None ) –

    The default is to sort by ascending startTime. To sort by descending startTime, set reverseOrder to true.

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

    Null, or the token from a previous call to get the next set of results.

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

    Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

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.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Resilience Hub service.

  • ResourceNotFoundException –

    This exception occurs when the specified resource could not be found.

  • ThrottlingException –

    This exception occurs when you have exceeded the limit on the number of requests per second.

  • ValidationException –

    This exception occurs when a request is not valid.

  • UnknownServiceError –

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

Source code in docs_src/capo_resiliencehub/_services/resiliencehub.py
def list_app_assessments(
    self,
    *,
    config_overrides: Optional[resiliencehubClientConfig] = None,
    app_arn: Optional["capo_resiliencehub.types.arn.Arn"] = None,
    assessment_name: Optional[
        "capo_resiliencehub.types.entity_name.EntityName"
    ] = None,
    assessment_status: Optional[
        "capo_resiliencehub.types.assessment_status_list.AssessmentStatusList"
    ] = None,
    compliance_status: Optional[
        "capo_resiliencehub.types.compliance_status.ComplianceStatus"
    ] = None,
    invoker: Optional[
        "capo_resiliencehub.types.assessment_invoker.AssessmentInvoker"
    ] = None,
    reverse_order: Optional[
        "capo_resiliencehub.types.boolean_optional.BooleanOptional"
    ] = None,
    next_token: Optional["capo_resiliencehub.types.next_token.NextToken"] = None,
    max_results: Optional["capo_resiliencehub.types.max_results.MaxResults"] = None,
) -> "capo_resiliencehub.types.list_app_assessments_response.ListAppAssessmentsResponse":
    """<p>Lists the assessments for an Resilience Hub application. You can use request parameters to refine the results for the response object.</p>

    Args:
        app_arn: <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
        assessment_name: <p>The name for the assessment.</p>
        assessment_status: <p>The current status of the assessment for the resiliency policy.</p>
        compliance_status: <p>The current status of compliance for the resiliency policy.</p>
        invoker: <p>Specifies the entity that invoked a specific assessment, either a <code>User</code> or the <code>System</code>.</p>
        reverse_order: <p>The default is to sort by ascending <b>startTime</b>. To sort by descending <b>startTime</b>, set reverseOrder to <code>true</code>.</p>
        next_token: <p>Null, or the token from a previous call to get the next set of results.</p>
        max_results: <p>Maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>

    Raises:
        capo_resiliencehub.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.</p>
        capo_resiliencehub.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Resilience Hub service.</p>
        capo_resiliencehub.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception occurs when the specified resource could not be found.</p>
        capo_resiliencehub.errors.throttling_exception.ThrottlingException: <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
        capo_resiliencehub.errors.validation_exception.ValidationException: <p>This exception occurs when a request is not valid.</p>
        capo_resiliencehub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_resiliencehub.types.list_app_assessments_request.ListAppAssessmentsRequest]",
    ) -> OperationResponse[
        "capo_resiliencehub.types.list_app_assessments_response.ListAppAssessmentsResponse"
    ]:
        import capo_resiliencehub._operations.aws_resilience_hub.list_app_assessments

        output, http_response = (
            capo_resiliencehub._operations.aws_resilience_hub.list_app_assessments.list_app_assessments(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAppAssessments")
    )
    input_: capo_resiliencehub.types.list_app_assessments_request.ListAppAssessmentsRequest = {}
    if app_arn is not None:
        input_["app_arn"] = app_arn
    if assessment_name is not None:
        input_["assessment_name"] = assessment_name
    if assessment_status is not None:
        input_["assessment_status"] = assessment_status
    if compliance_status is not None:
        input_["compliance_status"] = compliance_status
    if invoker is not None:
        input_["invoker"] = invoker
    if reverse_order is not None:
        input_["reverse_order"] = reverse_order
    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