Skip to content

list_notifications

list_notifications(
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    workload_id: Optional[WorkloadId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    resource_arn: Optional[ResourceArn] = None,
) -> ListNotificationsOutput

List lens notifications.

Parameters:

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

    The maximum number of results to return for this request.

  • resource_arn (Optional[ResourceArn], default: None ) –

    The ARN for the related resource for the notification.

    Only one of WorkloadID or ResourceARN should be specified.

Raises:

Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def list_notifications(
    self,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    workload_id: Optional[
        "capo_wellarchitected.types.workload_id.WorkloadId"
    ] = None,
    next_token: Optional["capo_wellarchitected.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_wellarchitected.types.max_results.MaxResults"
    ] = None,
    resource_arn: Optional[
        "capo_wellarchitected.types.resource_arn.ResourceArn"
    ] = None,
) -> "capo_wellarchitected.types.list_notifications_output.ListNotificationsOutput":
    """<p>List lens notifications.</p>

    Args:
        max_results: <p>The maximum number of results to return for this request.</p>
        resource_arn: <p>The ARN for the related resource for the notification.</p> <note> <p>Only one of <code>WorkloadID</code> or <code>ResourceARN</code> should be specified.</p> </note>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_wellarchitected.types.list_notifications_input.ListNotificationsInput]",
    ) -> OperationResponse[
        "capo_wellarchitected.types.list_notifications_output.ListNotificationsOutput"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.list_notifications

        output, http_response = (
            capo_wellarchitected._operations.well_architected_api_service_lambda.list_notifications.list_notifications(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNotifications")
    )
    input_: capo_wellarchitected.types.list_notifications_input.ListNotificationsInput = {}
    if workload_id is not None:
        input_["workload_id"] = workload_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if resource_arn is not None:
        input_["resource_arn"] = resource_arn

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