Skip to content

batch_get_deployments async

batch_get_deployments(
    deployment_ids: DeploymentsList,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> BatchGetDeploymentsOutput

Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.

Parameters:

  • deployment_ids (DeploymentsList) –

    A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.

Raises:

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def batch_get_deployments(
    self,
    deployment_ids: "capo_codedeploy.types.deployments_list.DeploymentsList",
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.batch_get_deployments_output.BatchGetDeploymentsOutput":
    """<p>Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.</p>

    Args:
        deployment_ids: <p> A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.</p>

    Raises:
        capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
        capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
        capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
        capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codedeploy.types.batch_get_deployments_input.BatchGetDeploymentsInput]",
    ) -> AsyncOperationResponse[
        "capo_codedeploy.types.batch_get_deployments_output.BatchGetDeploymentsOutput"
    ]:
        import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployments

        (
            output,
            http_response,
        ) = await capo_codedeploy._operations.code_deploy_20141006.batch_get_deployments.async_batch_get_deployments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetDeployments")
    )
    input_: capo_codedeploy.types.batch_get_deployments_input.BatchGetDeploymentsInput = {
        "deployment_ids": deployment_ids
    }

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