View a markdown version of this page

CreateOntology - AWS Context

CreateOntology

Creates an ontology from an OWL ontology document. An ontology defines the types of nodes and edges in an agent context. Returns the new ontology's ID and ARN.

Request Parameters

clientToken

Client idempotency token. A reused token with an identical request returns the existing ontology with no second write. A reused token with a different request (any member differs, for example name, description, sourceFormat, or source) is a ValidationException naming clientToken, never a ConflictException. The AWS SDKs generate the token automatically. A request that arrives without a token is a ValidationException.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\x21-\x7E]+

Required: No

description

Optional description of the ontology. Part of the idempotency comparison on a replay.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: \P{Cc}*

Required: No

name

Friendly display name for the ontology (for example, "Sales Org"). AWS Context assigns the ontology its opaque ID. This name is a non-unique label. You can rename the ontology in the AWS Context console.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [^\s\p{Cc}\p{Z}\p{Cf}](\P{Cc}*[^\s\p{Cc}\p{Z}\p{Cf}])?

Required: Yes

source

An OWL ontology to derive the template from, in sourceFormat.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2000000.

Required: Yes

sourceFormat

The format of source. The only supported value is TURTLE.

Type: String

Valid Values: TURTLE

Required: Yes

tags

Tags to add to the ontology when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with aws:. To add tags, you also need context:TagResource permission on the new ontology. If you specify more than 50 user tags, the request fails with ServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with ValidationException.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: No

Response Elements

The following elements are returned by the service.

arn

The ARN of the created ontology.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:(\d{12})?:ontology/[a-z0-9]+(-[a-z0-9]+)*

description

The description as stored. Absent when there is none. On a replay, the current one.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: \P{Cc}*

id

The ID of the ontology, assigned by AWS Context.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 180.

Pattern: (arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:(\d{12})?:ontology/)?[a-z0-9]+(-[a-z0-9]+)*

name

The display name as stored. On a replay, the current one.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [^\s\p{Cc}\p{Z}\p{Cf}](\P{Cc}*[^\s\p{Cc}\p{Z}\p{Cf}])?

updatedAt

When the ontology last changed. On create, the creation time. On a replay, the current value.

Type: Timestamp

validationIssues

Non-fatal warnings from the derivation, such as SYNTHESIZED_NODE_ID or a widened datatype. AWS Context also stores them on the version, and GetOntology returns them in validationIssues. Absent or empty if the derivation produced no warnings.

Type: Array of OntologyValidationIssue objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

version

The initial version that CreateOntology created, in MAJOR.MINOR.PATCH form, for example 1.0.0.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: (0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.

message

A message that describes the error.

HTTP Status Code: 403

ConflictException

The request conflicts with the current state of the resource. Check the resource's current state before you retry the request.

message

A message that describes the error.

resourceId

The ID of the resource that caused the conflict. When several resources caused it, a comma-separated list of their IDs.

resourceType

The type of the resource that caused the conflict.

Valid values:

  • agent-context - An agent context.

  • connection - A connection.

  • curation-policy - A curation policy.

  • evaluation - Reserved for future use.

  • ontology - An ontology.

  • ontology-induction - An ontology induction.

  • resource-policy - A resource-based policy.

HTTP Status Code: 409

InternalServerException

The request failed because of an internal error. Retry the request.

message

A message that describes the error.

HTTP Status Code: 500

ServiceQuotaExceededException

The request would exceed a service quota. Check the quota that quotaCode names, reduce your usage, and then retry the request.

message

A message that describes the error.

quotaCode

The code of the quota that the request would exceed.

resourceId

The ID of the resource that the quota applies to.

resourceType

The type of the resource that the quota applies to.

Valid values:

  • agent-context - An agent context.

  • connection - A connection.

  • curation-policy - A curation policy.

  • evaluation - Reserved for future use.

  • ontology - An ontology.

  • ontology-induction - An ontology induction.

  • resource-policy - A resource-based policy.

serviceCode

The code of the service that owns the quota.

HTTP Status Code: 402

ThrottlingException

The request was denied because it exceeded a request rate quota. Wait, then retry the request.

message

A message that describes the error.

quotaCode

The code of the quota that throttled the request.

retryAfterSeconds

The number of seconds to wait before you retry the request, if AWS Context provides one.

serviceCode

The code of the service whose quota throttled the request.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.

fieldList

The fields that failed validation, each with a message that describes why.

message

A message that describes the error.

reason

The reason that the input failed validation. Valid values:

  • unknownOperation - The operation isn't recognized.

  • cannotParse - The request couldn't be parsed.

  • fieldValidationFailed - One or more fields failed validation. fieldList describes them.

  • other - Another reason. message describes it.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: