SDK for PHP V3

Client: Aws\Context\ContextClient
Service ID: context
Version: 2022-07-26

This page describes the parameters and results for the operations of the AWS Context (2022-07-26), and shows how to use the Aws\Context\ContextClient object to call the described operations. This documentation is specific to the 2022-07-26 API version of the service.

Service Description

AWS Context is a service that connects to your data where it already lives and builds an agent context that maps your business: what your terms mean, how your numbers are calculated, and which rules apply. AI agents use an agent context to find and interpret the information they need. This API reference describes the operations that you use to connect data sources, create agent contexts, describe your data with ontologies, govern changes with curation policies and proposals, and search, traverse, query, or ask questions of an agent context.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AcceptCurationProposal ( array $params = [] )
Accepts a curation proposal and applies its change to the agent context.
AgenticRetrieve ( array $params = [] )
Retrieves ranked context from an agent context for a natural-language question, in a single response.
AgenticRetrieveStream ( array $params = [] )
Answers a natural-language question against an agent context and streams the work as it happens.
AssociateCurationPolicy ( array $params = [] )
Associates a curation policy with an agent context.
CancelOntologyInduction ( array $params = [] )
Cancels an ontology induction that is still INDUCING.
CancelTask ( array $params = [] )
Cancels a task that is PENDING or IN_PROGRESS.
CreateAgentContext ( array $params = [] )
Creates an agent context over one or more connections.
CreateChangeSet ( array $params = [] )
Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of put, update, or delete.
CreateConnection ( array $params = [] )
Creates a connection to a data source, such as an AWS Glue Data Catalog, an Amazon Bedrock knowledge base, or a third-party data catalog through an AWS Glue connection.
CreateCurationPolicy ( array $params = [] )
Creates a curation policy, which decides which changes to an agent context are held for review as curation proposals instead of applied automatically.
CreateCurationPolicyVersion ( array $params = [] )
Publishes a curation policy's working copy as a new, immutable version.
CreateOntology ( array $params = [] )
Creates an ontology from an OWL ontology document.
DeleteAgentContext ( array $params = [] )
Deletes an agent context.
DeleteConnection ( array $params = [] )
Deletes a connection.
DeleteCurationPolicy ( array $params = [] )
Deletes a curation policy.
DeleteOntology ( array $params = [] )
Deletes an ontology that you own and all of its versions.
DeleteOntologyInduction ( array $params = [] )
Deletes an ontology induction.
DeleteResourcePolicy ( array $params = [] )
Removes the resource-based policy from an agent context.
DisassociateCurationPolicy ( array $params = [] )
Disassociates a curation policy from an agent context, so the agent context stops enforcing it.
ExecuteSql ( array $params = [] )
Runs one read-only SQL query over the tables of a connection in an agent context, and returns the result as typed columns and rows.
GetAgentContext ( array $params = [] )
Returns an agent context's configuration and status.
GetChangeSet ( array $params = [] )
Returns one change set's metadata: its status and the other fields of the change set, without its operations.
GetConnection ( array $params = [] )
Returns a connection's configuration and status.
GetCurationPolicy ( array $params = [] )
Returns a curation policy's configuration, status, and policy document.
GetCurationProposal ( array $params = [] )
Returns a curation proposal and a summary of the change that it holds for review.
GetOntology ( array $params = [] )
Returns an ontology's status and one of its versions.
GetOntologyInduction ( array $params = [] )
Returns an ontology induction's status, and, once it is a draft, the ontology it created.
GetResourcePolicy ( array $params = [] )
Returns the resource-based policy attached to an agent context, with its revision ID.
GetTask ( array $params = [] )
Returns a task's configuration, status, and results.
ListAgentContexts ( array $params = [] )
Lists the agent contexts in your account.
ListChangeSetOperations ( array $params = [] )
Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order.
ListChangeSets ( array $params = [] )
Lists an agent context's change sets that have the specified status, newest first.
ListConnections ( array $params = [] )
Lists the connections in your account, most recently updated first.
ListCurationPolicies ( array $params = [] )
Lists the curation policies in your account, or the ones associated with an agent context.
ListCurationProposals ( array $params = [] )
Lists an agent context's curation proposals, newest first.
ListOntologies ( array $params = [] )
Lists the ontologies in your account, with the status of each.
ListOntologyInductions ( array $params = [] )
Lists the ontology inductions in your account.
ListTagsForResource ( array $params = [] )
Returns the tags on an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
ListTasks ( array $params = [] )
Lists an agent context's tasks, newest first.
PutResourcePolicy ( array $params = [] )
Attaches a resource-based policy to an agent context, or replaces the one it has.
PutTrace ( array $params = [] )
Submits an agent's execution traces so that AWS Context can extract reusable knowledge and skills from them.
RejectCurationProposal ( array $params = [] )
Rejects a curation proposal.
SearchAgentContext ( array $params = [] )
Searches an agent context for entities matching a query.
StartOntologyInduction ( array $params = [] )
Starts an ontology induction, which induces a draft ontology from the documents that you provide.
StartTask ( array $params = [] )
Starts a task that imports a data dictionary, verified queries, or ontologies into an agent context.
TagResource ( array $params = [] )
Adds tags to an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
TraverseAgentContext ( array $params = [] )
Returns the neighbors of a seed node in an agent context, each with its properties, hop distance, and the edges that connect it to the seed.
UntagResource ( array $params = [] )
Removes tags from an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
UpdateAgentContext ( array $params = [] )
Updates an agent context's configuration.
UpdateChangeSet ( array $params = [] )
Drops operations from a change set that is held for curator review.
UpdateConnection ( array $params = [] )
Updates a connection's configuration.
UpdateCurationPolicy ( array $params = [] )
Updates a curation policy's working copy.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListAgentContexts
ListChangeSetOperations
ListChangeSets
ListConnections
ListCurationPolicies
ListCurationProposals
ListOntologies
ListOntologyInductions
ListTasks
SearchAgentContext
TraverseAgentContext

Operations

AcceptCurationProposal

$result = $client->acceptCurationProposal([/* ... */]);
$promise = $client->acceptCurationProposalAsync([/* ... */]);

Accepts a curation proposal and applies its change to the agent context.

Parameter Syntax

