Skip to content

get_application

get_application(
    application_name: ApplicationName,
    *,
    config_overrides: Optional[CodeDeployClientConfig] = None,
) -> GetApplicationOutput

Gets information about an application.

Parameters:

  • application_name (ApplicationName) –

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

Raises:

Source code in docs_src/capo_codedeploy/_services/code_deploy.py
def get_application(
    self,
    application_name: "capo_codedeploy.types.application_name.ApplicationName",
    *,
    config_overrides: Optional[CodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.get_application_output.GetApplicationOutput":
    """<p>Gets information about an application.</p>

    Args:
        application_name: <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</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.invalid_application_name_exception.InvalidApplicationNameException: <p>The application name was specified in an invalid format.</p>
        capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codedeploy.types.get_application_input.GetApplicationInput]",
    ) -> OperationResponse[
        "capo_codedeploy.types.get_application_output.GetApplicationOutput"
    ]:
        import capo_codedeploy._operations.code_deploy_20141006.get_application

        output, http_response = (
            capo_codedeploy._operations.code_deploy_20141006.get_application.get_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetApplication")
    )
    input_: capo_codedeploy.types.get_application_input.GetApplicationInput = {
        "application_name": application_name
    }

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