Skip to content

update_application async

update_application(
    application_id: __string,
    *,
    config_overrides: Optional[AsyncServerlessApplicationRepositoryClientConfig] = None,
    author: Optional[__string] = None,
    description: Optional[__string] = None,
    home_page_url: Optional[__string] = None,
    labels: Optional[__listOf__string] = None,
    readme_body: Optional[__string] = None,
    readme_url: Optional[__string] = None,
) -> UpdateApplicationResponse

Updates the specified application.

Parameters:

  • application_id (__string) –

    The Amazon Resource Name (ARN) of the application.

  • author (Optional[__string], default: None ) –

    The name of the author publishing the app.

    Minimum length=1. Maximum length=127.

    Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";

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

    The description of the application.

    Minimum length=1. Maximum length=256

  • home_page_url (Optional[__string], default: None ) –

    A URL with more information about the application, for example the location of your GitHub repository for the application.

  • labels (Optional[__listOf__string], default: None ) –

    Labels to improve discovery of apps in search results.

    Minimum length=1. Maximum length=127. Maximum number of labels: 10

    Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";

  • readme_body (Optional[__string], default: None ) –

    A text readme file in Markdown language that contains a more detailed description of the application and how it works.

    Maximum size 5 MB

  • readme_url (Optional[__string], default: None ) –

    A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.

    Maximum size 5 MB

Raises:

Source code in docs_src/capo_serverlessapplicationrepository/_services/async_serverless_application_repository.py
async def update_application(
    self,
    application_id: "capo_serverlessapplicationrepository.types.__string.__string",
    *,
    config_overrides: Optional[
        AsyncServerlessApplicationRepositoryClientConfig
    ] = None,
    author: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    description: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    home_page_url: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    labels: Optional[
        "capo_serverlessapplicationrepository.types.__list_of__string.__listOf__string"
    ] = None,
    readme_body: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    readme_url: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
) -> "capo_serverlessapplicationrepository.types.update_application_response.UpdateApplicationResponse":
    r"""<p>Updates the specified application.</p>

    Args:
        application_id: <p>The Amazon Resource Name (ARN) of the application.</p>
        author: <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
        description: <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
        home_page_url: <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
        labels: <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
        readme_body: <p>A text readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
        readme_url: <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>

    Raises:
        capo_serverlessapplicationrepository.errors.bad_request_exception.BadRequestException: <p>One of the parameters in the request is invalid.</p>
        capo_serverlessapplicationrepository.errors.conflict_exception.ConflictException: <p>The resource already exists.</p>
        capo_serverlessapplicationrepository.errors.forbidden_exception.ForbiddenException: <p>The client is not authenticated.</p>
        capo_serverlessapplicationrepository.errors.internal_server_error_exception.InternalServerErrorException: <p>The AWS Serverless Application Repository service encountered an internal error.</p>
        capo_serverlessapplicationrepository.errors.not_found_exception.NotFoundException: <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
        capo_serverlessapplicationrepository.errors.too_many_requests_exception.TooManyRequestsException: <p>The client is sending more than the allowed number of requests per unit of time.</p>
        capo_serverlessapplicationrepository.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_serverlessapplicationrepository._operations.serverless_application_repository.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_serverlessapplicationrepository.types.update_application_request.UpdateApplicationRequest = {
        "application_id": application_id
    }
    if author is not None:
        input_["author"] = author
    if description is not None:
        input_["description"] = description
    if home_page_url is not None:
        input_["home_page_url"] = home_page_url
    if labels is not None:
        input_["labels"] = labels
    if readme_body is not None:
        input_["readme_body"] = readme_body
    if readme_url is not None:
        input_["readme_url"] = readme_url

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