Skip to content

update_application

update_application(
    id: Id,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    data_sources: Optional[DataSources] = None,
    app_configs: Optional[AppConfigs] = None,
    iam_identity_center_options: Optional[IamIdentityCenterOptionsInput] = None,
) -> UpdateApplicationResponse

Updates the configuration and settings of an existing OpenSearch application.

Parameters:

  • id (Id) –

    The unique identifier for the OpenSearch application to be updated.

  • data_sources (Optional[DataSources], default: None ) –

    The data sources to associate with the OpenSearch application.

  • app_configs (Optional[AppConfigs], default: None ) –

    The configuration settings to modify for the OpenSearch application.

  • iam_identity_center_options (Optional[IamIdentityCenterOptionsInput], default: None ) –

    Configuration settings for integrating IAM Identity Center with the OpenSearch application.

Raises:

  • AccessDeniedException –

    An error occurred because you don't have permissions to access the resource.

  • BaseException –

    An error occurred while processing the request.

  • ConflictException –

    An error occurred because the client attempts to remove a resource that is currently in use.

  • DisabledOperationException –

    An error occured because the client wanted to access an unsupported operation.

  • InternalException –

    Request processing failed because of an unknown error, exception, or internal failure.

  • ResourceNotFoundException –

    An exception for accessing or deleting a resource that doesn't exist.

  • ValidationException –

    An exception for accessing or deleting a resource that doesn't exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_opensearch/_services/open_search.py
def update_application(
    self,
    id: "capo_opensearch.types.id.Id",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    data_sources: Optional["capo_opensearch.types.data_sources.DataSources"] = None,
    app_configs: Optional["capo_opensearch.types.app_configs.AppConfigs"] = None,
    iam_identity_center_options: Optional[
        "capo_opensearch.types.iam_identity_center_options_input.IamIdentityCenterOptionsInput"
    ] = None,
) -> "capo_opensearch.types.update_application_response.UpdateApplicationResponse":
    """<p>Updates the configuration and settings of an existing OpenSearch application.</p>

    Args:
        id: <p>The unique identifier for the OpenSearch application to be updated.</p>
        data_sources: <p>The data sources to associate with the OpenSearch application.</p>
        app_configs: <p>The configuration settings to modify for the OpenSearch application.</p>
        iam_identity_center_options: <p>Configuration settings for integrating IAM Identity Center with the OpenSearch application.</p>

    Raises:
        capo_opensearch.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because you don't have permissions to access the resource.</p>
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.conflict_exception.ConflictException: <p>An error occurred because the client attempts to remove a resource that is currently in use.</p>
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.update_application_request.UpdateApplicationRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.update_application_response.UpdateApplicationResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.update_application

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.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_opensearch.types.update_application_request.UpdateApplicationRequest = {
        "id": id
    }
    if data_sources is not None:
        input_["data_sources"] = data_sources
    if app_configs is not None:
        input_["app_configs"] = app_configs
    if iam_identity_center_options is not None:
        input_["iam_identity_center_options"] = iam_identity_center_options

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