Skip to content

list_deployments

list_deployments(
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    filters: Optional[DeploymentFilterList] = None,
    max_results: Optional[MaxDeploymentResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListDeploymentsOutput

Lists the deployments that have been created.

Parameters:

  • filters (Optional[DeploymentFilterList], default: None ) –

    Filters to scope the results. The following filters are supported:

    • WORKLOAD_NAME - The name used in deployments.

    • DEPLOYMENT_STATUS - COMPLETED | CREATING | DELETE_IN_PROGRESS | DELETE_INITIATING | DELETE_FAILED | DELETED | FAILED | IN_PROGRESS | VALIDATING

  • max_results (Optional[MaxDeploymentResults], 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:

  • InternalServerException –

    An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on re:Post.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

List deployments in the account with filters.

>>> client.list_deployments(filters=[{'name': 'DEPLOYMENT_STATUS', 'values': ['IN_PROGRESS']}])
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
def list_deployments(
    self,
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    filters: Optional[
        "capo_launch_wizard.types.deployment_filter_list.DeploymentFilterList"
    ] = None,
    max_results: Optional[
        "capo_launch_wizard.types.max_deployment_results.MaxDeploymentResults"
    ] = None,
    next_token: Optional["capo_launch_wizard.types.next_token.NextToken"] = None,
) -> "capo_launch_wizard.types.list_deployments_output.ListDeploymentsOutput":
    """<p>Lists the deployments that have been created.</p>

    Args:
        filters: <p>Filters to scope the results. The following filters are supported:</p> <ul> <li> <p> <code>WORKLOAD_NAME</code> - The name used in deployments.</p> </li> <li> <p> <code>DEPLOYMENT_STATUS</code> - <code>COMPLETED</code> | <code>CREATING</code> | <code>DELETE_IN_PROGRESS</code> | <code>DELETE_INITIATING</code> | <code>DELETE_FAILED</code> | <code>DELETED</code> | <code>FAILED</code> | <code>IN_PROGRESS</code> | <code>VALIDATING</code> </p> </li> </ul>
        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.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 deployments in the account with filters.

        >>> client.list_deployments(filters=[{'name': 'DEPLOYMENT_STATUS', 'values': ['IN_PROGRESS']}])
    """

    def _handler(
        req: "OperationRequest[capo_launch_wizard.types.list_deployments_input.ListDeploymentsInput]",
    ) -> OperationResponse[
        "capo_launch_wizard.types.list_deployments_output.ListDeploymentsOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.list_deployments

        output, http_response = (
            capo_launch_wizard._operations.launch_wizard.list_deployments.list_deployments(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeployments")
    )
    input_: capo_launch_wizard.types.list_deployments_input.ListDeploymentsInput = {}
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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