$result = $client->acceptCurationProposal([
    'agentContextId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'curationProposalId' => '<string>', // REQUIRED
    'revisionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with ResourceNotFoundException.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the proposal's current state, and the same token used with another proposal returns a ValidationException.

curationProposalId
Required: Yes
Type: string

The ID of the proposal to accept.

revisionId
Required: Yes
Type: string

The revisionId the curator observed. A mismatch means a stale view.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>',
    'changeSetId' => '<string>',
    'createdAt' => <DateTime>,
    'expiresAt' => <DateTime>,
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'id' => '<string>',
    'revisionId' => '<string>',
    'status' => 'PENDING_REVIEW|APPROVED|REJECTED|SUPERSEDED|FAILED|PUBLISHING|ARCHIVED',
    'statusReason' => [
        'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
        'message' => '<string>',
    ],
    'statusReasonCode' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
    'title' => '<string>',
    'triggeringPolicies' => [
        [
            'policyId' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessControl
Type: string

Who can read the authorizing change set's content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns accessControl on every proposal.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetId
Required: Yes
Type: string

The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was created.

expiresAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the review window closes, which is when a holding policy's autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

generatedBy
Type: string

The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.

id
Required: Yes
Type: string

The proposal's opaque instance ID. Requests take it as curationProposalId.

revisionId
Required: Yes
Type: string

An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

status
Required: Yes
Type: string

The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.

Valid values:

  • PENDING_REVIEW - Waiting for a curator's decision. The only status Accept and Reject act on.

  • APPROVED - A curator accepted it. Its change set is published or publishing.

  • REJECTED - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCode REQUEST_EXPIRED).

  • SUPERSEDED - A newer proposal for the same document replaced it.

  • FAILED - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.

  • PUBLISHING - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.

  • ARCHIVED - The connection that produced it was removed from the agent context. statusReason.code is CONNECTION_REMOVED.

statusReason
Type: StatusReason structure

Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

statusReasonCode
Type: string

Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.

Valid values:

  • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

  • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.

title
Type: string

A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add 'orders' and 2 more entities, and 20 relationships, Add 'orders → customers' and 2 more relationships, or Associate ontology 'my-ontology' version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

triggeringPolicies
Type: Array of TriggeringPolicy structures

The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set's evaluation). Absent if none held it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Accept a curation proposal

The following example accepts a curation proposal that is waiting for review, using the revisionId from GetCurationProposal, so AWS Context applies its change set to the agent context.

$result = $client->acceptCurationProposal([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'clientToken' => '5e2b8d14-6c3a-4f7e-9b1d-0a4c6e8f2b3d',
    'curationProposalId' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
    'revisionId' => '7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c',
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b',
    'createdAt' => ,
    'generatedBy' => 'DATA_SOURCE_INGESTION',
    'id' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
    'revisionId' => 'a9d1f3b5-7c2e-4a6b-8d0f-3e5a7c9b1d4f',
    'status' => 'APPROVED',
    'title' => 'Update 'orders' and 2 more entities, and 3 relationships',
    'triggeringPolicies' => [
        [
            'policyId' => 'pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c',
        ],
    ],
    'updatedAt' => ,
]
Example 2: Accept a curation proposal with a stale revision, which fails with ConflictException

The following example fails with a ConflictException because the proposal changed after the caller read it, so the revisionId in the request is no longer current.

$result = $client->acceptCurationProposal([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'curationProposalId' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
    'revisionId' => '0b2d4f6a-8c1e-4b3d-a5f7-9c1e3a5b7d9f',
]);

AgenticRetrieve

$result = $client->agenticRetrieve([/* ... */]);
$promise = $client->agenticRetrieveAsync([/* ... */]);

Retrieves ranked context from an agent context for a natural-language question, in a single response. Send the question as a user message in messages and read the ranked retrievedContext. AWS Context searches and traverses the agent context for you until it has gathered enough context or reaches maxIterations. Prefer this over SearchAgentContext when finding the context needs more than one search or hop. To stream progress and receive a generated answer, use AgenticRetrieveStream.

Parameter Syntax

$result = $client->agenticRetrieve([
    'agentContextId' => '<string>', // REQUIRED
    'analysisConfiguration' => [
        'emitTrace' => 'ENABLED|DISABLED',
    ],
    'messages' => [ // REQUIRED
        [
            'content' => '<string>', // REQUIRED
            'role' => 'USER|ASSISTANT', // REQUIRED
        ],
        // ...
    ],
    'retrievalConfiguration' => [
        'maxIterations' => <integer>,
    ],
    'sessionId' => '<string>',
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to retrieve from, by its ID or ARN.

analysisConfiguration
Type: AnalysisConfiguration structure

Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis.

messages
Required: Yes
Type: Array of Message structures

The conversation, as an ordered list of turns. A single-question caller sends one user message. The list carries multi-turn history so a follow-up resolves against earlier turns.

retrievalConfiguration
Type: RetrievalConfiguration structure

Optional bounds and configuration for the agent loop.

sessionId
Type: string

Optional. A key that you supply to group related calls, for example the turns of one conversation, for trace storage and analysis. Grouping is per account, across agent contexts, so use a value that is unique to each conversation.

Result Syntax

[
    'answer' => '<string>',
    'authorizationRequired' => [
        'authorizationUrl' => '<string>',
        'message' => '<string>',
    ],
    'citations' => [
        [
            'endIndex' => <integer>,
            'references' => [
                [
                    'documentId' => '<string>',
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'nodeId' => '<string>',
                ],
                // ...
            ],
            'startIndex' => <integer>,
        ],
        // ...
    ],
    'retrievedContext' => [
        [
            'content' => [
                'byteContent' => <string || resource || Psr\Http\Message\StreamInterface>,
                'mimeType' => '<string>',
                'text' => '<string>',
            ],
            'documentId' => '<string>',
            'edgeId' => [
                'from' => '<string>',
                'to' => '<string>',
            ],
            'entityType' => 'NODE|EDGE|DOCUMENT',
            'nodeId' => '<string>',
            'properties' => [
                '<MetadataKey>' => [
                    'boolListValue' => [true || false, ...],
                    'boolValue' => true || false,
                    'doubleListValue' => [<float>, ...],
                    'doubleValue' => <float>,
                    'floatListValue' => [<float>, ...],
                    'floatValue' => <float>,
                    'intListValue' => [<integer>, ...],
                    'intValue' => <integer>,
                    'longListValue' => [<integer>, ...],
                    'longValue' => <integer>,
                    'stringListValue' => ['<string>', ...],
                    'stringValue' => '<string>',
                ],
                // ...
            ],
            'summary' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
answer
Type: string

The synthesized natural-language answer, when one was generated.

authorizationRequired
Type: AuthorizationRequired structure

Present when you must authorize access to a third-party resource. If retrievedContext is empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. Show authorizationUrl to the user and retry after they consent.

citations
Type: Array of Citation structures

Maps spans of answer to the supporting entities, when an answer was generated.

retrievedContext
Required: Yes
Type: Array of RetrievedContext structures

The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Retrieve context for a question about an agent context

The following example asks which table holds customer orders and returns the retrieved context in a single response.

$result = $client->agenticRetrieve([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'messages' => [
        [
            'content' => 'Which table holds customer order data?',
            'role' => 'USER',
        ],
    ],
    'retrievalConfiguration' => [
        'maxIterations' => 10,
    ],
    'sessionId' => 'sales-analytics-chat-0001',
]);

Result syntax:

[
    'retrievedContext' => [
        [
            'entityType' => 'NODE',
            'nodeId' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
            'properties' => [
                'name' => [
                    'stringValue' => 'orders',
                ],
                'aws:context:connection-arns' => [
                    'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                ],
                'createdAt' => [
                    'stringValue' => '2026-10-14T09:12:41Z',
                ],
                'databaseName' => [
                    'stringValue' => 'sales_analytics',
                ],
                'nodeType' => [
                    'stringValue' => 'AWS::CONTEXT::TABLE',
                ],
                'tableArn' => [
                    'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
                'updatedAt' => [
                    'stringValue' => '2026-10-14T09:12:41Z',
                ],
            ],
            'summary' => 'AWS Glue table orders in the sales_analytics database.',
        ],
    ],
]

AgenticRetrieveStream

$result = $client->agenticRetrieveStream([/* ... */]);
$promise = $client->agenticRetrieveStreamAsync([/* ... */]);

Answers a natural-language question against an agent context and streams the work as it happens. The response is an event stream that contains progress events while AWS Context searches the agent context, the answer in chunks as it is generated, and a final result. The final result contains the answer and the ranked retrieved context.

Parameter Syntax

$result = $client->agenticRetrieveStream([
    'agentContextId' => '<string>', // REQUIRED
    'analysisConfiguration' => [
        'emitTrace' => 'ENABLED|DISABLED',
    ],
    'messages' => [ // REQUIRED
        [
            'content' => '<string>', // REQUIRED
            'role' => 'USER|ASSISTANT', // REQUIRED
        ],
        // ...
    ],
    'retrievalConfiguration' => [
        'maxIterations' => <integer>,
    ],
    'sessionId' => '<string>',
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to retrieve from, by its ID or ARN.

analysisConfiguration
Type: AnalysisConfiguration structure

Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis. Trace events are streamed either way.

messages
Required: Yes
Type: Array of Message structures

The conversation, as an ordered list of turns. A single-question caller sends one user message. The list carries multi-turn history so a follow-up resolves against earlier turns.

retrievalConfiguration

Optional bounds and configuration for the agent loop.

sessionId
Type: string

Optional. A key that you supply to group related calls, for example the turns of one conversation, for trace storage and analysis. Grouping is per account, across agent contexts, so use a value that is unique to each conversation.

Result Syntax

[
    'stream' => [ // EventParsingIterator
        'accessDeniedException' => [
            'message' => '<string>',
        ],
        'internalServerException' => [
            'message' => '<string>',
        ],
        'resourceNotFoundException' => [
            'message' => '<string>',
            'resourceId' => '<string>',
            'resourceType' => 'agent-context|connection|curation-policy|evaluation|ontology|ontology-induction|resource-policy',
        ],
        'responseEvent' => [
            'text' => '<string>',
        ],
        'result' => [
            'answer' => '<string>',
            'citations' => [
                [
                    'endIndex' => <integer>,
                    'references' => [
                        [
                            'documentId' => '<string>',
                            'edgeId' => [
                                'from' => '<string>',
                                'to' => '<string>',
                            ],
                            'nodeId' => '<string>',
                        ],
                        // ...
                    ],
                    'startIndex' => <integer>,
                ],
                // ...
            ],
            'retrievedContext' => [
                [
                    'content' => [
                        'byteContent' => <string || resource || Psr\Http\Message\StreamInterface>,
                        'mimeType' => '<string>',
                        'text' => '<string>',
                    ],
                    'documentId' => '<string>',
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'entityType' => 'NODE|EDGE|DOCUMENT',
                    'nodeId' => '<string>',
                    'properties' => [
                        '<MetadataKey>' => [
                            'boolListValue' => [true || false, ...],
                            'boolValue' => true || false,
                            'doubleListValue' => [<float>, ...],
                            'doubleValue' => <float>,
                            'floatListValue' => [<float>, ...],
                            'floatValue' => <float>,
                            'intListValue' => [<integer>, ...],
                            'intValue' => <integer>,
                            'longListValue' => [<integer>, ...],
                            'longValue' => <integer>,
                            'stringListValue' => ['<string>', ...],
                            'stringValue' => '<string>',
                        ],
                        // ...
                    ],
                    'summary' => '<string>',
                ],
                // ...
            ],
        ],
        'traceEvent' => [
            'attributes' => [
                'actions' => [
                    [
                        'inputQuery' => '<string>',
                        'sourceRetrievers' => [
                            [
                                'identifier' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    // ...
                ],
                'failures' => [
                    [
                        'message' => '<string>',
                    ],
                    // ...
                ],
                'message' => '<string>',
                'status' => 'IN_PROGRESS|SUCCEEDED|FAILED',
                'step' => 'Planning|Retrieval',
                'warnings' => [
                    [
                        'message' => '<string>',
                    ],
                    // ...
                ],
            ],
            'id' => '<string>',
            'occurredAt' => <DateTime>,
        ],
    ],
]

Result Details

Members
stream

The events of the retrieval, in order: progress events while the agent context is searched, chunks of the answer as it is written, and a final result with the answer and the retrieved context. An error event ends the stream.

Using an EventParsingIterator

To use an EventParsingIterator, you will need to loop over the events it will generate and check the top-level field to determine which type of event it is.

foreach($result['stream'] as $event) {
    if (isset($event['accessDeniedException'])) {
        // Handle the 'accessDeniedException' event.
    } else if (isset($event['internalServerException'])) {
        // Handle the 'internalServerException' event.
    } else if (isset($event['resourceNotFoundException'])) {
        // Handle the 'resourceNotFoundException' event.
    } else if (isset($event['responseEvent'])) {
        // Handle the 'responseEvent' event.
    } else if (isset($event['result'])) {
        // Handle the 'result' event.
    } else if (isset($event['traceEvent'])) {
        // Handle the 'traceEvent' event.
    }
}

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Ask a question about an agent context

The following example asks which table holds customer orders. The response is an event stream; this example shows only its final result event, which carries the answer, the retrieved context, and a citation.

$result = $client->agenticRetrieveStream([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'messages' => [
        [
            'content' => 'Which table holds customer order data?',
            'role' => 'USER',
        ],
    ],
    'retrievalConfiguration' => [
        'maxIterations' => 10,
    ],
    'sessionId' => 'sales-analytics-chat-0001',
]);

Result syntax:

[
    'stream' => [
        'result' => [
            'answer' => 'Customer order data is in the orders table in the sales_analytics database. Each row records an order_id, a customer_id, an order_date, and an order_total.',
            'citations' => [
                [
                    'endIndex' => 74,
                    'references' => [
                        [
                            'nodeId' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                        ],
                    ],
                    'startIndex' => 26,
                ],
            ],
            'retrievedContext' => [
                [
                    'entityType' => 'NODE',
                    'nodeId' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                    'properties' => [
                        'name' => [
                            'stringValue' => 'orders',
                        ],
                        'aws:context:connection-arns' => [
                            'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                        ],
                        'createdAt' => [
                            'stringValue' => '2026-10-14T09:12:41Z',
                        ],
                        'databaseName' => [
                            'stringValue' => 'sales_analytics',
                        ],
                        'nodeType' => [
                            'stringValue' => 'AWS::CONTEXT::TABLE',
                        ],
                        'tableArn' => [
                            'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                        ],
                        'updatedAt' => [
                            'stringValue' => '2026-10-14T09:12:41Z',
                        ],
                    ],
                    'summary' => 'AWS Glue table orders in the sales_analytics database.',
                ],
            ],
        ],
    ],
]

AssociateCurationPolicy

$result = $client->associateCurationPolicy([/* ... */]);
$promise = $client->associateCurationPolicyAsync([/* ... */]);

Associates a curation policy with an agent context. The agent context enforces the policy's latest published version, including versions published later. Returns the association.

Parameter Syntax

$result = $client->associateCurationPolicy([
    'agentContextId' => '<string>', // REQUIRED
    'curationPolicyId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context, by its ID or ARN.

curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with ResourceNotFoundException. If it was deleted, the request fails with ConflictException.

Result Syntax

[
    'agentContextId' => '<string>',
    'curationPolicyId' => '<string>',
]

Result Details

Members
agentContextId
Required: Yes
Type: string

The agent context's ID.

curationPolicyId
Required: Yes
Type: string

The ID of the curation policy that is associated with the agent context.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Associate a curation policy with an agent context

The following example associates a curation policy with an agent context, which then enforces the policy's latest published version.

$result = $client->associateCurationPolicy([
    'agentContextId' => 'ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d',
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
]);

Result syntax:

[
    'agentContextId' => 'ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d',
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
]

CancelOntologyInduction

$result = $client->cancelOntologyInduction([/* ... */]);
$promise = $client->cancelOntologyInductionAsync([/* ... */]);

Cancels an ontology induction that is still INDUCING. The induction's status changes to CANCELLED, and no ontology is created.

Parameter Syntax

$result = $client->cancelOntologyInduction([
    'ontologyInductionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ontologyInductionId
Required: Yes
Type: string

The ID or Amazon Resource Name (ARN) of the ontology induction to cancel.

Result Syntax

[
    'arn' => '<string>',
    'id' => '<string>',
    'status' => 'INDUCING|DRAFT|FAILED|CANCELLED',
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the ontology induction.

id
Required: Yes
Type: string

The ID of the induction, assigned by AWS Context.

status
Required: Yes
Type: string

The status of the induction after the cancel request. Always CANCELLED.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Cancel an ontology induction

The following example cancels an ontology induction that is still INDUCING, so no ontology is created.

$result = $client->cancelOntologyInduction([
    'ontologyInductionId' => 'oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
]);

Result syntax:

[
    'arn' => 'arn:aws:context:us-east-1:111122223333:ontology-induction/oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
    'id' => 'oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
    'status' => 'CANCELLED',
]

CancelTask

$result = $client->cancelTask([/* ... */]);
$promise = $client->cancelTaskAsync([/* ... */]);

Cancels a task that is PENDING or IN_PROGRESS. The task moves to CANCELLING, and then to CANCELLED when it stops. AWS Context keeps the change sets that the task already created. Canceling a CANCELLED task returns it unchanged. Canceling a CANCELLING task returns it unchanged, unless the task's work has already stopped, in which case the cancel completes and the task is returned as CANCELLED. Canceling a COMPLETED or FAILED task fails with ConflictException.

Parameter Syntax

$result = $client->cancelTask([
    'agentContextId' => '<string>', // REQUIRED
    'taskId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context, as an ID or ARN.

taskId
Required: Yes
Type: string

The ID of the task to cancel.

Result Syntax

[
    'agentContextId' => '<string>',
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
        'importOntology' => [
            'ontologies' => [
                [
                    'ontologyArn' => '<string>',
                    'ontologyVersion' => '<string>',
                ],
                // ...
            ],
        ],
        'importVerifiedQueries' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
    ],
    'outputs' => [
        [
            'changeSet' => [
                'changeSetId' => '<string>',
            ],
        ],
        // ...
    ],
    'statistics' => [
        'numberOfChangeSetsAutoApproved' => <integer>,
        'numberOfChangeSetsCreated' => <integer>,
        'numberOfDocumentsAnalyzed' => <integer>,
    ],
    'status' => 'PENDING|IN_PROGRESS|COMPLETED|FAILED|CANCELLING|CANCELLED',
    'statusMessage' => '<string>',
    'statusReasonCode' => 'GRAPH_NOT_ACTIVE|ONTOLOGY_INVALID|ONTOLOGY_IMPORT_UNAVAILABLE|ONTOLOGY_ALREADY_IMPORTED',
    'type' => 'IMPORT_DATA_DICTIONARY|IMPORT_VERIFIED_QUERIES|IMPORT_ONTOLOGY',
    'updatedAt' => <DateTime>,
]

Result Details

Members
agentContextId
Required: Yes
Type: string

The agent context's ID.

arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the task.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was created.

description
Type: string

The description of the task, as given to StartTask.

id
Required: Yes
Type: string

The ID of the task. Pass it as taskId to GetTask or CancelTask.

inputConfiguration
Required: Yes
Type: TaskInputConfigurationSummary structure

A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.

outputs
Type: Array of TaskOutput structures

What the task created, in creation order. Set when it finishes.

statistics
Type: TaskStatistics structure

Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

status
Required: Yes
Type: string

The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

statusMessage
Type: string

The reason the task failed. Present only when status is FAILED.

statusReasonCode
Type: string

The code for why the task failed. Present only when status is FAILED.

Valid values:

  • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

  • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

  • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

  • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

type
Required: Yes
Type: string

The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Cancel a running task

The following example cancels a verified queries import task that is in progress, which moves it to CANCELLING.

$result = $client->cancelTask([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'taskId' => 'task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153',
]);

Result syntax:

[
    'type' => 'IMPORT_VERIFIED_QUERIES',
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153',
    'createdAt' => ,
    'description' => 'Import verified sales queries',
    'id' => 'task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153',
    'inputConfiguration' => [
        'importVerifiedQueries' => [
            'documents' => [
                [
                    'name' => 'verified-sales-queries.sql',
                    'contentType' => 'SQL',
                    'sizeBytes' => 18432,
                ],
            ],
        ],
    ],
    'statistics' => [
        'numberOfChangeSetsAutoApproved' => 0,
        'numberOfChangeSetsCreated' => 1,
    ],
    'status' => 'CANCELLING',
    'updatedAt' => ,
]
Example 2: Cancel a task that has already completed, which fails with ConflictException

The following example tries to cancel a task that is COMPLETED, which fails with ConflictException.

$result = $client->cancelTask([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'taskId' => 'task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
]);

CreateAgentContext

$result = $client->createAgentContext([/* ... */]);
$promise = $client->createAgentContextAsync([/* ... */]);

Creates an agent context over one or more connections. Creation is asynchronous. GetAgentContext returns its status.

Parameter Syntax

$result = $client->createAgentContext([
    'clientToken' => '<string>',
    'connectionMappings' => [ // REQUIRED
        [
            'connectionId' => '<string>', // REQUIRED
            'dataFilter' => [
                'filters' => [
                    [
                        'createdAfter' => <integer || string || DateTime>,
                        'excludeTags' => ['<string>', ...],
                        'fileType' => '<string>',
                        'includeTags' => ['<string>', ...],
                        'maxDocumentSizeBytes' => <integer>,
                        'updatedAfter' => <integer || string || DateTime>,
                    ],
                    // ...
                ],
            ],
            'extractionDepth' => '<string>',
            'ontologyMappings' => [ // REQUIRED
                [
                    'ontologyId' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'pathSegments' => [
                [
                    'id' => '<string>', // REQUIRED
                    'level' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
        ],
        // ...
    ],
    'curationPolicyIds' => ['<string>', ...],
    'description' => '<string>',
    'entityResolutionConfig' => [
        'status' => 'ENABLED|DISABLED',
    ],
    'name' => '<string>',
    'tags' => ['<string>', ...],
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED|DISABLED',
        'status' => 'ENABLED|DISABLED',
        'traceAnalysisRole' => '<string>',
    ],
    'trustedIdentitySources' => [
        [
            'identityProviderArn' => '<string>',
            'identityStoreArn' => '<string>',
        ],
        // ...
    ],
    'workforceSignInConfig' => [
        'signInUrl' => '<string>',
        'status' => 'ENABLED|DISABLED',
    ],
]);

Parameter Details

Members
clientToken
Type: string

Client idempotency token. The AWS SDKs generate one when it is absent. An identical request with the same token returns the existing agent context. The same token with a different request returns ValidationException. trustedIdentitySources with the same entries in another order is the same request.

connectionMappings
Required: Yes
Type: Array of ConnectionMapping structures

The connection mappings for this agent context, up to 20. CreateAgentContext requires at least one: an empty list returns ValidationException. Each entry binds a connection to one or more ontologies, optionally scoped by a data filter, extraction depth, and path segments. Each referenced connection must exist, be owned by your account, and be ACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.

curationPolicyIds
Type: Array of strings

Curation policies to associate with the new agent context, as IDs or ARNs, instead of the default curation policies. If you omit it or the list is empty, AWS Context associates the default curation policies. Each policy must be ACTIVE and owned by your account, and you need context:AssociateCurationPolicy permission on each. AWS Context checks both again on a clientToken retry. If a policy doesn't exist, the request fails with ResourceNotFoundException. If one has been deleted, it fails with ConflictException. Change the policies later with AssociateCurationPolicy and DisassociateCurationPolicy.

description
Type: string

Optional human-readable description of the agent context. An empty string is the same as none.

entityResolutionConfig
Type: EntityResolutionConfig structure

Optional entity resolution settings. When the config or its status is absent, status reads ENABLED. You can change it with UpdateAgentContext.

name
Type: string

Optional. The name of the agent context. If you omit it, the name is default. You can change it later with UpdateAgentContext.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add to the agent context 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 agent context. 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.

traceAnalysisConfig
Type: TraceAnalysisConfig structure

The agent context's trace analysis settings. Optional. You can change it with UpdateAgentContext.

trustedIdentitySources
Type: Array of TrustedIdentitySource structures

Optional identity sources to trust in addition to your account. At most 100 unique entries, each with exactly one member. Order is not significant. An empty list and an absent member are the same value: only your account is trusted. You can change it with UpdateAgentContext.

workforceSignInConfig
Type: WorkforceSignInConfig structure

Optional workforce sign-in settings. A config with signInUrl turns sign-in on (status defaults to ENABLED). status ENABLED without signInUrl is a ValidationException. You can change it with UpdateAgentContext.

Result Syntax

[
    'arn' => '<string>',
    'connectionMappings' => [
        [
            'connectionId' => '<string>',
            'dataFilter' => [
                'filters' => [
                    [
                        'createdAfter' => <DateTime>,
                        'excludeTags' => ['<string>', ...],
                        'fileType' => '<string>',
                        'includeTags' => ['<string>', ...],
                        'maxDocumentSizeBytes' => <integer>,
                        'updatedAfter' => <DateTime>,
                    ],
                    // ...
                ],
            ],
            'extractionDepth' => '<string>',
            'ontologyMappings' => [
                [
                    'ontologyId' => '<string>',
                ],
                // ...
            ],
            'pathSegments' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
        ],
        // ...
    ],
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED|CUSTOMER_MANAGED',
        'keyArn' => '<string>',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED|DISABLED',
    ],
    'id' => '<string>',
    'mcpServerUrl' => '<string>',
    'name' => '<string>',
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED|DISABLED',
        'status' => 'ENABLED|DISABLED',
        'traceAnalysisRole' => '<string>',
    ],
    'trustedIdentitySources' => [
        [
            'identityProviderArn' => '<string>',
            'identityStoreArn' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
    'workforceSignInConfig' => [
        'signInUrl' => '<string>',
        'status' => 'ENABLED|DISABLED',
    ],
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.

connectionMappings
Type: Array of ConnectionMapping structures

The agent context's connection mappings.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the agent context was created.

description
Type: string

A human-readable description, if one was set.

encryptionConfig
Required: Yes
Type: EncryptionConfig structure

The agent context's encryption settings.

entityResolutionConfig
Type: EntityResolutionConfig structure

The agent context's entity resolution settings. Populated on every response path that returns the resource.

id
Required: Yes
Type: string

The agent context's opaque ID.

mcpServerUrl
Type: string

The Model Context Protocol (MCP) server URL to give your employees while workforce sign-in is ENABLED. The URL is the agent context's MCP endpoint, with workforceSignInConfig.signInUrl as its login_hint query parameter and the ID that AWS Context assigns to that sign-in URL as its tenantId query parameter. Absent while workforce sign-in is DISABLED.

name
Required: Yes
Type: string

The name of the agent context. If you didn't specify a name when you created it, the name is default.

status
Required: Yes
Type: string

The agent context's lifecycle status.

Valid values:

  • CREATING - The agent context is being created.

  • ACTIVE - The agent context is ready to use.

  • UPDATING - The agent context is being updated.

  • DELETING - The agent context is being deleted.

  • FAILED - The agent context failed.

traceAnalysisConfig
Type: TraceAnalysisConfig structure

The agent context's trace analysis settings.

trustedIdentitySources
Type: Array of TrustedIdentitySource structures

Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

workforceSignInConfig
Type: WorkforceSignInConfig structure

How your employees sign in to this agent context's MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Create an agent context

The following example creates an agent context over one AWS Glue Data Catalog connection, scoped to the sales database and mapped to the AWS managed Data ontology.

$result = $client->createAgentContext([
    'name' => 'sales-analytics',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE11111',
    'connectionMappings' => [
        [
            'connectionId' => 'conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7',
            'ontologyMappings' => [
                [
                    'ontologyId' => 'arn:aws:context:us-east-1::ontology/data',
                ],
            ],
            'pathSegments' => [
                [
                    'id' => 'sales',
                    'level' => 'glueDatabase',
                ],
            ],
        ],
    ],
    'description' => 'Sales pipeline and revenue tables for the analytics agents.',
    'tags' => [
        'team' => 'sales-analytics',
    ],
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'connectionMappings' => [
        [
            'type' => 'GLUE_DATA_CATALOG',
            'connectionId' => 'arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7',
            'ontologyMappings' => [
                [
                    'ontologyId' => 'arn:aws:context:us-east-1::ontology/data',
                ],
            ],
            'pathSegments' => [
                [
                    'id' => 'sales',
                    'level' => 'glueDatabase',
                ],
            ],
        ],
    ],
    'createdAt' => ,
    'description' => 'Sales pipeline and revenue tables for the analytics agents.',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED',
    ],
    'id' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'status' => 'CREATING',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED',
        'status' => 'DISABLED',
    ],
    'updatedAt' => ,
    'workforceSignInConfig' => [
        'status' => 'DISABLED',
    ],
]

CreateChangeSet

$result = $client->createChangeSet([/* ... */]);
$promise = $client->createChangeSetAsync([/* ... */]);

Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of put, update, or delete.

Parameter Syntax

$result = $client->createChangeSet([
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW|DENY', // REQUIRED
                'principalId' => '<string>', // REQUIRED
                'principalType' => 'USER|GROUP',
            ],
            // ...
        ],
    ],
    'agentContextId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'operations' => [ // REQUIRED
        [
            'delete' => [
                'entity' => [ // REQUIRED
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [ // REQUIRED
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'update' => [
                'entity' => [ // REQUIRED
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [ // REQUIRED
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
accessControlConfig
Type: AccessControlConfig structure

Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty accessControlList lets nobody read them.

agentContextId
Required: Yes
Type: string

The agent context to change, by its ID or ARN.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.

operations
Required: Yes
Type: Array of ChangeSetOperation structures

The operations to write, each a ChangeSetOperation, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails with ValidationException.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'id' => '<string>',
    'status' => 'DRAFT|PENDING|AUTHORIZED|SUPPRESSED|PUBLISHED|FAILED',
]

Result Details

Members
accessControl
Type: string

See AccessControl. The service returns it on every response.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

id
Required: Yes
Type: string

The ID of the change set, which AWS Context assigns. The create is idempotent on clientToken: a retry with the same token returns the same change set. Treat this ID as opaque, and don't assume any relationship to clientToken.

status
Required: Yes
Type: string

PENDING (held for curator review) or PUBLISHED (applied). A replay reports the change set's current one.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Create or replace the retrieval instructions

The following example creates or replaces the retrieval instructions of an agent context with one update operation on the fixed instructions node. No curation policy holds direct changes, so AWS Context applies the change set right away.

$result = $client->createChangeSet([
    'operations' => [
        [
            'update' => [
                'entity' => [
                    'nodeId' => 'https://ontology.context.aws.dev/retrievalInstruction:default',
                ],
                'properties' => [
                    'nodeType' => [
                        'stringValue' => 'AWS::CONTEXT::RETRIEVAL_INSTRUCTION',
                    ],
                    'retrievalInstructionId' => [
                        'stringValue' => 'default',
                    ],
                    'retrievalInstructionText' => [
                        'stringValue' => '# Rules for every query- If two sources disagree, use the most recent one.',
                    ],
                ],
            ],
        ],
    ],
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'clientToken' => '3d5f7a9c-1e2b-4d6f-8a0c-4e6b8d0f2a5c',
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'id' => 'cs-5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4b',
    'status' => 'PUBLISHED',
]
Example 2: Create a relationship in a change set that only one group can read

The following example adds a relationship between two existing concepts. Because the request specifies accessControlConfig, only members of the group can read the change set's operations, and the change set is ACL_RESTRICTED. The relationship itself is visible to anyone who can read both concepts. AWS Context applies the change set right away because no curation policy holds it.

$result = $client->createChangeSet([
    'operations' => [
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'concept:forecast-margin',
                        'to' => 'concept:gross-margin',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'AWS::CONTEXT::RELATED_TO',
                    ],
                ],
            ],
        ],
    ],
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW',
                'principalId' => '94a8f4e8-60d1-70a4-b2c3-1f5e9d7c3a20',
                'principalType' => 'GROUP',
            ],
        ],
    ],
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'clientToken' => '6f8b0d2a-4c6e-4a8b-9d1f-5b7d9f1a3c6e',
]);

Result syntax:

[
    'accessControl' => 'ACL_RESTRICTED',
    'id' => 'cs-7b9d1f3a5c6e4a8b0d2f4a6c8e0b1d3f',
    'status' => 'PUBLISHED',
]

CreateConnection

$result = $client->createConnection([/* ... */]);
$promise = $client->createConnectionAsync([/* ... */]);

Creates a connection to a data source, such as an AWS Glue Data Catalog, an Amazon Bedrock knowledge base, or a third-party data catalog through an AWS Glue connection. GetConnection returns the connection's status.

Parameter Syntax

$result = $client->createConnection([
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => '<string>', // REQUIRED
        ],
    ],
    'acknowledgements' => ['<string>', ...],
    'clientToken' => '<string>',
    'dataSource' => [ // REQUIRED
        'location' => [ // REQUIRED
            'arn' => '<string>', // REQUIRED
        ],
        'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE', // REQUIRED
    ],
    'glueConnectionMappings' => [
        [
            'glueConnectionArn' => '<string>', // REQUIRED
            'path' => [ // REQUIRED
                [
                    'id' => '<string>', // REQUIRED
                    'level' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
    'ingestionConfig' => [ // REQUIRED
        'roleArn' => '<string>', // REQUIRED
    ],
    'name' => '<string>', // REQUIRED
    'publish' => true || false,
    'scope' => [
        'selectors' => [
            [
                'path' => [ // REQUIRED
                    [
                        'id' => '<string>', // REQUIRED
                        'level' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'syncSchedule' => [
        'cronExpression' => '<string>',
        'frequency' => 'HOURLY|DAILY|WEEKLY|MONTHLY',
    ],
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
accessConfig
Type: AccessConfig structure

The access configuration for the data source, which names the AWS Identity and Access Management (IAM) role for data access. Optional.

For GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE, iamRole is the IAM role that AWS Context assumes to read the source and the AWS Glue connections in glueConnectionMappings. If you omit accessConfig or set no variant, AWS Context reads them with your own credentials. This applies whether the source is in your account or another account. For a source in another account, AWS Context checks when it creates the connection that iamRole can read the source, and the request fails if it can't. A source in another account with no iamRole isn't checked when the connection is created. An accessConfig with no variant is stored as absent and is not returned on the connection.

For DATABRICKS and SNOWFLAKE, AWS Glue reads the source with the ROLE_ARN of the AWS Glue connection in dataSource, not with accessConfig. For these types, accessConfig is reserved for other roles.

acknowledgements
Type: Array of strings

The conditions that you acknowledge AWS Context can't honor. Specify CUSTOMER_MANAGED_KEY when the knowledge base is encrypted with an AWS KMS customer managed key and you accept that AWS Context stores the ingested data under AWS owned keys. If you omit it, creating a connection to such a knowledge base fails with ValidationException. An unknown or repeated value also fails with ValidationException.

clientToken
Type: string

A client idempotency token. It is optional, so the AWS SDKs can generate it automatically and reuse it on retries. A retry with an identical request returns the original connection. A different request returns ValidationException. acknowledgements, tags and, once the connection is ACTIVE, publish are not compared with the original request. A create refused for a missing acknowledgement records no token.

dataSource
Required: Yes
Type: DataSourceReference structure

The external data source that this connection binds to: its type and location.arn. The ARN must be in your account, except for GLUE_DATA_CATALOG, where it can name a catalog or an AWS Glue connection in another account.

  • GLUE_DATA_CATALOG - An AWS Glue Data Catalog ARN (:catalog or :catalog/<path>), or the ARN of an existing AWS Glue connection (:connection/<name>) for a federated AWS data source such as Amazon Redshift or Amazon RDS. The AWS Glue connection must be a unified connection (ConnectionSchemaVersion 2) in your partition and Region that you can read. You can't specify scope with an AWS Glue connection ARN. While AWS Glue is still validating the connection, the request fails with ConflictException. If its validation failed, the request fails with AccessDeniedException.

  • DATABRICKS or SNOWFLAKE - The ARN of an existing AWS Glue connection whose AWS Glue ConnectionType matches type. AWS Context validates its Credential Broker settings, if present, and doesn't store them.

glueConnectionMappings
Type: Array of GlueConnectionMapping structures

The AWS Glue connection to use for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope, keyed by path. Optional. You can specify 0–20 entries. The following rules apply:

  • Once an entry names a level, every resource of that level in scope needs an entry. While an entry names rdsInstance, every selector that names an rdsInstance must also name its rdsDatabase.

  • redshiftNamespace and rdsInstance entries require dataSource to be an AWS Glue Data Catalog ARN. accessConfig.iamRole is optional.

  • snowflakeDatabase entries require dataSource to be an AWS Glue connection ARN.

  • While any entry is present, scope cannot contain a selector that names only a catalog or a glueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with a glueService segment follows these rules as it would without that segment. An entry's path never names glueService.

  • A selector that names only glueService REDSHIFT or RDS, with no namespace or instance, cannot be combined with any entry. Such a connection reads only the service's metadata, and you cannot query its data.

ingestionConfig
Required: Yes
Type: IngestionConfig structure

The ingestion configuration: the IAM role that a data producer (AWS Glue Data Catalog or Amazon Bedrock knowledge base) assumes to push data into this connection's agent contexts. It is separate from accessConfig, which names the role that AWS Context assumes to read the source. Required, because a connection can't ingest data without a role that its data producer can assume. You must have iam:PassRole permission to pass this role to the data producer, and the role must be in your account.

name
Required: Yes
Type: string

The name of the connection. Required. You can change it later with UpdateConnection. Starts with a letter and contains 3–63 ASCII letters, digits, and hyphens.

publish
Type: boolean

Specifies whether to configure catalog synchronization and wait for it to be provisioned during this call. If you omit it, the default is true. For a DATABRICKS or SNOWFLAKE connection, false validates only the AWS Glue connection. The connection is returned as CREATING with subStatus GLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection with publish set to true. Ignored for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which have no sync job.

scope
Type: DataSourceScope structure

Optional hierarchical subset of the data source to ingest. Absent means the whole source. A DATABRICKS scope names at most one databricksCatalog, and a SNOWFLAKE scope one snowflakeDatabase. A GLUE_DATA_CATALOG scope can select by service with a glueService segment (see DataSourceScope). An unknown service name, a repeated or misplaced glueService segment, a later level of another service, or glueService on another connection type returns ValidationException.

syncSchedule
Type: SyncSchedule structure

How often AWS Context re-syncs a DATABRICKS or SNOWFLAKE source. If you omit it, the default is DAILY. Not accepted for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections. You can change it with UpdateConnection.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add to the connection 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 connection. 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.

Result Syntax

[
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => '<string>',
        ],
    ],
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'dataSource' => [
        'location' => [
            'arn' => '<string>',
        ],
        'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
    ],
    'failure' => [
        'code' => 'GLUE_CONNECTION_UNAVAILABLE',
        'message' => '<string>',
    ],
    'glueConnectionMappings' => [
        [
            'glueConnectionArn' => '<string>',
            'path' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'id' => '<string>',
    'ingestionConfig' => [
        'roleArn' => '<string>',
    ],
    'name' => '<string>',
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => '<string>',
                        'level' => '<string>',
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'subStatus' => 'GLUE_CONNECTION_CREATED|GLUE_CONNECTION_VALIDATED|SYNC_JOB_CREATED',
    'syncSchedule' => [
        'cronExpression' => '<string>',
        'frequency' => 'HOURLY|DAILY|WEEKLY|MONTHLY',
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessConfig
Type: AccessConfig structure

Per-connection access configuration: the IAM role used for data access.

arn
Required: Yes
Type: string

The ARN of the connection.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the connection was created.

dataSource
Required: Yes
Type: DataSourceReference structure

The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

failure
Type: ConnectionFailure structure

The reason the connection is FAILED. Absent in every other status.

glueConnectionMappings
Type: Array of GlueConnectionMapping structures

The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

id
Required: Yes
Type: string

The ID of the connection.

ingestionConfig
Type: IngestionConfig structure

The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

name
Required: Yes
Type: string

The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

scope
Type: DataSourceScope structure

The hierarchical subset of the data source this connection ingests.

status
Required: Yes
Type: string

The connection's status. Valid values:

  • CREATING - Validation or provisioning is still in progress.

  • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn't mean that a crawl has started or completed.

  • UPDATING - The connection is being updated.

  • DELETING - The connection is being deleted.

  • FAILED - Validation or provisioning failed, and the connection can't recover.

subStatus
Type: string

The last milestone a third-party connection's lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

syncSchedule
Type: SyncSchedule structure

The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn't specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Create a connection to an AWS Glue Data Catalog

The following example creates a connection to the sales_db database in the AWS Glue Data Catalog of account 111122223333, with a role that AWS Context assumes to read the catalog and a role that the data producer assumes to push data. An AWS Glue Data Catalog connection is ACTIVE as soon as CreateConnection returns.

$result = $client->createConnection([
    'name' => 'sales-analytics',
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => 'arn:aws:iam::111122223333:role/ContextGlueReadRole',
        ],
    ],
    'dataSource' => [
        'type' => 'GLUE_DATA_CATALOG',
        'location' => [
            'arn' => 'arn:aws:glue:us-east-1:111122223333:catalog',
        ],
    ],
    'ingestionConfig' => [
        'roleArn' => 'arn:aws:iam::111122223333:role/ContextIngestionRole',
    ],
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'sales_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
        ],
    ],
    'tags' => [
        'team' => 'sales-analytics',
    ],
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => 'arn:aws:iam::111122223333:role/ContextGlueReadRole',
        ],
    ],
    'arn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'createdAt' => ,
    'dataSource' => [
        'type' => 'GLUE_DATA_CATALOG',
        'location' => [
            'arn' => 'arn:aws:glue:us-east-1:111122223333:catalog',
        ],
    ],
    'id' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'ingestionConfig' => [
        'roleArn' => 'arn:aws:iam::111122223333:role/ContextIngestionRole',
    ],
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'sales_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
        ],
    ],
    'status' => 'ACTIVE',
    'updatedAt' => ,
]

CreateCurationPolicy

$result = $client->createCurationPolicy([/* ... */]);
$promise = $client->createCurationPolicyAsync([/* ... */]);

Creates a curation policy, which decides which changes to an agent context are held for review as curation proposals instead of applied automatically. The policy starts as an unpublished draft. The agent contexts associated with it enforce it once CreateCurationPolicyVersion publishes it.

Parameter Syntax

$result = $client->createCurationPolicy([
    'autoRejectAfterSeconds' => <integer>,
    'clientToken' => '<string>',
    'description' => '<string>',
    'name' => '<string>', // REQUIRED
    'policyDocument' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a curation proposal held for review under this policy can wait for a decision before it is rejected automatically. Valid range: 86,400 (1 day) to 15,552,000 (180 days). If you omit it, proposals held under this policy are never rejected automatically.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token and the same parameters returns the curation policy that the first request created. If you don't specify one, the AWS SDKs generate one.

description
Type: string

A description of the curation policy. Up to 1,024 characters, with no control characters.

name
Required: Yes
Type: string

The name of the curation policy. 3 to 63 characters: it must start with a letter and can contain only ASCII letters, digits, and hyphens.

policyDocument
Required: Yes
Type: string

The policy's rules, as a Cedar policy document.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add to the curation policy 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 curation policy. 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.

Result Syntax

[
    'arn' => '<string>',
    'autoRejectAfterSeconds' => <integer>,
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'lastPublishedVersion' => '<string>',
    'name' => '<string>',
    'policyDocument' => '<string>',
    'revisionId' => '<string>',
    'status' => 'DRAFT|ACTIVE|DELETED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the curation policy.

autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation policy was created.

description
Type: string

The description of the curation policy.

id
Required: Yes
Type: string

The ID of the curation policy. Requests take it as curationPolicyId.

lastPublishedVersion
Type: string

Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).

name
Required: Yes
Type: string

The name of the curation policy.

policyDocument
Required: Yes
Type: string

The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

revisionId
Required: Yes
Type: string

An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

status
Required: Yes
Type: string

The policy's status.

Valid values:

  • DRAFT - The policy has never been published, so no agent context enforces it.

  • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

  • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: Create a curation policy

The following example creates a curation policy that holds change sets that trace analysis generates for review, and rejects a held proposal after 7 days without a decision.

$result = $client->createCurationPolicy([
    'name' => 'hold-trace-analysis-changes',
    'autoRejectAfterSeconds' => 604800,
    'description' => 'Holds changes that trace analysis generates for review before they are applied.',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" };',
    'tags' => [
        'team' => 'sales-analytics',
    ],
]);

Result syntax:

[
    'name' => 'hold-trace-analysis-changes',
    'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'autoRejectAfterSeconds' => 604800,
    'createdAt' => ,
    'description' => 'Holds changes that trace analysis generates for review before they are applied.',
    'id' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" };',
    'revisionId' => '8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e',
    'status' => 'DRAFT',
    'updatedAt' => ,
]

CreateCurationPolicyVersion

$result = $client->createCurationPolicyVersion([/* ... */]);
$promise = $client->createCurationPolicyVersionAsync([/* ... */]);

Publishes a curation policy's working copy as a new, immutable version. The agent contexts associated with the policy start enforcing the new version. Returns the updated policy.

Parameter Syntax

$result = $client->createCurationPolicyVersion([
    'clientToken' => '<string>',
    'curationPolicyId' => '<string>', // REQUIRED
    'revisionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

A token that makes a retry safe. A retry with the same token and the same parameters returns the current policy instead of creating another version. A token used with different parameters is a ValidationException, checked first, and a retry with the same parameters after the policy was deleted is a ConflictException. Required at run time. The AWS SDKs generate one.

curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to publish a new version of.

revisionId
Required: Yes
Type: string

The revisionId of the working copy to publish, as last read. A working copy whose revision has since advanced is a ConflictException.

Result Syntax

[
    'arn' => '<string>',
    'autoRejectAfterSeconds' => <integer>,
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'lastPublishedVersion' => '<string>',
    'name' => '<string>',
    'policyDocument' => '<string>',
    'revisionId' => '<string>',
    'status' => 'DRAFT|ACTIVE|DELETED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the curation policy.

autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation policy was created.

description
Type: string

The description of the curation policy.

id
Required: Yes
Type: string

The ID of the curation policy. Requests take it as curationPolicyId.

lastPublishedVersion
Type: string

Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).

name
Required: Yes
Type: string

The name of the curation policy.

policyDocument
Required: Yes
Type: string

The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

revisionId
Required: Yes
Type: string

An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

status
Required: Yes
Type: string

The policy's status.

Valid values:

  • DRAFT - The policy has never been published, so no agent context enforces it.

  • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

  • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Publish a curation policy

The following example publishes the working copy of a draft curation policy as version 1, so the agent contexts associated with the policy start enforcing it.

$result = $client->createCurationPolicyVersion([
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'revisionId' => '8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e',
]);

Result syntax:

[
    'name' => 'hold-trace-analysis-changes',
    'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'autoRejectAfterSeconds' => 604800,
    'createdAt' => ,
    'description' => 'Holds changes that trace analysis generates for review before they are applied.',
    'id' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'lastPublishedVersion' => '1',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" };',
    'revisionId' => 'e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e',
    'status' => 'ACTIVE',
    'updatedAt' => ,
]

CreateOntology

$result = $client->createOntology([/* ... */]);
$promise = $client->createOntologyAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createOntology([
    'clientToken' => '<string>',
    'description' => '<string>',
    'name' => '<string>', // REQUIRED
    'source' => '<string>', // REQUIRED
    'sourceFormat' => 'TURTLE', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Type: string

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.

description
Type: string

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

name
Required: Yes
Type: string

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.

source
Required: Yes
Type: string

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

sourceFormat
Required: Yes
Type: string

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

tags
Type: Associative array of custom strings keys (TagKey) to strings

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.

Result Syntax

[
    'arn' => '<string>',
    'description' => '<string>',
    'id' => '<string>',
    'name' => '<string>',
    'updatedAt' => <DateTime>,
    'validationIssues' => [
        [
            'code' => '<string>',
            'line' => <integer>,
            'message' => '<string>',
            'subject' => '<string>',
        ],
        // ...
    ],
    'version' => '<string>',
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the created ontology.

description
Type: string

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

id
Required: Yes
Type: string

The ID of the ontology, assigned by AWS Context.

name
Type: string

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

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

validationIssues
Type: Array of OntologyValidationIssue structures

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.

version
Type: string

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

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: Create an ontology

The following example creates an ontology from a Turtle (OWL) document that defines customers, orders, and the relationship between them.

$result = $client->createOntology([
    'name' => 'sales-analytics',
    'clientToken' => '3f1c9a2e-5b7d-4e8f-9a0b-1c2d3e4f5a6b',
    'description' => 'Customers and the orders they place.',
    'source' => '@prefix ex:  .@prefix owl:  .@prefix rdfs:  .@prefix xsd:  . a owl:Ontology .ex:Customer a owl:Class ; rdfs:label "Customer" ; rdfs:comment "A person or company that places orders." .ex:Order a owl:Class ; rdfs:label "Order" ; rdfs:comment "A purchase that a customer places." .ex:customerId a owl:DatatypeProperty ; rdfs:domain ex:Customer ; rdfs:range xsd:string .ex:orderId a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:string .ex:placedOrder a owl:ObjectProperty ; rdfs:label "placed order" ; rdfs:domain ex:Customer ; rdfs:range ex:Order .',
    'sourceFormat' => 'TURTLE',
    'tags' => [
        'team' => 'analytics',
    ],
]);

Result syntax:

[
    'version' => '1.0.0',
    'name' => 'sales-analytics',
    'arn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
    'description' => 'Customers and the orders they place.',
    'id' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
    'updatedAt' => ,
]

DeleteAgentContext

$result = $client->deleteAgentContext([/* ... */]);
$promise = $client->deleteAgentContextAsync([/* ... */]);

Deletes an agent context. Deletion is asynchronous. An agent context that does not exist or is already being deleted returns ResourceNotFoundException.

Parameter Syntax

$result = $client->deleteAgentContext([
    'agentContextId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to delete, by its ID or ARN.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Delete an agent context

The following example deletes the agent context ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394; deletion is asynchronous, and the agent context no longer appears in GetAgentContext or ListAgentContexts as soon as deletion starts.

$result = $client->deleteAgentContext([
    'agentContextId' => 'ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394',
]);

Result syntax:

[
]

DeleteConnection

$result = $client->deleteConnection([/* ... */]);
$promise = $client->deleteConnectionAsync([/* ... */]);

Deletes a connection. While any agent context still uses the connection, the request fails with ConflictException. Remove the connection from each agent context with UpdateAgentContext, and wait until AWS Context has removed the connection's data from the agent context, before you retry. For a DATABRICKS or SNOWFLAKE connection, deletionMode specifies whether AWS Context also deletes the AWS Glue connection. If the connection stays DELETING, call DeleteConnection again to finish the cleanup. Deleting a connection that doesn't exist or is already being deleted succeeds, so you can safely retry.

Parameter Syntax

$result = $client->deleteConnection([
    'connectionId' => '<string>', // REQUIRED
    'deletionMode' => 'RETAIN|DELETE',
]);

Parameter Details

Members
connectionId
Required: Yes
Type: string

The connection to delete, by its ID (which starts with conn-) or its ARN.

deletionMode
Type: string

Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in glueConnectionMappings. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is RETAIN. It has no effect on GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: Delete a connection

The following example deletes the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b, which no agent context uses.

$result = $client->deleteConnection([
    'connectionId' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
]);

Result syntax:

[
]

DeleteCurationPolicy

$result = $client->deleteCurationPolicy([/* ... */]);
$promise = $client->deleteCurationPolicyAsync([/* ... */]);

Deletes a curation policy. While the policy is associated with any agent context, the request fails with ConflictException. Disassociate it with DisassociateCurationPolicy first. You can't delete a default policy that AWS Context created in your account: the request fails with ConflictException. Disassociate it instead. After the delete, GetCurationPolicy returns the policy with status DELETED, and ListCurationPolicies doesn't return it. Deleting a policy that is already deleted succeeds.

Parameter Syntax

$result = $client->deleteCurationPolicy([
    'curationPolicyId' => '<string>', // REQUIRED
]);

Parameter Details

Members
curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Delete a curation policy

The following example deletes a curation policy that isn't associated with any agent context.

$result = $client->deleteCurationPolicy([
    'curationPolicyId' => 'pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a',
]);

Result syntax:

[
]
Example 2: Delete a curation policy that is still associated with an agent context, which fails with ConflictException

The following example fails because the curation policy is still associated with an agent context; disassociate it with DisassociateCurationPolicy first.

$result = $client->deleteCurationPolicy([
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
]);

DeleteOntology

$result = $client->deleteOntology([/* ... */]);
$promise = $client->deleteOntologyAsync([/* ... */]);

Deletes an ontology that you own and all of its versions. You can't delete an AWS managed ontology. While an agent context maps the ontology, the request fails with ConflictException. Remove the ontology from the agent context's connection mappings with UpdateAgentContext first. If an agent context mapped the ontology in the last 5 minutes, the request also fails with ConflictException, and you can retry later. A DRAFT ontology that an induction created is deleted together with its induction. Deleting an ontology that is already deleted succeeds. AWS Context never reuses the ID of a deleted ontology.

Parameter Syntax

$result = $client->deleteOntology([
    'ontologyId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ontologyId
Required: Yes
Type: string

The ontology to delete, by its ID or ARN. ListOntologies and GetOntology return its ARN.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Delete an ontology

The following example deletes an ontology and all of its versions.

$result = $client->deleteOntology([
    'ontologyId' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
]);

Result syntax:

[
]
Example 2: Delete an ontology that an agent context maps, which fails with ConflictException

The following example fails with ConflictException because an agent context still maps the ontology; remove the ontology from the agent context's connection mappings with UpdateAgentContext, then retry.

$result = $client->deleteOntology([
    'ontologyId' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
]);

DeleteOntologyInduction

$result = $client->deleteOntologyInduction([/* ... */]);
$promise = $client->deleteOntologyInductionAsync([/* ... */]);

Deletes an ontology induction. You can delete a FAILED or CANCELLED induction, or one whose ontology is PUBLISHED or was deleted after it was published. While the induction is INDUCING, or while its ontology is still a DRAFT, the request fails with ConflictException. To stop a running induction, call CancelOntologyInduction first. To delete a draft ontology and its induction together, call DeleteOntology. Deleting an induction doesn't change its published ontology.

Parameter Syntax

$result = $client->deleteOntologyInduction([
    'ontologyInductionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ontologyInductionId
Required: Yes
Type: string

The ID or Amazon Resource Name (ARN) of the ontology induction to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Delete an ontology induction

The following example deletes a CANCELLED ontology induction.

$result = $client->deleteOntologyInduction([
    'ontologyInductionId' => 'oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
]);

Result syntax:

[
]
Example 2: Delete an ontology induction whose ontology is a draft, which fails with ConflictException

The following example fails with ConflictException because the induction's ontology is still a DRAFT; to delete the draft ontology and its induction together, call DeleteOntology.

$result = $client->deleteOntologyInduction([
    'ontologyInductionId' => 'oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
]);

DeleteResourcePolicy

$result = $client->deleteResourcePolicy([/* ... */]);
$promise = $client->deleteResourcePolicyAsync([/* ... */]);

Removes the resource-based policy from an agent context.

Parameter Syntax

$result = $client->deleteResourcePolicy([
    'expectedRevisionId' => '<string>',
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
expectedRevisionId
Type: string

The revision that you last read. The delete succeeds only if it matches the stored revision.

resourceArn
Required: Yes
Type: string

ARN of the agent context.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Remove the resource-based policy from an agent context

The following example removes the resource-based policy from an agent context, only if the stored policy is still at the given revision.

$result = $client->deleteResourcePolicy([
    'expectedRevisionId' => '9a4f2c6e-1d8b-4b3a-a7e5-0c2d6f8b1e49',
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
]);

Result syntax:

[
]

DisassociateCurationPolicy

$result = $client->disassociateCurationPolicy([/* ... */]);
$promise = $client->disassociateCurationPolicyAsync([/* ... */]);

Disassociates a curation policy from an agent context, so the agent context stops enforcing it.

Parameter Syntax

$result = $client->disassociateCurationPolicy([
    'agentContextId' => '<string>', // REQUIRED
    'curationPolicyId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to unlink the policy from, by its ID or ARN.

curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to disassociate from the agent context.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Disassociate a curation policy from an agent context

The following example disassociates a curation policy from an agent context, so the agent context stops enforcing it.

$result = $client->disassociateCurationPolicy([
    'agentContextId' => 'ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d',
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
]);

Result syntax:

[
]

ExecuteSql

$result = $client->executeSql([/* ... */]);
$promise = $client->executeSqlAsync([/* ... */]);

Runs one read-only SQL query over the tables of a connection in an agent context, and returns the result as typed columns and rows. Use this to read structured data directly when you can write the query yourself. If the result's rows are larger than 5 MiB, the call fails with ValidationException. Add a LIMIT clause or select fewer columns.

Parameter Syntax

$result = $client->executeSql([
    'agentContextId' => '<string>', // REQUIRED
    'connectionId' => '<string>', // REQUIRED
    'query' => [ // REQUIRED
        'sql' => [
            'statement' => '<string>', // REQUIRED
            'tables' => [ // REQUIRED
                [
                    'glueTableArn' => '<string>',
                ],
                // ...
            ],
        ],
    ],
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that owns the connection, by ID or full ARN.

connectionId
Required: Yes
Type: string

The connection to run against. Must be a GLUE_DATA_CATALOG connection linked to the agent context. Its access configuration (accessConfig) determines how AWS Context reads the tables.

query
Required: Yes
Type: SqlDataQuery structure

The query to run: a SQL statement and the AWS Glue tables that it reads. For the SQL rules and limits, see SqlQuery.

Result Syntax

[
    'columnMetadata' => [
        [
            'name' => '<string>',
            'nullable' => true || false,
            'precision' => <integer>,
            'scale' => <integer>,
            'timeZone' => '<string>',
            'type' => 'BOOLEAN|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|DOUBLE|DECIMAL|VARCHAR|VARBINARY|DATE|TIME|TIMESTAMP|INTERVAL|ARRAY|STRUCT|MAP|UNKNOWN',
            'typeName' => '<string>',
        ],
        // ...
    ],
    'rows' => [
        [
            'values' => [
                [
                    'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                    'booleanValue' => true || false,
                    'doubleValue' => <float>,
                    'jsonValue' => '<string>',
                    'longValue' => <integer>,
                    'nullValue' => true || false,
                    'stringValue' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
columnMetadata
Required: Yes
Type: Array of SqlColumnMetadata structures

One entry per result column, in result order. rows[i].values[j] is the value of columnMetadata[j].

rows
Required: Yes
Type: Array of SqlRow structures

The result rows, in result order. Each row holds a positional list of typed values, one per column.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Run a SQL query

The following example totals order value by sales region from an AWS Glue table that a connection in the agent context links, and returns the top three sales regions.

$result = $client->executeSql([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'connectionId' => 'conn-0123456789abcdef0123456789abcdef',
    'query' => [
        'sql' => [
            'statement' => 'SELECT "sales_region", SUM("order_total") AS "total_sales" FROM "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders" GROUP BY "sales_region" ORDER BY "total_sales" DESC LIMIT 3',
            'tables' => [
                [
                    'glueTableArn' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
            ],
        ],
    ],
]);

Result syntax:

[
    'columnMetadata' => [
        [
            'name' => 'sales_region',
            'type' => 'VARCHAR',
            'nullable' => 1,
            'typeName' => 'Utf8',
        ],
        [
            'name' => 'total_sales',
            'type' => 'DECIMAL',
            'nullable' => 1,
            'precision' => 22,
            'scale' => 2,
            'typeName' => 'Decimal(22, 2, 128)',
        ],
    ],
    'rows' => [
        [
            'values' => [
                [
                    'stringValue' => 'West',
                ],
                [
                    'stringValue' => '1284503.75',
                ],
            ],
        ],
        [
            'values' => [
                [
                    'stringValue' => 'East',
                ],
                [
                    'stringValue' => '1176220.40',
                ],
            ],
        ],
        [
            'values' => [
                [
                    'stringValue' => 'Central Europe',
                ],
                [
                    'stringValue' => '843019.12',
                ],
            ],
        ],
    ],
]
Example 2: Run a SQL query on a connection that isn't linked, which fails with ResourceNotFoundException

The following example fails with ResourceNotFoundException because the connection isn't linked to the agent context.

$result = $client->executeSql([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'connectionId' => 'conn-fedcba9876543210fedcba9876543210',
    'query' => [
        'sql' => [
            'statement' => 'SELECT "order_id" FROM "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders" LIMIT 10',
            'tables' => [
                [
                    'glueTableArn' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
            ],
        ],
    ],
]);

GetAgentContext

$result = $client->getAgentContext([/* ... */]);
$promise = $client->getAgentContextAsync([/* ... */]);

Returns an agent context's configuration and status.

Parameter Syntax

$result = $client->getAgentContext([
    'agentContextId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to return, by its ID or ARN.

Result Syntax

[
    'arn' => '<string>',
    'connectionMappings' => [
        [
            'connectionId' => '<string>',
            'dataFilter' => [
                'filters' => [
                    [
                        'createdAfter' => <DateTime>,
                        'excludeTags' => ['<string>', ...],
                        'fileType' => '<string>',
                        'includeTags' => ['<string>', ...],
                        'maxDocumentSizeBytes' => <integer>,
                        'updatedAfter' => <DateTime>,
                    ],
                    // ...
                ],
            ],
            'extractionDepth' => '<string>',
            'ontologyMappings' => [
                [
                    'ontologyId' => '<string>',
                ],
                // ...
            ],
            'pathSegments' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
        ],
        // ...
    ],
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED|CUSTOMER_MANAGED',
        'keyArn' => '<string>',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED|DISABLED',
    ],
    'id' => '<string>',
    'mcpServerUrl' => '<string>',
    'name' => '<string>',
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED|DISABLED',
        'status' => 'ENABLED|DISABLED',
        'traceAnalysisRole' => '<string>',
    ],
    'trustedIdentitySources' => [
        [
            'identityProviderArn' => '<string>',
            'identityStoreArn' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
    'workforceSignInConfig' => [
        'signInUrl' => '<string>',
        'status' => 'ENABLED|DISABLED',
    ],
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.

connectionMappings
Type: Array of ConnectionMapping structures

The agent context's connection mappings.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the agent context was created.

description
Type: string

A human-readable description, if one was set.

encryptionConfig
Required: Yes
Type: EncryptionConfig structure

The agent context's encryption settings.

entityResolutionConfig
Type: EntityResolutionConfig structure

The agent context's entity resolution settings. Populated on every response path that returns the resource.

id
Required: Yes
Type: string

The agent context's opaque ID.

mcpServerUrl
Type: string

The Model Context Protocol (MCP) server URL to give your employees while workforce sign-in is ENABLED. The URL is the agent context's MCP endpoint, with workforceSignInConfig.signInUrl as its login_hint query parameter and the ID that AWS Context assigns to that sign-in URL as its tenantId query parameter. Absent while workforce sign-in is DISABLED.

name
Required: Yes
Type: string

The name of the agent context. If you didn't specify a name when you created it, the name is default.

status
Required: Yes
Type: string

The agent context's lifecycle status.

Valid values:

  • CREATING - The agent context is being created.

  • ACTIVE - The agent context is ready to use.

  • UPDATING - The agent context is being updated.

  • DELETING - The agent context is being deleted.

  • FAILED - The agent context failed.

traceAnalysisConfig
Type: TraceAnalysisConfig structure

The agent context's trace analysis settings.

trustedIdentitySources
Type: Array of TrustedIdentitySource structures

Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

workforceSignInConfig
Type: WorkforceSignInConfig structure

How your employees sign in to this agent context's MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get an agent context

The following example returns the configuration and status of the agent context ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53.

$result = $client->getAgentContext([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'connectionMappings' => [
        [
            'type' => 'GLUE_DATA_CATALOG',
            'connectionId' => 'arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7',
            'ontologyMappings' => [
                [
                    'ontologyId' => 'arn:aws:context:us-east-1::ontology/data',
                ],
            ],
            'pathSegments' => [
                [
                    'id' => 'sales',
                    'level' => 'glueDatabase',
                ],
            ],
        ],
    ],
    'createdAt' => ,
    'description' => 'Sales pipeline and revenue tables for the analytics agents.',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED',
    ],
    'id' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'status' => 'ACTIVE',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED',
        'status' => 'DISABLED',
    ],
    'updatedAt' => ,
    'workforceSignInConfig' => [
        'status' => 'DISABLED',
    ],
]

GetChangeSet

$result = $client->getChangeSet([/* ... */]);
$promise = $client->getChangeSetAsync([/* ... */]);

Returns one change set's metadata: its status and the other fields of the change set, without its operations. To see what the change set wrote, list its operations with ListChangeSetOperations. For changeSetId, pass a change set's id from ListChangeSets.

Parameter Syntax

$result = $client->getChangeSet([
    'agentContextId' => '<string>', // REQUIRED
    'changeSetId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that owns the change set, by its ID or ARN.

changeSetId
Required: Yes
Type: string

The change set to fetch, by its opaque instance ID.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>',
    'changeSetVersion' => <integer>,
    'connectionArn' => '<string>',
    'createdAt' => <DateTime>,
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'id' => '<string>',
    'status' => 'DRAFT|PENDING|AUTHORIZED|SUPPRESSED|PUBLISHED|FAILED',
    'statusReason' => [
        'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
        'message' => '<string>',
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessControl
Type: string

See AccessControl. The service returns it on every item.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetVersion
Required: Yes
Type: int

The change set's latest version. Pass it to UpdateChangeSet. Each version is immutable. The number increases by one on each edit and each status change.

connectionArn
Type: string

The ARN of the connection that produced this change set. Absent for a change that no connection produced, such as a direct CreateChangeSet call, and for every ACL_RESTRICTED change set, because the connection would identify the source of the restricted content.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was created.

generatedBy
Type: string

The activity that generated the change set. A change set that an IMPORT_ONTOLOGY task writes carries IMPORT_ONTOLOGY_TASK, and one that a CreateChangeSet call makes carries DIRECT_MODIFICATION. A sync of a connected data source's own metadata, such as an AWS Glue Data Catalog sync, carries DATA_SOURCE_INGESTION. To list the change sets that carry a value, filter ListChangeSets on it.

This member can be absent, so handle a change set that has no activity. For example, it's absent on a change set that records a connection's removal, on a change set that AWS Context wrote when it loaded an ontology's schema, and on a change set whose activity this API version doesn't recognize.

id
Required: Yes
Type: string

The change set's opaque instance ID. Requests take it as changeSetId.

status
Required: Yes
Type: string

The status of the change set. Valid values:

  • DRAFT - AWS Context is evaluating the change set against the agent context's curation policies.

  • PENDING - Held for review as a curation proposal. While the change set is PENDING, you can remove operations from it with UpdateChangeSet.

  • AUTHORIZED - The change set is approved, and AWS Context is applying it.

  • SUPPRESSED - AWS Context won't apply the change set, because a curation policy denied it or its curation proposal was closed without approval.

  • PUBLISHED - AWS Context applied the change set to the agent context.

  • FAILED - AWS Context couldn't apply the change set.

SUPPRESSED and PUBLISHED are final. A FAILED change set can still change to PUBLISHED or PENDING if AWS Context retries applying it. New values can be added, so handle a status that you don't recognize.

statusReason
Type: StatusReason structure

Why AWS Context created or closed the change set, for example because a connection was removed from the agent context. AWS Context keeps it across later status changes, including a curator's decision. Absent when AWS Context gave no reason.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was last updated, such as when its status changed or its operations were edited.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get a change set

The following example returns the metadata of a change set that ontology grounding produced and that a curation policy holds for review, including the changeSetVersion to pass to UpdateChangeSet.

$result = $client->getChangeSet([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetVersion' => 1,
    'createdAt' => ,
    'generatedBy' => 'ONTOLOGY_GROUNDING',
    'id' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
    'status' => 'PENDING',
    'updatedAt' => ,
]

GetConnection

$result = $client->getConnection([/* ... */]);
$promise = $client->getConnectionAsync([/* ... */]);

Returns a connection's configuration and status.

Parameter Syntax

$result = $client->getConnection([
    'connectionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
connectionId
Required: Yes
Type: string

The connection to return, by its ID (which starts with conn-) or its ARN.

Result Syntax

[
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => '<string>',
        ],
    ],
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'dataSource' => [
        'location' => [
            'arn' => '<string>',
        ],
        'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
    ],
    'failure' => [
        'code' => 'GLUE_CONNECTION_UNAVAILABLE',
        'message' => '<string>',
    ],
    'glueConnectionMappings' => [
        [
            'glueConnectionArn' => '<string>',
            'path' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'id' => '<string>',
    'ingestionConfig' => [
        'roleArn' => '<string>',
    ],
    'name' => '<string>',
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => '<string>',
                        'level' => '<string>',
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'subStatus' => 'GLUE_CONNECTION_CREATED|GLUE_CONNECTION_VALIDATED|SYNC_JOB_CREATED',
    'syncSchedule' => [
        'cronExpression' => '<string>',
        'frequency' => 'HOURLY|DAILY|WEEKLY|MONTHLY',
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessConfig
Type: AccessConfig structure

Per-connection access configuration: the IAM role used for data access.

arn
Required: Yes
Type: string

The ARN of the connection.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the connection was created.

dataSource
Required: Yes
Type: DataSourceReference structure

The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

failure
Type: ConnectionFailure structure

The reason the connection is FAILED. Absent in every other status.

glueConnectionMappings
Type: Array of GlueConnectionMapping structures

The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

id
Required: Yes
Type: string

The ID of the connection.

ingestionConfig
Type: IngestionConfig structure

The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

name
Required: Yes
Type: string

The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

scope
Type: DataSourceScope structure

The hierarchical subset of the data source this connection ingests.

status
Required: Yes
Type: string

The connection's status. Valid values:

  • CREATING - Validation or provisioning is still in progress.

  • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn't mean that a crawl has started or completed.

  • UPDATING - The connection is being updated.

  • DELETING - The connection is being deleted.

  • FAILED - Validation or provisioning failed, and the connection can't recover.

subStatus
Type: string

The last milestone a third-party connection's lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

syncSchedule
Type: SyncSchedule structure

The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn't specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get a connection

The following example returns the configuration and status of the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b.

$result = $client->getConnection([
    'connectionId' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => 'arn:aws:iam::111122223333:role/ContextGlueReadRole',
        ],
    ],
    'arn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'createdAt' => ,
    'dataSource' => [
        'type' => 'GLUE_DATA_CATALOG',
        'location' => [
            'arn' => 'arn:aws:glue:us-east-1:111122223333:catalog',
        ],
    ],
    'id' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'ingestionConfig' => [
        'roleArn' => 'arn:aws:iam::111122223333:role/ContextIngestionRole',
    ],
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'sales_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
        ],
    ],
    'status' => 'ACTIVE',
    'updatedAt' => ,
]

GetCurationPolicy

$result = $client->getCurationPolicy([/* ... */]);
$promise = $client->getCurationPolicyAsync([/* ... */]);

Returns a curation policy's configuration, status, and policy document.

Parameter Syntax

$result = $client->getCurationPolicy([
    'curationPolicyId' => '<string>', // REQUIRED
    'version' => '<string>',
]);

Parameter Details

Members
curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to return.

version
Type: string

The version to return: DRAFT for the working copy, or a published version number. If you omit it, AWS Context returns the working copy.

Result Syntax

[
    'arn' => '<string>',
    'autoRejectAfterSeconds' => <integer>,
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'lastPublishedVersion' => '<string>',
    'name' => '<string>',
    'policyDocument' => '<string>',
    'revisionId' => '<string>',
    'status' => 'DRAFT|ACTIVE|DELETED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the curation policy.

autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation policy was created.

description
Type: string

The description of the curation policy.

id
Required: Yes
Type: string

The ID of the curation policy. Requests take it as curationPolicyId.

lastPublishedVersion
Type: string

Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).

name
Required: Yes
Type: string

The name of the curation policy.

policyDocument
Required: Yes
Type: string

The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

revisionId
Required: Yes
Type: string

An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

status
Required: Yes
Type: string

The policy's status.

Valid values:

  • DRAFT - The policy has never been published, so no agent context enforces it.

  • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

  • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get a published version of a curation policy

The following example returns version 1 of a curation policy, including the Cedar policy document that the associated agent contexts enforce.

$result = $client->getCurationPolicy([
    'version' => '1',
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
]);

Result syntax:

[
    'name' => 'hold-trace-analysis-changes',
    'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'autoRejectAfterSeconds' => 604800,
    'createdAt' => ,
    'description' => 'Holds changes that trace analysis generates for review before they are applied.',
    'id' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'lastPublishedVersion' => '1',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" };',
    'revisionId' => 'e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e',
    'status' => 'ACTIVE',
    'updatedAt' => ,
]

GetCurationProposal

$result = $client->getCurationProposal([/* ... */]);
$promise = $client->getCurationProposalAsync([/* ... */]);

Returns a curation proposal and a summary of the change that it holds for review. ListChangeSetOperations returns the change's individual operations.

Parameter Syntax

$result = $client->getCurationProposal([
    'agentContextId' => '<string>', // REQUIRED
    'curationProposalId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with ResourceNotFoundException.

curationProposalId
Required: Yes
Type: string

The proposal to fetch, by its opaque instance ID.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>',
    'changeSetId' => '<string>',
    'createdAt' => <DateTime>,
    'expiresAt' => <DateTime>,
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'id' => '<string>',
    'revisionId' => '<string>',
    'status' => 'PENDING_REVIEW|APPROVED|REJECTED|SUPERSEDED|FAILED|PUBLISHING|ARCHIVED',
    'statusReason' => [
        'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
        'message' => '<string>',
    ],
    'statusReasonCode' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
    'title' => '<string>',
    'triggeringPolicies' => [
        [
            'policyId' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessControl
Type: string

Who can read the authorizing change set's content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns accessControl on every proposal.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetId
Required: Yes
Type: string

The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was created.

expiresAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the review window closes, which is when a holding policy's autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

generatedBy
Type: string

The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.

id
Required: Yes
Type: string

The proposal's opaque instance ID. Requests take it as curationProposalId.

revisionId
Required: Yes
Type: string

An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

status
Required: Yes
Type: string

The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.

Valid values:

  • PENDING_REVIEW - Waiting for a curator's decision. The only status Accept and Reject act on.

  • APPROVED - A curator accepted it. Its change set is published or publishing.

  • REJECTED - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCode REQUEST_EXPIRED).

  • SUPERSEDED - A newer proposal for the same document replaced it.

  • FAILED - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.

  • PUBLISHING - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.

  • ARCHIVED - The connection that produced it was removed from the agent context. statusReason.code is CONNECTION_REMOVED.

statusReason
Type: StatusReason structure

Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

statusReasonCode
Type: string

Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.

Valid values:

  • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

  • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.

title
Type: string

A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add 'orders' and 2 more entities, and 20 relationships, Add 'orders → customers' and 2 more relationships, or Associate ontology 'my-ontology' version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

triggeringPolicies
Type: Array of TriggeringPolicy structures

The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set's evaluation). Absent if none held it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get a curation proposal

The following example returns a curation proposal that a curation policy held for review, including the revisionId to pass when you accept or reject it.

$result = $client->getCurationProposal([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'curationProposalId' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b',
    'createdAt' => ,
    'expiresAt' => ,
    'generatedBy' => 'DATA_SOURCE_INGESTION',
    'id' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
    'revisionId' => '7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c',
    'status' => 'PENDING_REVIEW',
    'title' => 'Update 'orders' and 2 more entities, and 3 relationships',
    'triggeringPolicies' => [
        [
            'policyId' => 'pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c',
        ],
    ],
    'updatedAt' => ,
]

GetOntology

$result = $client->getOntology([/* ... */]);
$promise = $client->getOntologyAsync([/* ... */]);

Returns an ontology's status and one of its versions.

Parameter Syntax

$result = $client->getOntology([
    'ontologyId' => '<string>', // REQUIRED
    'sourceFormat' => 'TURTLE',
    'version' => '<string>',
]);

Parameter Details

Members
ontologyId
Required: Yes
Type: string

The ontology to return, by its ID or ARN (see OntologyIdentifier).

sourceFormat
Type: string

Return the version's source document in source, in this format, in place of the template. The response then has no template. The format must be the version's sourceFormat. On a DRAFT ontology, GetOntology returns the draft, with or without version (its only version is 1.0.0). If the ontology is AWS managed, whose source is never returned, or the version has no source document, the request fails with ValidationException. If you omit it, the response has the template and no source.

version
Type: string

The version to return, in MAJOR.MINOR.PATCH form, for example 1.0.0. If you omit it, GetOntology returns the current default version.

Result Syntax

[
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'derivationVersion' => '<string>',
    'description' => '<string>',
    'id' => '<string>',
    'name' => '<string>',
    'ontologyInductionId' => '<string>',
    'publishedAt' => <DateTime>,
    'revisionId' => '<string>',
    'source' => '<string>',
    'sourceFormat' => 'TURTLE',
    'status' => 'DRAFT|PUBLISHED',
    'template' => '<string>',
    'updatedAt' => <DateTime>,
    'validationIssues' => [
        [
            'code' => '<string>',
            'line' => <integer>,
            'message' => '<string>',
            'subject' => '<string>',
        ],
        // ...
    ],
    'version' => '<string>',
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

When this version was created. Absent when the stored version carries no creation time.

derivationVersion
Type: string

Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.

description
Type: string

The ontology's description. The same for every version. Absent when the ontology has none.

id
Required: Yes
Type: string

The ID of the ontology, assigned by AWS Context.

name
Type: string

The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.

ontologyInductionId
Type: string

The induction that made the ontology. Absent for an ontology CreateOntology made.

publishedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.

revisionId
Type: string

The revision of the draft. Set only for a DRAFT ontology.

source
Type: string

The source document of the returned version, or the draft of a DRAFT ontology, with or without version. Set only when the request set sourceFormat. Absent otherwise.

sourceFormat
Type: string

The format of the version's source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).

status
Required: Yes
Type: string

The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.

template
Type: string

The serialized template JSON for this version (see OntologyTemplate).

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level createdAt (from the version fields) is the returned version's creation time, not the ontology's.

validationIssues
Type: Array of OntologyValidationIssue structures

Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.

version
Required: Yes
Type: string

The version of the ontology, in MAJOR.MINOR.PATCH form, for example 1.0.0.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get an ontology and its source document

The following example returns the current default version of an ontology, with its Turtle source document in place of the template.

$result = $client->getOntology([
    'ontologyId' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
    'sourceFormat' => 'TURTLE',
]);

Result syntax:

[
    'version' => '1.0.0',
    'name' => 'sales-analytics',
    'arn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
    'createdAt' => ,
    'derivationVersion' => 'owl-derivation-3',
    'description' => 'Customers and the orders they place.',
    'id' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
    'publishedAt' => ,
    'source' => '@prefix ex:  .@prefix owl:  .@prefix rdfs:  .@prefix xsd:  . a owl:Ontology .ex:Customer a owl:Class ; rdfs:label "Customer" ; rdfs:comment "A person or company that places orders." .ex:Order a owl:Class ; rdfs:label "Order" ; rdfs:comment "A purchase that a customer places." .ex:customerId a owl:DatatypeProperty ; rdfs:domain ex:Customer ; rdfs:range xsd:string .ex:orderId a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:string .ex:placedOrder a owl:ObjectProperty ; rdfs:label "placed order" ; rdfs:domain ex:Customer ; rdfs:range ex:Order .',
    'sourceFormat' => 'TURTLE',
    'status' => 'PUBLISHED',
    'updatedAt' => ,
]

GetOntologyInduction

$result = $client->getOntologyInduction([/* ... */]);
$promise = $client->getOntologyInductionAsync([/* ... */]);

Returns an ontology induction's status, and, once it is a draft, the ontology it created.

Parameter Syntax

$result = $client->getOntologyInduction([
    'ontologyInductionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ontologyInductionId
Required: Yes
Type: string

The ID or Amazon Resource Name (ARN) of the ontology induction to return.

Result Syntax

[
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'failure' => [
        'code' => '<string>',
        'message' => '<string>',
    ],
    'id' => '<string>',
    'inputConfig' => [
        'documents' => [
            [
                'contentType' => 'PDF|TXT|MARKDOWN|CSV|JSON|YAML|DOC|DOCX|HTML',
                'name' => '<string>',
                'sizeBytes' => <integer>,
            ],
            // ...
        ],
    ],
    'ontologyArn' => '<string>',
    'ontologyDescription' => '<string>',
    'ontologyId' => '<string>',
    'ontologyName' => '<string>',
    'prompt' => '<string>',
    'seedOntologyId' => '<string>',
    'status' => 'INDUCING|DRAFT|FAILED|CANCELLED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the ontology induction.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the ontology induction was created.

failure
Type: OntologyInductionFailure structure

Why the induction is FAILED. Absent in every other status.

id
Required: Yes
Type: string

The ID of the induction, assigned by AWS Context.

inputConfig

What the induction was started from, without the document content.

ontologyArn
Type: string

The ARN of ontologyId. Present when it is.

ontologyDescription
Type: string

The description the induction's ontology gets (ontologyDescription). Absent when there is none.

ontologyId
Type: string

The ontology the induction created. Present exactly when the status is DRAFT: the ontology is created as DRAFT, in the same step that makes the induction DRAFT. Absent while INDUCING, and on a FAILED or CANCELLED induction, which never has an ontology. Returned even after the ontology is deleted.

ontologyName
Type: string

The name the induction's ontology gets, as StartOntologyInduction took it (ontologyName). Once the ontology exists, its current name is GetOntology's.

prompt
Type: string

The prompt that the induction was started with. Absent if the induction was started without a prompt.

seedOntologyId
Type: string

The seed ontology the induction started from. Absent when started without a seed. Returned in every status.

status
Required: Yes
Type: string

The status of the ontology induction: INDUCING while it runs, then DRAFT once it has created a draft ontology, or FAILED. An induction that CancelOntologyInduction stops is CANCELLED. DRAFT, FAILED, and CANCELLED are final.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the ontology induction was last updated. Set when the induction is created, and updated on every change, such as a change of status.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get an ontology induction

The following example returns an ontology induction that has finished and created a DRAFT ontology.

$result = $client->getOntologyInduction([
    'ontologyInductionId' => 'oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
]);

Result syntax:

[
    'arn' => 'arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'createdAt' => ,
    'id' => 'oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'inputConfig' => [
        'documents' => [
            [
                'name' => 'catalog-overview.md',
                'contentType' => 'MARKDOWN',
                'sizeBytes' => 143,
            ],
        ],
    ],
    'ontologyArn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'ontologyDescription' => 'Books, authors, members, and loans for a lending library.',
    'ontologyId' => 'ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'ontologyName' => 'library-catalog',
    'prompt' => 'Model books, authors, library members, and loans. Give every type a stable identifier.',
    'status' => 'DRAFT',
    'updatedAt' => ,
]

GetResourcePolicy

$result = $client->getResourcePolicy([/* ... */]);
$promise = $client->getResourcePolicyAsync([/* ... */]);

Returns the resource-based policy attached to an agent context, with its revision ID.

Parameter Syntax

$result = $client->getResourcePolicy([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

ARN of the agent context.

Result Syntax

[
    'policy' => '<string>',
    'resourceArn' => '<string>',
    'revisionId' => '<string>',
]

Result Details

Members
policy
Required: Yes
Type: string (string|number|array|map or anything parsable by json_encode)

The resource-based policy document.

resourceArn
Required: Yes
Type: string

ARN of the agent context.

revisionId
Required: Yes
Type: string

Current revision. Pass it to PutResourcePolicy or DeleteResourcePolicy as expectedRevisionId.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get the resource-based policy of an agent context

The following example returns the resource-based policy attached to an agent context, with the revision ID to pass to PutResourcePolicy or DeleteResourcePolicy.

$result = $client->getResourcePolicy([
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
]);

Result syntax:

[
    'policy' => '{"Version":"2012-10-17","Statement":[{"Sid":"AllowAnalyticsAccountRead","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::444455556666:root"},"Action":["context:SearchAgentContext","context:TraverseAgentContext"],"Resource":"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53"}]}',
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'revisionId' => '3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f',
]
Example 2: Get the policy of an agent context that has none, which fails with ResourceNotFoundException

The following example shows the ResourceNotFoundException returned when no resource-based policy is attached to the agent context.

$result = $client->getResourcePolicy([
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394',
]);

GetTask

$result = $client->getTask([/* ... */]);
$promise = $client->getTaskAsync([/* ... */]);

Returns a task's configuration, status, and results.

Parameter Syntax

$result = $client->getTask([
    'agentContextId' => '<string>', // REQUIRED
    'taskId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context, as an ID or ARN.

taskId
Required: Yes
Type: string

The ID of the task to return.

Result Syntax

[
    'agentContextId' => '<string>',
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
        'importOntology' => [
            'ontologies' => [
                [
                    'ontologyArn' => '<string>',
                    'ontologyVersion' => '<string>',
                ],
                // ...
            ],
        ],
        'importVerifiedQueries' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
    ],
    'outputs' => [
        [
            'changeSet' => [
                'changeSetId' => '<string>',
            ],
        ],
        // ...
    ],
    'statistics' => [
        'numberOfChangeSetsAutoApproved' => <integer>,
        'numberOfChangeSetsCreated' => <integer>,
        'numberOfDocumentsAnalyzed' => <integer>,
    ],
    'status' => 'PENDING|IN_PROGRESS|COMPLETED|FAILED|CANCELLING|CANCELLED',
    'statusMessage' => '<string>',
    'statusReasonCode' => 'GRAPH_NOT_ACTIVE|ONTOLOGY_INVALID|ONTOLOGY_IMPORT_UNAVAILABLE|ONTOLOGY_ALREADY_IMPORTED',
    'type' => 'IMPORT_DATA_DICTIONARY|IMPORT_VERIFIED_QUERIES|IMPORT_ONTOLOGY',
    'updatedAt' => <DateTime>,
]

Result Details

Members
agentContextId
Required: Yes
Type: string

The agent context's ID.

arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the task.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was created.

description
Type: string

The description of the task, as given to StartTask.

id
Required: Yes
Type: string

The ID of the task. Pass it as taskId to GetTask or CancelTask.

inputConfiguration
Required: Yes
Type: TaskInputConfigurationSummary structure

A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.

outputs
Type: Array of TaskOutput structures

What the task created, in creation order. Set when it finishes.

statistics
Type: TaskStatistics structure

Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

status
Required: Yes
Type: string

The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

statusMessage
Type: string

The reason the task failed. Present only when status is FAILED.

statusReasonCode
Type: string

The code for why the task failed. Present only when status is FAILED.

Valid values:

  • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

  • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

  • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

  • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

type
Required: Yes
Type: string

The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Get a completed task

The following example gets a data dictionary import task that has completed and lists the change sets that it created.

$result = $client->getTask([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'taskId' => 'task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
]);

Result syntax:

[
    'type' => 'IMPORT_DATA_DICTIONARY',
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
    'createdAt' => ,
    'description' => 'Import the sales data dictionary',
    'id' => 'task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'name' => 'sales-columns.csv',
                    'contentType' => 'CSV',
                    'sizeBytes' => 140,
                ],
            ],
        ],
    ],
    'outputs' => [
        [
            'changeSet' => [
                'changeSetId' => 'cs-8a1f3d5c7e9b4f2a6c0d8e4b1a9f7c35',
            ],
        ],
        [
            'changeSet' => [
                'changeSetId' => 'cs-4d9e2b7a5c1f4e83a7b6d0c3f9e2a518',
            ],
        ],
    ],
    'statistics' => [
        'numberOfChangeSetsAutoApproved' => 0,
        'numberOfChangeSetsCreated' => 2,
    ],
    'status' => 'COMPLETED',
    'updatedAt' => ,
]

ListAgentContexts

$result = $client->listAgentContexts([/* ... */]);
$promise = $client->listAgentContextsAsync([/* ... */]);

Lists the agent contexts in your account. A page can hold fewer items than maxResults, or none, and still return a nextToken. Keep paging until nextToken is absent.

Parameter Syntax

$result = $client->listAgentContexts([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.

nextToken
Type: string

Opaque pagination cursor from a prior response. Omit for the first page.

Result Syntax

[
    'items' => [
        [
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'id' => '<string>',
            'name' => '<string>',
            'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
            'updatedAt' => <DateTime>,
            'workforceSignInConfig' => [
                'signInUrl' => '<string>',
                'status' => 'ENABLED|DISABLED',
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of AgentContextSummary structures

The agent contexts in your account, as summaries, most recently updated first.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more results exist.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: List agent contexts

The following example lists the agent contexts in the account.

$result = $client->listAgentContexts([
    'maxResults' => 10,
]);

Result syntax:

[
    'items' => [
        [
            'name' => 'sales-analytics',
            'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
            'createdAt' => ,
            'description' => 'Sales pipeline and revenue tables for the analytics agents.',
            'id' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
            'status' => 'ACTIVE',
            'updatedAt' => ,
            'workforceSignInConfig' => [
                'status' => 'DISABLED',
            ],
        ],
        [
            'name' => 'support-knowledge',
            'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394',
            'createdAt' => ,
            'id' => 'ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394',
            'status' => 'ACTIVE',
            'updatedAt' => ,
            'workforceSignInConfig' => [
                'status' => 'DISABLED',
            ],
        ],
    ],
]

ListChangeSetOperations

$result = $client->listChangeSetOperations([/* ... */]);
$promise = $client->listChangeSetOperationsAsync([/* ... */]);

Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order. This is the only read that returns a change set's contents.

Parameter Syntax

$result = $client->listChangeSetOperations([
    'agentContextId' => '<string>', // REQUIRED
    'changeSetId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that owns the change set, as an ID or ARN. Authorization is on this agent context's ARN, and a change set of another agent context is a ResourceNotFoundException.

changeSetId
Required: Yes
Type: string

The change set whose operations to page through, by its opaque instance ID.

maxResults
Type: int

Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with ValidationException.

nextToken
Type: string

The pagination token from a previous response. Omit it for the first page.

The request fails with ValidationException, and you must start again without a token, in these cases:

  • The token was issued before an UpdateChangeSet edit, and the change set is still PENDING.

  • The token was issued while an edited change set was PENDING, and the change set's status has since changed.

  • The token was issued to another end user or for another change set.

On an ACL_RESTRICTED change set, AWS Context checks access before it reads the token, so a caller without access gets AccessDeniedException whatever token it sends. For an allowed end user, the token also carries the access decision, which expires after a few minutes. AWS Context then checks access again before it returns the page.

Result Syntax

[
    'items' => [
        [
            'delete' => [
                'entity' => [
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'update' => [
                'entity' => [
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of ChangeSetOperation structures

This page of the change set's operations.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more operations remain.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: List the operations in a change set

The following example returns the operations in a change set that ontology grounding produced for one table: a link from the table to an ontology class, and a link from each of two columns to an ontology property.

$result = $client->listChangeSetOperations([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
    'maxResults' => 25,
]);

Result syntax:

[
    'items' => [
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_db%2Forders',
                        'to' => 'iri:https://example.com/ontology/sales%23Order',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'MAPPED_TO',
                    ],
                ],
            ],
        ],
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:order_total',
                        'to' => 'iri:https://example.com/ontology/sales%23orderTotal',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'MAPPED_TO',
                    ],
                ],
            ],
        ],
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:region_code',
                        'to' => 'iri:https://example.com/ontology/sales%23salesRegion',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'MAPPED_TO',
                    ],
                ],
            ],
        ],
    ],
]

ListChangeSets

$result = $client->listChangeSets([/* ... */]);
$promise = $client->listChangeSetsAsync([/* ... */]);

Lists an agent context's change sets that have the specified status, newest first. Each item is a summary of the change set, without its operations. To see what a change set wrote, call ListChangeSetOperations with its id as changeSetId.

Parameter Syntax

$result = $client->listChangeSets([
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>', // REQUIRED
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'DRAFT|PENDING|AUTHORIZED|SUPPRESSED|PUBLISHED|FAILED', // REQUIRED
]);

Parameter Details

Members
accessControl
Type: string

The accessControl value to list change sets for. If you omit it, every change set in the status is listed, each with its accessControl. If you specify a value that isn't listed, the request fails with ValidationException.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context whose change sets you want to list, by its ID or ARN.

generatedBy
Type: string

The activity that generated the change sets to list, for example ENTITY_RESOLUTION. If you omit it, change sets from every activity are listed. If you specify a value that isn't listed, the request fails with ValidationException. A change set without a generatedBy, for example one that AWS Context wrote when it loaded an ontology's schema, matches no value.

Valid values:

  • DATA_SOURCE_EXTRACTION - AWS Context extracted the content from a connected data source with a model, for example from the documents of an Amazon Bedrock knowledge base.

  • DATA_SOURCE_INGESTION - AWS Context ingested content from a connected data source as a repeatable projection of the source, such as an AWS Glue Data Catalog sync.

  • ENTITY_RESOLUTION - AWS Context merged duplicate entities into one canonical entity.

  • ONTOLOGY_GROUNDING - AWS Context linked an ontology class to the data entities that instantiate it.

  • TRACE_ANALYSIS - AWS Context derived skills and instructions from recorded agent sessions.

  • IMPORT_DATA_DICTIONARY_TASK - An IMPORT_DATA_DICTIONARY task wrote the content. Change sets from earlier IMPORT_VERIFIED_QUERIES tasks can also carry this value.

  • IMPORT_VERIFIED_QUERIES_TASK - An IMPORT_VERIFIED_QUERIES task wrote the content.

  • IMPORT_ONTOLOGY_TASK - An IMPORT_ONTOLOGY task imported an ontology.

  • DIRECT_MODIFICATION - A person, an agent, or an application called CreateChangeSet directly.

maxResults
Type: int

Maximum number of results per page (upper bound, not a target). The service might return fewer.

nextToken
Type: string

Opaque pagination cursor from a prior response. Omit for the first page.

status
Required: Yes
Type: string

The status of the change sets to list, for example PUBLISHED. Required. A request lists one status, so to list several statuses, make one request for each. If you specify a value that isn't listed, the request fails with ValidationException.

Result Syntax

[
    'items' => [
        [
            'accessControl' => 'ACL_RESTRICTED|NO_ACL',
            'agentContextId' => '<string>',
            'createdAt' => <DateTime>,
            'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
            'id' => '<string>',
            'status' => 'DRAFT|PENDING|AUTHORIZED|SUPPRESSED|PUBLISHED|FAILED',
            'statusReason' => [
                'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
                'message' => '<string>',
            ],
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of ChangeSetSummary structures

The change set summaries. Always present, and empty when there are none. Stop paging when nextToken is absent, not when a page is short.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more results exist.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: List published change sets

The following example lists an agent context's published change sets, newest first, two per page.

$result = $client->listChangeSets([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'maxResults' => 2,
    'status' => 'PUBLISHED',
]);

Result syntax:

[
    'items' => [
        [
            'accessControl' => 'NO_ACL',
            'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
            'createdAt' => ,
            'generatedBy' => 'DATA_SOURCE_INGESTION',
            'id' => 'cs-9c1e3a5b7d0f4b2d6e8a0c2f4b6d8e1a',
            'status' => 'PUBLISHED',
            'updatedAt' => ,
        ],
        [
            'accessControl' => 'ACL_RESTRICTED',
            'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
            'createdAt' => ,
            'generatedBy' => 'DIRECT_MODIFICATION',
            'id' => 'cs-7b9d1f3a5c6e4a8b0d2f4a6c8e0b1d3f',
            'status' => 'PUBLISHED',
            'updatedAt' => ,
        ],
    ],
    'nextToken' => 'AgV4EXAMPLEnextTokenListChangeSets0001',
]

ListConnections

$result = $client->listConnections([/* ... */]);
$promise = $client->listConnectionsAsync([/* ... */]);

Lists the connections in your account, most recently updated first.

Parameter Syntax

$result = $client->listConnections([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.

nextToken
Type: string

Opaque pagination cursor from a prior response. Omit for the first page.

Result Syntax

[
    'items' => [
        [
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'dataSource' => [
                'location' => [
                    'arn' => '<string>',
                ],
                'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
            ],
            'id' => '<string>',
            'name' => '<string>',
            'scope' => [
                'selectors' => [
                    [
                        'path' => [
                            [
                                'id' => '<string>',
                                'level' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    // ...
                ],
            ],
            'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of ConnectionSummary structures

The connections in your account, as summaries. Always present, and empty when the account has no connections.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more results exist.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: List connections

The following example lists the connections in the account, most recently updated first.

$result = $client->listConnections([
    'maxResults' => 10,
]);

Result syntax:

[
    'items' => [
        [
            'name' => 'sales-analytics',
            'type' => 'GLUE_DATA_CATALOG',
            'arn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
            'createdAt' => ,
            'dataSource' => [
                'type' => 'GLUE_DATA_CATALOG',
                'location' => [
                    'arn' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                ],
            ],
            'id' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
            'scope' => [
                'selectors' => [
                    [
                        'path' => [
                            [
                                'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                                'level' => 'glueCatalog',
                            ],
                            [
                                'id' => 'sales_db',
                                'level' => 'glueDatabase',
                            ],
                        ],
                    ],
                ],
            ],
            'status' => 'ACTIVE',
            'updatedAt' => ,
        ],
        [
            'name' => 'support-knowledge-base',
            'type' => 'BEDROCK_KNOWLEDGE_BASE',
            'arn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-c9d0e1f2a3b44c5d9e6f7a8b9c0d1e2f',
            'createdAt' => ,
            'dataSource' => [
                'type' => 'BEDROCK_KNOWLEDGE_BASE',
                'location' => [
                    'arn' => 'arn:aws:bedrock:us-east-1:111122223333:knowledge-base/KBEXAMPLE1',
                ],
            ],
            'id' => 'conn-c9d0e1f2a3b44c5d9e6f7a8b9c0d1e2f',
            'status' => 'ACTIVE',
            'updatedAt' => ,
        ],
    ],
]

ListCurationPolicies

$result = $client->listCurationPolicies([/* ... */]);
$promise = $client->listCurationPoliciesAsync([/* ... */]);

Lists the curation policies in your account, or the ones associated with an agent context. Each item is a summary without the policy document. GetCurationPolicy returns the document. If agentContextId doesn't name an agent context in your account, the operation returns an empty page instead of an error.

Parameter Syntax

$result = $client->listCurationPolicies([
    'agentContextId' => '<string>',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'DRAFT|ACTIVE',
]);

Parameter Details

Members
agentContextId
Type: string

The agent context whose associated policies you want to list, by its ID or ARN. If you omit it, every policy in your account is listed.

maxResults
Type: int

Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with ValidationException.

nextToken
Type: string

Opaque pagination cursor from a prior response. Omit for the first page.

status
Type: string

Return only policies with this status. If you omit it, policies in both statuses are returned.

Valid values:

  • DRAFT - Policies that have never been published.

  • ACTIVE - Policies with a published version.

Result Syntax

[
    'items' => [
        [
            'arn' => '<string>',
            'autoRejectAfterSeconds' => <integer>,
            'createdAt' => <DateTime>,
            'id' => '<string>',
            'lastPublishedVersion' => '<string>',
            'name' => '<string>',
            'revisionId' => '<string>',
            'status' => 'DRAFT|ACTIVE|DELETED',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of CurationPolicySummary structures

The matching policies, as summaries: the agent context's associated policies, or every policy in your account when agentContextId is omitted, in no particular order. The account-wide list is eventually consistent, so a policy created moments ago might be missing. Always present, and empty when there are none.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more results exist.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: List the curation policies in your account

The following example lists the curation policies in the account, one published and one still a draft.

$result = $client->listCurationPolicies([
    'maxResults' => 10,
]);

Result syntax:

[
    'items' => [
        [
            'name' => 'hold-trace-analysis-changes',
            'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
            'autoRejectAfterSeconds' => 604800,
            'createdAt' => ,
            'id' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
            'lastPublishedVersion' => '1',
            'revisionId' => 'e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e',
            'status' => 'ACTIVE',
            'updatedAt' => ,
        ],
        [
            'name' => 'hold-ontology-changes',
            'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a',
            'createdAt' => ,
            'id' => 'pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a',
            'revisionId' => '2c9b7e1a-4d3f-4a8b-b6c5-1e0f9d8c7b6a',
            'status' => 'DRAFT',
            'updatedAt' => ,
        ],
    ],
]

ListCurationProposals

$result = $client->listCurationProposals([/* ... */]);
$promise = $client->listCurationProposalsAsync([/* ... */]);

Lists an agent context's curation proposals, newest first. A curation proposal holds a change to the agent context for review.

Parameter Syntax

$result = $client->listCurationProposals([
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'PENDING_REVIEW|APPROVED|REJECTED|SUPERSEDED|FAILED|PUBLISHING|ARCHIVED', // REQUIRED
]);

Parameter Details

Members
accessControl
Type: string

The accessControl value to list proposals for. If you omit it, every proposal in the status is listed, each with its accessControl. If you specify a value that isn't listed, the request fails with ValidationException.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context whose proposals you want to list, by its ID or ARN.

maxResults
Type: int

Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with ValidationException.

nextToken
Type: string

Opaque pagination cursor from a prior response. Omit for the first page.

status
Required: Yes
Type: string

The status to scope the queue to, for example, PENDING_REVIEW for the review queue. Required: a request lists one status, so list each status you want in its own request.

Valid values:

  • PENDING_REVIEW - Waiting for a curator's decision. The only status Accept and Reject act on.

  • APPROVED - A curator accepted it. Its change set is published or publishing.

  • REJECTED - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCode REQUEST_EXPIRED).

  • SUPERSEDED - A newer proposal for the same document replaced it.

  • FAILED - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.

  • PUBLISHING - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.

  • ARCHIVED - The connection that produced it was removed from the agent context. statusReason.code is CONNECTION_REMOVED.

Result Syntax

[
    'items' => [
        [
            'accessControl' => 'ACL_RESTRICTED|NO_ACL',
            'agentContextId' => '<string>',
            'changeSetId' => '<string>',
            'createdAt' => <DateTime>,
            'expiresAt' => <DateTime>,
            'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
            'id' => '<string>',
            'revisionId' => '<string>',
            'status' => 'PENDING_REVIEW|APPROVED|REJECTED|SUPERSEDED|FAILED|PUBLISHING|ARCHIVED',
            'statusReason' => [
                'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
                'message' => '<string>',
            ],
            'statusReasonCode' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
            'title' => '<string>',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of CurationProposalSummary structures

The curation proposals, as summaries. Always present, and empty when there are none.

nextToken
Type: string

Pagination cursor for the next page. Absent when no more results exist.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: List the curation proposals waiting for review

The following example lists the curation proposals of an agent context that are waiting for a curator's decision, newest first.

$result = $client->listCurationProposals([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'maxResults' => 25,
    'status' => 'PENDING_REVIEW',
]);

Result syntax:

[
    'items' => [
        [
            'accessControl' => 'NO_ACL',
            'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
            'changeSetId' => 'cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b',
            'createdAt' => ,
            'expiresAt' => ,
            'generatedBy' => 'DATA_SOURCE_INGESTION',
            'id' => 'cp-dc0af01d4ca5847e27d63a3e30a0c9c6',
            'revisionId' => '7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c',
            'status' => 'PENDING_REVIEW',
            'title' => 'Update 'orders' and 2 more entities, and 3 relationships',
            'updatedAt' => ,
        ],
        [
            'accessControl' => 'NO_ACL',
            'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
            'changeSetId' => 'cs-2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c',
            'createdAt' => ,
            'expiresAt' => ,
            'generatedBy' => 'DATA_SOURCE_INGESTION',
            'id' => 'cp-1331654b3cbad6b265e09a4588a4e32f',
            'revisionId' => 'c4e6a8b0-2d1f-4a3c-9e5b-7d9f1b3a5c7e',
            'status' => 'PENDING_REVIEW',
            'title' => 'Update 'customers' and 1 more entity, and 1 relationship',
            'updatedAt' => ,
        ],
    ],
]

ListOntologies

$result = $client->listOntologies([/* ... */]);
$promise = $client->listOntologiesAsync([/* ... */]);

Lists the ontologies in your account, with the status of each.

Parameter Syntax

$result = $client->listOntologies([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of ontology summaries to return in one page, 1–100. Defaults to 50. A value outside this range fails with ValidationException. AWS Context doesn't clamp it.

nextToken
Type: string

Opaque continuation token from a prior response's nextToken. Omit on the first page.

Result Syntax

[
    'items' => [
        [
            'arn' => '<string>',
            'defaultVersion' => '<string>',
            'description' => '<string>',
            'edgeTypeCount' => <integer>,
            'id' => '<string>',
            'name' => '<string>',
            'nodeTypeCount' => <integer>,
            'ontologyInductionId' => '<string>',
            'publishedAt' => <DateTime>,
            'status' => 'DRAFT|PUBLISHED',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of OntologySummary structures

One entry for each ontology that you own. Always present, and empty when you have none.

nextToken
Type: string

The token for the next page of results. Pass it as nextToken in your next request. Absent on the last page. Treat the token as opaque.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: List ontologies

The following example lists the ontologies in the account: one created with CreateOntology and one created by an ontology induction and then published.

$result = $client->listOntologies([
    'maxResults' => 50,
]);

Result syntax:

[
    'items' => [
        [
            'name' => 'product-catalog',
            'arn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e',
            'defaultVersion' => '1.0.0',
            'edgeTypeCount' => 3,
            'id' => 'ont-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e',
            'nodeTypeCount' => 4,
            'ontologyInductionId' => 'oi-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e',
            'publishedAt' => ,
            'status' => 'PUBLISHED',
            'updatedAt' => ,
        ],
        [
            'name' => 'sales-analytics',
            'arn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
            'defaultVersion' => '1.0.0',
            'description' => 'Customers and the orders they place.',
            'edgeTypeCount' => 1,
            'id' => 'ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d',
            'nodeTypeCount' => 2,
            'publishedAt' => ,
            'status' => 'PUBLISHED',
            'updatedAt' => ,
        ],
    ],
]

ListOntologyInductions

$result = $client->listOntologyInductions([/* ... */]);
$promise = $client->listOntologyInductionsAsync([/* ... */]);

Lists the ontology inductions in your account.

Parameter Syntax

$result = $client->listOntologyInductions([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of inductions to return in one page, from 1 to 100. Defaults to 50.

nextToken
Type: string

Opaque continuation token from a prior response's nextToken. Omit on the first page.

Result Syntax

[
    'items' => [
        [
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'id' => '<string>',
            'ontologyArn' => '<string>',
            'ontologyDescription' => '<string>',
            'ontologyId' => '<string>',
            'ontologyName' => '<string>',
            'status' => 'INDUCING|DRAFT|FAILED|CANCELLED',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of OntologyInductionSummary structures

The ontology inductions in your account. Always present, and empty when there are none.

nextToken
Type: string

The token for the next page of results. Absent on the last page.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

AccessDeniedException:

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

Examples

Example 1: List ontology inductions

The following example lists the ontology inductions in the account: one that created a DRAFT ontology and one that was cancelled.

$result = $client->listOntologyInductions([
    'maxResults' => 50,
]);

Result syntax:

[
    'items' => [
        [
            'arn' => 'arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
            'createdAt' => ,
            'id' => 'oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
            'ontologyArn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
            'ontologyDescription' => 'Books, authors, members, and loans for a lending library.',
            'ontologyId' => 'ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
            'ontologyName' => 'library-catalog',
            'status' => 'DRAFT',
            'updatedAt' => ,
        ],
        [
            'arn' => 'arn:aws:context:us-east-1:111122223333:ontology-induction/oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
            'createdAt' => ,
            'id' => 'oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b',
            'ontologyName' => 'support-tickets',
            'status' => 'CANCELLED',
            'updatedAt' => ,
        ],
    ],
]

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Returns the tags on an agent context, connection, curation policy, customer-owned ontology, or ontology induction.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource whose tags you want to list.

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The resource's tags, including any aws: system tags. Empty when the resource has no tags.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: List the tags on an agent context

The following example lists the tags on the agent context ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d.

$result = $client->listTagsForResource([
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d',
]);

Result syntax:

[
    'tags' => [
        'environment' => 'production',
        'team' => 'sales-analytics',
    ],
]

ListTasks

$result = $client->listTasks([/* ... */]);
$promise = $client->listTasksAsync([/* ... */]);

Lists an agent context's tasks, newest first.

Parameter Syntax

$result = $client->listTasks([
    'agentContextId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'PENDING|IN_PROGRESS|COMPLETED|FAILED|CANCELLING|CANCELLED',
    'type' => 'IMPORT_DATA_DICTIONARY|IMPORT_VERIFIED_QUERIES|IMPORT_ONTOLOGY',
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context, as an ID or ARN.

maxResults
Type: int

The maximum number of tasks to return in one page, from 1–100. The service can return fewer. Defaults to 20. A value outside 1–100 fails with ValidationException.

nextToken
Type: string

The pagination token from a previous ListTasks response. Omit it for the first page, and keep the status and type filters the same on every page.

status
Type: string

Specify a status to list only the tasks with that status.

type
Type: string

Specify a type to list only the tasks of that type.

Result Syntax

[
    'items' => [
        [
            'agentContextId' => '<string>',
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'id' => '<string>',
            'statistics' => [
                'numberOfChangeSetsAutoApproved' => <integer>,
                'numberOfChangeSetsCreated' => <integer>,
                'numberOfDocumentsAnalyzed' => <integer>,
            ],
            'status' => 'PENDING|IN_PROGRESS|COMPLETED|FAILED|CANCELLING|CANCELLED',
            'statusMessage' => '<string>',
            'statusReasonCode' => 'GRAPH_NOT_ACTIVE|ONTOLOGY_INVALID|ONTOLOGY_IMPORT_UNAVAILABLE|ONTOLOGY_ALREADY_IMPORTED',
            'type' => 'IMPORT_DATA_DICTIONARY|IMPORT_VERIFIED_QUERIES|IMPORT_ONTOLOGY',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of TaskSummary structures

The tasks. Always present, and empty when there are none.

nextToken
Type: string

The token for the next page of results. Absent on the last page.

Errors

ThrottlingException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: List the tasks of an agent context

The following example lists the tasks of an agent context, newest first.

$result = $client->listTasks([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'maxResults' => 10,
]);

Result syntax:

[
    'items' => [
        [
            'type' => 'IMPORT_ONTOLOGY',
            'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
            'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46',
            'createdAt' => ,
            'id' => 'task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46',
            'statistics' => [
                'numberOfChangeSetsAutoApproved' => 0,
                'numberOfChangeSetsCreated' => 0,
            ],
            'status' => 'FAILED',
            'statusMessage' => 'Imported 0 of 1 ontologies. Failed: arn:aws:context:us-east-1:111122223333:ontology/ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274 (this ontology version is already imported into the graph)',
            'statusReasonCode' => 'ONTOLOGY_ALREADY_IMPORTED',
            'updatedAt' => ,
        ],
        [
            'type' => 'IMPORT_DATA_DICTIONARY',
            'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
            'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
            'createdAt' => ,
            'description' => 'Import the sales data dictionary',
            'id' => 'task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
            'statistics' => [
                'numberOfChangeSetsAutoApproved' => 0,
                'numberOfChangeSetsCreated' => 2,
            ],
            'status' => 'COMPLETED',
            'updatedAt' => ,
        ],
    ],
]

PutResourcePolicy

$result = $client->putResourcePolicy([/* ... */]);
$promise = $client->putResourcePolicyAsync([/* ... */]);

Attaches a resource-based policy to an agent context, or replaces the one it has. The policy controls which other accounts can call operations on the agent context. Returns the policy's revision ID.

Parameter Syntax

$result = $client->putResourcePolicy([
    'expectedRevisionId' => '<string>',
    'policy' => '<string>', // REQUIRED
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
expectedRevisionId
Type: string

The revision that you last read. The write succeeds only if it matches the stored revision.

policy
Required: Yes
Type: string (string|number|array|map or anything parsable by json_encode)

The resource-based policy document.

resourceArn
Required: Yes
Type: string

ARN of the agent context to attach the policy to.

Result Syntax

[
    'resourceArn' => '<string>',
    'revisionId' => '<string>',
]

Result Details

Members
resourceArn
Required: Yes
Type: string

ARN of the agent context.

revisionId
Required: Yes
Type: string

Revision of the stored policy after this call.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Attach a resource-based policy to an agent context

The following example lets account 444455556666 also get an agent context, in addition to searching and traversing it, replacing the policy at the revision that GetResourcePolicy returned.

$result = $client->putResourcePolicy([
    'expectedRevisionId' => '3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f',
    'policy' => '{"Version":"2012-10-17","Statement":[{"Sid":"AllowAnalyticsAccountRead","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::444455556666:root"},"Action":["context:GetAgentContext","context:SearchAgentContext","context:TraverseAgentContext"],"Resource":"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53"}]}',
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
]);

Result syntax:

[
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'revisionId' => '9a4f2c6e-1d8b-4b3a-a7e5-0c2d6f8b1e49',
]
Example 2: Put a policy with a stale revision ID, which fails with ConflictException

The following example shows the ConflictException returned when expectedRevisionId doesn't match the stored revision because another writer changed the policy first.

$result = $client->putResourcePolicy([
    'expectedRevisionId' => '3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f',
    'policy' => '{"Version":"2012-10-17","Statement":[{"Sid":"AllowAnalyticsAccountRead","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::444455556666:root"},"Action":["context:SearchAgentContext","context:TraverseAgentContext"],"Resource":"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53"}]}',
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
]);

PutTrace

$result = $client->putTrace([/* ... */]);
$promise = $client->putTraceAsync([/* ... */]);

Submits an agent's execution traces so that AWS Context can extract reusable knowledge and skills from them. Call it when an agent finishes a task or session that is worth learning from. In agentContextArns, name the agent contexts that the traces are about. AWS Context analyzes the traces for each of them.

Each traceDocuments entry is one raw trace document in the trace schema that format selects. You can send 1–100 documents per call. Each document can be up to 5 MiB before encoding. If you use an AWS SDK, pass each document's raw bytes. If you call PutTrace through the agent context's MCP server or another JSON client, send each document as a base64-encoded string. To send a larger trace, split it across calls that share a sessionId.

sessionId groups related calls into one session. If you omit it, AWS Context generates one and returns it in the response so that you can reuse it.

Each agent context can hold up to 100,000 trace documents. If a request would exceed this quota, it fails with ServiceQuotaExceededException, and AWS Context stores no documents. If a request fails for any other reason, AWS Context might have stored some of its documents. To store the rest without duplicates, retry with the same clientToken.

Parameter Syntax

$result = $client->putTrace([
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW|DENY', // REQUIRED
                'principalId' => '<string>', // REQUIRED
                'principalType' => 'USER|GROUP',
            ],
            // ...
        ],
    ],
    'agentContextArns' => ['<string>', ...], // REQUIRED
    'clientToken' => '<string>',
    'format' => 'OTEL|ANTHROPIC|BEDROCK_CONVERSE|KIRO', // REQUIRED
    'sessionId' => '<string>',
    'traceDocuments' => [<string || resource || Psr\Http\Message\StreamInterface>, ...], // REQUIRED
    'traceMetadata' => ['<string>', ...],
]);

Parameter Details

Members
accessControlConfig
Type: AccessControlConfig structure

The principals who can see the insights that AWS Context generates from the traces. If you provide entries, the caller is not included unless an entry names it.

If you provide no entries (accessControlConfig absent, or accessControlList absent or empty), only the end user that the caller's trusted identity propagation session names can see the insights. If the session names no end user, or there is no session, the call fails with ValidationException and stores nothing. In that case, name the principals, or send ALLOW for * so that every reader of the agent contexts can see the insights.

An entry other than * without principalType, a principalId that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with ValidationException. AWS Context stores principal IDs as given and does not verify them against a directory. A session's access control is the union of its traces' entries. A call that would take that union over 100 entries, or over 65,536 bytes of UTF-8, fails with ValidationException and stores nothing.

agentContextArns
Required: Yes
Type: Array of strings

The ARNs of the agent contexts that the traces are about: 1–10 agent-context/ ARNs that name at most 5 distinct agent contexts, in this Region and partition, all in your account. If you name more, the request fails with ValidationException. AWS Context authorizes context:PutTrace once for each agent context. If any authorization is denied, the whole call fails with AccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with ValidationException, and nothing is stored.

clientToken
Type: string

Makes the call idempotent. A retry with the same token and the same request returns the same sessionId and does not write the traces again. Reusing the token fails with ValidationException if the request is different, or if another caller reuses it when accessControlConfig names no entries. A token is honored for 8 hours after its first use. When accessControlConfig names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with ValidationException even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.

format
Required: Yes
Type: string

The format of the documents in traceDocuments. Valid values:

  • OTEL - OpenTelemetry traces in OTLP/JSON.

  • ANTHROPIC - Claude Code session logs, one log line per document.

  • BEDROCK_CONVERSE - Amazon Bedrock Converse messages, one message (role and content) per document, in conversation order.

  • KIRO - Kiro IDE or Kiro CLI session logs.

sessionId
Type: string

The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same sessionId are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the traceId: an OTLP batch carries many trace_ids under one session.

traceDocuments
Required: Yes
Type: Array of blob (string|resource|Psr\Http\Message\StreamInterface)s

The raw trace documents, in the trace schema that format selects. You can send 1–100 documents per call, and each document can be up to 5 MiB (5,242,880 bytes) before encoding. If you use an AWS SDK, pass each document's raw bytes. If you call PutTrace through the agent context's MCP server or another JSON client, send each document as a base64-encoded string.

traceMetadata
Type: Associative array of custom strings keys (TraceMetadataKey) to strings

Client-supplied key-value pairs, stored with the traces as-is. The key analysisMode is reserved. A request that sets it fails with AccessDeniedException.

Result Syntax

[
    'sessionId' => '<string>',
]

Result Details

Members
sessionId
Required: Yes
Type: string

The session ID for the traces: the sessionId that you specified, or one that AWS Context generated if you omitted it. A successful response means that AWS Context stored every document. A failed call might leave some documents stored. To store the rest without duplicates, retry with the same clientToken.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Submit agent traces for analysis

The following example submits two Amazon Bedrock Converse messages from one agent session so that AWS Context can learn from them.

$result = $client->putTrace([
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW',
                'principalId' => '*',
            ],
        ],
    ],
    'agentContextArns' => [
        'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    ],
    'clientToken' => '9e4b2d7c-1a5f-4c38-b6e0-2f8d3a7c1b95',
    'format' => 'BEDROCK_CONVERSE',
    'sessionId' => 'sales-analytics-session-0142',
    'traceDocuments' => [
        <BLOB>,
        <BLOB>,
    ],
    'traceMetadata' => [
        'agentName' => 'sales-analytics-agent',
        'agentVersion' => '1.4.0',
    ],
]);

Result syntax:

[
    'sessionId' => 'sales-analytics-session-0142',
]

RejectCurationProposal

$result = $client->rejectCurationProposal([/* ... */]);
$promise = $client->rejectCurationProposalAsync([/* ... */]);

Rejects a curation proposal. Its change is not applied to the agent context.

Parameter Syntax

$result = $client->rejectCurationProposal([
    'agentContextId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'curationProposalId' => '<string>', // REQUIRED
    'revisionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with ResourceNotFoundException.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a ValidationException.

curationProposalId
Required: Yes
Type: string

The ID of the proposal to reject.

revisionId
Required: Yes
Type: string

The revisionId the curator observed. A mismatch means a stale view.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>',
    'changeSetId' => '<string>',
    'createdAt' => <DateTime>,
    'expiresAt' => <DateTime>,
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'id' => '<string>',
    'revisionId' => '<string>',
    'status' => 'PENDING_REVIEW|APPROVED|REJECTED|SUPERSEDED|FAILED|PUBLISHING|ARCHIVED',
    'statusReason' => [
        'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
        'message' => '<string>',
    ],
    'statusReasonCode' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
    'title' => '<string>',
    'triggeringPolicies' => [
        [
            'policyId' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessControl
Type: string

Who can read the authorizing change set's content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns accessControl on every proposal.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetId
Required: Yes
Type: string

The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was created.

expiresAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the review window closes, which is when a holding policy's autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

generatedBy
Type: string

The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.

id
Required: Yes
Type: string

The proposal's opaque instance ID. Requests take it as curationProposalId.

revisionId
Required: Yes
Type: string

An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

status
Required: Yes
Type: string

The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.

Valid values:

  • PENDING_REVIEW - Waiting for a curator's decision. The only status Accept and Reject act on.

  • APPROVED - A curator accepted it. Its change set is published or publishing.

  • REJECTED - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCode REQUEST_EXPIRED).

  • SUPERSEDED - A newer proposal for the same document replaced it.

  • FAILED - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.

  • PUBLISHING - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.

  • ARCHIVED - The connection that produced it was removed from the agent context. statusReason.code is CONNECTION_REMOVED.

statusReason
Type: StatusReason structure

Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

statusReasonCode
Type: string

Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.

Valid values:

  • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

  • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.

title
Type: string

A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add 'orders' and 2 more entities, and 20 relationships, Add 'orders → customers' and 2 more relationships, or Associate ontology 'my-ontology' version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

triggeringPolicies
Type: Array of TriggeringPolicy structures

The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set's evaluation). Absent if none held it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Reject a curation proposal

The following example rejects a curation proposal that is waiting for review, so AWS Context doesn't apply its change set to the agent context.

$result = $client->rejectCurationProposal([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'clientToken' => '8a1c3e5b-7d9f-4b2d-a6c8-0e2f4a6b8d1c',
    'curationProposalId' => 'cp-1331654b3cbad6b265e09a4588a4e32f',
    'revisionId' => 'c4e6a8b0-2d1f-4a3c-9e5b-7d9f1b3a5c7e',
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c',
    'createdAt' => ,
    'generatedBy' => 'DATA_SOURCE_INGESTION',
    'id' => 'cp-1331654b3cbad6b265e09a4588a4e32f',
    'revisionId' => 'f2b4d6a8-0c1e-4f3a-b5d7-9e1a3c5f7b9d',
    'status' => 'REJECTED',
    'title' => 'Update 'customers' and 1 more entity, and 1 relationship',
    'triggeringPolicies' => [
        [
            'policyId' => 'pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c',
        ],
    ],
    'updatedAt' => ,
]

SearchAgentContext

$result = $client->searchAgentContext([/* ... */]);
$promise = $client->searchAgentContextAsync([/* ... */]);

Searches an agent context for entities matching a query. Returns ranked entities with relevance scores and metadata. To see the edges around a result node, pass its node ID to TraverseAgentContext.

Parameter Syntax

$result = $client->searchAgentContext([
    'agentContextId' => '<string>', // REQUIRED
    'filter' => [
        'andAll' => [
            [...], // RECURSIVE
            // ...
        ],
        'equalTo' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'greaterThan' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'greaterThanOrEqualTo' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'in' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'lessThan' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'lessThanOrEqualTo' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
        'notEqualTo' => [
            'key' => '<string>', // REQUIRED
            'value' => [ // REQUIRED
                'booleanValue' => true || false,
                'numberValue' => <float>,
                'stringListValue' => ['<string>', ...],
                'stringValue' => '<string>',
            ],
        ],
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'query' => '<string>', // REQUIRED
    'searchType' => 'KEYWORD|SEMANTIC|AUTO', // REQUIRED
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to search, by ID or full Amazon Resource Name (ARN).

filter
Type: SearchFilter structure

Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.

maxResults
Type: int

Maximum number of results to return per page.

nextToken
Type: string

Opaque continuation token from a prior response. Omit on the first page.

query
Required: Yes
Type: string

The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on searchType: as literal text for KEYWORD, as a semantic concept for SEMANTIC, or as both for AUTO.

searchType
Required: Yes
Type: string

The search strategy to use. Valid values:

  • KEYWORD - Full-text keyword matching (BM25).

  • SEMANTIC - Vector similarity of embeddings.

  • AUTO - Keyword matches first, then semantic matches for the remaining results.

Result Syntax

[
    'authorizationRequired' => [
        'authorizationUrl' => '<string>',
        'message' => '<string>',
    ],
    'items' => [
        [
            'edgeId' => [
                'from' => '<string>',
                'to' => '<string>',
            ],
            'entityType' => 'NODE|EDGE',
            'nodeId' => '<string>',
            'properties' => [
                '<MetadataKey>' => [
                    'boolListValue' => [true || false, ...],
                    'boolValue' => true || false,
                    'doubleListValue' => [<float>, ...],
                    'doubleValue' => <float>,
                    'floatListValue' => [<float>, ...],
                    'floatValue' => <float>,
                    'intListValue' => [<integer>, ...],
                    'intValue' => <integer>,
                    'longListValue' => [<integer>, ...],
                    'longValue' => <integer>,
                    'stringListValue' => ['<string>', ...],
                    'stringValue' => '<string>',
                ],
                // ...
            ],
            'score' => <float>,
            'summary' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
authorizationRequired
Type: AuthorizationRequired structure

Present when the end user must authorize access to a third-party resource before the search can run. In that case, items is empty. Show authorizationUrl to the end user, and retry after the user consents. Through the agent context's MCP server, you receive this as an MCP elicitation request that contains the URL.

items
Required: Yes
Type: Array of SearchAgentContextResultEntity structures

The matching entities, ranked by relevance.

nextToken
Type: string

Pagination cursor for the next page. Absent when there are no more results.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Search an agent context

The following example runs a semantic search for customer orders and returns the two best-matching nodes, an AWS Glue table and one of its columns.

$result = $client->searchAgentContext([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'maxResults' => 5,
    'query' => 'customer orders',
    'searchType' => 'SEMANTIC',
]);

Result syntax:

[
    'items' => [
        [
            'entityType' => 'NODE',
            'nodeId' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
            'properties' => [
                'name' => [
                    'stringValue' => 'orders',
                ],
                'aws:context:connection-arns' => [
                    'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                ],
                'createdAt' => [
                    'stringValue' => '2026-10-14T09:12:41Z',
                ],
                'databaseName' => [
                    'stringValue' => 'sales_analytics',
                ],
                'nodeType' => [
                    'stringValue' => 'AWS::CONTEXT::TABLE',
                ],
                'tableArn' => [
                    'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
                'updatedAt' => [
                    'stringValue' => '2026-10-14T09:12:41Z',
                ],
            ],
            'score' => 1.0412,
        ],
        [
            'entityType' => 'NODE',
            'nodeId' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:customer_id',
            'properties' => [
                'name' => [
                    'stringValue' => 'customer_id',
                ],
                'aws:context:connection-arns' => [
                    'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                ],
                'columnName' => [
                    'stringValue' => 'customer_id',
                ],
                'dataType' => [
                    'stringValue' => 'string',
                ],
                'isPartitionKey' => [
                    'boolValue' => ,
                ],
                'nodeType' => [
                    'stringValue' => 'AWS::CONTEXT::COLUMN',
                ],
                'tableArn' => [
                    'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
                'tableNodeId' => [
                    'stringValue' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                ],
                'vendor' => [
                    'stringValue' => 'GLUE',
                ],
            ],
            'score' => 0.9137,
        ],
    ],
]

StartOntologyInduction

$result = $client->startOntologyInduction([/* ... */]);
$promise = $client->startOntologyInductionAsync([/* ... */]);

Starts an ontology induction, which induces a draft ontology from the documents that you provide. The induction runs asynchronously. To get its status, call GetOntologyInduction. When the induction's status is DRAFT, AWS Context has created the ontology as a DRAFT: GetOntologyInduction returns the ontology's ID, and GetOntology returns the draft. To publish the draft, use the AWS Context console. Because AWS Context creates the ontology on your behalf, you need context:CreateOntology permission in addition to context:StartOntologyInduction. If you specify tags, you also need context:TagResource permission.

Parameter Syntax

$result = $client->startOntologyInduction([
    'clientToken' => '<string>',
    'inputConfig' => [ // REQUIRED
        'documents' => [
            [
                'content' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
                'contentType' => 'PDF|TXT|MARKDOWN|CSV|JSON|YAML|DOC|DOCX|HTML', // REQUIRED
                'name' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
    'ontologyDescription' => '<string>',
    'ontologyName' => '<string>', // REQUIRED
    'ontologyTags' => ['<string>', ...],
    'prompt' => '<string>',
    'seedOntologyId' => '<string>',
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a ValidationException. If that induction, or the ontology it created, was deleted since, a retry with the token fails with ConflictException.

inputConfig
Required: Yes
Type: OntologyInductionInputConfig structure

The input to induce the ontology from. Set exactly one member.

ontologyDescription
Type: string

Optional. The new ontology's description. An empty string is the same as none.

ontologyName
Required: Yes
Type: string

The new ontology's display name.

ontologyTags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as tags. They are checked here, and supplying them also requires context:TagResource on the new ontology. These tags go on the ontology only. tags go on the induction.

prompt
Type: string

Optional. Instructions for the induction.

seedOntologyId
Type: string

Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be PUBLISHED, and its current version must be derived from a Turtle source document. You also need context:GetOntology permission on the seed. If the seed doesn't exist, the request fails with ResourceNotFoundException. If it can't be used, the request fails with ValidationException. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with SEED_INVALID.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to add to the induction 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 induction. 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. These tags go on the induction only. ontologyTags go on the ontology.

Result Syntax

[
    'arn' => '<string>',
    'id' => '<string>',
    'status' => 'INDUCING|DRAFT|FAILED|CANCELLED',
]

Result Details

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the ontology induction.

id
Required: Yes
Type: string

The ID of the induction, assigned by AWS Context.

status
Required: Yes
Type: string

Always INDUCING on a fresh start. The stored status on an idempotent replay. The ontology is created at DRAFT: GetOntologyInduction returns its ID from then on. It stays a draft until you publish it in the AWS Context console.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Start an ontology induction

The following example starts an ontology induction from one Markdown document; the induction runs asynchronously and creates a DRAFT ontology when it finishes.

$result = $client->startOntologyInduction([
    'clientToken' => '8b0e6d4c-2a1f-4c3e-9d7b-5a6f7e8d9c0b',
    'inputConfig' => [
        'documents' => [
            [
                'name' => 'catalog-overview.md',
                'content' => <BLOB>,
                'contentType' => 'MARKDOWN',
            ],
        ],
    ],
    'ontologyDescription' => 'Books, authors, members, and loans for a lending library.',
    'ontologyName' => 'library-catalog',
    'prompt' => 'Model books, authors, library members, and loans. Give every type a stable identifier.',
]);

Result syntax:

[
    'arn' => 'arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'id' => 'oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b',
    'status' => 'INDUCING',
]

StartTask

$result = $client->startTask([/* ... */]);
$promise = $client->startTaskAsync([/* ... */]);

Starts a task that imports a data dictionary, verified queries, or ontologies into an agent context. The task runs asynchronously and records the changes it makes as change sets. GetTask returns its status.

Parameter Syntax

$result = $client->startTask([
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW|DENY', // REQUIRED
                'principalId' => '<string>', // REQUIRED
                'principalType' => 'USER|GROUP',
            ],
            // ...
        ],
    ],
    'agentContextId' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'description' => '<string>',
    'inputConfiguration' => [ // REQUIRED
        'importDataDictionary' => [
            'documents' => [ // REQUIRED
                [
                    'content' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT', // REQUIRED
                    'name' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
        'importOntology' => [
            'ontologies' => [ // REQUIRED
                [
                    'ontologyId' => '<string>', // REQUIRED
                    'ontologyVersion' => '<string>',
                ],
                // ...
            ],
        ],
        'importVerifiedQueries' => [
            'documents' => [ // REQUIRED
                [
                    'content' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT', // REQUIRED
                    'name' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
    ],
]);

Parameter Details

Members
accessControlConfig
Type: AccessControlConfig structure

Who can see the content that the task adds to the agent context. AWS Context supports only one entry: ALLOW with principalId *, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a DENY entry, or send more than one entry, the request fails with ValidationException, and no task is started.

agentContextId
Required: Yes
Type: string

The agent context, as an ID or ARN.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with ValidationException.

description
Type: string

A description of the task. Up to 1,024 characters, with no control characters.

inputConfiguration
Required: Yes
Type: TaskInputConfiguration structure

What the task imports. Set exactly one member. The member that you set determines the task's type.

Result Syntax

[
    'agentContextId' => '<string>',
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
        'importOntology' => [
            'ontologies' => [
                [
                    'ontologyArn' => '<string>',
                    'ontologyVersion' => '<string>',
                ],
                // ...
            ],
        ],
        'importVerifiedQueries' => [
            'documents' => [
                [
                    'contentType' => 'CSV|JSON|YAML|MARKDOWN|SQL|TXT',
                    'name' => '<string>',
                    'sizeBytes' => <integer>,
                ],
                // ...
            ],
        ],
    ],
    'outputs' => [
        [
            'changeSet' => [
                'changeSetId' => '<string>',
            ],
        ],
        // ...
    ],
    'statistics' => [
        'numberOfChangeSetsAutoApproved' => <integer>,
        'numberOfChangeSetsCreated' => <integer>,
        'numberOfDocumentsAnalyzed' => <integer>,
    ],
    'status' => 'PENDING|IN_PROGRESS|COMPLETED|FAILED|CANCELLING|CANCELLED',
    'statusMessage' => '<string>',
    'statusReasonCode' => 'GRAPH_NOT_ACTIVE|ONTOLOGY_INVALID|ONTOLOGY_IMPORT_UNAVAILABLE|ONTOLOGY_ALREADY_IMPORTED',
    'type' => 'IMPORT_DATA_DICTIONARY|IMPORT_VERIFIED_QUERIES|IMPORT_ONTOLOGY',
    'updatedAt' => <DateTime>,
]

Result Details

Members
agentContextId
Required: Yes
Type: string

The agent context's ID.

arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the task.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was created.

description
Type: string

The description of the task, as given to StartTask.

id
Required: Yes
Type: string

The ID of the task. Pass it as taskId to GetTask or CancelTask.

inputConfiguration
Required: Yes
Type: TaskInputConfigurationSummary structure

A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.

outputs
Type: Array of TaskOutput structures

What the task created, in creation order. Set when it finishes.

statistics
Type: TaskStatistics structure

Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

status
Required: Yes
Type: string

The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

statusMessage
Type: string

The reason the task failed. Present only when status is FAILED.

statusReasonCode
Type: string

The code for why the task failed. Present only when status is FAILED.

Valid values:

  • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

  • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

  • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

  • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

type
Required: Yes
Type: string

The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Import a data dictionary into an agent context

The following example starts a task that imports a CSV data dictionary that describes the columns of a sales table.

$result = $client->startTask([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'clientToken' => '3c8f1a2e-6b4d-4f9a-8e2c-1d7b5a9f0e64',
    'description' => 'Import the sales data dictionary',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'name' => 'sales-columns.csv',
                    'content' => <BLOB>,
                    'contentType' => 'CSV',
                ],
            ],
        ],
    ],
]);

Result syntax:

[
    'type' => 'IMPORT_DATA_DICTIONARY',
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
    'createdAt' => ,
    'description' => 'Import the sales data dictionary',
    'id' => 'task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364',
    'inputConfiguration' => [
        'importDataDictionary' => [
            'documents' => [
                [
                    'name' => 'sales-columns.csv',
                    'contentType' => 'CSV',
                    'sizeBytes' => 140,
                ],
            ],
        ],
    ],
    'status' => 'PENDING',
    'updatedAt' => ,
]
Example 2: Import an ontology into an agent context

The following example starts a task that imports version 1.2.0 of an ontology into an agent context.

$result = $client->startTask([
    'accessControlConfig' => [
        'accessControlList' => [
            [
                'access' => 'ALLOW',
                'principalId' => '*',
            ],
        ],
    ],
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'inputConfiguration' => [
        'importOntology' => [
            'ontologies' => [
                [
                    'ontologyId' => 'ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274',
                    'ontologyVersion' => '1.2.0',
                ],
            ],
        ],
    ],
]);

Result syntax:

[
    'type' => 'IMPORT_ONTOLOGY',
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46',
    'createdAt' => ,
    'id' => 'task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46',
    'inputConfiguration' => [
        'importOntology' => [
            'ontologies' => [
                [
                    'ontologyArn' => 'arn:aws:context:us-east-1:111122223333:ontology/ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274',
                    'ontologyVersion' => '1.2.0',
                ],
            ],
        ],
    ],
    'status' => 'PENDING',
    'updatedAt' => ,
]

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Adds tags to an agent context, connection, curation policy, customer-owned ontology, or ontology induction.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource to tag.

tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The tags to add, 1–200 per request. Keys must not start with aws:.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Add tags to an agent context

The following example adds two tags to the agent context ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d.

$result = $client->tagResource([
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d',
    'tags' => [
        'environment' => 'production',
        'team' => 'sales-analytics',
    ],
]);

Result syntax:

[
]

TraverseAgentContext

$result = $client->traverseAgentContext([/* ... */]);
$promise = $client->traverseAgentContextAsync([/* ... */]);

Returns the neighbors of a seed node in an agent context, each with its properties, hop distance, and the edges that connect it to the seed. To get the seed node ID, call SearchAgentContext.

Parameter Syntax

$result = $client->traverseAgentContext([
    'agentContextId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'nodeId' => '<string>', // REQUIRED
    'traversalStrategy' => [ // REQUIRED
        'direction' => 'OUTGOING|INCOMING|BOTH', // REQUIRED
        'edgeTypes' => ['<string>', ...],
        'maxDepth' => <integer>, // REQUIRED
    ],
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to traverse, by ID or full Amazon Resource Name (ARN).

maxResults
Type: int

Maximum total neighbors to return per page.

nextToken
Type: string

Opaque continuation token from a prior response. Omit on the first page.

nodeId
Required: Yes
Type: string

The ID of the seed node to start traversal from.

traversalStrategy
Required: Yes
Type: TraversalStrategy structure

Traversal directives: which edge types to follow, direction, and max depth.

Result Syntax

[
    'authorizationRequired' => [
        'authorizationUrl' => '<string>',
        'message' => '<string>',
    ],
    'items' => [
        [
            'depth' => <integer>,
            'nodeId' => '<string>',
            'pathEdges' => [
                [
                    'edgeId' => [
                        'from' => '<string>',
                        'to' => '<string>',
                    ],
                    'properties' => [
                        '<MetadataKey>' => [
                            'boolListValue' => [true || false, ...],
                            'boolValue' => true || false,
                            'doubleListValue' => [<float>, ...],
                            'doubleValue' => <float>,
                            'floatListValue' => [<float>, ...],
                            'floatValue' => <float>,
                            'intListValue' => [<integer>, ...],
                            'intValue' => <integer>,
                            'longListValue' => [<integer>, ...],
                            'longValue' => <integer>,
                            'stringListValue' => ['<string>', ...],
                            'stringValue' => '<string>',
                        ],
                        // ...
                    ],
                ],
                // ...
            ],
            'properties' => [
                '<MetadataKey>' => [
                    'boolListValue' => [true || false, ...],
                    'boolValue' => true || false,
                    'doubleListValue' => [<float>, ...],
                    'doubleValue' => <float>,
                    'floatListValue' => [<float>, ...],
                    'floatValue' => <float>,
                    'intListValue' => [<integer>, ...],
                    'intValue' => <integer>,
                    'longListValue' => [<integer>, ...],
                    'longValue' => <integer>,
                    'stringListValue' => ['<string>', ...],
                    'stringValue' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
authorizationRequired
Type: AuthorizationRequired structure

Present when the end user must authorize access to a third-party resource before the traversal can run. In that case, items is empty. Show authorizationUrl to the end user, and retry after the user consents. Through the agent context's MCP server, you receive this as an MCP elicitation request that contains the URL.

items
Required: Yes
Type: Array of NeighborNode structures

The neighbors reached from the seed node.

nextToken
Type: string

Pagination cursor for the next page. Absent when there are no more results.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Traverse from a node

The following example follows outgoing HAS_COLUMN edges one hop from an AWS Glue table node, and returns two of the table's columns with the edge that connects each one to the table.

$result = $client->traverseAgentContext([
    'agentContextId' => 'ac-0123456789abcdef0123456789abcdef',
    'maxResults' => 2,
    'nodeId' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
    'traversalStrategy' => [
        'direction' => 'OUTGOING',
        'edgeTypes' => [
            'AWS::CONTEXT::HAS_COLUMN',
        ],
        'maxDepth' => 1,
    ],
]);

Result syntax:

[
    'items' => [
        [
            'depth' => 1,
            'nodeId' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_id',
            'pathEdges' => [
                [
                    'edgeId' => [
                        'from' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                        'to' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_id',
                    ],
                    'properties' => [
                        'edgeType' => [
                            'stringValue' => 'AWS::CONTEXT::HAS_COLUMN',
                        ],
                        'vendor' => [
                            'stringValue' => 'GLUE',
                        ],
                    ],
                ],
            ],
            'properties' => [
                'name' => [
                    'stringValue' => 'order_id',
                ],
                'aws:context:connection-arns' => [
                    'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                ],
                'columnName' => [
                    'stringValue' => 'order_id',
                ],
                'dataType' => [
                    'stringValue' => 'string',
                ],
                'isPartitionKey' => [
                    'boolValue' => ,
                ],
                'nodeType' => [
                    'stringValue' => 'AWS::CONTEXT::COLUMN',
                ],
                'tableArn' => [
                    'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
                'tableNodeId' => [
                    'stringValue' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                ],
                'vendor' => [
                    'stringValue' => 'GLUE',
                ],
            ],
        ],
        [
            'depth' => 1,
            'nodeId' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_total',
            'pathEdges' => [
                [
                    'edgeId' => [
                        'from' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                        'to' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_total',
                    ],
                    'properties' => [
                        'edgeType' => [
                            'stringValue' => 'AWS::CONTEXT::HAS_COLUMN',
                        ],
                        'vendor' => [
                            'stringValue' => 'GLUE',
                        ],
                    ],
                ],
            ],
            'properties' => [
                'name' => [
                    'stringValue' => 'order_total',
                ],
                'aws:context:connection-arns' => [
                    'stringValue' => '["arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef"]',
                ],
                'columnName' => [
                    'stringValue' => 'order_total',
                ],
                'dataType' => [
                    'stringValue' => 'decimal(12,2)',
                ],
                'isPartitionKey' => [
                    'boolValue' => ,
                ],
                'nodeType' => [
                    'stringValue' => 'AWS::CONTEXT::COLUMN',
                ],
                'tableArn' => [
                    'stringValue' => 'arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders',
                ],
                'tableNodeId' => [
                    'stringValue' => 'glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders',
                ],
                'vendor' => [
                    'stringValue' => 'GLUE',
                ],
            ],
        ],
    ],
    'nextToken' => 'e1.AQIDAHhEXAMPLEnextTokenTraverseOrders0001',
]

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes tags from an agent context, connection, curation policy, customer-owned ontology, or ontology induction.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource to untag.

tagKeys
Required: Yes
Type: Array of strings

The keys of the tags to remove, 1–200 per request.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Remove a tag from a connection

The following example removes the team tag from the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b.

$result = $client->untagResource([
    'resourceArn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'tagKeys' => [
        'team',
    ],
]);

Result syntax:

[
]

UpdateAgentContext

$result = $client->updateAgentContext([/* ... */]);
$promise = $client->updateAgentContextAsync([/* ... */]);

Updates an agent context's configuration.

Parameter Syntax

$result = $client->updateAgentContext([
    'agentContextId' => '<string>', // REQUIRED
    'connectionMappings' => [
        [
            'connectionId' => '<string>', // REQUIRED
            'dataFilter' => [
                'filters' => [
                    [
                        'createdAfter' => <integer || string || DateTime>,
                        'excludeTags' => ['<string>', ...],
                        'fileType' => '<string>',
                        'includeTags' => ['<string>', ...],
                        'maxDocumentSizeBytes' => <integer>,
                        'updatedAfter' => <integer || string || DateTime>,
                    ],
                    // ...
                ],
            ],
            'extractionDepth' => '<string>',
            'ontologyMappings' => [ // REQUIRED
                [
                    'ontologyId' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'pathSegments' => [
                [
                    'id' => '<string>', // REQUIRED
                    'level' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
        ],
        // ...
    ],
    'description' => '<string>',
    'entityResolutionConfig' => [
        'status' => 'ENABLED|DISABLED',
    ],
    'name' => '<string>',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED|DISABLED',
        'status' => 'ENABLED|DISABLED',
        'traceAnalysisRole' => '<string>',
    ],
    'trustedIdentitySources' => [
        [
            'identityProviderArn' => '<string>',
            'identityStoreArn' => '<string>',
        ],
        // ...
    ],
    'workforceSignInConfig' => [
        'signInUrl' => '<string>',
        'status' => 'ENABLED|DISABLED',
    ],
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context to update, by its ID or ARN.

connectionMappings
Type: Array of ConnectionMapping structures

The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.

Each newly referenced connection must exist, be owned by your account, and be ACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.

description
Type: string

The new description. Absent leaves the description unchanged. An empty string removes it.

entityResolutionConfig
Type: EntityResolutionConfig structure

Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.

name
Type: string

The new name. If you omit it, the name is unchanged.

traceAnalysisConfig
Type: TraceAnalysisConfig structure

Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. status ENABLED requires a role, supplied here or already on the agent context. A role supplied without status requires the agent context's status to read ENABLED.

trustedIdentitySources
Type: Array of TrustedIdentitySource structures

Identity sources to trust in addition to your account. A present list replaces the stored list, [] clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.

workforceSignInConfig
Type: WorkforceSignInConfig structure

Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. signInUrl replaces the stored URL and reads ENABLED. status DISABLED removes the stored URL. status ENABLED requires a URL, supplied here or already on the agent context.

Result Syntax

[
    'arn' => '<string>',
    'connectionMappings' => [
        [
            'connectionId' => '<string>',
            'dataFilter' => [
                'filters' => [
                    [
                        'createdAfter' => <DateTime>,
                        'excludeTags' => ['<string>', ...],
                        'fileType' => '<string>',
                        'includeTags' => ['<string>', ...],
                        'maxDocumentSizeBytes' => <integer>,
                        'updatedAfter' => <DateTime>,
                    ],
                    // ...
                ],
            ],
            'extractionDepth' => '<string>',
            'ontologyMappings' => [
                [
                    'ontologyId' => '<string>',
                ],
                // ...
            ],
            'pathSegments' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
            'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
        ],
        // ...
    ],
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED|CUSTOMER_MANAGED',
        'keyArn' => '<string>',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED|DISABLED',
    ],
    'id' => '<string>',
    'mcpServerUrl' => '<string>',
    'name' => '<string>',
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED|DISABLED',
        'status' => 'ENABLED|DISABLED',
        'traceAnalysisRole' => '<string>',
    ],
    'trustedIdentitySources' => [
        [
            'identityProviderArn' => '<string>',
            'identityStoreArn' => '<string>',
        ],
        // ...
    ],
    'updatedAt' => <DateTime>,
    'workforceSignInConfig' => [
        'signInUrl' => '<string>',
        'status' => 'ENABLED|DISABLED',
    ],
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.

connectionMappings
Type: Array of ConnectionMapping structures

The agent context's connection mappings.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the agent context was created.

description
Type: string

A human-readable description, if one was set.

encryptionConfig
Required: Yes
Type: EncryptionConfig structure

The agent context's encryption settings.

entityResolutionConfig
Type: EntityResolutionConfig structure

The agent context's entity resolution settings. Populated on every response path that returns the resource.

id
Required: Yes
Type: string

The agent context's opaque ID.

mcpServerUrl
Type: string

The Model Context Protocol (MCP) server URL to give your employees while workforce sign-in is ENABLED. The URL is the agent context's MCP endpoint, with workforceSignInConfig.signInUrl as its login_hint query parameter and the ID that AWS Context assigns to that sign-in URL as its tenantId query parameter. Absent while workforce sign-in is DISABLED.

name
Required: Yes
Type: string

The name of the agent context. If you didn't specify a name when you created it, the name is default.

status
Required: Yes
Type: string

The agent context's lifecycle status.

Valid values:

  • CREATING - The agent context is being created.

  • ACTIVE - The agent context is ready to use.

  • UPDATING - The agent context is being updated.

  • DELETING - The agent context is being deleted.

  • FAILED - The agent context failed.

traceAnalysisConfig
Type: TraceAnalysisConfig structure

The agent context's trace analysis settings.

trustedIdentitySources
Type: Array of TrustedIdentitySource structures

Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

workforceSignInConfig
Type: WorkforceSignInConfig structure

How your employees sign in to this agent context's MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Turn on trace analysis for an agent context

The following example turns on trace analysis for the agent context ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53 with an IAM role in the same account, and updates its description.

$result = $client->updateAgentContext([
    'agentContextId' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'description' => 'Sales pipeline, revenue, and forecast tables for the analytics agents.',
    'traceAnalysisConfig' => [
        'status' => 'ENABLED',
        'traceAnalysisRole' => 'arn:aws:iam::111122223333:role/ContextTraceAnalysisRole',
    ],
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'arn' => 'arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'connectionMappings' => [
        [
            'type' => 'GLUE_DATA_CATALOG',
            'connectionId' => 'arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7',
            'ontologyMappings' => [
                [
                    'ontologyId' => 'arn:aws:context:us-east-1::ontology/data',
                ],
            ],
            'pathSegments' => [
                [
                    'id' => 'sales',
                    'level' => 'glueDatabase',
                ],
            ],
        ],
    ],
    'createdAt' => ,
    'description' => 'Sales pipeline, revenue, and forecast tables for the analytics agents.',
    'encryptionConfig' => [
        'encryptionMode' => 'AWS_OWNED',
    ],
    'entityResolutionConfig' => [
        'status' => 'ENABLED',
    ],
    'id' => 'ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53',
    'status' => 'ACTIVE',
    'traceAnalysisConfig' => [
        'includeContextAgentTraces' => 'ENABLED',
        'status' => 'ENABLED',
        'traceAnalysisRole' => 'arn:aws:iam::111122223333:role/ContextTraceAnalysisRole',
    ],
    'updatedAt' => ,
    'workforceSignInConfig' => [
        'status' => 'DISABLED',
    ],
]

UpdateChangeSet

$result = $client->updateChangeSet([/* ... */]);
$promise = $client->updateChangeSetAsync([/* ... */]);

Drops operations from a change set that is held for curator review. Returns the updated change set.

Parameter Syntax

$result = $client->updateChangeSet([
    'agentContextId' => '<string>', // REQUIRED
    'changeSetId' => '<string>', // REQUIRED
    'changeSetVersion' => <integer>, // REQUIRED
    'clientToken' => '<string>',
    'operationsToRemove' => [ // REQUIRED
        [
            'delete' => [
                'entity' => [ // REQUIRED
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [ // REQUIRED
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            'update' => [
                'entity' => [ // REQUIRED
                    'edgeId' => [
                        'from' => '<string>', // REQUIRED
                        'to' => '<string>', // REQUIRED
                    ],
                    'nodeId' => '<string>',
                ],
                'properties' => [ // REQUIRED
                    '<MetadataKey>' => [
                        'boolListValue' => [true || false, ...],
                        'boolValue' => true || false,
                        'doubleListValue' => [<float>, ...],
                        'doubleValue' => <float>,
                        'floatListValue' => [<float>, ...],
                        'floatValue' => <float>,
                        'intListValue' => [<integer>, ...],
                        'intValue' => <integer>,
                        'longListValue' => [<integer>, ...],
                        'longValue' => <integer>,
                        'stringListValue' => ['<string>', ...],
                        'stringValue' => '<string>',
                    ],
                    // ...
                ],
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
agentContextId
Required: Yes
Type: string

The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with ResourceNotFoundException.

changeSetId
Required: Yes
Type: string

The change set to edit: the changeSetId that GetCurationProposal returns.

changeSetVersion
Required: Yes
Type: int

The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with ConflictException.

clientToken
Type: string

A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a ValidationException.

operationsToRemove
Required: Yes
Type: Array of ChangeSetOperation structures

Operations to remove, copied unchanged from ListChangeSetOperations. A retry must resend the same list with the same clientToken.

Result Syntax

[
    'accessControl' => 'ACL_RESTRICTED|NO_ACL',
    'agentContextId' => '<string>',
    'changeSetVersion' => <integer>,
    'createdAt' => <DateTime>,
    'generatedBy' => 'DATA_SOURCE_EXTRACTION|DATA_SOURCE_INGESTION|ENTITY_RESOLUTION|ONTOLOGY_GROUNDING|TRACE_ANALYSIS|IMPORT_DATA_DICTIONARY_TASK|IMPORT_VERIFIED_QUERIES_TASK|IMPORT_ONTOLOGY_TASK|DIRECT_MODIFICATION',
    'id' => '<string>',
    'status' => 'DRAFT|PENDING|AUTHORIZED|SUPPRESSED|PUBLISHED|FAILED',
    'statusReason' => [
        'code' => 'REQUEST_EXPIRED|CONNECTION_REMOVED',
        'message' => '<string>',
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessControl
Type: string

See AccessControl. The service returns it on every item.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetVersion
Required: Yes
Type: int

The version the edit created. Pass it to the next UpdateChangeSet.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was created.

generatedBy
Type: string

The activity that generated the change set. A change set that an IMPORT_ONTOLOGY task writes carries IMPORT_ONTOLOGY_TASK, and one that a CreateChangeSet call makes carries DIRECT_MODIFICATION. A sync of a connected data source's own metadata, such as an AWS Glue Data Catalog sync, carries DATA_SOURCE_INGESTION. To list the change sets that carry a value, filter ListChangeSets on it.

This member can be absent, so handle a change set that has no activity. For example, it's absent on a change set that records a connection's removal, on a change set that AWS Context wrote when it loaded an ontology's schema, and on a change set whose activity this API version doesn't recognize.

id
Required: Yes
Type: string

The change set's opaque instance ID. Requests take it as changeSetId.

status
Required: Yes
Type: string

The status of the change set. Valid values:

  • DRAFT - AWS Context is evaluating the change set against the agent context's curation policies.

  • PENDING - Held for review as a curation proposal. While the change set is PENDING, you can remove operations from it with UpdateChangeSet.

  • AUTHORIZED - The change set is approved, and AWS Context is applying it.

  • SUPPRESSED - AWS Context won't apply the change set, because a curation policy denied it or its curation proposal was closed without approval.

  • PUBLISHED - AWS Context applied the change set to the agent context.

  • FAILED - AWS Context couldn't apply the change set.

SUPPRESSED and PUBLISHED are final. A FAILED change set can still change to PUBLISHED or PENDING if AWS Context retries applying it. New values can be added, so handle a status that you don't recognize.

statusReason
Type: StatusReason structure

Why AWS Context created or closed the change set, for example because a connection was removed from the agent context. AWS Context keeps it across later status changes, including a curator's decision. Absent when AWS Context gave no reason.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was last updated, such as when its status changed or its operations were edited.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Drop a link from a change set

The following example drops one column link from a grounding change set that is held for review, copying the operation unchanged from ListChangeSetOperations, and returns the change set's new version.

$result = $client->updateChangeSet([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
    'changeSetVersion' => 1,
    'clientToken' => '2c4e6a8b-0d1f-4c3e-a5b7-9d1f3b5d7f0a',
    'operationsToRemove' => [
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:region_code',
                        'to' => 'iri:https://example.com/ontology/sales%23salesRegion',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'MAPPED_TO',
                    ],
                ],
            ],
        ],
    ],
]);

Result syntax:

[
    'accessControl' => 'NO_ACL',
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetVersion' => 2,
    'createdAt' => ,
    'generatedBy' => 'ONTOLOGY_GROUNDING',
    'id' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
    'status' => 'PENDING',
    'updatedAt' => ,
]
Example 2: Update a change set with a stale version, which fails with ConflictException

The following example fails with a ConflictException because the change set was edited after the caller read version 1 with GetChangeSet.

$result = $client->updateChangeSet([
    'agentContextId' => 'ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c',
    'changeSetId' => 'cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b',
    'changeSetVersion' => 1,
    'operationsToRemove' => [
        [
            'put' => [
                'entity' => [
                    'edgeId' => [
                        'from' => 'glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:order_total',
                        'to' => 'iri:https://example.com/ontology/sales%23orderTotal',
                    ],
                ],
                'properties' => [
                    'edgeType' => [
                        'stringValue' => 'MAPPED_TO',
                    ],
                ],
            ],
        ],
    ],
]);

UpdateConnection

$result = $client->updateConnection([/* ... */]);
$promise = $client->updateConnectionAsync([/* ... */]);

Updates a connection's configuration.

Parameter Syntax

$result = $client->updateConnection([
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => '<string>', // REQUIRED
        ],
    ],
    'connectionId' => '<string>', // REQUIRED
    'glueConnectionMappings' => [
        [
            'glueConnectionArn' => '<string>', // REQUIRED
            'path' => [ // REQUIRED
                [
                    'id' => '<string>', // REQUIRED
                    'level' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
    'ingestionConfig' => [ // REQUIRED
        'roleArn' => '<string>', // REQUIRED
    ],
    'name' => '<string>',
    'publish' => true || false,
    'scope' => [
        'selectors' => [
            [
                'path' => [ // REQUIRED
                    [
                        'id' => '<string>', // REQUIRED
                        'level' => '<string>', // REQUIRED
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'syncSchedule' => [
        'cronExpression' => '<string>',
        'frequency' => 'HOURLY|DAILY|WEEKLY|MONTHLY',
    ],
]);

Parameter Details

Members
accessConfig
Type: AccessConfig structure

The updated access configuration for the data source. If you omit it, the existing configuration is unchanged. If you provide one, it replaces the stored configuration, including its variant.

For DATABRICKS and SNOWFLAKE, a configuration with no variant clears a stored iamRole, and the connection is then returned with no accessConfig.

For GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE, you cannot add or remove the iamRole. An update that adds an iamRole to a connection stored without one fails with ValidationException. So does an update that provides a configuration without iamRole for a connection that has one. You can replace a stored role with another role. To change how such a connection reads its data source, delete the connection and create it again.

connectionId
Required: Yes
Type: string

The connection to update, by its ID (which starts with conn-) or its ARN.

glueConnectionMappings
Type: Array of GlueConnectionMapping structures

The AWS Glue connection for each redshiftNamespace, and for each rdsInstance and rdsDatabase pair, in scope. If you omit it, the stored list is kept. A list replaces the stored list, and an empty list clears it. If the update changes scope, or changes the role of a connection to another account's catalog, AWS Context validates the kept list again. The rules are those of CreateConnectionRequest.glueConnectionMappings. You can't change the list of a SNOWFLAKE connection, which is keyed by snowflakeDatabase: omit it or send it unchanged.

ingestionConfig
Required: Yes
Type: IngestionConfig structure

The ingestion configuration: the IAM role that a data producer assumes to push data into this connection. Required on every update, so that an existing connection always has an ingestion role that AWS Context can authorize. You must have iam:PassRole permission to pass this role to the data producer, and the role must be in your account. You can't clear the role.

name
Type: string

The new name. If you omit it, the name is unchanged.

publish
Type: boolean

Specifies whether to publish a third-party connection created with publish: false. If true, AWS Context configures catalog synchronization. The connection moves to ACTIVE when AWS Glue finishes provisioning the managed crawler. This has no effect on an ACTIVE connection. false is not accepted, because a connection can't be unpublished. Delete the connection instead.

scope
Type: DataSourceScope structure

The new ingestion scope for the connection. If you omit it, the existing scope is unchanged. The rules of CreateConnectionRequest.scope apply, with the following additions:

  • A DATABRICKS or SNOWFLAKE scope names at most one databricksCatalog or snowflakeDatabase, unless the existing scope already names each one.

  • If the stored scope has a selector with a glueService segment, the new scope can't be empty. Every selector that it adds must also have a glueService segment. Otherwise, the request fails with ValidationException. You can keep a selector that the stored scope already has, so resending the stored scope unchanged succeeds.

syncSchedule
Type: SyncSchedule structure

The new sync schedule for a DATABRICKS or SNOWFLAKE source. If you omit it, the existing schedule is unchanged. Not accepted for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections.

Result Syntax

[
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => '<string>',
        ],
    ],
    'arn' => '<string>',
    'createdAt' => <DateTime>,
    'dataSource' => [
        'location' => [
            'arn' => '<string>',
        ],
        'type' => 'GLUE_DATA_CATALOG|BEDROCK_KNOWLEDGE_BASE|DATABRICKS|SNOWFLAKE',
    ],
    'failure' => [
        'code' => 'GLUE_CONNECTION_UNAVAILABLE',
        'message' => '<string>',
    ],
    'glueConnectionMappings' => [
        [
            'glueConnectionArn' => '<string>',
            'path' => [
                [
                    'id' => '<string>',
                    'level' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'id' => '<string>',
    'ingestionConfig' => [
        'roleArn' => '<string>',
    ],
    'name' => '<string>',
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => '<string>',
                        'level' => '<string>',
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'status' => 'CREATING|ACTIVE|UPDATING|DELETING|FAILED',
    'subStatus' => 'GLUE_CONNECTION_CREATED|GLUE_CONNECTION_VALIDATED|SYNC_JOB_CREATED',
    'syncSchedule' => [
        'cronExpression' => '<string>',
        'frequency' => 'HOURLY|DAILY|WEEKLY|MONTHLY',
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
accessConfig
Type: AccessConfig structure

Per-connection access configuration: the IAM role used for data access.

arn
Required: Yes
Type: string

The ARN of the connection.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the connection was created.

dataSource
Required: Yes
Type: DataSourceReference structure

The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

failure
Type: ConnectionFailure structure

The reason the connection is FAILED. Absent in every other status.

glueConnectionMappings
Type: Array of GlueConnectionMapping structures

The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

id
Required: Yes
Type: string

The ID of the connection.

ingestionConfig
Type: IngestionConfig structure

The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

name
Required: Yes
Type: string

The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

scope
Type: DataSourceScope structure

The hierarchical subset of the data source this connection ingests.

status
Required: Yes
Type: string

The connection's status. Valid values:

  • CREATING - Validation or provisioning is still in progress.

  • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn't mean that a crawl has started or completed.

  • UPDATING - The connection is being updated.

  • DELETING - The connection is being deleted.

  • FAILED - Validation or provisioning failed, and the connection can't recover.

subStatus
Type: string

The last milestone a third-party connection's lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

syncSchedule
Type: SyncSchedule structure

The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn't specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

ServiceQuotaExceededException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Update the scope of a connection

The following example adds the marketing_db database to the scope of the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b and keeps its ingestion role, which every update must specify.

$result = $client->updateConnection([
    'connectionId' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'ingestionConfig' => [
        'roleArn' => 'arn:aws:iam::111122223333:role/ContextIngestionRole',
    ],
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'sales_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'marketing_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
        ],
    ],
]);

Result syntax:

[
    'name' => 'sales-analytics',
    'accessConfig' => [
        'iamRole' => [
            'roleArn' => 'arn:aws:iam::111122223333:role/ContextGlueReadRole',
        ],
    ],
    'arn' => 'arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'createdAt' => ,
    'dataSource' => [
        'type' => 'GLUE_DATA_CATALOG',
        'location' => [
            'arn' => 'arn:aws:glue:us-east-1:111122223333:catalog',
        ],
    ],
    'id' => 'conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b',
    'ingestionConfig' => [
        'roleArn' => 'arn:aws:iam::111122223333:role/ContextIngestionRole',
    ],
    'scope' => [
        'selectors' => [
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'sales_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
            [
                'path' => [
                    [
                        'id' => 'arn:aws:glue:us-east-1:111122223333:catalog',
                        'level' => 'glueCatalog',
                    ],
                    [
                        'id' => 'marketing_db',
                        'level' => 'glueDatabase',
                    ],
                ],
            ],
        ],
    ],
    'status' => 'ACTIVE',
    'updatedAt' => ,
]

UpdateCurationPolicy

$result = $client->updateCurationPolicy([/* ... */]);
$promise = $client->updateCurationPolicyAsync([/* ... */]);

Updates a curation policy's working copy.

Parameter Syntax

$result = $client->updateCurationPolicy([
    'autoRejectAfterSeconds' => <integer>,
    'clientToken' => '<string>',
    'curationPolicyId' => '<string>', // REQUIRED
    'description' => '<string>',
    'name' => '<string>',
    'policyDocument' => '<string>',
    'revisionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
autoRejectAfterSeconds
Type: long (int|float)

The new auto-reject window, in seconds, from 86,400 (1 day) to 15,552,000 (180 days). If you omit it, the window is unchanged. You can't clear it with this operation.

clientToken
Type: string

Makes a retry safe: the same token with the same parameters returns the current policy instead of a ConflictException. A token used with different parameters is a ValidationException whose message names clientToken, checked first. A retry with the same parameters after the policy was deleted is a ConflictException.

curationPolicyId
Required: Yes
Type: string

The ID of the curation policy to update.

description
Type: string

The new description. If you omit it, the description is unchanged.

name
Type: string

The new name. If you omit it, the name is unchanged. This operation updates only the members that you include. You can't use it to clear an optional member.

policyDocument
Type: string

The new Cedar policy document. If you omit it, the document is unchanged.

revisionId
Required: Yes
Type: string

The revisionId of the working copy that you edited, as you last read it. If a concurrent edit advanced the revision, the request fails with ConflictException.

Result Syntax

[
    'arn' => '<string>',
    'autoRejectAfterSeconds' => <integer>,
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'id' => '<string>',
    'lastPublishedVersion' => '<string>',
    'name' => '<string>',
    'policyDocument' => '<string>',
    'revisionId' => '<string>',
    'status' => 'DRAFT|ACTIVE|DELETED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
arn
Required: Yes
Type: string

The ARN of the curation policy.

autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation policy was created.

description
Type: string

The description of the curation policy.

id
Required: Yes
Type: string

The ID of the curation policy. Requests take it as curationPolicyId.

lastPublishedVersion
Type: string

Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).

name
Required: Yes
Type: string

The name of the curation policy.

policyDocument
Required: Yes
Type: string

The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

revisionId
Required: Yes
Type: string

An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

status
Required: Yes
Type: string

The policy's status.

Valid values:

  • DRAFT - The policy has never been published, so no agent context enforces it.

  • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

  • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

Errors

ThrottlingException:

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

ConflictException:

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

ValidationException:

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

InternalServerException:

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

ResourceNotFoundException:

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

AccessDeniedException:

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

Examples

Example 1: Update a curation policy

The following example changes the working copy of a curation policy to also hold change sets that ontology grounding generates, and extends the auto-reject window to 14 days.

$result = $client->updateCurationPolicy([
    'autoRejectAfterSeconds' => 1209600,
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && (resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" || resource.generatedBy == AWS::Context::Activity::"ONTOLOGY_GROUNDING") };',
    'revisionId' => 'e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e',
]);

Result syntax:

[
    'name' => 'hold-trace-analysis-changes',
    'arn' => 'arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'autoRejectAfterSeconds' => 1209600,
    'createdAt' => ,
    'description' => 'Holds changes that trace analysis generates for review before they are applied.',
    'id' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'lastPublishedVersion' => '1',
    'policyDocument' => 'forbid ( principal, action == AWS::Context::Action::"PublishChangeSet", resource is AWS::Context::ChangeSet)when { resource has generatedBy && (resource.generatedBy == AWS::Context::Activity::"TRACE_ANALYSIS" || resource.generatedBy == AWS::Context::Activity::"ONTOLOGY_GROUNDING") };',
    'revisionId' => 'd41d8cd9-8f00-4b20-9e98-0998ecf8427e',
    'status' => 'ACTIVE',
    'updatedAt' => ,
]
Example 2: Update a curation policy with a stale revision ID, which fails with ConflictException

The following example fails because another edit changed the policy's working copy after the caller last read it, so the revision ID no longer matches.

$result = $client->updateCurationPolicy([
    'curationPolicyId' => 'pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e',
    'description' => 'Holds trace analysis and ontology grounding changes for review.',
    'revisionId' => '8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e',
]);

Shapes

AccessConfig

Description

The authorization that AWS Context uses to read a connection's data source at search time. Specify at most one member. For a third-party connection, configure Credential Broker settings on its AWS Glue connection, not in this structure.

Members
iamRole
Type: IamRoleAccess structure

Assume-role access. The service assumes roleArn to read the connection's data source.

AccessControlConfig

Description

Who can see information a caller writes into AWS Context: an access control list whose entries each allow or deny one end user or group, or every reader (*). Deny wins: a reader matched by a DENY entry, by ID, through a group or by *, is denied even when an ALLOW entry also matches. Otherwise a reader matched by an ALLOW entry is allowed. Every other reader is denied. What an absent AccessControlConfig, or an absent or empty list, means is stated by the operation member that takes it.

Members
accessControlList
Type: Array of AccessControlEntry structures

Entries, each allowing or denying one principal.

AccessControlEntry

Description

Allows or denies one end user or group, or every reader (*).

Members
access
Required: Yes
Type: string

Specifies whether the principal can see the information.

Valid values:

  • ALLOW - Access is allowed.

  • DENY - Access is denied.

principalId
Required: Yes
Type: string

The principal's opaque user or group ID, or * for every reader authorized on the resource.

principalType
Type: string

Specifies whether principalId names a user or a group. Required unless principalId is *, where it is ignored.

Valid values:

  • USER - An end user.

  • GROUP - A group of end users.

AccessDeniedException

Description

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

Members
message
Required: Yes
Type: string

A message that describes the error.

AgentContextSummary

Description

Condensed representation of an agent context for ListAgentContexts.

Members
arn
Type: string

The agent context's ARN.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the agent context was created.

description
Type: string

A human-readable description. Absent when none was set.

id
Required: Yes
Type: string

The agent context's opaque ID.

name
Type: string

The agent context's friendly name.

status
Type: string

The agent context's lifecycle status.

Valid values:

  • CREATING - The agent context is being created.

  • ACTIVE - The agent context is ready to use.

  • UPDATING - The agent context is being updated.

  • DELETING - The agent context is being deleted.

  • FAILED - The agent context failed.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

workforceSignInConfig
Type: WorkforceSignInConfig structure

How your employees sign in to this agent context's MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

AgenticRetrieveAction

Description

A retrieval the agent decided to run.

Members
inputQuery
Type: string

The query the agent composed.

sourceRetrievers
Type: Array of AgenticRetrieveSourceRetriever structures

The sources that the retrieval targets: an agent context, a knowledge base, or a data source.

AgenticRetrieveFailure

Description

A problem that failed the step.

Members
message
Required: Yes
Type: string

A description of the problem that caused the step to fail.

AgenticRetrieveResponseEvent

Description

A chunk of the generated answer text.

Members
text
Required: Yes
Type: string

The next chunk of the generated answer. Concatenate the text of every response event, in the order received, to get the complete answer, which the final result event also returns.

AgenticRetrieveResultEvent

Description

The final event of a successful stream: the answer and the ranked retrieved context.

Members
answer
Type: string

The synthesized natural-language answer, when one was generated.

citations
Type: Array of Citation structures

Maps spans of answer to the supporting entities, when an answer was generated.

retrievedContext
Required: Yes
Type: Array of RetrievedContext structures

The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.

AgenticRetrieveSourceRetriever

Description

A source a retrieval targets.

Members
identifier
Required: Yes
Type: string

The source's identifier: an agent context ARN, a knowledge base ID, or a data source ARN.

AgenticRetrieveStreamOutput

Description

Events produced during a streaming retrieval.

Members
accessDeniedException
Type: AccessDeniedException structure

You don't have sufficient access to perform this operation. The stream ends after this event.

internalServerException
Type: InternalServerException structure

The retrieval failed because of an internal error. The stream ends after this event.

resourceNotFoundException
Type: ResourceNotFoundException structure

A resource that the retrieval needs was not found. The stream ends after this event.

responseEvent

A chunk of the generated answer. Concatenate the chunks, in the order received, to get the complete answer.

result
Type: AgenticRetrieveResultEvent structure

The final event of a successful stream: the complete answer and the context retrieved for it.

traceEvent
Type: AgenticRetrieveTraceEvent structure

A progress event: a planning or retrieval step started, succeeded, or failed.

AgenticRetrieveTraceEvent

Description

A progress event in an AgenticRetrieveStream response. It reports that a planning or retrieval step of the retrieval started, succeeded, or failed.

Members
attributes
Required: Yes
Type: AgenticRetrieveTraceEventAttributes structure

The step that the event reports on, the status of the step, and what happened in it.

id
Required: Yes
Type: string

Unique identifier for the event.

occurredAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the event occurred.

AgenticRetrieveTraceEventAttributes

Description

The details of a trace event: the step it reports on, the status of the step, and the retrievals, warnings, and failures that the step produced.

Members
actions
Type: Array of AgenticRetrieveAction structures

The retrievals the agent planned. Present on Planning events only.

failures
Type: Array of AgenticRetrieveFailure structures

Problems that failed the step.

message
Required: Yes
Type: string

Human-readable description of the step's state.

status
Required: Yes
Type: string

The status of the step. Valid values:

  • IN_PROGRESS - The step started.

  • SUCCEEDED - The step finished successfully.

  • FAILED - The step failed. failures describes why.

step
Required: Yes
Type: string

The step of the agent loop that this event reports on. Valid values:

  • Planning - The agent is planning which retrievals to run.

  • Retrieval - The agent is running a retrieval.

warnings
Type: Array of AgenticRetrieveWarning structures

Problems that did not stop the step.

AgenticRetrieveWarning

Description

A problem that did not stop the step.

Members
message
Required: Yes
Type: string

A description of the problem. The step continued despite it.

AnalysisConfiguration

Description

Controls post-call analysis of the agent run.

Members
emitTrace
Type: string

Specifies whether AWS Context stores this call's agent trace for asynchronous analysis. Absent means ENABLED. A trace is stored only when the agent context's traceAnalysisConfig also has status and includeContextAgentTraces ENABLED.

AnyValue

Description

The value of a property on a node or an edge in an agent context. Exactly one member is set, and the member that is set determines the value's type.

Members
boolListValue
Type: Array of booleans

A list of up to 1,000 Boolean values.

boolValue
Type: boolean

A Boolean value.

doubleListValue
Type: Array of doubles

A list of up to 1,000 double-precision (64-bit) floating-point values.

doubleValue
Type: double

A double-precision (64-bit) floating-point value.

floatListValue
Type: Array of floats

A list of up to 1,000 single-precision (32-bit) floating-point values.

floatValue
Type: float

A single-precision (32-bit) floating-point value.

intListValue
Type: Array of ints

A list of up to 1,000 32-bit signed integer values.

intValue
Type: int

A 32-bit signed integer value.

longListValue
Type: Array of long (int|float)s

A list of up to 1,000 64-bit signed integer values.

longValue
Type: long (int|float)

A 64-bit signed integer value.

stringListValue
Type: Array of strings

A list of up to 1,000 string values, each up to 2,048 characters.

stringValue
Type: string

A string value, up to 2,048 characters.

AuthorizationRequired

Description

The end user must open authorizationUrl and consent to third-party access before you retry the request.

Members
authorizationUrl
Required: Yes
Type: string

The URL the end user opens to consent. Single-use and bound to the caller's identity.

message
Type: string

A short, user-facing explanation of what is being authorized.

ChangeSetOperation

Description

One operation of a change set. Exactly one member is set. CreateChangeSet takes it as the operation to write, ListChangeSetOperations returns it, and UpdateChangeSet takes it to name an operation to remove. Operation values are customer content. A member set beside an unknown one is used and the unknown one is ignored, as an authorization member is ignored. An item with no member set, or two, is refused with ValidationException. A client built from an older model receives a member it does not know as an unknown member.

Members
delete
Type: DeleteOperation structure

Removes a node or edge. A deleted node takes its unowned edges.

put
Type: PutOperation structure

Writes a node or edge in full. Creates it if it does not exist.

update
Type: UpdateOperation structure

Changes the properties of a node or edge. Like put, it creates a node that doesn't exist, and every reader of the agent context can read the node unless the request specifies accessControlConfig.

ChangeSetReference

Description

A reference to a change set that the task created. Read it with GetChangeSet.

Members
changeSetId
Required: Yes
Type: string

The ID of a change set that the task created. Pass it to GetChangeSet to read the change set.

ChangeSetSummary

Description

A summary of a change set's latest version, as returned by ListChangeSets.

Members
accessControl
Type: string

See AccessControl. The service returns it on every item.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was created.

generatedBy
Type: string

The activity that generated the change set. A change set that an IMPORT_ONTOLOGY task writes carries IMPORT_ONTOLOGY_TASK, and one that a CreateChangeSet call makes carries DIRECT_MODIFICATION. A sync of a connected data source's own metadata, such as an AWS Glue Data Catalog sync, carries DATA_SOURCE_INGESTION. To list the change sets that carry a value, filter ListChangeSets on it.

This member can be absent, so handle a change set that has no activity. For example, it's absent on a change set that records a connection's removal, on a change set that AWS Context wrote when it loaded an ontology's schema, and on a change set whose activity this API version doesn't recognize.

id
Required: Yes
Type: string

The change set's opaque instance ID. Requests take it as changeSetId.

status
Required: Yes
Type: string

The status of the change set. Valid values:

  • DRAFT - AWS Context is evaluating the change set against the agent context's curation policies.

  • PENDING - Held for review as a curation proposal. While the change set is PENDING, you can remove operations from it with UpdateChangeSet.

  • AUTHORIZED - The change set is approved, and AWS Context is applying it.

  • SUPPRESSED - AWS Context won't apply the change set, because a curation policy denied it or its curation proposal was closed without approval.

  • PUBLISHED - AWS Context applied the change set to the agent context.

  • FAILED - AWS Context couldn't apply the change set.

SUPPRESSED and PUBLISHED are final. A FAILED change set can still change to PUBLISHED or PENDING if AWS Context retries applying it. New values can be added, so handle a status that you don't recognize.

statusReason
Type: StatusReason structure

Why AWS Context created or closed the change set, for example because a connection was removed from the agent context. AWS Context keeps it across later status changes, including a curator's decision. Absent when AWS Context gave no reason.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the change set was last updated, such as when its status changed or its operations were edited.

Citation

Description

Maps a span of the answer to the entities that support it. The span is answer[startIndex:endIndex].

Members
endIndex
Required: Yes
Type: int

The character offset in answer where the cited span ends (exclusive).

references
Required: Yes
Type: Array of Reference structures

The entities in retrievedContext that support the span, referenced by identity.

startIndex
Required: Yes
Type: int

The character offset in answer where the cited span begins.

ConflictException

Description

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

Members
message
Required: Yes
Type: string

A message that describes the error.

resourceId
Type: string

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

resourceType
Type: string

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.

ConnectionFailure

Description

Details of why a connection is FAILED. Use code to decide how to respond. message is a human-readable description that you shouldn't parse. Both members are always present together.

Members
code
Required: Yes
Type: string

A code that identifies why the connection failed. Codes include the following:

  • GLUE_CONNECTION_UNAVAILABLE - The AWS Glue connection failed AWS Glue validation or no longer exists, or AWS Context couldn't provision catalog synchronization. Check the AWS Glue connection in the AWS Glue console, and then create the connection again.

New codes can be added, so handle a code that you don't recognize. Use code, not message, to decide how to respond.

message
Required: Yes
Type: string

The failure message. For an AWS Glue connection that failed validation, this is the StatusReason from AWS Glue. Otherwise, it is a message from AWS Context.

ConnectionMapping

Description

A connection mapping entry on CreateAgentContext and UpdateAgentContext. Each entry binds a connection to one or more ontologies within the agent context, optionally scoped by a data filter, extraction depth, and path segments.

Members
connectionId
Required: Yes
Type: string

The connection, by its ID (which starts with conn-) or its full ARN. Required. AWS Context resolves an ID to an ARN in your account and the current Region.

dataFilter
Type: DataFilter structure

Optional. The data filter for this connection mapping. A document matches if it matches any filter in the list. Within a filter, all conditions must match. If you omit it, every document matches.

extractionDepth
Type: string

Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.

ontologyMappings
Required: Yes
Type: Array of OntologyMapping structures

The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets. BEDROCK_KNOWLEDGE_BASE rejects the AWS managed Data ontology. GLUE_DATA_CATALOG rejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only on BEDROCK_KNOWLEDGE_BASE. An incompatible mapping, or an ontology that isn't PUBLISHED, fails with ValidationException.

pathSegments
Type: Array of PathSegment structures

The path segments that scope ingestion within the data source, 0–100 segments. Optional. An empty list is the same as omitting the field and matches everything. The segments name levels from one branch of the connection type's level hierarchy. The container levels form a contiguous prefix of that branch that starts at its root, and a link can also name the table level. AWS Context rejects a link that mixes branches. The branches are the following:

  • GLUE_DATA_CATALOG - The native branch (glueDatabase, glueTable) and one branch for each federated AWS data source: redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable, rdsInstance, rdsDatabase, rdsSchema, rdsTable, s3TableBucket, s3Namespace, s3Table, and sagemakerModelGroup.

  • SNOWFLAKE - snowflakeDatabase, snowflakeSchema, snowflakeTable.

  • DATABRICKS - databricksCatalog, databricksSchema, databricksTable.

The connection holds the source's identity, such as the account locator or metastore ID, so it isn't a segment. AWS Context matches IDs as opaque strings against the source's coordinate values.

type
Type: string

The connection's data source type. AWS Context sets it from the referenced connection's data source type when you create or update the mapping. Read-only.

Valid values:

  • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

  • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

  • DATABRICKS - A Databricks third-party catalog.

  • SNOWFLAKE - A Snowflake third-party catalog.

ConnectionSummary

Description

A summary of a connection, as returned by ListConnections. It includes name, so you can find connections by name without calling GetConnection for each one.

Members
arn
Type: string

The ARN of the connection.

createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the connection was created.

dataSource
Type: DataSourceReference structure

The connection's data source: its type and location ARN, in the same form as the dataSource that GetConnection returns.

id
Required: Yes
Type: string

The ID of the connection.

name
Type: string

The name of the connection.

scope
Type: DataSourceScope structure

The part of the data source that the connection ingests, in the same form as the scope that GetConnection returns. Absent or empty if the connection ingests the whole source.

status
Type: string

The status of the connection.

Valid values:

  • CREATING - Validation or provisioning is in progress.

  • ACTIVE - The data source is reachable and, for a third-party connection, AWS Glue has provisioned catalog synchronization. This does not mean a crawl has started or completed.

  • UPDATING - The connection is being updated.

  • DELETING - The connection is being deleted.

  • FAILED - Validation or provisioning failed terminally.

type
Type: string

The kind of external data source.

Valid values:

  • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

  • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

  • DATABRICKS - A Databricks third-party catalog.

  • SNOWFLAKE - A Snowflake third-party catalog.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the connection was last updated.

CurationPolicySummary

Description

A summary of a curation policy, as returned by ListCurationPolicies. It omits the full resource's description and policyDocument. Get those with GetCurationPolicy.

Members
arn
Required: Yes
Type: string

The ARN of the curation policy.

autoRejectAfterSeconds
Type: long (int|float)

The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation policy was created.

id
Required: Yes
Type: string

The ID of the curation policy. Requests take it as curationPolicyId.

lastPublishedVersion
Type: string

Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).

name
Required: Yes
Type: string

The name of the curation policy.

revisionId
Required: Yes
Type: string

An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

status
Required: Yes
Type: string

The policy's status.

Valid values:

  • DRAFT - The policy has never been published, so no agent context enforces it.

  • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

  • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the resource last changed. Equal to createdAt until the first update.

CurationProposalSummary

Description

A summary of a curation proposal, as returned by ListCurationProposals.

Members
accessControl
Type: string

Who can read the authorizing change set's content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns accessControl on every proposal.

Valid values:

  • ACL_RESTRICTED - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's title names no nodes or edges.

  • NO_ACL - Every caller can read the content.

agentContextId
Required: Yes
Type: string

The agent context's ID.

changeSetId
Required: Yes
Type: string

The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was created.

expiresAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the review window closes, which is when a holding policy's autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

generatedBy
Type: string

The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.

id
Required: Yes
Type: string

The proposal's opaque instance ID. Requests take it as curationProposalId.

revisionId
Required: Yes
Type: string

An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

status
Required: Yes
Type: string

The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.

Valid values:

  • PENDING_REVIEW - Waiting for a curator's decision. The only status Accept and Reject act on.

  • APPROVED - A curator accepted it. Its change set is published or publishing.

  • REJECTED - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCode REQUEST_EXPIRED).

  • SUPERSEDED - A newer proposal for the same document replaced it.

  • FAILED - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.

  • PUBLISHING - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.

  • ARCHIVED - The connection that produced it was removed from the agent context. statusReason.code is CONNECTION_REMOVED.

statusReason
Type: StatusReason structure

Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

statusReasonCode
Type: string

Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.

Valid values:

  • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

  • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.

title
Type: string

A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add 'orders' and 2 more entities, and 20 relationships, Add 'orders → customers' and 2 more relationships, or Associate ontology 'my-ontology' version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

DataFilter

Description

The filters for a connection mapping. An asset matches if it matches any filter in the list.

Members
filters
Type: Array of Filter structures

The filters. An asset matches if it matches at least one filter in the list. If the list is absent or empty, every asset matches.

DataSourceLocation

Description

Physical location of the data source, given by its arn.

Members
arn
Required: Yes
Type: string

The ARN of the data source. Its account segment must be your account when you create the connection.

DataSourceReference

Description

Typed reference to the external data source a connection binds to: its type and its location.

Members
location
Required: Yes
Type: DataSourceLocation structure

Where the data source lives. For this scope, an AWS ARN only.

type
Required: Yes
Type: string

The kind of data source.

Valid values:

  • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

  • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

  • DATABRICKS - A Databricks third-party catalog.

  • SNOWFLAKE - A Snowflake third-party catalog.

DataSourceScope

Description

The part of the data source that a connection ingests, as a list of resource selectors. If you omit it or the list is empty, the connection ingests the whole data source.

For a GLUE_DATA_CATALOG connection, a selector can name the service whose resources it selects with a glueService segment, placed directly after the glueCatalog segment, or first if the selector names no glueCatalog. For example, [{glueCatalog: C}, {glueService: SAGEMAKER_AI}] selects every SageMaker AI resource in catalog C, including resources created later, and [{glueCatalog: C}, {glueService: REDSHIFT}, {redshiftNamespace: N}] selects only namespace N. A selector without glueService keeps its usual meaning, and one scope can combine selectors for different services. For the segment values, see PathSegment.

Members
selectors
Type: Array of ResourceSelector structures

The selectors describing which parts of the data source are in scope.

DeleteOperation

Description

The operation delete of a ChangeSetOperation.

Members
entity
Required: Yes
Type: Entity structure

The node or edge to remove.

properties
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

An edge delete requires edgeType, which with the two node IDs names the edge. A node delete ignores properties on input, so a listed delete can be sent back. A property value over the Metadata input limit (a long list property of the deleted node) is refused before it is ignored. ListChangeSetOperations returns the properties the entity had when the change was made: a node's nodeType and nodeName, an edge's edgeType.

EdgeIdentifier

Description

Identifies an edge by its endpoint nodes (edges have no standalone ID). The accompanying properties include the edgeType, so it is not repeated here.

Members
from
Required: Yes
Type: string

The ID of the node where the edge starts.

to
Required: Yes
Type: string

The ID of the node where the edge ends.

EncryptionConfig

Description

The encryption settings for the data that an agent context stores.

Members
encryptionMode
Required: Yes
Type: string

How the agent context's stored data is encrypted. Always present on the resource.

Valid values:

  • AWS_OWNED - Encrypted with an AWS owned key.

  • CUSTOMER_MANAGED - Encrypted with the AWS KMS customer managed key that keyArn specifies.

keyArn
Type: string

The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED. Absent for AWS_OWNED.

Entity

Description

The node or edge a change set operation acts on: exactly one of nodeId or edgeId.

Members
edgeId
Type: EdgeIdentifier structure

The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.

nodeId
Type: string

The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.

EntityResolutionConfig

Description

Specifies whether AWS Context resolves duplicate entities in an agent context after ingestion (offline entity resolution), which produces merge suggestions in the curation queue. Also controls grounding the resource's AWS Glue Data Catalog tables in its ontologies. Merged member-wise on Update.

Members
status
Type: string

Specifies whether entity resolution and AWS Glue Data Catalog grounding run. A resource that has never set it reads ENABLED. DISABLED stops new runs. A run already started finishes its current step, and a grounding pass that spans several steps stops at the next one.

Filter

Description

A filter that selects documents in a connection mapping. All members are optional, and a document must match every condition in the filter. When a mapping has more than one filter, a document that matches any of them is selected. updatedAfter, includeTags, and excludeTags apply to all connection types. createdAfter applies only to BEDROCK_KNOWLEDGE_BASE connections; for other connection types it doesn't exclude any document. fileType and maxDocumentSizeBytes apply only to BEDROCK_KNOWLEDGE_BASE connections, and specifying either for another connection type fails with ValidationException. You can't specify both includeTags and excludeTags in one filter.

Members
createdAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.

excludeTags
Type: Array of strings

The tags to exclude: 1–25 strings, each 1–256 characters. Applies to all connection types. You can't specify both excludeTags and includeTags in one filter.

fileType
Type: string

The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.

includeTags
Type: Array of strings

The tags to include: 1–25 strings, each 1–256 characters. Applies to all connection types. You can't specify both includeTags and excludeTags in one filter.

maxDocumentSizeBytes
Type: long (int|float)

The maximum document size, in bytes. Applies only to BEDROCK_KNOWLEDGE_BASE connections. Documents larger than this are filtered out. If you omit it, there is no size limit. Range: 1 to 52,428,800 bytes (50 MiB).

updatedAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Documents updated after this time match. Applies to all connection types.

FilterAttribute

Description

An attribute key and the value to compare it with.

Members
key
Required: Yes
Type: string

The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.

value
Required: Yes
Type: FilterValue structure

The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.

FilterValue

Description

The value a condition compares with: a list for in, a single value otherwise.

Members
booleanValue
Type: boolean

A Boolean value.

numberValue
Type: double

A number. It must be finite.

stringListValue
Type: Array of strings

A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.

stringValue
Type: string

A string, 1 to 2,048 characters.

GlueConnectionMapping

Description

A GlueConnectionMapping binds one resource in the connection's scope to an existing AWS Glue connection that you specify for it. The mapping covers every scope selector that names that resource. For a redshiftNamespace, AWS Context does not check which resource your AWS Glue connection targets. AWS Context does not revalidate an update that resends the stored list unchanged. A response does not return a status for each mapping.

Members
glueConnectionArn
Required: Yes
Type: string

The ARN of your AWS Glue connection for path, in your account and Region. Required. The connection type must be one that path accepts:

  • redshiftNamespace - A REDSHIFT unified connection (ConnectionSchemaVersion 2).

  • rdsInstance and rdsDatabase - A POSTGRESQL unified connection, or, for an RDS DB instance, also ORACLE, with its DATABASE property set to that rdsDatabase.

  • snowflakeDatabase - A SNOWFLAKE connection with a ROLE_ARN and its DATABASE property set to that database. The ROLE_ARN must allow glue:GetConnection on that connection.

AWS Context synchronizes the database through this connection. It doesn't change DATABASE on a connection that it didn't create. If AWS Glue is still validating the connection, the request fails with ConflictException. If its validation failed, the request fails with AccessDeniedException.

path
Required: Yes
Type: Array of PathSegment structures

The resource that this mapping binds, root first, in the same form as scope.selectors[].path. Required. Contains 1–2 segments:

  • On a GLUE_DATA_CATALOG connection, either a redshiftNamespace segment whose ID is an Amazon Redshift namespace ARN (namespace:<id>, or namespace/<id> for Amazon Redshift Serverless), or an rdsInstance segment whose ID is an Amazon RDS DB cluster or DB instance ARN (cluster:<id> or db:<id>) followed by an rdsDatabase segment whose ID is the database name. The ARN must be in your account and Region.

  • On a SNOWFLAKE connection whose dataSource is an AWS Glue connection, a snowflakeDatabase segment whose ID is the database name, at most 255 characters.

IamRoleAccess

Description

The IAM role in your account that AWS Context assumes to read the connection's data source.

Members
roleArn
Required: Yes
Type: string

The IAM role that AWS Context assumes to read this connection's data source. The role must be in your account. AWS Context rejects a role in another account. It has the same format as ingestionConfig.roleArn. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, CreateConnection and UpdateConnection fail with AccessDeniedException.

ImportDataDictionaryTaskConfiguration

Description

Documents of type CSV, JSON, YAML, or MARKDOWN.

Members
documents
Required: Yes
Type: Array of InputDocument structures

The documents to import the data dictionary from, sent inline: 1–10 documents of type CSV, JSON, YAML, or MARKDOWN, with at most 10,485,760 bytes (10 MiB) of content in total.

ImportDataDictionaryTaskSummary

Description

The input of an IMPORT_DATA_DICTIONARY task: the name, size, and content type of each document that the task was started with. The content of the documents isn't returned.

Members
documents
Required: Yes
Type: Array of TaskDocument structures

The names and sizes of the documents, in request order.

ImportOntologyTaskConfiguration

Description

The input of a task that imports ontologies into the agent context: 1 to 10 ontologies, imported in the order given.

Members
ontologies
Required: Yes
Type: Array of OntologyReference structures

The ontologies to import, in import order. Each ARN can appear only once.

ImportOntologyTaskSummary

Description

The input of an IMPORT_ONTOLOGY task: the ontologies that the task was started with.

Members
ontologies
Required: Yes
Type: Array of OntologyReferenceSummary structures

The ontologies that the task imports, in import order.

ImportVerifiedQueriesTaskConfiguration

Description

Documents of type SQL, CSV, JSON, or TXT.

Members
documents
Required: Yes
Type: Array of InputDocument structures

The documents to import the verified queries from, sent inline: 1–10 documents of type SQL, CSV, JSON, or TXT, with at most 10,485,760 bytes (10 MiB) of content in total.

ImportVerifiedQueriesTaskSummary

Description

The input of an IMPORT_VERIFIED_QUERIES task: the name, size, and content type of each document that the task was started with. The content of the documents isn't returned.

Members
documents
Required: Yes
Type: Array of TaskDocument structures

Names and sizes, in request order.

IngestionConfig

Description

Ingestion configuration a data producer uses to push data into this connection's agent contexts.

Members
roleArn
Required: Yes
Type: string

The IAM role in your account that a data producer assumes to push data into this connection's agent contexts. Your account must own the role.

InputDocument

Description

A document for a task to read, sent inline in the StartTask request.

Members
content
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The content of the document. All the documents in one request can total at most 10,485,760 bytes (10 MiB).

contentType
Required: Yes
Type: string

You must specify a content type that the task configuration accepts. Otherwise, the request fails with ValidationException.

name
Required: Yes
Type: string

The name of the document. The name must be unique within the request.

InternalServerException

Description

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

Members
message
Required: Yes
Type: string

A message that describes the error.

Message

Description

A single conversation turn.

Members
content
Required: Yes
Type: string

The turn's text content.

role
Required: Yes
Type: string

The role of the participant that produced this turn. Valid values:

  • USER - The user asked or said this turn.

  • ASSISTANT - The assistant answered in this turn.

NeighborNode

Description

A node that the traversal reached from the seed node, with its properties, its depth, and the edges on the path to it from the seed node.

Members
depth
Required: Yes
Type: int

The depth at which the traversal found this neighbor (1 = directly connected to seed, 2 = two edges away, and so on).

nodeId
Required: Yes
Type: string

Unique identifier of the neighbor node.

pathEdges
Type: Array of PathEdge structures

The edges along the path from the seed node to this neighbor, preserving traversal order.

properties
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

Arbitrary key-value properties stored on this neighbor node.

OntologyInductionDocument

Description

One input document, uploaded in the request. The documents are the material that the ontology is induced from, not an ontology, so they don't use OntologySourceFormat. Only the seed and the induced result are Turtle.

Members
content
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The content of the document, of the type that contentType specifies. Each document can be up to 10,485,760 bytes (10 MiB), and all the documents in the request together up to 10 MiB.

contentType
Required: Yes
Type: string

The document's type. Its bytes must be a real document of this type. Otherwise the request fails with ValidationException.

name
Required: Yes
Type: string

The name of the document. Each document in the request needs its own name, and the name only labels the document, whose type contentType sets.

OntologyInductionDocumentSummary

Description

An uploaded document as recorded.

Members
contentType
Type: string

The document's content type, as declared in the StartOntologyInduction request. Absent only for an induction started before StartOntologyInduction required a content type.

name
Required: Yes
Type: string

The document's name, as uploaded.

sizeBytes
Type: long (int|float)

The document's size in bytes.

OntologyInductionFailure

Description

Details of why an ontology induction is FAILED. Use code to decide how to respond. message is a human-readable description that you shouldn't parse. Both members are always present together.

Members
code
Required: Yes
Type: string

A code that identifies why the induction failed. Codes include the following:

  • INPUT_UNREADABLE - AWS Context couldn't read an uploaded document.

  • TOO_MANY_DOCUMENTS - The request has more documents than one induction accepts.

  • SEED_INVALID - The seed ontology's source document was deleted, is larger than 400,000 bytes, or doesn't parse.

  • FRAGMENT_EMPTY - The induction found nothing to induce in the documents, and there is no seed to start from.

  • FRAGMENT_FAILED - Inducing from a document failed after retries.

  • DOCUMENT_FILTERED - The model that drafts the ontology refused to process a document.

  • MERGE_FAILED - Merging the results from the documents failed after retries.

  • INDUCED_TOO_LARGE - The draft is larger than the maximum size of an ontology.

  • DRAFT_WRITE_FAILED - AWS Context couldn't save the draft.

  • TIMED_OUT - The induction didn't finish within its time limit.

  • RUN_STOPPED - The run stopped before it finished.

If AWS Context rejects the induced draft, code is the code that CreateOntology reports for the same problem (see OntologyIssueCode), for example RDF_PARSE_ERROR or NO_CLASSES.

For INPUT_UNREADABLE, TOO_MANY_DOCUMENTS, SEED_INVALID, FRAGMENT_EMPTY, DOCUMENT_FILTERED, and INDUCED_TOO_LARGE, fix the input, and then start a new induction. For the other codes, start a new induction with the same input. New codes can be added, so handle a code that you don't recognize. Use code, not message, to decide how to respond.

message
Required: Yes
Type: string

A human-readable description of why the induction failed. Use code, not message, to decide how to respond.

OntologyInductionInputConfig

Description

The input to induce an ontology from. Set exactly one member. Currently, the only member is documents, the documents that you upload in the request.

Members
documents
Type: Array of OntologyInductionDocument structures

Documents uploaded in the request.

OntologyInductionInputConfigSummary

Description

What an induction was started from, as recorded, for starting the same induction again. Never carries document content.

Members
documents
Type: Array of OntologyInductionDocumentSummary structures

The documents uploaded in the request, in the order given.

OntologyInductionSummary

Description

One induction in a ListOntologyInductions page. Never carries the induced document.

Members
arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the ontology induction.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the ontology induction was created.

id
Required: Yes
Type: string

The ID of the induction, assigned by AWS Context.

ontologyArn
Type: string

The ARN of ontologyId. Present when it is.

ontologyDescription
Type: string

The description the induction's ontology gets (ontologyDescription). Absent when there is none.

ontologyId
Type: string

The ontology the induction created. Present exactly when the status is DRAFT: the ontology is created as DRAFT, in the same step that makes the induction DRAFT. Absent while INDUCING, and on a FAILED or CANCELLED induction, which never has an ontology.

ontologyName
Type: string

The name the induction's ontology gets, as StartOntologyInduction took it (ontologyName). Renaming the ontology in the AWS Context console does not change this value: GetOntology and ListOntologies return its current name.

status
Required: Yes
Type: string

The status of the ontology induction: INDUCING while it runs, then DRAFT once it has created a draft ontology, or FAILED. An induction that CancelOntologyInduction stops is CANCELLED. DRAFT, FAILED, and CANCELLED are final.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the ontology induction was last updated. Set when the induction is created, and updated on every change, such as a change of status.

OntologyMapping

Description

A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.

Members
ontologyId
Required: Yes
Type: string

The ontology that this mapping targets, by its ID or ARN.

OntologyReference

Description

An ontology to import into the agent context, and optionally the version of it to import.

Members
ontologyId
Required: Yes
Type: string

An ontology ID or ARN, in the account that owns the agent context.

ontologyVersion
Type: string

The ontology version to import. If you omit it, the task imports the ontology's default version at the time the import runs.

OntologyReferenceSummary

Description

An ontology that an IMPORT_ONTOLOGY task was started with, and the version that was requested.

Members
ontologyArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the ontology to import.

ontologyVersion
Type: string

The ontology version, as requested. Absent if the request omitted it, in which case the task imported the default version at the time the import ran.

OntologySummary

Description

Identity, status, DEFAULT-version summary and type counts for one ontology, ordered by ontology ID. Doesn't include the template, which can be up to 2,000,000 characters. Call GetOntology for one ontology's detail.

Members
arn
Required: Yes
Type: string

The ARN of the ontology. Always present: every listed ontology is customer-owned, so its ARN includes the account.

defaultVersion
Type: string

The current DEFAULT version. While an induced ontology is DRAFT, its version 1.0.0, which has an empty template and no source until you publish the ontology in the AWS Context console.

description
Type: string

The description. Absent when the ontology has none.

edgeTypeCount
Type: long (int|float)

Number of edge types in the DEFAULT version's template. Absent for an ontology created before counts were stored.

id
Required: Yes
Type: string

The ID of the ontology, assigned by AWS Context.

name
Type: string

The ontology's current display name. Present on every summary: only customer-owned ontologies are listed, and each has a name.

nodeTypeCount
Type: long (int|float)

Number of node types in the DEFAULT version's template. Absent for an ontology created before counts were stored.

ontologyInductionId
Type: string

The induction that made the ontology. Absent for an ontology CreateOntology made.

publishedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

When that version was published as the DEFAULT. Absent while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.

status
Required: Yes
Type: string

The ontology's status. PUBLISHED for every ontology CreateOntology made.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the ontology last changed. Equal to its creation time until the first update.

OntologyValidationIssue

Description

One reason an uploaded ontology was rejected, or a non-fatal warning about a construct that could not be fully represented in the derived template, also in the draft of an induced ontology.

Members
code
Required: Yes
Type: string

A code that identifies the issue, such as RDF_PARSE_ERROR or UNMAPPABLE_CLASS. New codes can be added, so handle a code that you don't recognize.

line
Type: int

1-based line in the uploaded source, when the failure is attributable to a specific triple.

message
Required: Yes
Type: string

A human-readable description of the issue.

subject
Type: string

What the issue is about, when attributable. From an ontology operation, such as GetOntology: the offending subject/predicate IRI. In the draft of an induced ontology, the IRI of a term.

PathEdge

Description

An edge on the path from the seed node to a neighbor node, with the edge's properties.

Members
edgeId
Required: Yes
Type: EdgeIdentifier structure

Edge identity: the (from, to) node pair. Edges have no standalone ID. The edge type, edgeType, is carried in properties.

properties
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

Arbitrary key-value properties stored on this edge.

PathSegment

Description

One segment of a resource hierarchy path: the hierarchy level, such as database or table, and the id of the resource at that level. Both are required.

In a GLUE_DATA_CATALOG connection's scope, the level glueService names a service instead of a resource. Its id is one of the following:

  • GLUE - AWS Glue databases and tables.

  • SAGEMAKER_AI - Amazon SageMaker AI resources.

  • REDSHIFT - Amazon Redshift resources.

  • RDS - Amazon RDS resources.

  • MSK - Amazon Managed Streaming for Apache Kafka (Amazon MSK) resources.

  • KINESIS - Amazon Kinesis Data Streams resources.

  • FIREHOSE - Amazon Data Firehose resources.

  • DYNAMODB - Amazon DynamoDB resources.

  • KEYSPACES - Amazon Keyspaces (for Apache Cassandra) resources.

  • ELASTICACHE - Amazon ElastiCache resources.

  • OPENSEARCH - Amazon OpenSearch Service resources.

  • NEPTUNE - Amazon Neptune resources.

  • TIMESTREAM - Amazon Timestream resources.

  • ATHENA - Amazon Athena resources.

  • GLUE_SCHEMA_REGISTRY - AWS Glue Schema Registry resources.

  • S3 - Amazon S3 resources.

  • S3_VECTORS - Amazon S3 Vectors resources.

Every later segment of the selector must name a level of that service. Any other value, a second glueService segment, or a glueService segment in any other position returns ValidationException. A resource path never contains glueService.

Members
id
Required: Yes
Type: string

The ID of the resource at this level. Non-blank. Can contain spaces, backticks, and % (it is a resource name), but no control characters. AWS Context matches it exactly.

level
Required: Yes
Type: string

The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.

PutOperation

Description

The put operation of a ChangeSetOperation, which writes a node or an edge. A put of a node replaces the stored node: properties that you don't include are removed. To change only some properties, use UpdateOperation. On CreateChangeSet, the reserved properties keys work as follows:

  • An edge names its endpoints in entity.edgeId and its type in properties.edgeType, which is required and isn't stored as a property. The type is up to 128 characters in one or more segments separated by ::. Each segment starts with an uppercase letter and contains only uppercase letters, digits, and underscores, for example HAS_COLUMN. AWS Context refuses nodeType and nodeName on an edge.

  • An edge carries at most 49 customer properties, because edgeType counts toward the limit of 50 properties entries.

  • edgeType can't be MAPPED_TO, which is reserved for the ontology links that AWS Context writes. CreateChangeSet refuses it with ValidationException.

  • A node needs no entity, and AWS Context refuses edgeType on a node. AWS Context builds a node's ID from its nodeType and identity properties, using the ID rules of the node type's ontology, and ignores any entity.nodeId that you send. An edge names its endpoints by these built IDs.

  • An authorization member in the item is unknown and ignored, so no access control is applied from it.

Members
entity
Type: Entity structure

Names the edge to write in entity.edgeId. Required for an edge. Omit it to write a node: a node's ID comes from its properties, so AWS Context ignores entity.nodeId. ListChangeSetOperations returns a node put's entity.nodeId as a placeholder of the form ~operations/<index>, which isn't the node's ID in the agent context.

properties
Required: Yes
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

Up to 50 properties. {} when there are none. A node requires nodeType. An edge requires edgeType. ListChangeSetOperations returns the operation's properties as stored, plus edgeType on an edge and the recorded nodeType / nodeName on a node (a written nodeType, or a name under nodeName, name, title or displayName, wins), in key order after those. AWS Context doesn't list stored keys that aren't customer content (aws:*, ~*, and an edge's identity keys), or a property cut by the 50-entry cap. UpdateChangeSet cannot remove such an item.

Reference

Description

A reference by entity identity into retrievedContext (one of nodeId, edgeId, or documentId).

Members
documentId
Type: string

Identifier of the referenced document. Set when the reference is a document.

edgeId
Type: EdgeIdentifier structure

Identifier of the referenced edge. Set when the reference is an edge.

nodeId
Type: string

Identifier of the referenced node. Set when the reference is a node.

ResourceNotFoundException

Description

The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

Members
message
Required: Yes
Type: string

A message that describes the error.

resourceId
Type: string

The ID of the resource that was not found.

resourceType
Type: string

The type of the resource that wasn't found.

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.

ResourceSelector

Description

A single selector: an ordered path of {level, id} segments identifying a node in the data source's resource hierarchy. On a GLUE_DATA_CATALOG connection the path can also name at most one glueService segment, which selects a service rather than a node (see DataSourceScope).

Members
path
Required: Yes
Type: Array of PathSegment structures

Ordered hierarchy path from the root to the selected resource. Must be non-empty.

RetrievalConfiguration

Description

Bounds and configures the agent loop. The loop stops once maxIterations is reached (or the service's wall-clock ceiling elapses), or earlier once the agent judges the answer complete.

Members
maxIterations
Type: int

The maximum number of agent turns, from 2 to 50. One turn is roughly one round of tool calls and their results. If you omit it, AWS Context uses 30. The minimum is 2, because the agent needs at least one planning turn and one acting turn.

RetrievedContext

Description

One entity in the context that AgenticRetrieveStream returns: a graph node, a graph edge, or a document.

Members
content
Type: RetrievedContextContent structure

The retrieved content of the entity.

documentId
Type: string

Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).

edgeId
Type: EdgeIdentifier structure

Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).

entityType
Required: Yes
Type: string

Specifies whether this result is a node, an edge, or a document. Valid values:

  • NODE - The result is a node.

  • EDGE - The result is an edge.

  • DOCUMENT - The result is a document.

nodeId
Type: string

Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).

properties
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

Arbitrary key-value properties stored on the entity.

summary
Type: string

Human-readable description or summary of the entity.

RetrievedContextContent

Description

The content retrieved for an entity.

Members
byteContent
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The binary content of the retrieved entity.

mimeType
Type: string

The Multipurpose Internet Mail Extensions (MIME) type of the retrieved content.

text
Type: string

The text content of the retrieved entity.

SearchAgentContextResultEntity

Description

One SearchAgentContext result.

Members
edgeId
Type: EdgeIdentifier structure

Identifier of the matched edge, set when this result is an edge (at most one of nodeId or edgeId). Edge search isn't supported, so AWS Context doesn't set this member. An edge document indexed by a custom ontology is returned with neither nodeId nor edgeId set.

entityType
Required: Yes
Type: string

Specifies whether this result is a node or an edge. Valid values:

  • NODE - The result is a node. This is the only value that AWS Context returns.

  • EDGE - The result is an edge.

nodeId
Type: string

Identifier of the matched node. Set when this result is a node (at most one of nodeId or edgeId).

properties
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

Arbitrary key-value properties stored on the entity.

score
Required: Yes
Type: double

Relevance score indicating how well this entity matches the query.

summary
Type: string

Human-readable description or summary of the entity.

SearchFilter

Description

Filter on entity attributes: a single comparison, or andAll of comparisons that must all match.

Members
andAll
Type: Array of SearchFilter structures

Matches entities that match every condition in the list. Specify 2 to 5 conditions. A condition in the list can't itself be an andAll.

equalTo
Type: FilterAttribute structure

Matches entities whose attribute equals the value. The value must be a stringValue, numberValue, or booleanValue.

greaterThan
Type: FilterAttribute structure

Matches entities whose attribute is greater than the value. The value must be a stringValue, numberValue, or booleanValue.

greaterThanOrEqualTo
Type: FilterAttribute structure

Matches entities whose attribute is greater than or equal to the value. The value must be a stringValue, numberValue, or booleanValue.

in
Type: FilterAttribute structure

Matches entities whose attribute equals any of the values. The value must be a stringListValue.

lessThan
Type: FilterAttribute structure

Matches entities whose attribute is less than the value. The value must be a stringValue, numberValue, or booleanValue.

lessThanOrEqualTo
Type: FilterAttribute structure

Matches entities whose attribute is less than or equal to the value. The value must be a stringValue, numberValue, or booleanValue.

notEqualTo
Type: FilterAttribute structure

Matches entities whose attribute does not equal the value. The value must be a stringValue, numberValue, or booleanValue.

ServiceQuotaExceededException

Description

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

Members
message
Required: Yes
Type: string

A message that describes the error.

quotaCode
Type: string

The code of the quota that the request would exceed.

resourceId
Type: string

The ID of the resource that the quota applies to.

resourceType
Type: string

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
Type: string

The code of the service that owns the quota.

SqlColumnMetadata

Description

A result column.

Members
name
Required: Yes
Type: string

The column name or alias as the engine reports it. Not unique: SELECT a.id, b.id returns two id columns.

nullable
Required: Yes
Type: boolean

Specifies whether the column can hold NULL.

precision
Type: int

DECIMAL: total digits. TIME and TIMESTAMP: fractional-second digits.

scale
Type: int

DECIMAL: digits after the decimal point.

timeZone
Type: string

TIMESTAMP only: set when the engine stores an instant, for example UTC.

type
Required: Yes
Type: string

The column's portable SQL type. It fixes which SqlValue member the column's values use.

typeName
Required: Yes
Type: string

The engine's own type, for example Timestamp(MICROSECOND, UTC) or Decimal(12, 2, 128).

SqlDataQuery

Description

The query for ExecuteSql to run. Set exactly one member.

Members
sql
Type: SqlQuery structure

A SQL statement and the tables it reads.

SqlQuery

Description

A SQL statement for ExecuteSql to run, and the AWS Glue tables that the statement reads.

Members
statement
Required: Yes
Type: string

One read-only SELECT or WITH statement, without a trailing ;, in PostgreSQL-compatible SQL as the query engine parses it. Double-quote every identifier: unquoted identifiers are upper-cased and matching is case-sensitive. Reference each table by its quoted, fully qualified AWS Glue table ARN, for example SELECT "order_id" FROM "arn:aws:glue:us-east-1:111122223333:table/db/orders" LIMIT 10. At most 50,000 rows are returned whatever the statement's own LIMIT.

tables
Required: Yes
Type: Array of SqlTableReference structures

Every table the statement reads. The service does not parse the SQL to find tables, and the engine resolves only the tables listed here.

SqlRow

Description

One result row.

Members
values
Required: Yes
Type: Array of SqlValue structures

The row's values, one per column, in column order.

SqlTableReference

Description

One table the statement reads. Exactly one member is set. Every table must belong to the requested connection in this agent context.

Members
glueTableArn
Type: string

An AWS Glue table, by its fully qualified AWS Glue table ARN, in your account and the current Region.

SqlValue

Description

One value. Exactly one member is set, and the column's type determines which member.

Members
blobValue
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

A VARBINARY column value, as binary data.

booleanValue
Type: boolean

A BOOLEAN column value.

doubleValue
Type: double

REAL and DOUBLE, except NaN and infinities, which are stringValue (NaN, Infinity, -Infinity).

jsonValue
Type: string

An ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of {"key": ..., "value": ...} entries. Nested values follow the same rules, with NULL as null.

longValue
Type: long (int|float)

A TINYINT, SMALLINT, INTEGER, or BIGINT column value.

nullValue
Type: boolean

Specifies whether the value is a SQL NULL. Always true when present.

stringValue
Type: string

VARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation, DATE (yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision; Z when timeZone is set), and INTERVAL (ISO-8601 duration). An UNKNOWN column's values are NULL. A non-null value of a type the service cannot return fails the request with ValidationException (cast the column to VARCHAR).

StatusReason

Description

Why AWS Context created or closed a change set or curation proposal. For example, when a connection is removed from an agent context, the change sets that record and remove its data and the proposals AWS Context archives carry CONNECTION_REMOVED, and message names the connection.

Members
code
Required: Yes
Type: string

Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.

message
Required: Yes
Type: string

A human-readable description. Don't parse it.

StreamRetrievalConfiguration

Description

Settings for how the answer is retrieved.

Members
maxIterations
Type: int

The maximum number of agent turns, from 2 to 50. One turn is roughly one round of tool calls and their results. If you omit it, AWS Context uses 30. The minimum is 2, because the agent needs at least one planning turn and one acting turn.

SyncSchedule

Description

How often AWS Context re-syncs metadata from a third-party source. Applies to DATABRICKS and SNOWFLAKE. For GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE, which are event-driven, it fails with ValidationException. Specify exactly one member: a fixed cadence or an exact cron expression.

Members
cronExpression
Type: string

Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.

frequency
Type: string

How often catalog synchronization runs. AWS Glue determines the schedule's start time. Valid values:

  • HOURLY - Every 60 minutes.

  • DAILY - Every 1,440 minutes.

  • WEEKLY - Not supported. You can save this value on a connection created with publish set to false, but publishing the connection with this value returns ValidationException.

  • MONTHLY - Not supported. You can save this value on a connection created with publish set to false, but publishing the connection with this value returns ValidationException.

TaskDocument

Description

The name, size, and content type of a document that a task was started with. The document's content isn't returned.

Members
contentType
Required: Yes
Type: string

The content type of the document, as declared in the StartTask request.

name
Required: Yes
Type: string

The name of the document, as given in the StartTask request.

sizeBytes
Required: Yes
Type: long (int|float)

The size of the document's content, in bytes.

TaskInputConfiguration

Description

What a task does and what it reads: exactly one member, which sets the task's type.

Members
importDataDictionary

Imports a data dictionary into the agent context from documents of type CSV, JSON, YAML, or MARKDOWN. The task's type is IMPORT_DATA_DICTIONARY.

importOntology

Imports one or more ontologies into the agent context. The task's type is IMPORT_ONTOLOGY.

importVerifiedQueries

Imports verified queries into the agent context from documents of type SQL, CSV, JSON, or TXT. The task's type is IMPORT_VERIFIED_QUERIES.

TaskInputConfigurationSummary

Description

The task's input as StartTask received it, except that document content is never returned.

Members
importDataDictionary

The data dictionary documents that an IMPORT_DATA_DICTIONARY task was started with.

importOntology
Type: ImportOntologyTaskSummary structure

The ontologies that an IMPORT_ONTOLOGY task was started with.

importVerifiedQueries

The verified query documents that an IMPORT_VERIFIED_QUERIES task was started with.

TaskOutput

Description

One thing a task created: exactly one member.

Members
changeSet
Type: ChangeSetReference structure

A change set that the task created. Pass its changeSetId to GetChangeSet to read it.

TaskStatistics

Description

Counts for the task. The counts are final once the task reaches a terminal status.

Members
numberOfChangeSetsAutoApproved
Type: long (int|float)

The number of change sets that the agent context's curation policies published without review.

numberOfChangeSetsCreated
Type: long (int|float)

The number of change sets that the task has created.

numberOfDocumentsAnalyzed
Type: long (int|float)

The number of input documents that the task has analyzed.

TaskSummary

Description

Summary information about a task, as returned by ListTasks: its ID, ARN, agent context, type, status, description, timestamps, status reason code and message, and statistics. It omits the task's input configuration and outputs, which GetTask returns.

Members
agentContextId
Required: Yes
Type: string

The agent context's ID.

arn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the task.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was created.

description
Type: string

The description of the task, as given to StartTask.

id
Required: Yes
Type: string

The ID of the task. Pass it as taskId to GetTask or CancelTask.

statistics
Type: TaskStatistics structure

Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

status
Required: Yes
Type: string

The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

statusMessage
Type: string

The reason the task failed. Present only when status is FAILED.

statusReasonCode
Type: string

The code for why the task failed. Present only when status is FAILED.

Valid values:

  • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

  • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

  • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

  • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

type
Required: Yes
Type: string

The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.

ThrottlingException

Description

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

Members
message
Required: Yes
Type: string

A message that describes the error.

quotaCode
Type: string

The code of the quota that throttled the request.

retryAfterSeconds
Type: int

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

serviceCode
Type: string

The code of the service whose quota throttled the request.

TraceAnalysisConfig

Description

An agent context's agentic trace analysis settings.

Members
includeContextAgentTraces
Type: string

Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses traceAnalysisRole and takes effect only while status is ENABLED. An agent context that has never set it reads ENABLED.

status
Type: string

Specifies whether you allow AWS Context to use traceAnalysisRole to analyze this agent context's agent traces, and to capture its own agents' traces as includeContextAgentTraces specifies. Defaults to ENABLED when you set traceAnalysisConfig on CreateAgentContext. Setting it to ENABLED requires traceAnalysisRole. Setting it to DISABLED removes the role. An agent context that has never set it reads ENABLED when it has a traceAnalysisRole, and DISABLED otherwise.

traceAnalysisRole
Type: string

The IAM role that AWS Context assumes to access the agent context's connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with aws:SourceArn set to the agent context's ARN and aws:SourceAccount set to its account. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, the request fails with AccessDeniedException. Required to set status to ENABLED. You can't set it while status is DISABLED.

TraversalStrategy

Description

The traversal settings for TraverseAgentContext: which edge types to follow, in which direction, and how deep.

Members
direction
Required: Yes
Type: string

Direction of edge traversal.

Valid values:

  • OUTGOING - Follow edges pointing away from the current node (source -> target).

  • INCOMING - Follow edges pointing toward the current node (target -> source).

  • BOTH - Follow edges in both directions.

edgeTypes
Type: Array of strings

Edge types to follow. When omitted, all edge types are traversed.

maxDepth
Required: Yes
Type: int

The maximum traversal depth from the seed node, from 1 to 3.

TriggeringPolicy

Description

A policy that routed the change set to review.

Members
policyId
Required: Yes
Type: string

The ID of the curation policy that routed the change set to review.

TrustedIdentitySource

Description

An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.

Members
identityProviderArn
Type: string

An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.

identityStoreArn
Type: string

An IAM Identity Center identity store ARN, for example arn:aws:identitystore::111122223333:identitystore/d-1234567890. IAM Identity Center DescribeInstance returns it as IdentityStoreArn.

UpdateOperation

Description

The operation update of a ChangeSetOperation. Its properties keys mean what they mean on PutOperation. An update of a node merges into the stored node: only the properties that you include change, and the others are kept.

Members
entity
Required: Yes
Type: Entity structure

The node or edge to change. A node's ID is built from its nodeType and identity properties, so entity.nodeId is a placeholder that must differ for each node in one write.

properties
Required: Yes
Type: Associative array of custom strings keys (MetadataKey) to AnyValue structures

The properties to set, up to 50. {} when there are none. ListChangeSetOperations lists them as it lists those of PutOperation.

ValidationException

Description

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

Members
fieldList
Type: Array of ValidationExceptionField structures

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

message
Required: Yes
Type: string

A message that describes the error.

reason
Required: Yes
Type: string

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.

ValidationExceptionField

Description

Describes a field in the request that failed validation.

Members
message
Required: Yes
Type: string

A message that describes why the field failed validation.

name
Required: Yes
Type: string

The name of the field that failed validation.

WorkforceSignInConfig

Description

Contains the settings for workforce sign-in. Your employees can sign in to an agent context's Model Context Protocol (MCP) server through your own identity provider. While ENABLED, the resource's mcpServerUrl carries signInUrl as its login_hint, so an MCP client that connects without credentials is sent to that identity provider to sign in.

On UpdateAgentContext, AWS Context merges the members that you send into the stored settings. Setting status to DISABLED clears them.

Members
signInUrl
Type: string

The URL that starts a sign-in to your AWS application at the identity provider. For example, an Okta application link, a Microsoft Entra My Apps link, or an IAM Identity Center access portal URL. HTTPS only, a single line with no whitespace, 9 to 2048 characters. Sent alone, it replaces the stored URL and turns sign-in ENABLED. It cannot be sent together with status DISABLED in the same request.

status
Type: string

Whether workforce sign-in is on. Reads ENABLED while a signInUrl is stored, DISABLED otherwise. On Create, a config with a signInUrl defaults to ENABLED. On Update, DISABLED removes the stored signInUrl. ENABLED requires a signInUrl, supplied in the same request or already stored on the resource.