Skip to content

update_application async

update_application(
    application_id: Identifier,
    current_application_version: Version,
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
    description: Optional[EntityDescription] = None,
    definition: Optional[Definition] = None,
) -> UpdateApplicationResponse

Updates an application and creates a new version.

Parameters:

  • application_id (Identifier) –

    The unique identifier of the application you want to update.

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

    The description of the application to update.

  • current_application_version (Version) –

    The current version of the application to update.

  • definition (Optional[Definition], default: None ) –

    The application definition for this application. You can specify either inline JSON or an S3 bucket location.

Raises:

Source code in docs_src/capo_m2/_services/async_m2.py
async def update_application(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    current_application_version: "capo_m2.types.version.Version",
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
    description: Optional[
        "capo_m2.types.entity_description.EntityDescription"
    ] = None,
    definition: Optional["capo_m2.types.definition.Definition"] = None,
) -> "capo_m2.types.update_application_response.UpdateApplicationResponse":
    """<p>Updates an application and creates a new version.</p>

    Args:
        application_id: <p>The unique identifier of the application you want to update.</p>
        description: <p>The description of the application to update.</p>
        current_application_version: <p>The current version of the application to update.</p>
        definition: <p>The application definition for this application. You can specify either inline JSON or an S3 bucket location.</p>

    Raises:
        capo_m2.errors.access_denied_exception.AccessDeniedException: <p>The account or role doesn't have the right permissions to make the request.</p>
        capo_m2.errors.conflict_exception.ConflictException: <p>The parameters provided in the request conflict with existing resources.</p>
        capo_m2.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_m2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_m2.errors.throttling_exception.ThrottlingException: <p>The number of requests made exceeds the limit.</p>
        capo_m2.errors.validation_exception.ValidationException: <p>One or more parameters provided in the request is not valid.</p>
        capo_m2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_m2.types.update_application_request.UpdateApplicationRequest]",
    ) -> AsyncOperationResponse[
        "capo_m2.types.update_application_response.UpdateApplicationResponse"
    ]:
        import capo_m2._operations.aws_supernova_control_plane_service.update_application

        (
            output,
            http_response,
        ) = await capo_m2._operations.aws_supernova_control_plane_service.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_m2.types.update_application_request.UpdateApplicationRequest = {
        "application_id": application_id,
        "current_application_version": current_application_version,
    }
    if description is not None:
        input_["description"] = description
    if definition is not None:
        input_["definition"] = definition

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