Skip to content

list_workload_deployment_patterns async

list_workload_deployment_patterns(
    workload_name: WorkloadName,
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[MaxWorkloadDeploymentPatternResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListWorkloadDeploymentPatternsOutput

Lists the workload deployment patterns for a given workload name. You can use the ListWorkloads operation to discover the available workload names.

Parameters:

  • workload_name (WorkloadName) –

    The name of the workload.

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

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output.

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

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

Raises:

Examples:

List all available workloads supported by AWS Launch Wizard.

>>> await client.list_workload_deployment_patterns(workload_name='SAP')
Source code in docs_src/capo_launch_wizard/_services/async_launch_wizard.py
async def list_workload_deployment_patterns(
    self,
    workload_name: "capo_launch_wizard.types.workload_name.WorkloadName",
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[
        "capo_launch_wizard.types.max_workload_deployment_pattern_results.MaxWorkloadDeploymentPatternResults"
    ] = None,
    next_token: Optional["capo_launch_wizard.types.next_token.NextToken"] = None,
) -> "capo_launch_wizard.types.list_workload_deployment_patterns_output.ListWorkloadDeploymentPatternsOutput":
    """<p>Lists the workload deployment patterns for a given workload name. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html">ListWorkloads</a> operation to discover the available workload names.</p>

    Args:
        workload_name: <p>The name of the workload.</p>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output.</p>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>

    Raises:
        capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
        capo_launch_wizard.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified workload or deployment resource can't be found.</p>
        capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List all available workloads supported by AWS Launch Wizard.

        >>> await client.list_workload_deployment_patterns(workload_name='SAP')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_launch_wizard.types.list_workload_deployment_patterns_input.ListWorkloadDeploymentPatternsInput]",
    ) -> AsyncOperationResponse[
        "capo_launch_wizard.types.list_workload_deployment_patterns_output.ListWorkloadDeploymentPatternsOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.list_workload_deployment_patterns

        (
            output,
            http_response,
        ) = await capo_launch_wizard._operations.launch_wizard.list_workload_deployment_patterns.async_list_workload_deployment_patterns(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListWorkloadDeploymentPatterns")
    )
    input_: capo_launch_wizard.types.list_workload_deployment_patterns_input.ListWorkloadDeploymentPatternsInput = {
        "workload_name": workload_name
    }
    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