Skip to content

batch_get_deployment_groups async

batch_get_deployment_groups(
    application_name: ApplicationName,
    deployment_group_names: DeploymentGroupsList,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> BatchGetDeploymentGroupsOutput

Gets information about one or more deployment groups.

Parameters:

  • application_name (ApplicationName) –

    The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.

  • deployment_group_names (DeploymentGroupsList) –

    The names of the deployment groups.

Raises:

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def batch_get_deployment_groups(
    self,
    application_name: "capo_codedeploy.types.application_name.ApplicationName",
    deployment_group_names: "capo_codedeploy.types.deployment_groups_list.DeploymentGroupsList",
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.batch_get_deployment_groups_output.BatchGetDeploymentGroupsOutput":
    """<p>Gets information about one or more deployment groups.</p>

    Args:
        application_name: <p>The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.</p>
        deployment_group_names: <p>The names of the deployment groups.</p>

    Raises:
        capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException: <p>The application does not exist with the user or Amazon Web Services account.</p>
        capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException: <p>The minimum number of required application names was not specified.</p>
        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_config_does_not_exist_exception.DeploymentConfigDoesNotExistException: <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
        capo_codedeploy.errors.deployment_group_name_required_exception.DeploymentGroupNameRequiredException: <p>The deployment group name was not specified.</p>
        capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
        capo_codedeploy.errors.invalid_deployment_group_name_exception.InvalidDeploymentGroupNameException: <p>The deployment group name 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_deployment_groups_input.BatchGetDeploymentGroupsInput]",
    ) -> AsyncOperationResponse[
        "capo_codedeploy.types.batch_get_deployment_groups_output.BatchGetDeploymentGroupsOutput"
    ]:
        import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_groups

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetDeploymentGroups")
    )
    input_: capo_codedeploy.types.batch_get_deployment_groups_input.BatchGetDeploymentGroupsInput = {
        "application_name": application_name,
        "deployment_group_names": deployment_group_names,
    }

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