Skip to content

list_deployment_pattern_versions async

list_deployment_pattern_versions(
    workload_name: WorkloadName,
    deployment_pattern_name: DeploymentPatternName,
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[MaxWorkloadResults] = None,
    next_token: Optional[NextToken] = None,
    filters: Optional[FilterList] = None,
) -> ListDeploymentPatternVersionsOutput

Lists the deployment pattern versions.

Parameters:

Raises:

Examples:

List all visible versions for the given workload and deployment pattern.

>>> await client.list_deployment_pattern_versions(workload_name='security-automations-for-aws-waf', deployment_pattern_name='default')
List filtered versions for the given workload and deployment pattern.
>>> await client.list_deployment_pattern_versions(workload_name='security-automations-for-aws-waf', deployment_pattern_name='default', filters=[{'name': 'updateFromVersion', 'values': ['4.0.2']}])
Source code in docs_src/capo_launch_wizard/_services/async_launch_wizard.py
async def list_deployment_pattern_versions(
    self,
    workload_name: "capo_launch_wizard.types.workload_name.WorkloadName",
    deployment_pattern_name: "capo_launch_wizard.types.deployment_pattern_name.DeploymentPatternName",
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[
        "capo_launch_wizard.types.max_workload_results.MaxWorkloadResults"
    ] = None,
    next_token: Optional["capo_launch_wizard.types.next_token.NextToken"] = None,
    filters: Optional["capo_launch_wizard.types.filter_list.FilterList"] = None,
) -> "capo_launch_wizard.types.list_deployment_pattern_versions_output.ListDeploymentPatternVersionsOutput":
    """<p>Lists the deployment pattern versions.</p>

    Args:
        workload_name: <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
        deployment_pattern_name: <p>The name of the deployment pattern. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
        max_results: <p>The maximum number of deployment pattern versions to list.</p>
        next_token: <p>The token for the next set of results.</p>
        filters: <p>Filters to apply when listing deployment pattern versions.</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 visible versions for the given workload and deployment pattern.

        >>> await client.list_deployment_pattern_versions(workload_name='security-automations-for-aws-waf', deployment_pattern_name='default')
        List filtered versions for the given workload and deployment pattern.

        >>> await client.list_deployment_pattern_versions(workload_name='security-automations-for-aws-waf', deployment_pattern_name='default', filters=[{'name': 'updateFromVersion', 'values': ['4.0.2']}])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_launch_wizard.types.list_deployment_pattern_versions_input.ListDeploymentPatternVersionsInput]",
    ) -> AsyncOperationResponse[
        "capo_launch_wizard.types.list_deployment_pattern_versions_output.ListDeploymentPatternVersionsOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.list_deployment_pattern_versions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeploymentPatternVersions")
    )
    input_: capo_launch_wizard.types.list_deployment_pattern_versions_input.ListDeploymentPatternVersionsInput = {
        "workload_name": workload_name,
        "deployment_pattern_name": deployment_pattern_name,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters

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