Skip to content

get_deployment_group async

get_deployment_group(
    application_name: ApplicationName,
    deployment_group_name: DeploymentGroupName,
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> GetDeploymentGroupOutput

Gets information about a deployment group.

Parameters:

  • application_name (ApplicationName) –

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

  • deployment_group_name (DeploymentGroupName) –

    The name of a deployment group for the specified application.

Raises:

Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
async def get_deployment_group(
    self,
    application_name: "capo_codedeploy.types.application_name.ApplicationName",
    deployment_group_name: "capo_codedeploy.types.deployment_group_name.DeploymentGroupName",
    *,
    config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.get_deployment_group_output.GetDeploymentGroupOutput":
    """<p>Gets information about a deployment group.</p>

    Args:
        application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
        deployment_group_name: <p>The name of a deployment group for the specified application.</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.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_does_not_exist_exception.DeploymentGroupDoesNotExistException: <p>The named deployment group with the user or Amazon Web Services account does not exist.</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.get_deployment_group_input.GetDeploymentGroupInput]",
    ) -> AsyncOperationResponse[
        "capo_codedeploy.types.get_deployment_group_output.GetDeploymentGroupOutput"
    ]:
        import capo_codedeploy._operations.code_deploy_20141006.get_deployment_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeploymentGroup")
    )
    input_: capo_codedeploy.types.get_deployment_group_input.GetDeploymentGroupInput = {
        "application_name": application_name,
        "deployment_group_name": deployment_group_name,
    }

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