Skip to content

list_deployments async

list_deployments(
    application_id: Name,
    environment_id: Name,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> Deployments

Lists the deployments for an environment in descending deployment number order.

Parameters:

  • application_id (Name) –

    The application ID.

  • environment_id (Name) –

    The environment ID.

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

    The maximum number of items that may be returned for this call. If there are items that have not yet been returned, the response will include a non-null NextToken that you can provide in a subsequent call to get the next set of results.

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

    The token returned by a prior call to this operation indicating the next set of results to be returned. If not specified, the operation will return the first set of results.

Raises:

Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def list_deployments(
    self,
    application_id: "capo_appconfig.types.name.Name",
    environment_id: "capo_appconfig.types.name.Name",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    max_results: Optional["capo_appconfig.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_appconfig.types.next_token.NextToken"] = None,
) -> "capo_appconfig.types.deployments.Deployments":
    """<p>Lists the deployments for an environment in descending deployment number order.</p>

    Args:
        application_id: <p>The application ID.</p>
        environment_id: <p>The environment ID.</p>
        max_results: <p>The maximum number of items that may be returned for this call. If there are items that have not yet been returned, the response will include a non-null <code>NextToken</code> that you can provide in a subsequent call to get the next set of results.</p>
        next_token: <p>The token returned by a prior call to this operation indicating the next set of results to be returned. If not specified, the operation will return the first set of results.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.list_deployments_request.ListDeploymentsRequest]",
    ) -> AsyncOperationResponse["capo_appconfig.types.deployments.Deployments"]:
        import capo_appconfig._operations.amazon_app_config.list_deployments

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.list_deployments.async_list_deployments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeployments")
    )
    input_: capo_appconfig.types.list_deployments_request.ListDeploymentsRequest = {
        "application_id": application_id,
        "environment_id": environment_id,
    }
    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