Skip to content

update_application

update_application(
    application_id: Name,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[Description] = None,
) -> Application

Updates an application.

Parameters:

  • application_id (Name) –

    The application ID.

  • name (Optional[Name], default: None ) –

    The name of the application.

  • description (Optional[Description], default: None ) –

    A description of the application.

Raises:

Examples:

To update an application The following update-application example updates the name of the specified application.

>>> client.update_application(application_id='339ohji', name='Example-Application', description='')
Source code in docs_src/capo_appconfig/_services/app_config.py
def update_application(
    self,
    application_id: "capo_appconfig.types.name.Name",
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    name: Optional["capo_appconfig.types.name.Name"] = None,
    description: Optional["capo_appconfig.types.description.Description"] = None,
) -> "capo_appconfig.types.application.Application":
    """<p>Updates an application.</p>

    Args:
        application_id: <p>The application ID.</p>
        name: <p>The name of the application.</p>
        description: <p>A description of the application.</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.

    Examples:
        To update an application
        The following update-application example updates the name of the specified application.

        >>> client.update_application(application_id='339ohji', name='Example-Application', description='')
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.update_application_request.UpdateApplicationRequest]",
    ) -> OperationResponse["capo_appconfig.types.application.Application"]:
        import capo_appconfig._operations.amazon_app_config.update_application

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.update_application.update_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateApplication")
    )
    input_: capo_appconfig.types.update_application_request.UpdateApplicationRequest = {
        "application_id": application_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description

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