create_content
async
¶
create_content(
knowledge_base_id: UuidOrArn,
name: Name,
upload_id: UploadId,
*,
config_overrides: Optional[AsyncWisdomClientConfig] = None,
title: Optional[ContentTitle] = None,
override_link_out_uri: Optional[Uri] = None,
metadata: Optional[ContentMetadata] = None,
client_token: Optional[NonEmptyString] = None,
tags: Optional[Tags] = None,
) -> CreateContentResponse
Creates Wisdom content. Before to calling this API, use StartContentUpload to upload an asset.
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.
-
name(Name) –The name of the content. Each piece of content in a knowledge base must have a unique name. You can retrieve a piece of content using only its knowledge base and its name with the SearchContent API.
-
title(Optional[ContentTitle], default:None) –The title of the content. If not set, the title is equal to the name.
-
override_link_out_uri(Optional[Uri], default:None) –The URI you want to use for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content.
-
metadata(Optional[ContentMetadata], default:None) –A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.
-
upload_id(UploadId) –A pointer to the uploaded asset. This value is returned by StartContentUpload.
-
client_token(Optional[NonEmptyString], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
tags(Optional[Tags], default:None) –The tags used to organize, track, or control access for this resource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource. For example, if you're using a
CreateAPI (such asCreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated. -
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–You've exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use service quotas to request a service quota increase.
-
ValidationException–The input fails to satisfy the constraints specified by a service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_wisdom/_services/async_wisdom.py
2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 | |