Skip to content

update_application async

update_application(
    application_id: Name,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = 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.

>>> await client.update_application(application_id='339ohji', name='Example-Application', description='')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def update_application(
    self,
    application_id: "capo_appconfig.types.name.Name",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = 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.

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

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

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.update_application.async_update_application(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output