Skip to content

list_agent_recommendation_generations async

list_agent_recommendation_generations(
    profile_arn: AgentProfileArn,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    recommendation_type: Optional[RecommendationType] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListAgentRecommendationGenerationsResponse

Lists recommendation generation processes for a specified profile.

Parameters:

  • profile_arn (AgentProfileArn) –

    The Amazon Resource Name (ARN) of the optimization profile to list generation processes for.

  • recommendation_type (Optional[RecommendationType], default: None ) –

    Optional filter by recommendation type.

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

    The maximum number of generation processes to return in a single response.

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

    A pagination token returned from a previous call to continue retrieving results.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def list_agent_recommendation_generations(
    self,
    profile_arn: "capo_wellarchitected.types.agent_profile_arn.AgentProfileArn",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    recommendation_type: Optional[
        "capo_wellarchitected.types.recommendation_type.RecommendationType"
    ] = None,
    max_results: Optional[
        "capo_wellarchitected.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_wellarchitected.types.next_token.NextToken"] = None,
) -> "capo_wellarchitected.types.list_agent_recommendation_generations_response.ListAgentRecommendationGenerationsResponse":
    """<p>Lists recommendation generation processes for a specified profile.</p>

    Args:
        profile_arn: <p>The Amazon Resource Name (ARN) of the optimization profile to list generation processes for.</p>
        recommendation_type: <p>Optional filter by recommendation type.</p>
        max_results: <p>The maximum number of generation processes to return in a single response.</p>
        next_token: <p>A pagination token returned from a previous call to continue retrieving results.</p>

    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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wellarchitected.types.list_agent_recommendation_generations_request.ListAgentRecommendationGenerationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.list_agent_recommendation_generations_response.ListAgentRecommendationGenerationsResponse"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.list_agent_recommendation_generations

        (
            output,
            http_response,
        ) = await capo_wellarchitected._operations.well_architected_api_service_lambda.list_agent_recommendation_generations.async_list_agent_recommendation_generations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAgentRecommendationGenerations")
    )
    input_: capo_wellarchitected.types.list_agent_recommendation_generations_request.ListAgentRecommendationGenerationsRequest = {
        "profile_arn": profile_arn
    }
    if recommendation_type is not None:
        input_["recommendation_type"] = recommendation_type
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output