Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.
Parameters:
-
knowledge_base_id
(UuidOrArn)
–
The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.
-
template_uri
(Uri)
–
The template URI to update.
Raises:
Source code in docs_src/capo_wisdom/_services/async_wisdom.py
| async def update_knowledge_base_template_uri(
self,
knowledge_base_id: "capo_wisdom.types.uuid_or_arn.UuidOrArn",
template_uri: "capo_wisdom.types.uri.Uri",
*,
config_overrides: Optional[AsyncWisdomClientConfig] = None,
) -> "capo_wisdom.types.update_knowledge_base_template_uri_response.UpdateKnowledgeBaseTemplateUriResponse":
"""<p>Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in <code>${variable}</code> format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an <code>Id</code> value, and you can set the template URI to <code>https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view</code>. </p>
Args:
knowledge_base_id: <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
template_uri: <p>The template URI to update.</p>
Raises:
capo_wisdom.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_wisdom.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_wisdom.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
capo_wisdom.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_wisdom.types.update_knowledge_base_template_uri_request.UpdateKnowledgeBaseTemplateUriRequest]",
) -> AsyncOperationResponse[
"capo_wisdom.types.update_knowledge_base_template_uri_response.UpdateKnowledgeBaseTemplateUriResponse"
]:
import capo_wisdom._operations.wisdom_service.update_knowledge_base_template_uri
(
output,
http_response,
) = await capo_wisdom._operations.wisdom_service.update_knowledge_base_template_uri.async_update_knowledge_base_template_uri(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateKnowledgeBaseTemplateUri")
)
input_: capo_wisdom.types.update_knowledge_base_template_uri_request.UpdateKnowledgeBaseTemplateUriRequest = {
"knowledge_base_id": knowledge_base_id,
"template_uri": template_uri,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|