Skip to content

start_agent_recommendation_generation async

start_agent_recommendation_generation(
    profile_arn: AgentProfileArn,
    types: RecommendationTypes,
    scope: Scope,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    name: Optional[str] = None,
    additional_context: Optional[object] = None,
) -> StartAgentRecommendationGenerationResponse

Initiates a new recommendation generation process for the specified optimization profile. This asynchronous operation analyzes your Amazon Web Services resources and generates optimization recommendations based on the configured pillars and scope. Use GetAgentRecommendationGeneration to check status.

Parameters:

  • profile_arn (AgentProfileArn) –

    The Amazon Resource Name (ARN) of the optimization profile to use for generating recommendations.

  • types (RecommendationTypes) –

    The types of recommendations to generate.

  • name (Optional[str], default: None ) –

    An optional name for this generation process to help identify it in lists and logs.

  • additional_context (Optional[object], default: None ) –

    Optional additional context to guide the recommendation generation, such as specific business requirements or constraints.

  • scope (Scope) –

    Scope configuration to focus the generation on specific pillars or goals.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def start_agent_recommendation_generation(
    self,
    profile_arn: "capo_wellarchitected.types.agent_profile_arn.AgentProfileArn",
    types: "capo_wellarchitected.types.recommendation_types.RecommendationTypes",
    scope: "capo_wellarchitected.types.scope.Scope",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    name: Optional[str] = None,
    additional_context: Optional[object] = None,
) -> "capo_wellarchitected.types.start_agent_recommendation_generation_response.StartAgentRecommendationGenerationResponse":
    """<p>Initiates a new recommendation generation process for the specified optimization profile. This asynchronous operation analyzes your Amazon Web Services resources and generates optimization recommendations based on the configured pillars and scope. Use GetAgentRecommendationGeneration to check status.</p>

    Args:
        profile_arn: <p>The Amazon Resource Name (ARN) of the optimization profile to use for generating recommendations.</p>
        types: <p>The types of recommendations to generate.</p>
        name: <p>An optional name for this generation process to help identify it in lists and logs.</p>
        additional_context: <p>Optional additional context to guide the recommendation generation, such as specific business requirements or constraints.</p>
        scope: <p>Scope configuration to focus the generation on specific pillars or goals.</p>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_wellarchitected.errors.conflict_exception.ConflictException: <p>The resource has already been processed, was deleted, or is too large.</p>
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The user has reached their resource quota.</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.start_agent_recommendation_generation_request.StartAgentRecommendationGenerationRequest]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.start_agent_recommendation_generation_response.StartAgentRecommendationGenerationResponse"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.start_agent_recommendation_generation

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartAgentRecommendationGeneration")
    )
    input_: capo_wellarchitected.types.start_agent_recommendation_generation_request.StartAgentRecommendationGenerationRequest = {
        "profile_arn": profile_arn,
        "types": types,
        "scope": scope,
    }
    if name is not None:
        input_["name"] = name
    if additional_context is not None:
        input_["additional_context"] = additional_context

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