2026/12/01 - AWS Context - 52 new api methods
Changes Initial release of AWS Context. AWS Context helps agents understand how your business works. It connects to your data where it lives, maps what it means, and gets smarter every time agents and experts use it.
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.
See also: AWS API Documentation
Request Syntax
client.create_connection(
clientToken='string',
name='string',
dataSource={
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'location': {
'arn': 'string'
}
},
scope={
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
},
accessConfig={
'iamRole': {
'roleArn': 'string'
}
},
syncSchedule={
'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
'cronExpression': 'string'
},
ingestionConfig={
'roleArn': 'string'
},
glueConnectionMappings=[
{
'path': [
{
'level': 'string',
'id': 'string'
},
],
'glueConnectionArn': 'string'
},
],
publish=True|False,
acknowledgements=[
'string',
],
tags={
'string': 'string'
}
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
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.
dict
[REQUIRED]
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.
type (string) -- [REQUIRED]
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.
location (dict) -- [REQUIRED]
Where the data source lives. For this scope, an AWS ARN only.
arn (string) -- [REQUIRED]
The ARN of the data source. Its account segment must be your account when you create the connection.
dict
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.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) -- [REQUIRED]
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
dict
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.
iamRole (dict) --
Assume-role access. The service assumes roleArn to read the connection's data source.
roleArn (string) -- [REQUIRED]
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.
dict
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.
frequency (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.
cronExpression (string) --
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
dict
[REQUIRED]
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.
roleArn (string) -- [REQUIRED]
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.
list
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.
(dict) --
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.
path (list) -- [REQUIRED]
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.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
glueConnectionArn (string) -- [REQUIRED]
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.
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.
list
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.
(string) --
A condition that you accept on CreateConnection. Supported value: CUSTOMER_MANAGED_KEY.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'dataSource': {
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'location': {
'arn': 'string'
}
},
'scope': {
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
},
'accessConfig': {
'iamRole': {
'roleArn': 'string'
}
},
'syncSchedule': {
'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
'cronExpression': 'string'
},
'ingestionConfig': {
'roleArn': 'string'
},
'glueConnectionMappings': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
],
'glueConnectionArn': 'string'
},
],
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'failure': {
'code': 'GLUE_CONNECTION_UNAVAILABLE',
'message': 'string'
},
'subStatus': 'GLUE_CONNECTION_CREATED'|'GLUE_CONNECTION_VALIDATED'|'SYNC_JOB_CREATED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
A connection, as returned by CreateConnection, GetConnection, and UpdateConnection. id, arn, name, dataSource, status, createdAt, and updatedAt are always present. Every other member is optional.
id (string) --
The ID of the connection.
arn (string) --
The ARN of the connection.
name (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.
dataSource (dict) --
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.
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.
location (dict) --
Where the data source lives. For this scope, an AWS ARN only.
arn (string) --
The ARN of the data source. Its account segment must be your account when you create the connection.
scope (dict) --
The hierarchical subset of the data source this connection ingests.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) --
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
accessConfig (dict) --
Per-connection access configuration: the IAM role used for data access.
iamRole (dict) --
Assume-role access. The service assumes roleArn to read the connection's data source.
roleArn (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.
syncSchedule (dict) --
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.
frequency (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.
cronExpression (string) --
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
ingestionConfig (dict) --
The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.
roleArn (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.
glueConnectionMappings (list) --
The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.
(dict) --
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.
path (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
glueConnectionArn (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.
status (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.
failure (dict) --
The reason the connection is FAILED. Absent in every other status.
code (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 (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.
subStatus (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.
createdAt (datetime) --
The date and time when the connection was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
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.
See also: AWS API Documentation
Request Syntax
client.start_ontology_induction(
clientToken='string',
ontologyName='string',
ontologyDescription='string',
inputConfig={
'documents': [
{
'name': 'string',
'contentType': 'PDF'|'TXT'|'MARKDOWN'|'CSV'|'JSON'|'YAML'|'DOC'|'DOCX'|'HTML',
'content': b'bytes'
},
]
},
seedOntologyId='string',
prompt='string',
tags={
'string': 'string'
},
ontologyTags={
'string': 'string'
}
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
The new ontology's display name.
string
Optional. The new ontology's description. An empty string is the same as none.
dict
[REQUIRED]
The input to induce the ontology from. Set exactly one member.
documents (list) --
Documents uploaded in the request.
(dict) --
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.
name (string) -- [REQUIRED]
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.
contentType (string) -- [REQUIRED]
The document's type. Its bytes must be a real document of this type. Otherwise the request fails with ValidationException.
content (bytes) -- [REQUIRED]
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.
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.
string
Optional. Instructions for the induction.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'status': 'INDUCING'|'DRAFT'|'FAILED'|'CANCELLED'
}
Response Structure
(dict) --
id (string) --
The ID of the induction, assigned by AWS Context.
arn (string) --
The Amazon Resource Name (ARN) of the ontology induction.
status (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.
Drops operations from a change set that is held for curator review. Returns the updated change set.
See also: AWS API Documentation
Request Syntax
client.update_change_set(
changeSetId='string',
agentContextId='string',
changeSetVersion=123,
clientToken='string',
operationsToRemove=[
{
'put': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'update': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'delete': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
}
},
]
)
string
[REQUIRED]
The change set to edit: the changeSetId that GetCurationProposal returns.
string
[REQUIRED]
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.
integer
[REQUIRED]
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.
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.
This field is autopopulated if not provided.
list
[REQUIRED]
Operations to remove, copied unchanged from ListChangeSetOperations. A retry must resend the same list with the same clientToken.
(dict) --
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.
put (dict) --
Writes a node or edge in full. Creates it if it does not exist.
entity (dict) --
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) -- [REQUIRED]
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
update (dict) --
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.
entity (dict) -- [REQUIRED]
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) -- [REQUIRED]
The properties to set, up to 50. {} when there are none. ListChangeSetOperations lists them as it lists those of PutOperation.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
delete (dict) --
Removes a node or edge. A deleted node takes its unowned edges.
entity (dict) -- [REQUIRED]
The node or edge to remove.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) --
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
dict
Response Syntax
{
'agentContextId': 'string',
'status': 'DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'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',
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string',
'changeSetVersion': 123
}
Response Structure
(dict) --
The change set version the edit created. Read its operations with ListChangeSetOperations.
agentContextId (string) --
The agent context's ID.
status (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.
createdAt (datetime) --
The date and time when the change set was created.
updatedAt (datetime) --
The date and time when the change set was last updated, such as when its status changed or its operations were edited.
accessControl (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.
generatedBy (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.
statusReason (dict) --
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.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The change set's opaque instance ID. Requests take it as changeSetId.
changeSetVersion (integer) --
The version the edit created. Pass it to the next UpdateChangeSet.
Returns the tags on an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource(
resourceArn='string'
)
string
[REQUIRED]
The ARN of the resource whose tags you want to list.
dict
Response Syntax
{
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
tags (dict) --
The resource's tags, including any aws: system tags. Empty when the resource has no tags.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
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.
See also: AWS API Documentation
Request Syntax
client.cancel_task(
agentContextId='string',
taskId='string'
)
string
[REQUIRED]
The agent context, as an ID or ARN.
string
[REQUIRED]
The ID of the task to cancel.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'agentContextId': 'string',
'type': 'IMPORT_DATA_DICTIONARY'|'IMPORT_VERIFIED_QUERIES'|'IMPORT_ONTOLOGY',
'status': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'description': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReasonCode': 'GRAPH_NOT_ACTIVE'|'ONTOLOGY_INVALID'|'ONTOLOGY_IMPORT_UNAVAILABLE'|'ONTOLOGY_ALREADY_IMPORTED',
'statusMessage': 'string',
'statistics': {
'numberOfDocumentsAnalyzed': 123,
'numberOfChangeSetsCreated': 123,
'numberOfChangeSetsAutoApproved': 123
},
'inputConfiguration': {
'importDataDictionary': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importVerifiedQueries': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importOntology': {
'ontologies': [
{
'ontologyArn': 'string',
'ontologyVersion': 'string'
},
]
}
},
'outputs': [
{
'changeSet': {
'changeSetId': 'string'
}
},
]
}
Response Structure
(dict) --
id (string) --
The ID of the task. Pass it as taskId to GetTask or CancelTask.
arn (string) --
The Amazon Resource Name (ARN) of the task.
agentContextId (string) --
The agent context's ID.
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.
status (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.
description (string) --
The description of the task, as given to StartTask.
createdAt (datetime) --
The date and time when the task was created.
updatedAt (datetime) --
The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.
statusReasonCode (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.
statusMessage (string) --
The reason the task failed. Present only when status is FAILED.
statistics (dict) --
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.
numberOfDocumentsAnalyzed (integer) --
The number of input documents that the task has analyzed.
numberOfChangeSetsCreated (integer) --
The number of change sets that the task has created.
numberOfChangeSetsAutoApproved (integer) --
The number of change sets that the agent context's curation policies published without review.
inputConfiguration (dict) --
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.
importDataDictionary (dict) --
The data dictionary documents that an IMPORT_DATA_DICTIONARY task was started with.
documents (list) --
The names and sizes of the documents, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importVerifiedQueries (dict) --
The verified query documents that an IMPORT_VERIFIED_QUERIES task was started with.
documents (list) --
Names and sizes, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importOntology (dict) --
The ontologies that an IMPORT_ONTOLOGY task was started with.
ontologies (list) --
The ontologies that the task imports, in import order.
(dict) --
An ontology that an IMPORT_ONTOLOGY task was started with, and the version that was requested.
ontologyArn (string) --
The Amazon Resource Name (ARN) of the ontology to import.
ontologyVersion (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.
outputs (list) --
What the task created, in creation order. Set when it finishes.
(dict) --
One thing a task created: exactly one member.
changeSet (dict) --
A change set that the task created. Pass its changeSetId to GetChangeSet to read it.
changeSetId (string) --
The ID of a change set that the task created. Pass it to GetChangeSet to read the change set.
Adds tags to an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
See also: AWS API Documentation
Request Syntax
client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
string
[REQUIRED]
The ARN of the resource to tag.
dict
[REQUIRED]
The tags to add, 1–200 per request. Keys must not start with aws:.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
Response Syntax
{}
Response Structure
(dict) --
Removes the resource-based policy from an agent context.
See also: AWS API Documentation
Request Syntax
client.delete_resource_policy(
resourceArn='string',
expectedRevisionId='string'
)
string
[REQUIRED]
ARN of the agent context.
string
The revision that you last read. The delete succeeds only if it matches the stored revision.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns an agent context's configuration and status.
See also: AWS API Documentation
Request Syntax
client.get_agent_context(
agentContextId='string'
)
string
[REQUIRED]
The agent context to return, by its ID or ARN.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'description': 'string',
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'connectionMappings': [
{
'connectionId': 'string',
'ontologyMappings': [
{
'ontologyId': 'string'
},
],
'dataFilter': {
'filters': [
{
'fileType': 'string',
'excludeTags': [
'string',
],
'includeTags': [
'string',
],
'updatedAfter': datetime(2015, 1, 1),
'createdAfter': datetime(2015, 1, 1),
'maxDocumentSizeBytes': 123
},
]
},
'extractionDepth': 'string',
'pathSegments': [
{
'level': 'string',
'id': 'string'
},
],
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
},
],
'encryptionConfig': {
'encryptionMode': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'keyArn': 'string'
},
'traceAnalysisConfig': {
'status': 'ENABLED'|'DISABLED',
'traceAnalysisRole': 'string',
'includeContextAgentTraces': 'ENABLED'|'DISABLED'
},
'workforceSignInConfig': {
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
},
'entityResolutionConfig': {
'status': 'ENABLED'|'DISABLED'
},
'mcpServerUrl': 'string',
'trustedIdentitySources': [
{
'identityStoreArn': 'string',
'identityProviderArn': 'string'
},
]
}
Response Structure
(dict) --
An agent context, as returned by CreateAgentContext, GetAgentContext, and UpdateAgentContext.
id (string) --
The agent context's opaque ID.
arn (string) --
The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.
name (string) --
The name of the agent context. If you didn't specify a name when you created it, the name is default.
description (string) --
A human-readable description, if one was set.
status (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.
createdAt (datetime) --
The date and time when the agent context was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
connectionMappings (list) --
The agent context's connection mappings.
(dict) --
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.
connectionId (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.
ontologyMappings (list) --
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.
(dict) --
A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.
ontologyId (string) --
The ontology that this mapping targets, by its ID or ARN.
dataFilter (dict) --
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.
filters (list) --
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.
(dict) --
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.
fileType (string) --
The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.
excludeTags (list) --
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.
(string) --
A single tag value within a TagSet.
includeTags (list) --
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.
(string) --
A single tag value within a TagSet.
updatedAfter (datetime) --
Documents updated after this time match. Applies to all connection types.
createdAfter (datetime) --
Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.
maxDocumentSizeBytes (integer) --
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).
extractionDepth (string) --
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
pathSegments (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
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.
encryptionConfig (dict) --
The agent context's encryption settings.
encryptionMode (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 (string) --
The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED. Absent for AWS_OWNED.
traceAnalysisConfig (dict) --
The agent context's trace analysis settings.
status (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 (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.
includeContextAgentTraces (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.
workforceSignInConfig (dict) --
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.
status (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.
signInUrl (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.
entityResolutionConfig (dict) --
The agent context's entity resolution settings. Populated on every response path that returns the resource.
status (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.
mcpServerUrl (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.
trustedIdentitySources (list) --
Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.
(dict) --
An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.
identityStoreArn (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.
identityProviderArn (string) --
An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.
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.
See also: AWS API Documentation
Request Syntax
client.list_change_sets(
agentContextId='string',
status='DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED',
accessControl='ACL_RESTRICTED'|'NO_ACL',
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=123,
nextToken='string'
)
string
[REQUIRED]
The agent context whose change sets you want to list, by its ID or ARN.
string
[REQUIRED]
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.
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.
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.
integer
Maximum number of results per page (upper bound, not a target). The service might return fewer.
string
Opaque pagination cursor from a prior response. Omit for the first page.
dict
Response Syntax
{
'items': [
{
'agentContextId': 'string',
'status': 'DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'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',
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The change set summaries. Always present, and empty when there are none. Stop paging when nextToken is absent, not when a page is short.
(dict) --
A summary of a change set's latest version, as returned by ListChangeSets.
agentContextId (string) --
The agent context's ID.
status (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.
createdAt (datetime) --
The date and time when the change set was created.
updatedAt (datetime) --
The date and time when the change set was last updated, such as when its status changed or its operations were edited.
accessControl (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.
generatedBy (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.
statusReason (dict) --
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.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The change set's opaque instance ID. Requests take it as changeSetId.
nextToken (string) --
Pagination cursor for the next page. Absent when no more results exist.
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.
See also: AWS API Documentation
Request Syntax
client.create_curation_policy_version(
clientToken='string',
curationPolicyId='string',
revisionId='string'
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
The ID of the curation policy to publish a new version of.
string
[REQUIRED]
The revisionId of the working copy to publish, as last read. A working copy whose revision has since advanced is a ConflictException.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'lastPublishedVersion': 'string',
'revisionId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'autoRejectAfterSeconds': 123,
'description': 'string',
'policyDocument': 'string',
'status': 'DRAFT'|'ACTIVE'|'DELETED'
}
Response Structure
(dict) --
id (string) --
The ID of the curation policy. Requests take it as curationPolicyId.
arn (string) --
The ARN of the curation policy.
name (string) --
The name of the curation policy.
lastPublishedVersion (string) --
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).
revisionId (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.
createdAt (datetime) --
The date and time when the curation policy was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
autoRejectAfterSeconds (integer) --
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.
description (string) --
The description of the curation policy.
policyDocument (string) --
The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.
status (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.
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.
See also: AWS API Documentation
Request Syntax
client.agentic_retrieve_stream(
agentContextId='string',
messages=[
{
'role': 'USER'|'ASSISTANT',
'content': 'string'
},
],
sessionId='string',
analysisConfiguration={
'emitTrace': 'ENABLED'|'DISABLED'
},
retrievalConfiguration={
'maxIterations': 123
}
)
string
[REQUIRED]
The agent context to retrieve from, by its ID or ARN.
list
[REQUIRED]
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.
(dict) --
A single conversation turn.
role (string) -- [REQUIRED]
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.
content (string) -- [REQUIRED]
The turn's text content.
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.
dict
Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis. Trace events are streamed either way.
emitTrace (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.
dict
Optional bounds and configuration for the agent loop.
maxIterations (integer) --
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.
dict
The response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.
Response Syntax
{
'stream': EventStream({
'traceEvent': {
'id': 'string',
'occurredAt': datetime(2015, 1, 1),
'attributes': {
'step': 'Planning'|'Retrieval',
'status': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
'message': 'string',
'actions': [
{
'inputQuery': 'string',
'sourceRetrievers': [
{
'identifier': 'string'
},
]
},
],
'warnings': [
{
'message': 'string'
},
],
'failures': [
{
'message': 'string'
},
]
}
},
'responseEvent': {
'text': 'string'
},
'result': {
'retrievedContext': [
{
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
},
'documentId': 'string',
'entityType': 'NODE'|'EDGE'|'DOCUMENT',
'summary': 'string',
'content': {
'byteContent': b'bytes',
'text': 'string',
'mimeType': 'string'
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
],
'answer': 'string',
'citations': [
{
'startIndex': 123,
'endIndex': 123,
'references': [
{
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
},
'documentId': 'string'
},
]
},
]
},
'accessDeniedException': {
'message': 'string'
},
'resourceNotFoundException': {
'message': 'string',
'resourceId': 'string',
'resourceType': 'agent-context'|'connection'|'curation-policy'|'evaluation'|'ontology'|'ontology-induction'|'resource-policy'
},
'internalServerException': {
'message': 'string'
}
})
}
Response Structure
(dict) --
stream (:class:`.EventStream`) --
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.
traceEvent (dict) --
A progress event: a planning or retrieval step started, succeeded, or failed.
id (string) --
Unique identifier for the event.
occurredAt (datetime) --
When the event occurred.
attributes (dict) --
The step that the event reports on, the status of the step, and what happened in it.
step (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.
status (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.
message (string) --
Human-readable description of the step's state.
actions (list) --
The retrievals the agent planned. Present on Planning events only.
(dict) --
A retrieval the agent decided to run.
inputQuery (string) --
The query the agent composed.
sourceRetrievers (list) --
The sources that the retrieval targets: an agent context, a knowledge base, or a data source.
(dict) --
A source a retrieval targets.
identifier (string) --
The source's identifier: an agent context ARN, a knowledge base ID, or a data source ARN.
warnings (list) --
Problems that did not stop the step.
(dict) --
A problem that did not stop the step.
message (string) --
A description of the problem. The step continued despite it.
failures (list) --
Problems that failed the step.
(dict) --
A problem that failed the step.
message (string) --
A description of the problem that caused the step to fail.
responseEvent (dict) --
A chunk of the generated answer. Concatenate the chunks, in the order received, to get the complete answer.
text (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.
result (dict) --
The final event of a successful stream: the complete answer and the context retrieved for it.
retrievedContext (list) --
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.
(dict) --
One entity in the context that AgenticRetrieveStream returns: a graph node, a graph edge, or a document.
nodeId (string) --
Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).
edgeId (dict) --
Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
documentId (string) --
Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).
entityType (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.
summary (string) --
Human-readable description or summary of the entity.
content (dict) --
The retrieved content of the entity.
byteContent (bytes) --
The binary content of the retrieved entity.
text (string) --
The text content of the retrieved entity.
mimeType (string) --
The Multipurpose Internet Mail Extensions (MIME) type of the retrieved content.
properties (dict) --
Arbitrary key-value properties stored on the entity.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
answer (string) --
The synthesized natural-language answer, when one was generated.
citations (list) --
Maps spans of answer to the supporting entities, when an answer was generated.
(dict) --
Maps a span of the answer to the entities that support it. The span is answer[startIndex:endIndex].
startIndex (integer) --
The character offset in answer where the cited span begins.
endIndex (integer) --
The character offset in answer where the cited span ends (exclusive).
references (list) --
The entities in retrievedContext that support the span, referenced by identity.
(dict) --
A reference by entity identity into retrievedContext (one of nodeId, edgeId, or documentId).
nodeId (string) --
Identifier of the referenced node. Set when the reference is a node.
edgeId (dict) --
Identifier of the referenced edge. Set when the reference is an edge.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
documentId (string) --
Identifier of the referenced document. Set when the reference is a document.
accessDeniedException (dict) --
You don't have sufficient access to perform this operation. The stream ends after this event.
message (string) --
A message that describes the error.
resourceNotFoundException (dict) --
A resource that the retrieval needs was not found. The stream ends after this event.
message (string) --
A message that describes the error.
resourceId (string) --
The ID of the resource that was not found.
resourceType (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.
internalServerException (dict) --
The retrieval failed because of an internal error. The stream ends after this event.
message (string) --
A message that describes the error.
Returns a task's configuration, status, and results.
See also: AWS API Documentation
Request Syntax
client.get_task(
agentContextId='string',
taskId='string'
)
string
[REQUIRED]
The agent context, as an ID or ARN.
string
[REQUIRED]
The ID of the task to return.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'agentContextId': 'string',
'type': 'IMPORT_DATA_DICTIONARY'|'IMPORT_VERIFIED_QUERIES'|'IMPORT_ONTOLOGY',
'status': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'description': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReasonCode': 'GRAPH_NOT_ACTIVE'|'ONTOLOGY_INVALID'|'ONTOLOGY_IMPORT_UNAVAILABLE'|'ONTOLOGY_ALREADY_IMPORTED',
'statusMessage': 'string',
'statistics': {
'numberOfDocumentsAnalyzed': 123,
'numberOfChangeSetsCreated': 123,
'numberOfChangeSetsAutoApproved': 123
},
'inputConfiguration': {
'importDataDictionary': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importVerifiedQueries': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importOntology': {
'ontologies': [
{
'ontologyArn': 'string',
'ontologyVersion': 'string'
},
]
}
},
'outputs': [
{
'changeSet': {
'changeSetId': 'string'
}
},
]
}
Response Structure
(dict) --
id (string) --
The ID of the task. Pass it as taskId to GetTask or CancelTask.
arn (string) --
The Amazon Resource Name (ARN) of the task.
agentContextId (string) --
The agent context's ID.
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.
status (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.
description (string) --
The description of the task, as given to StartTask.
createdAt (datetime) --
The date and time when the task was created.
updatedAt (datetime) --
The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.
statusReasonCode (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.
statusMessage (string) --
The reason the task failed. Present only when status is FAILED.
statistics (dict) --
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.
numberOfDocumentsAnalyzed (integer) --
The number of input documents that the task has analyzed.
numberOfChangeSetsCreated (integer) --
The number of change sets that the task has created.
numberOfChangeSetsAutoApproved (integer) --
The number of change sets that the agent context's curation policies published without review.
inputConfiguration (dict) --
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.
importDataDictionary (dict) --
The data dictionary documents that an IMPORT_DATA_DICTIONARY task was started with.
documents (list) --
The names and sizes of the documents, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importVerifiedQueries (dict) --
The verified query documents that an IMPORT_VERIFIED_QUERIES task was started with.
documents (list) --
Names and sizes, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importOntology (dict) --
The ontologies that an IMPORT_ONTOLOGY task was started with.
ontologies (list) --
The ontologies that the task imports, in import order.
(dict) --
An ontology that an IMPORT_ONTOLOGY task was started with, and the version that was requested.
ontologyArn (string) --
The Amazon Resource Name (ARN) of the ontology to import.
ontologyVersion (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.
outputs (list) --
What the task created, in creation order. Set when it finishes.
(dict) --
One thing a task created: exactly one member.
changeSet (dict) --
A change set that the task created. Pass its changeSetId to GetChangeSet to read it.
changeSetId (string) --
The ID of a change set that the task created. Pass it to GetChangeSet to read the change set.
Disassociates a curation policy from an agent context, so the agent context stops enforcing it.
See also: AWS API Documentation
Request Syntax
client.disassociate_curation_policy(
agentContextId='string',
curationPolicyId='string'
)
string
[REQUIRED]
The agent context to unlink the policy from, by its ID or ARN.
string
[REQUIRED]
The ID of the curation policy to disassociate from the agent context.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns the resource-based policy attached to an agent context, with its revision ID.
See also: AWS API Documentation
Request Syntax
client.get_resource_policy(
resourceArn='string'
)
string
[REQUIRED]
ARN of the agent context.
dict
Response Syntax
{
'resourceArn': 'string',
'policy': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
ARN of the agent context.
policy (string) --
The resource-based policy document.
revisionId (string) --
Current revision. Pass it to PutResourcePolicy or DeleteResourcePolicy as expectedRevisionId.
Updates an agent context's configuration.
See also: AWS API Documentation
Request Syntax
client.update_agent_context(
agentContextId='string',
name='string',
description='string',
connectionMappings=[
{
'connectionId': 'string',
'ontologyMappings': [
{
'ontologyId': 'string'
},
],
'dataFilter': {
'filters': [
{
'fileType': 'string',
'excludeTags': [
'string',
],
'includeTags': [
'string',
],
'updatedAfter': datetime(2015, 1, 1),
'createdAfter': datetime(2015, 1, 1),
'maxDocumentSizeBytes': 123
},
]
},
'extractionDepth': 'string',
'pathSegments': [
{
'level': 'string',
'id': 'string'
},
],
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
},
],
traceAnalysisConfig={
'status': 'ENABLED'|'DISABLED',
'traceAnalysisRole': 'string',
'includeContextAgentTraces': 'ENABLED'|'DISABLED'
},
workforceSignInConfig={
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
},
entityResolutionConfig={
'status': 'ENABLED'|'DISABLED'
},
trustedIdentitySources=[
{
'identityStoreArn': 'string',
'identityProviderArn': 'string'
},
]
)
string
[REQUIRED]
The agent context to update, by its ID or ARN.
string
The new name. If you omit it, the name is unchanged.
string
The new description. Absent leaves the description unchanged. An empty string removes it.
list
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.
(dict) --
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.
connectionId (string) -- [REQUIRED]
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.
ontologyMappings (list) -- [REQUIRED]
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.
(dict) --
A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.
ontologyId (string) -- [REQUIRED]
The ontology that this mapping targets, by its ID or ARN.
dataFilter (dict) --
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.
filters (list) --
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.
(dict) --
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.
fileType (string) --
The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.
excludeTags (list) --
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.
(string) --
A single tag value within a TagSet.
includeTags (list) --
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.
(string) --
A single tag value within a TagSet.
updatedAfter (datetime) --
Documents updated after this time match. Applies to all connection types.
createdAfter (datetime) --
Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.
maxDocumentSizeBytes (integer) --
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).
extractionDepth (string) --
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
pathSegments (list) --
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.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
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.
dict
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.
status (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 (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.
includeContextAgentTraces (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.
dict
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.
status (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.
signInUrl (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.
dict
Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.
status (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.
list
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.
(dict) --
An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.
identityStoreArn (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.
identityProviderArn (string) --
An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'description': 'string',
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'connectionMappings': [
{
'connectionId': 'string',
'ontologyMappings': [
{
'ontologyId': 'string'
},
],
'dataFilter': {
'filters': [
{
'fileType': 'string',
'excludeTags': [
'string',
],
'includeTags': [
'string',
],
'updatedAfter': datetime(2015, 1, 1),
'createdAfter': datetime(2015, 1, 1),
'maxDocumentSizeBytes': 123
},
]
},
'extractionDepth': 'string',
'pathSegments': [
{
'level': 'string',
'id': 'string'
},
],
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
},
],
'encryptionConfig': {
'encryptionMode': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'keyArn': 'string'
},
'traceAnalysisConfig': {
'status': 'ENABLED'|'DISABLED',
'traceAnalysisRole': 'string',
'includeContextAgentTraces': 'ENABLED'|'DISABLED'
},
'workforceSignInConfig': {
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
},
'entityResolutionConfig': {
'status': 'ENABLED'|'DISABLED'
},
'mcpServerUrl': 'string',
'trustedIdentitySources': [
{
'identityStoreArn': 'string',
'identityProviderArn': 'string'
},
]
}
Response Structure
(dict) --
An agent context, as returned by CreateAgentContext, GetAgentContext, and UpdateAgentContext.
id (string) --
The agent context's opaque ID.
arn (string) --
The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.
name (string) --
The name of the agent context. If you didn't specify a name when you created it, the name is default.
description (string) --
A human-readable description, if one was set.
status (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.
createdAt (datetime) --
The date and time when the agent context was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
connectionMappings (list) --
The agent context's connection mappings.
(dict) --
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.
connectionId (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.
ontologyMappings (list) --
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.
(dict) --
A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.
ontologyId (string) --
The ontology that this mapping targets, by its ID or ARN.
dataFilter (dict) --
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.
filters (list) --
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.
(dict) --
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.
fileType (string) --
The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.
excludeTags (list) --
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.
(string) --
A single tag value within a TagSet.
includeTags (list) --
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.
(string) --
A single tag value within a TagSet.
updatedAfter (datetime) --
Documents updated after this time match. Applies to all connection types.
createdAfter (datetime) --
Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.
maxDocumentSizeBytes (integer) --
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).
extractionDepth (string) --
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
pathSegments (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
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.
encryptionConfig (dict) --
The agent context's encryption settings.
encryptionMode (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 (string) --
The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED. Absent for AWS_OWNED.
traceAnalysisConfig (dict) --
The agent context's trace analysis settings.
status (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 (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.
includeContextAgentTraces (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.
workforceSignInConfig (dict) --
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.
status (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.
signInUrl (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.
entityResolutionConfig (dict) --
The agent context's entity resolution settings. Populated on every response path that returns the resource.
status (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.
mcpServerUrl (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.
trustedIdentitySources (list) --
Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.
(dict) --
An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.
identityStoreArn (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.
identityProviderArn (string) --
An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.
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.
See also: AWS API Documentation
Request Syntax
client.get_change_set(
changeSetId='string',
agentContextId='string'
)
string
[REQUIRED]
The change set to fetch, by its opaque instance ID.
string
[REQUIRED]
The agent context that owns the change set, by its ID or ARN.
dict
Response Syntax
{
'agentContextId': 'string',
'status': 'DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'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',
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string',
'changeSetVersion': 123,
'connectionArn': 'string'
}
Response Structure
(dict) --
The metadata of a change set, which is a proposed set of operations on an agent context. To read its operations, call ListChangeSetOperations.
agentContextId (string) --
The agent context's ID.
status (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.
createdAt (datetime) --
The date and time when the change set was created.
updatedAt (datetime) --
The date and time when the change set was last updated, such as when its status changed or its operations were edited.
accessControl (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.
generatedBy (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.
statusReason (dict) --
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.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The change set's opaque instance ID. Requests take it as changeSetId.
changeSetVersion (integer) --
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 (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.
Returns a curation proposal and a summary of the change that it holds for review. ListChangeSetOperations returns the change's individual operations.
See also: AWS API Documentation
Request Syntax
client.get_curation_proposal(
agentContextId='string',
curationProposalId='string'
)
string
[REQUIRED]
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.
string
[REQUIRED]
The proposal to fetch, by its opaque instance ID.
dict
Response Syntax
{
'changeSetId': 'string',
'title': 'string',
'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',
'revisionId': 'string',
'status': 'PENDING_REVIEW'|'APPROVED'|'REJECTED'|'SUPERSEDED'|'FAILED'|'PUBLISHING'|'ARCHIVED',
'statusReasonCode': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'agentContextId': 'string',
'expiresAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string',
'triggeringPolicies': [
{
'policyId': 'string'
},
]
}
Response Structure
(dict) --
A curation proposal, with the provenance of its change set.
changeSetId (string) --
The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.
title (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 ….
generatedBy (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.
revisionId (string) --
An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.
status (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.
statusReasonCode (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.
accessControl (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 (string) --
The agent context's ID.
expiresAt (datetime) --
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.
createdAt (datetime) --
The date and time when the curation proposal was created.
updatedAt (datetime) --
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.
statusReason (dict) --
Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The proposal's opaque instance ID. Requests take it as curationProposalId.
triggeringPolicies (list) --
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.
(dict) --
A policy that routed the change set to review.
policyId (string) --
The ID of the curation policy that routed the change set to review.
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.
See also: AWS API Documentation
Request Syntax
client.search_agent_context(
maxResults=123,
nextToken='string',
agentContextId='string',
query='string',
filter={
'equalTo': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'notEqualTo': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'greaterThan': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'greaterThanOrEqualTo': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'lessThan': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'lessThanOrEqualTo': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'in': {
'key': 'string',
'value': {
'stringValue': 'string',
'numberValue': 123.0,
'booleanValue': True|False,
'stringListValue': [
'string',
]
}
},
'andAll': [
{'... recursive ...'},
]
},
searchType='KEYWORD'|'SEMANTIC'|'AUTO'
)
integer
Maximum number of results to return per page.
string
Opaque continuation token from a prior response. Omit on the first page.
string
[REQUIRED]
The agent context to search, by ID or full Amazon Resource Name (ARN).
string
[REQUIRED]
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.
dict
Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.
equalTo (dict) --
Matches entities whose attribute equals the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
notEqualTo (dict) --
Matches entities whose attribute does not equal the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
greaterThan (dict) --
Matches entities whose attribute is greater than the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
greaterThanOrEqualTo (dict) --
Matches entities whose attribute is greater than or equal to the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
lessThan (dict) --
Matches entities whose attribute is less than the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
lessThanOrEqualTo (dict) --
Matches entities whose attribute is less than or equal to the value. The value must be a stringValue, numberValue, or booleanValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
in (dict) --
Matches entities whose attribute equals any of the values. The value must be a stringListValue.
key (string) -- [REQUIRED]
The name of the attribute to compare. 1 to 128 characters, with no whitespace or backtick characters.
value (dict) -- [REQUIRED]
The value to compare the attribute with. Use stringListValue for an in condition, and stringValue, numberValue, or booleanValue for any other condition.
stringValue (string) --
A string, 1 to 2,048 characters.
numberValue (float) --
A number. It must be finite.
booleanValue (boolean) --
A Boolean value.
stringListValue (list) --
A list of 1 to 50 strings, each 1 to 2,048 characters. Valid only for an in condition.
(string) --
The value to match exactly, up to 2,048 characters, so any stored string property value can be named in an exact-match filter.
andAll (list) --
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.
(dict) --
Filter on entity attributes: a single comparison, or andAll of comparisons that must all match.
string
[REQUIRED]
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.
dict
Response Syntax
{
'nextToken': 'string',
'items': [
{
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
},
'entityType': 'NODE'|'EDGE',
'summary': 'string',
'score': 123.0,
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
],
'authorizationRequired': {
'authorizationUrl': 'string',
'message': 'string'
}
}
Response Structure
(dict) --
The response of SearchAgentContext.
nextToken (string) --
Pagination cursor for the next page. Absent when there are no more results.
items (list) --
The matching entities, ranked by relevance.
(dict) --
One SearchAgentContext result.
nodeId (string) --
Identifier of the matched node. Set when this result is a node (at most one of nodeId or edgeId).
edgeId (dict) --
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.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
entityType (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.
summary (string) --
Human-readable description or summary of the entity.
score (float) --
Relevance score indicating how well this entity matches the query.
properties (dict) --
Arbitrary key-value properties stored on the entity.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
authorizationRequired (dict) --
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.
authorizationUrl (string) --
The URL the end user opens to consent. Single-use and bound to the caller's identity.
message (string) --
A short, user-facing explanation of what is being authorized.
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.
See also: AWS API Documentation
Request Syntax
client.create_curation_policy(
clientToken='string',
name='string',
description='string',
policyDocument='string',
autoRejectAfterSeconds=123,
tags={
'string': 'string'
}
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
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.
string
A description of the curation policy. Up to 1,024 characters, with no control characters.
string
[REQUIRED]
The policy's rules, as a Cedar policy document.
integer
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.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'lastPublishedVersion': 'string',
'revisionId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'autoRejectAfterSeconds': 123,
'description': 'string',
'policyDocument': 'string',
'status': 'DRAFT'|'ACTIVE'|'DELETED'
}
Response Structure
(dict) --
id (string) --
The ID of the curation policy. Requests take it as curationPolicyId.
arn (string) --
The ARN of the curation policy.
name (string) --
The name of the curation policy.
lastPublishedVersion (string) --
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).
revisionId (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.
createdAt (datetime) --
The date and time when the curation policy was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
autoRejectAfterSeconds (integer) --
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.
description (string) --
The description of the curation policy.
policyDocument (string) --
The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.
status (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.
Returns an ontology's status and one of its versions.
See also: AWS API Documentation
Request Syntax
client.get_ontology(
ontologyId='string',
version='string',
sourceFormat='TURTLE'
)
string
[REQUIRED]
The ontology to return, by its ID or ARN (see OntologyIdentifier).
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.
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.
dict
Response Syntax
{
'arn': 'string',
'version': 'string',
'template': 'string',
'createdAt': datetime(2015, 1, 1),
'publishedAt': datetime(2015, 1, 1),
'name': 'string',
'description': 'string',
'derivationVersion': 'string',
'id': 'string',
'status': 'DRAFT'|'PUBLISHED',
'updatedAt': datetime(2015, 1, 1),
'ontologyInductionId': 'string',
'source': 'string',
'sourceFormat': 'TURTLE',
'revisionId': 'string',
'validationIssues': [
{
'code': 'string',
'message': 'string',
'line': 123,
'subject': 'string'
},
]
}
Response Structure
(dict) --
The resolved ontology version's metadata and template, and the ontology's status. With sourceFormat, the response carries no template, and source carries the version's source document, or the draft on a DRAFT, with or without version. A DRAFT also returns revisionId, and the draft's warnings in validationIssues.
arn (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.
version (string) --
The version of the ontology, in MAJOR.MINOR.PATCH form, for example 1.0.0.
template (string) --
The serialized template JSON for this version (see OntologyTemplate).
createdAt (datetime) --
When this version was created. Absent when the stored version carries no creation time.
publishedAt (datetime) --
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.
name (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.
description (string) --
The ontology's description. The same for every version. Absent when the ontology has none.
derivationVersion (string) --
Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.
id (string) --
The ID of the ontology, assigned by AWS Context.
status (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.
updatedAt (datetime) --
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.
ontologyInductionId (string) --
The induction that made the ontology. Absent for an ontology CreateOntology made.
source (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 (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).
revisionId (string) --
The revision of the draft. Set only for a DRAFT ontology.
validationIssues (list) --
Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.
(dict) --
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.
code (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.
message (string) --
A human-readable description of the issue.
line (integer) --
1-based line in the uploaded source, when the failure is attributable to a specific triple.
subject (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.
Updates a connection's configuration.
See also: AWS API Documentation
Request Syntax
client.update_connection(
connectionId='string',
name='string',
scope={
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
},
accessConfig={
'iamRole': {
'roleArn': 'string'
}
},
syncSchedule={
'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
'cronExpression': 'string'
},
ingestionConfig={
'roleArn': 'string'
},
glueConnectionMappings=[
{
'path': [
{
'level': 'string',
'id': 'string'
},
],
'glueConnectionArn': 'string'
},
],
publish=True|False
)
string
[REQUIRED]
The connection to update, by its ID (which starts with conn-) or its ARN.
string
The new name. If you omit it, the name is unchanged.
dict
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.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) -- [REQUIRED]
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
dict
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.
iamRole (dict) --
Assume-role access. The service assumes roleArn to read the connection's data source.
roleArn (string) -- [REQUIRED]
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.
dict
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.
frequency (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.
cronExpression (string) --
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
dict
[REQUIRED]
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.
roleArn (string) -- [REQUIRED]
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.
list
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.
(dict) --
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.
path (list) -- [REQUIRED]
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.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
glueConnectionArn (string) -- [REQUIRED]
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.
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.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'dataSource': {
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'location': {
'arn': 'string'
}
},
'scope': {
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
},
'accessConfig': {
'iamRole': {
'roleArn': 'string'
}
},
'syncSchedule': {
'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
'cronExpression': 'string'
},
'ingestionConfig': {
'roleArn': 'string'
},
'glueConnectionMappings': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
],
'glueConnectionArn': 'string'
},
],
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'failure': {
'code': 'GLUE_CONNECTION_UNAVAILABLE',
'message': 'string'
},
'subStatus': 'GLUE_CONNECTION_CREATED'|'GLUE_CONNECTION_VALIDATED'|'SYNC_JOB_CREATED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
A connection, as returned by CreateConnection, GetConnection, and UpdateConnection. id, arn, name, dataSource, status, createdAt, and updatedAt are always present. Every other member is optional.
id (string) --
The ID of the connection.
arn (string) --
The ARN of the connection.
name (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.
dataSource (dict) --
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.
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.
location (dict) --
Where the data source lives. For this scope, an AWS ARN only.
arn (string) --
The ARN of the data source. Its account segment must be your account when you create the connection.
scope (dict) --
The hierarchical subset of the data source this connection ingests.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) --
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
accessConfig (dict) --
Per-connection access configuration: the IAM role used for data access.
iamRole (dict) --
Assume-role access. The service assumes roleArn to read the connection's data source.
roleArn (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.
syncSchedule (dict) --
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.
frequency (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.
cronExpression (string) --
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
ingestionConfig (dict) --
The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.
roleArn (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.
glueConnectionMappings (list) --
The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.
(dict) --
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.
path (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
glueConnectionArn (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.
status (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.
failure (dict) --
The reason the connection is FAILED. Absent in every other status.
code (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 (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.
subStatus (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.
createdAt (datetime) --
The date and time when the connection was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
Lists an agent context's tasks, newest first.
See also: AWS API Documentation
Request Syntax
client.list_tasks(
agentContextId='string',
status='PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
type='IMPORT_DATA_DICTIONARY'|'IMPORT_VERIFIED_QUERIES'|'IMPORT_ONTOLOGY',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The agent context, as an ID or ARN.
string
Specify a status to list only the tasks with that status.
string
Specify a type to list only the tasks of that type.
integer
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.
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.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'agentContextId': 'string',
'type': 'IMPORT_DATA_DICTIONARY'|'IMPORT_VERIFIED_QUERIES'|'IMPORT_ONTOLOGY',
'status': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'description': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReasonCode': 'GRAPH_NOT_ACTIVE'|'ONTOLOGY_INVALID'|'ONTOLOGY_IMPORT_UNAVAILABLE'|'ONTOLOGY_ALREADY_IMPORTED',
'statusMessage': 'string',
'statistics': {
'numberOfDocumentsAnalyzed': 123,
'numberOfChangeSetsCreated': 123,
'numberOfChangeSetsAutoApproved': 123
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The tasks. Always present, and empty when there are none.
(dict) --
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.
id (string) --
The ID of the task. Pass it as taskId to GetTask or CancelTask.
arn (string) --
The Amazon Resource Name (ARN) of the task.
agentContextId (string) --
The agent context's ID.
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.
status (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.
description (string) --
The description of the task, as given to StartTask.
createdAt (datetime) --
The date and time when the task was created.
updatedAt (datetime) --
The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.
statusReasonCode (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.
statusMessage (string) --
The reason the task failed. Present only when status is FAILED.
statistics (dict) --
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.
numberOfDocumentsAnalyzed (integer) --
The number of input documents that the task has analyzed.
numberOfChangeSetsCreated (integer) --
The number of change sets that the task has created.
numberOfChangeSetsAutoApproved (integer) --
The number of change sets that the agent context's curation policies published without review.
nextToken (string) --
The token for the next page of results. Absent on the last page.
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.
See also: AWS API Documentation
Request Syntax
client.delete_ontology(
ontologyId='string'
)
string
[REQUIRED]
The ontology to delete, by its ID or ARN. ListOntologies and GetOntology return its ARN.
dict
Response Syntax
{}
Response Structure
(dict) --
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.
See also: AWS API Documentation
Request Syntax
client.list_curation_policies(
agentContextId='string',
status='DRAFT'|'ACTIVE',
maxResults=123,
nextToken='string'
)
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.
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.
integer
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.
string
Opaque pagination cursor from a prior response. Omit for the first page.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'name': 'string',
'lastPublishedVersion': 'string',
'revisionId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'autoRejectAfterSeconds': 123,
'status': 'DRAFT'|'ACTIVE'|'DELETED'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
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.
(dict) --
A summary of a curation policy, as returned by ListCurationPolicies. It omits the full resource's description and policyDocument. Get those with GetCurationPolicy.
id (string) --
The ID of the curation policy. Requests take it as curationPolicyId.
arn (string) --
The ARN of the curation policy.
name (string) --
The name of the curation policy.
lastPublishedVersion (string) --
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).
revisionId (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.
createdAt (datetime) --
The date and time when the curation policy was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
autoRejectAfterSeconds (integer) --
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.
status (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.
nextToken (string) --
Pagination cursor for the next page. Absent when no more results exist.
Returns a curation policy's configuration, status, and policy document.
See also: AWS API Documentation
Request Syntax
client.get_curation_policy(
curationPolicyId='string',
version='string'
)
string
[REQUIRED]
The ID of the curation policy to return.
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.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'lastPublishedVersion': 'string',
'revisionId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'autoRejectAfterSeconds': 123,
'description': 'string',
'policyDocument': 'string',
'status': 'DRAFT'|'ACTIVE'|'DELETED'
}
Response Structure
(dict) --
id (string) --
The ID of the curation policy. Requests take it as curationPolicyId.
arn (string) --
The ARN of the curation policy.
name (string) --
The name of the curation policy.
lastPublishedVersion (string) --
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).
revisionId (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.
createdAt (datetime) --
The date and time when the curation policy was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
autoRejectAfterSeconds (integer) --
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.
description (string) --
The description of the curation policy.
policyDocument (string) --
The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.
status (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.
Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of put, update, or delete.
See also: AWS API Documentation
Request Syntax
client.create_change_set(
clientToken='string',
accessControlConfig={
'accessControlList': [
{
'access': 'ALLOW'|'DENY',
'principalId': 'string',
'principalType': 'USER'|'GROUP'
},
]
},
agentContextId='string',
operations=[
{
'put': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'update': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'delete': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
}
},
]
)
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.
This field is autopopulated if not provided.
dict
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.
accessControlList (list) --
Entries, each allowing or denying one principal.
(dict) --
Allows or denies one end user or group, or every reader ( *).
access (string) -- [REQUIRED]
Specifies whether the principal can see the information.
Valid values:
ALLOW - Access is allowed.
DENY - Access is denied.
principalId (string) -- [REQUIRED]
The principal's opaque user or group ID, or * for every reader authorized on the resource.
principalType (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.
string
[REQUIRED]
The agent context to change, by its ID or ARN.
list
[REQUIRED]
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.
(dict) --
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.
put (dict) --
Writes a node or edge in full. Creates it if it does not exist.
entity (dict) --
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) -- [REQUIRED]
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
update (dict) --
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.
entity (dict) -- [REQUIRED]
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) -- [REQUIRED]
The properties to set, up to 50. {} when there are none. ListChangeSetOperations lists them as it lists those of PutOperation.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
delete (dict) --
Removes a node or edge. A deleted node takes its unowned edges.
entity (dict) -- [REQUIRED]
The node or edge to remove.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) -- [REQUIRED]
The ID of the node where the edge starts.
to (string) -- [REQUIRED]
The ID of the node where the edge ends.
properties (dict) --
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
dict
Response Syntax
{
'status': 'DRAFT'|'PENDING'|'AUTHORIZED'|'SUPPRESSED'|'PUBLISHED'|'FAILED',
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'id': 'string'
}
Response Structure
(dict) --
The response of CreateChangeSet.
status (string) --
PENDING (held for curator review) or PUBLISHED (applied). A replay reports the change set's current one.
accessControl (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 (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.
Lists the ontologies in your account, with the status of each.
See also: AWS API Documentation
Request Syntax
client.list_ontologies(
maxResults=123,
nextToken='string'
)
integer
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.
string
Opaque continuation token from a prior response's nextToken. Omit on the first page.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'name': 'string',
'description': 'string',
'status': 'DRAFT'|'PUBLISHED',
'updatedAt': datetime(2015, 1, 1),
'ontologyInductionId': 'string',
'defaultVersion': 'string',
'publishedAt': datetime(2015, 1, 1),
'nodeTypeCount': 123,
'edgeTypeCount': 123
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
One entry for each ontology that you own. Always present, and empty when you have none.
(dict) --
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.
id (string) --
The ID of the ontology, assigned by AWS Context.
arn (string) --
The ARN of the ontology. Always present: every listed ontology is customer-owned, so its ARN includes the account.
name (string) --
The ontology's current display name. Present on every summary: only customer-owned ontologies are listed, and each has a name.
description (string) --
The description. Absent when the ontology has none.
status (string) --
The ontology's status. PUBLISHED for every ontology CreateOntology made.
updatedAt (datetime) --
When the ontology last changed. Equal to its creation time until the first update.
ontologyInductionId (string) --
The induction that made the ontology. Absent for an ontology CreateOntology made.
defaultVersion (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.
publishedAt (datetime) --
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.
nodeTypeCount (integer) --
Number of node types in the DEFAULT version's template. Absent for an ontology created before counts were stored.
edgeTypeCount (integer) --
Number of edge types in the DEFAULT version's template. Absent for an ontology created before counts were stored.
nextToken (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.
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.
See also: AWS API Documentation
Request Syntax
client.put_resource_policy(
resourceArn='string',
policy='string',
expectedRevisionId='string'
)
string
[REQUIRED]
ARN of the agent context to attach the policy to.
string
[REQUIRED]
The resource-based policy document.
string
The revision that you last read. The write succeeds only if it matches the stored revision.
dict
Response Syntax
{
'resourceArn': 'string',
'revisionId': 'string'
}
Response Structure
(dict) --
resourceArn (string) --
ARN of the agent context.
revisionId (string) --
Revision of the stored policy after this call.
Updates a curation policy's working copy.
See also: AWS API Documentation
Request Syntax
client.update_curation_policy(
clientToken='string',
curationPolicyId='string',
revisionId='string',
name='string',
description='string',
policyDocument='string',
autoRejectAfterSeconds=123
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
The ID of the curation policy to update.
string
[REQUIRED]
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.
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.
string
The new description. If you omit it, the description is unchanged.
string
The new Cedar policy document. If you omit it, the document is unchanged.
integer
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.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'lastPublishedVersion': 'string',
'revisionId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'autoRejectAfterSeconds': 123,
'description': 'string',
'policyDocument': 'string',
'status': 'DRAFT'|'ACTIVE'|'DELETED'
}
Response Structure
(dict) --
id (string) --
The ID of the curation policy. Requests take it as curationPolicyId.
arn (string) --
The ARN of the curation policy.
name (string) --
The name of the curation policy.
lastPublishedVersion (string) --
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).
revisionId (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.
createdAt (datetime) --
The date and time when the curation policy was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
autoRejectAfterSeconds (integer) --
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.
description (string) --
The description of the curation policy.
policyDocument (string) --
The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.
status (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.
Cancels an ontology induction that is still INDUCING. The induction's status changes to CANCELLED, and no ontology is created.
See also: AWS API Documentation
Request Syntax
client.cancel_ontology_induction(
ontologyInductionId='string'
)
string
[REQUIRED]
The ID or Amazon Resource Name (ARN) of the ontology induction to cancel.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'status': 'INDUCING'|'DRAFT'|'FAILED'|'CANCELLED'
}
Response Structure
(dict) --
id (string) --
The ID of the induction, assigned by AWS Context.
arn (string) --
The Amazon Resource Name (ARN) of the ontology induction.
status (string) --
The status of the induction after the cancel request. Always CANCELLED.
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.
See also: AWS API Documentation
Request Syntax
client.list_agent_contexts(
maxResults=123,
nextToken='string'
)
integer
Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.
string
Opaque pagination cursor from a prior response. Omit for the first page.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'name': 'string',
'description': 'string',
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'workforceSignInConfig': {
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The agent contexts in your account, as summaries, most recently updated first.
(dict) --
Condensed representation of an agent context for ListAgentContexts.
id (string) --
The agent context's opaque ID.
arn (string) --
The agent context's ARN.
name (string) --
The agent context's friendly name.
description (string) --
A human-readable description. Absent when none was set.
status (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.
createdAt (datetime) --
The date and time when the agent context was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
workforceSignInConfig (dict) --
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.
status (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.
signInUrl (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.
nextToken (string) --
Pagination cursor for the next page. Absent when no more results exist.
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.
See also: AWS API Documentation
Request Syntax
client.delete_ontology_induction(
ontologyInductionId='string'
)
string
[REQUIRED]
The ID or Amazon Resource Name (ARN) of the ontology induction to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the ontology inductions in your account.
See also: AWS API Documentation
Request Syntax
client.list_ontology_inductions(
maxResults=123,
nextToken='string'
)
integer
The maximum number of inductions to return in one page, from 1 to 100. Defaults to 50.
string
Opaque continuation token from a prior response's nextToken. Omit on the first page.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'ontologyName': 'string',
'ontologyDescription': 'string',
'ontologyId': 'string',
'ontologyArn': 'string',
'status': 'INDUCING'|'DRAFT'|'FAILED'|'CANCELLED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The ontology inductions in your account. Always present, and empty when there are none.
(dict) --
One induction in a ListOntologyInductions page. Never carries the induced document.
id (string) --
The ID of the induction, assigned by AWS Context.
arn (string) --
The Amazon Resource Name (ARN) of the ontology induction.
ontologyName (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.
ontologyDescription (string) --
The description the induction's ontology gets ( ontologyDescription). Absent when there is none.
ontologyId (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.
ontologyArn (string) --
The ARN of ontologyId. Present when it is.
status (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.
createdAt (datetime) --
The date and time when the ontology induction was created.
updatedAt (datetime) --
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.
nextToken (string) --
The token for the next page of results. Absent on the last page.
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.
See also: AWS API Documentation
Request Syntax
client.execute_sql(
agentContextId='string',
connectionId='string',
query={
'sql': {
'statement': 'string',
'tables': [
{
'glueTableArn': 'string'
},
]
}
}
)
string
[REQUIRED]
The agent context that owns the connection, by ID or full ARN.
string
[REQUIRED]
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.
dict
[REQUIRED]
The query to run: a SQL statement and the AWS Glue tables that it reads. For the SQL rules and limits, see SqlQuery.
sql (dict) --
A SQL statement and the tables it reads.
statement (string) -- [REQUIRED]
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 (list) -- [REQUIRED]
Every table the statement reads. The service does not parse the SQL to find tables, and the engine resolves only the tables listed here.
(dict) --
One table the statement reads. Exactly one member is set. Every table must belong to the requested connection in this agent context.
glueTableArn (string) --
An AWS Glue table, by its fully qualified AWS Glue table ARN, in your account and the current Region.
dict
Response Syntax
{
'columnMetadata': [
{
'name': 'string',
'type': 'BOOLEAN'|'TINYINT'|'SMALLINT'|'INTEGER'|'BIGINT'|'REAL'|'DOUBLE'|'DECIMAL'|'VARCHAR'|'VARBINARY'|'DATE'|'TIME'|'TIMESTAMP'|'INTERVAL'|'ARRAY'|'STRUCT'|'MAP'|'UNKNOWN',
'typeName': 'string',
'nullable': True|False,
'precision': 123,
'scale': 123,
'timeZone': 'string'
},
],
'rows': [
{
'values': [
{
'nullValue': True|False,
'booleanValue': True|False,
'longValue': 123,
'doubleValue': 123.0,
'stringValue': 'string',
'blobValue': b'bytes',
'jsonValue': 'string'
},
]
},
]
}
Response Structure
(dict) --
columnMetadata (list) --
One entry per result column, in result order. rows[i].values[j] is the value of columnMetadata[j].
(dict) --
A result column.
name (string) --
The column name or alias as the engine reports it. Not unique: SELECT a.id, b.id returns two id columns.
type (string) --
The column's portable SQL type. It fixes which SqlValue member the column's values use.
typeName (string) --
The engine's own type, for example Timestamp(MICROSECOND, UTC) or Decimal(12, 2, 128).
nullable (boolean) --
Specifies whether the column can hold NULL.
precision (integer) --
DECIMAL: total digits. TIME and TIMESTAMP: fractional-second digits.
scale (integer) --
DECIMAL: digits after the decimal point.
timeZone (string) --
TIMESTAMP only: set when the engine stores an instant, for example UTC.
rows (list) --
The result rows, in result order. Each row holds a positional list of typed values, one per column.
(dict) --
One result row.
values (list) --
The row's values, one per column, in column order.
(dict) --
One value. Exactly one member is set, and the column's type determines which member.
nullValue (boolean) --
Specifies whether the value is a SQL NULL. Always true when present.
booleanValue (boolean) --
A BOOLEAN column value.
longValue (integer) --
A TINYINT, SMALLINT, INTEGER, or BIGINT column value.
doubleValue (float) --
REAL and DOUBLE, except NaN and infinities, which are stringValue ( NaN, Infinity, -Infinity).
stringValue (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).
blobValue (bytes) --
A VARBINARY column value, as binary data.
jsonValue (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.
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.
See also: AWS API Documentation
Request Syntax
client.associate_curation_policy(
agentContextId='string',
curationPolicyId='string'
)
string
[REQUIRED]
The agent context, by its ID or ARN.
string
[REQUIRED]
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.
dict
Response Syntax
{
'agentContextId': 'string',
'curationPolicyId': 'string'
}
Response Structure
(dict) --
The association between an agent context and a curation policy. The agent context enforces the policy's latest published version.
agentContextId (string) --
The agent context's ID.
curationPolicyId (string) --
The ID of the curation policy that is associated with the agent context.
Deletes an agent context. Deletion is asynchronous. An agent context that does not exist or is already being deleted returns ResourceNotFoundException.
See also: AWS API Documentation
Request Syntax
client.delete_agent_context(
agentContextId='string'
)
string
[REQUIRED]
The agent context to delete, by its ID or ARN.
dict
Response Syntax
{}
Response Structure
(dict) --
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.
See also: AWS API Documentation
Request Syntax
client.agentic_retrieve(
agentContextId='string',
messages=[
{
'role': 'USER'|'ASSISTANT',
'content': 'string'
},
],
sessionId='string',
analysisConfiguration={
'emitTrace': 'ENABLED'|'DISABLED'
},
retrievalConfiguration={
'maxIterations': 123
}
)
string
[REQUIRED]
The agent context to retrieve from, by its ID or ARN.
list
[REQUIRED]
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.
(dict) --
A single conversation turn.
role (string) -- [REQUIRED]
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.
content (string) -- [REQUIRED]
The turn's text content.
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.
dict
Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis.
emitTrace (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.
dict
Optional bounds and configuration for the agent loop.
maxIterations (integer) --
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.
dict
Response Syntax
{
'retrievedContext': [
{
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
},
'documentId': 'string',
'entityType': 'NODE'|'EDGE'|'DOCUMENT',
'summary': 'string',
'content': {
'byteContent': b'bytes',
'text': 'string',
'mimeType': 'string'
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
],
'answer': 'string',
'citations': [
{
'startIndex': 123,
'endIndex': 123,
'references': [
{
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
},
'documentId': 'string'
},
]
},
],
'authorizationRequired': {
'authorizationUrl': 'string',
'message': 'string'
}
}
Response Structure
(dict) --
The result of a retrieval. retrievedContext is always present. A response that only asks for authorization carries authorizationRequired beside an empty retrievedContext.
retrievedContext (list) --
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.
(dict) --
One entity in the context that AgenticRetrieveStream returns: a graph node, a graph edge, or a document.
nodeId (string) --
Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).
edgeId (dict) --
Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
documentId (string) --
Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).
entityType (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.
summary (string) --
Human-readable description or summary of the entity.
content (dict) --
The retrieved content of the entity.
byteContent (bytes) --
The binary content of the retrieved entity.
text (string) --
The text content of the retrieved entity.
mimeType (string) --
The Multipurpose Internet Mail Extensions (MIME) type of the retrieved content.
properties (dict) --
Arbitrary key-value properties stored on the entity.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
answer (string) --
The synthesized natural-language answer, when one was generated.
citations (list) --
Maps spans of answer to the supporting entities, when an answer was generated.
(dict) --
Maps a span of the answer to the entities that support it. The span is answer[startIndex:endIndex].
startIndex (integer) --
The character offset in answer where the cited span begins.
endIndex (integer) --
The character offset in answer where the cited span ends (exclusive).
references (list) --
The entities in retrievedContext that support the span, referenced by identity.
(dict) --
A reference by entity identity into retrievedContext (one of nodeId, edgeId, or documentId).
nodeId (string) --
Identifier of the referenced node. Set when the reference is a node.
edgeId (dict) --
Identifier of the referenced edge. Set when the reference is an edge.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
documentId (string) --
Identifier of the referenced document. Set when the reference is a document.
authorizationRequired (dict) --
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.
authorizationUrl (string) --
The URL the end user opens to consent. Single-use and bound to the caller's identity.
message (string) --
A short, user-facing explanation of what is being authorized.
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.
See also: AWS API Documentation
Request Syntax
client.put_trace(
sessionId='string',
clientToken='string',
format='OTEL'|'ANTHROPIC'|'BEDROCK_CONVERSE'|'KIRO',
traceDocuments=[
b'bytes',
],
agentContextArns=[
'string',
],
traceMetadata={
'string': 'string'
},
accessControlConfig={
'accessControlList': [
{
'access': 'ALLOW'|'DENY',
'principalId': 'string',
'principalType': 'USER'|'GROUP'
},
]
}
)
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.
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.
This field is autopopulated if not provided.
string
[REQUIRED]
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.
list
[REQUIRED]
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.
(bytes) --
One raw trace document, up to 5 MiB (5,242,880 bytes) before encoding. Through the MCP server or another JSON client, send it as a base64-encoded string. If you use OpenTelemetry, split a large trace into multiple spans across traceDocuments and link them with your span metadata, instead of sending one oversized document.
list
[REQUIRED]
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.
(string) --
The Amazon Resource Name (ARN) of an agent context. The ARN has the following parts:
A partition: aws, aws-cn, or aws-us-gov.
A Region of up to 32 characters.
An account of exactly 12 digits.
The resource path agent-context/.
An ID of lowercase letters and digits in single-hyphen-separated runs.
This matches the public agent context ID format.
dict
Client-supplied key-value pairs, stored with the traces as-is. The key analysisMode is reserved. A request that sets it fails with AccessDeniedException.
(string) --
(string) --
dict
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.
accessControlList (list) --
Entries, each allowing or denying one principal.
(dict) --
Allows or denies one end user or group, or every reader ( *).
access (string) -- [REQUIRED]
Specifies whether the principal can see the information.
Valid values:
ALLOW - Access is allowed.
DENY - Access is denied.
principalId (string) -- [REQUIRED]
The principal's opaque user or group ID, or * for every reader authorized on the resource.
principalType (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.
dict
Response Syntax
{
'sessionId': 'string'
}
Response Structure
(dict) --
sessionId (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.
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.
See also: AWS API Documentation
Request Syntax
client.start_task(
agentContextId='string',
clientToken='string',
description='string',
inputConfiguration={
'importDataDictionary': {
'documents': [
{
'name': 'string',
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT',
'content': b'bytes'
},
]
},
'importVerifiedQueries': {
'documents': [
{
'name': 'string',
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT',
'content': b'bytes'
},
]
},
'importOntology': {
'ontologies': [
{
'ontologyId': 'string',
'ontologyVersion': 'string'
},
]
}
},
accessControlConfig={
'accessControlList': [
{
'access': 'ALLOW'|'DENY',
'principalId': 'string',
'principalType': 'USER'|'GROUP'
},
]
}
)
string
[REQUIRED]
The agent context, as an ID or ARN.
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.
This field is autopopulated if not provided.
string
A description of the task. Up to 1,024 characters, with no control characters.
dict
[REQUIRED]
What the task imports. Set exactly one member. The member that you set determines the task's type.
importDataDictionary (dict) --
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.
documents (list) -- [REQUIRED]
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.
(dict) --
A document for a task to read, sent inline in the StartTask request.
name (string) -- [REQUIRED]
The name of the document. The name must be unique within the request.
contentType (string) -- [REQUIRED]
You must specify a content type that the task configuration accepts. Otherwise, the request fails with ValidationException.
content (bytes) -- [REQUIRED]
The content of the document. All the documents in one request can total at most 10,485,760 bytes (10 MiB).
importVerifiedQueries (dict) --
Imports verified queries into the agent context from documents of type SQL, CSV, JSON, or TXT. The task's type is IMPORT_VERIFIED_QUERIES.
documents (list) -- [REQUIRED]
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.
(dict) --
A document for a task to read, sent inline in the StartTask request.
name (string) -- [REQUIRED]
The name of the document. The name must be unique within the request.
contentType (string) -- [REQUIRED]
You must specify a content type that the task configuration accepts. Otherwise, the request fails with ValidationException.
content (bytes) -- [REQUIRED]
The content of the document. All the documents in one request can total at most 10,485,760 bytes (10 MiB).
importOntology (dict) --
Imports one or more ontologies into the agent context. The task's type is IMPORT_ONTOLOGY.
ontologies (list) -- [REQUIRED]
The ontologies to import, in import order. Each ARN can appear only once.
(dict) --
An ontology to import into the agent context, and optionally the version of it to import.
ontologyId (string) -- [REQUIRED]
An ontology ID or ARN, in the account that owns the agent context.
ontologyVersion (string) --
The ontology version to import. If you omit it, the task imports the ontology's default version at the time the import runs.
dict
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.
accessControlList (list) --
Entries, each allowing or denying one principal.
(dict) --
Allows or denies one end user or group, or every reader ( *).
access (string) -- [REQUIRED]
Specifies whether the principal can see the information.
Valid values:
ALLOW - Access is allowed.
DENY - Access is denied.
principalId (string) -- [REQUIRED]
The principal's opaque user or group ID, or * for every reader authorized on the resource.
principalType (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.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'agentContextId': 'string',
'type': 'IMPORT_DATA_DICTIONARY'|'IMPORT_VERIFIED_QUERIES'|'IMPORT_ONTOLOGY',
'status': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'description': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReasonCode': 'GRAPH_NOT_ACTIVE'|'ONTOLOGY_INVALID'|'ONTOLOGY_IMPORT_UNAVAILABLE'|'ONTOLOGY_ALREADY_IMPORTED',
'statusMessage': 'string',
'statistics': {
'numberOfDocumentsAnalyzed': 123,
'numberOfChangeSetsCreated': 123,
'numberOfChangeSetsAutoApproved': 123
},
'inputConfiguration': {
'importDataDictionary': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importVerifiedQueries': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'CSV'|'JSON'|'YAML'|'MARKDOWN'|'SQL'|'TXT'
},
]
},
'importOntology': {
'ontologies': [
{
'ontologyArn': 'string',
'ontologyVersion': 'string'
},
]
}
},
'outputs': [
{
'changeSet': {
'changeSetId': 'string'
}
},
]
}
Response Structure
(dict) --
id (string) --
The ID of the task. Pass it as taskId to GetTask or CancelTask.
arn (string) --
The Amazon Resource Name (ARN) of the task.
agentContextId (string) --
The agent context's ID.
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.
status (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.
description (string) --
The description of the task, as given to StartTask.
createdAt (datetime) --
The date and time when the task was created.
updatedAt (datetime) --
The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.
statusReasonCode (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.
statusMessage (string) --
The reason the task failed. Present only when status is FAILED.
statistics (dict) --
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.
numberOfDocumentsAnalyzed (integer) --
The number of input documents that the task has analyzed.
numberOfChangeSetsCreated (integer) --
The number of change sets that the task has created.
numberOfChangeSetsAutoApproved (integer) --
The number of change sets that the agent context's curation policies published without review.
inputConfiguration (dict) --
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.
importDataDictionary (dict) --
The data dictionary documents that an IMPORT_DATA_DICTIONARY task was started with.
documents (list) --
The names and sizes of the documents, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importVerifiedQueries (dict) --
The verified query documents that an IMPORT_VERIFIED_QUERIES task was started with.
documents (list) --
Names and sizes, in request order.
(dict) --
The name, size, and content type of a document that a task was started with. The document's content isn't returned.
name (string) --
The name of the document, as given in the StartTask request.
sizeBytes (integer) --
The size of the document's content, in bytes.
contentType (string) --
The content type of the document, as declared in the StartTask request.
importOntology (dict) --
The ontologies that an IMPORT_ONTOLOGY task was started with.
ontologies (list) --
The ontologies that the task imports, in import order.
(dict) --
An ontology that an IMPORT_ONTOLOGY task was started with, and the version that was requested.
ontologyArn (string) --
The Amazon Resource Name (ARN) of the ontology to import.
ontologyVersion (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.
outputs (list) --
What the task created, in creation order. Set when it finishes.
(dict) --
One thing a task created: exactly one member.
changeSet (dict) --
A change set that the task created. Pass its changeSetId to GetChangeSet to read it.
changeSetId (string) --
The ID of a change set that the task created. Pass it to GetChangeSet to read the change set.
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.
See also: AWS API Documentation
Request Syntax
client.delete_curation_policy(
curationPolicyId='string'
)
string
[REQUIRED]
The ID of the curation policy to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Removes tags from an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
See also: AWS API Documentation
Request Syntax
client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
string
[REQUIRED]
The ARN of the resource to untag.
list
[REQUIRED]
The keys of the tags to remove, 1–200 per request.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the connections in your account, most recently updated first.
See also: AWS API Documentation
Request Syntax
client.list_connections(
maxResults=123,
nextToken='string'
)
integer
Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.
string
Opaque pagination cursor from a prior response. Omit for the first page.
dict
Response Syntax
{
'items': [
{
'id': 'string',
'arn': 'string',
'name': 'string',
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'dataSource': {
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'location': {
'arn': 'string'
}
},
'scope': {
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The connections in your account, as summaries. Always present, and empty when the account has no connections.
(dict) --
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.
id (string) --
The ID of the connection.
arn (string) --
The ARN of the connection.
name (string) --
The name of the connection.
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.
status (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.
createdAt (datetime) --
The date and time when the connection was created.
updatedAt (datetime) --
The date and time when the connection was last updated.
dataSource (dict) --
The connection's data source: its type and location ARN, in the same form as the dataSource that GetConnection returns.
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.
location (dict) --
Where the data source lives. For this scope, an AWS ARN only.
arn (string) --
The ARN of the data source. Its account segment must be your account when you create the connection.
scope (dict) --
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.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) --
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
nextToken (string) --
Pagination cursor for the next page. Absent when no more results exist.
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.
See also: AWS API Documentation
Request Syntax
client.delete_connection(
connectionId='string',
deletionMode='RETAIN'|'DELETE'
)
string
[REQUIRED]
The connection to delete, by its ID (which starts with conn-) or its ARN.
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.
dict
Response Syntax
{}
Response Structure
(dict) --
Accepts a curation proposal and applies its change to the agent context.
See also: AWS API Documentation
Request Syntax
client.accept_curation_proposal(
curationProposalId='string',
agentContextId='string',
revisionId='string',
clientToken='string'
)
string
[REQUIRED]
The ID of the proposal to accept.
string
[REQUIRED]
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.
string
[REQUIRED]
The revisionId the curator observed. A mismatch means a stale view.
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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'changeSetId': 'string',
'title': 'string',
'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',
'revisionId': 'string',
'status': 'PENDING_REVIEW'|'APPROVED'|'REJECTED'|'SUPERSEDED'|'FAILED'|'PUBLISHING'|'ARCHIVED',
'statusReasonCode': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'agentContextId': 'string',
'expiresAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string',
'triggeringPolicies': [
{
'policyId': 'string'
},
]
}
Response Structure
(dict) --
The proposal after this call, in its new status.
changeSetId (string) --
The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.
title (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 ….
generatedBy (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.
revisionId (string) --
An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.
status (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.
statusReasonCode (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.
accessControl (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 (string) --
The agent context's ID.
expiresAt (datetime) --
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.
createdAt (datetime) --
The date and time when the curation proposal was created.
updatedAt (datetime) --
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.
statusReason (dict) --
Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The proposal's opaque instance ID. Requests take it as curationProposalId.
triggeringPolicies (list) --
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.
(dict) --
A policy that routed the change set to review.
policyId (string) --
The ID of the curation policy that routed the change set to review.
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.
See also: AWS API Documentation
Request Syntax
client.list_change_set_operations(
changeSetId='string',
agentContextId='string',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The change set whose operations to page through, by its opaque instance ID.
string
[REQUIRED]
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.
integer
Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with ValidationException.
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.
dict
Response Syntax
{
'items': [
{
'put': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'update': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
'delete': {
'entity': {
'nodeId': 'string',
'edgeId': {
'from': 'string',
'to': 'string'
}
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
This page of the change set's operations.
(dict) --
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.
put (dict) --
Writes a node or edge in full. Creates it if it does not exist.
entity (dict) --
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
properties (dict) --
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
update (dict) --
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.
entity (dict) --
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.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
properties (dict) --
The properties to set, up to 50. {} when there are none. ListChangeSetOperations lists them as it lists those of PutOperation.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
delete (dict) --
Removes a node or edge. A deleted node takes its unowned edges.
entity (dict) --
The node or edge to remove.
nodeId (string) --
The ID of the node. For an ontology schema node, use its iri: reference, which every write accepts.
edgeId (dict) --
The edge, identified by the IDs of its start and end nodes. The edge type is in properties.edgeType.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
properties (dict) --
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.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
nextToken (string) --
Pagination cursor for the next page. Absent when no more operations remain.
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.
See also: AWS API Documentation
Request Syntax
client.traverse_agent_context(
maxResults=123,
nextToken='string',
agentContextId='string',
nodeId='string',
traversalStrategy={
'edgeTypes': [
'string',
],
'direction': 'OUTGOING'|'INCOMING'|'BOTH',
'maxDepth': 123
}
)
integer
Maximum total neighbors to return per page.
string
Opaque continuation token from a prior response. Omit on the first page.
string
[REQUIRED]
The agent context to traverse, by ID or full Amazon Resource Name (ARN).
string
[REQUIRED]
The ID of the seed node to start traversal from.
dict
[REQUIRED]
Traversal directives: which edge types to follow, direction, and max depth.
edgeTypes (list) --
Edge types to follow. When omitted, all edge types are traversed.
(string) --
The name of an ontology edge type: one or more segments of uppercase letters, digits, and underscores, each starting with a letter and separated by ::, for example WORKS_ON or AWS::BEDROCK_KNOWLEDGE_BASE::WORKS_ON. Up to 128 characters. A traversal edgeTypes filter accepts the :: form, so it can name any edge type that AWS Context ingests.
direction (string) -- [REQUIRED]
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.
maxDepth (integer) -- [REQUIRED]
The maximum traversal depth from the seed node, from 1 to 3.
dict
Response Syntax
{
'nextToken': 'string',
'items': [
{
'nodeId': 'string',
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
},
'depth': 123,
'pathEdges': [
{
'edgeId': {
'from': 'string',
'to': 'string'
},
'properties': {
'string': {
'stringValue': 'string',
'intValue': 123,
'longValue': 123,
'boolValue': True|False,
'floatValue': ...,
'doubleValue': 123.0,
'stringListValue': [
'string',
],
'intListValue': [
123,
],
'longListValue': [
123,
],
'floatListValue': [
...,
],
'doubleListValue': [
123.0,
],
'boolListValue': [
True|False,
]
}
}
},
]
},
],
'authorizationRequired': {
'authorizationUrl': 'string',
'message': 'string'
}
}
Response Structure
(dict) --
The response of TraverseAgentContext.
nextToken (string) --
Pagination cursor for the next page. Absent when there are no more results.
items (list) --
The neighbors reached from the seed node.
(dict) --
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.
nodeId (string) --
Unique identifier of the neighbor node.
properties (dict) --
Arbitrary key-value properties stored on this neighbor node.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
depth (integer) --
The depth at which the traversal found this neighbor (1 = directly connected to seed, 2 = two edges away, and so on).
pathEdges (list) --
The edges along the path from the seed node to this neighbor, preserving traversal order.
(dict) --
An edge on the path from the seed node to a neighbor node, with the edge's properties.
edgeId (dict) --
Edge identity: the (from, to) node pair. Edges have no standalone ID. The edge type, edgeType, is carried in properties.
from (string) --
The ID of the node where the edge starts.
to (string) --
The ID of the node where the edge ends.
properties (dict) --
Arbitrary key-value properties stored on this edge.
(string) --
(dict) --
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.
stringValue (string) --
A string value, up to 2,048 characters.
intValue (integer) --
A 32-bit signed integer value.
longValue (integer) --
A 64-bit signed integer value.
boolValue (boolean) --
A Boolean value.
floatValue (float) --
A single-precision (32-bit) floating-point value.
doubleValue (float) --
A double-precision (64-bit) floating-point value.
stringListValue (list) --
A list of up to 1,000 string values, each up to 2,048 characters.
(string) --
intListValue (list) --
A list of up to 1,000 32-bit signed integer values.
(integer) --
longListValue (list) --
A list of up to 1,000 64-bit signed integer values.
(integer) --
floatListValue (list) --
A list of up to 1,000 single-precision (32-bit) floating-point values.
(float) --
doubleListValue (list) --
A list of up to 1,000 double-precision (64-bit) floating-point values.
(float) --
boolListValue (list) --
A list of up to 1,000 Boolean values.
(boolean) --
authorizationRequired (dict) --
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.
authorizationUrl (string) --
The URL the end user opens to consent. Single-use and bound to the caller's identity.
message (string) --
A short, user-facing explanation of what is being authorized.
Creates an agent context over one or more connections. Creation is asynchronous. GetAgentContext returns its status.
See also: AWS API Documentation
Request Syntax
client.create_agent_context(
clientToken='string',
name='string',
description='string',
connectionMappings=[
{
'connectionId': 'string',
'ontologyMappings': [
{
'ontologyId': 'string'
},
],
'dataFilter': {
'filters': [
{
'fileType': 'string',
'excludeTags': [
'string',
],
'includeTags': [
'string',
],
'updatedAfter': datetime(2015, 1, 1),
'createdAfter': datetime(2015, 1, 1),
'maxDocumentSizeBytes': 123
},
]
},
'extractionDepth': 'string',
'pathSegments': [
{
'level': 'string',
'id': 'string'
},
],
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
},
],
traceAnalysisConfig={
'status': 'ENABLED'|'DISABLED',
'traceAnalysisRole': 'string',
'includeContextAgentTraces': 'ENABLED'|'DISABLED'
},
workforceSignInConfig={
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
},
entityResolutionConfig={
'status': 'ENABLED'|'DISABLED'
},
trustedIdentitySources=[
{
'identityStoreArn': 'string',
'identityProviderArn': 'string'
},
],
tags={
'string': 'string'
},
curationPolicyIds=[
'string',
]
)
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.
This field is autopopulated if not provided.
string
Optional. The name of the agent context. If you omit it, the name is default. You can change it later with UpdateAgentContext.
string
Optional human-readable description of the agent context. An empty string is the same as none.
list
[REQUIRED]
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.
(dict) --
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.
connectionId (string) -- [REQUIRED]
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.
ontologyMappings (list) -- [REQUIRED]
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.
(dict) --
A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.
ontologyId (string) -- [REQUIRED]
The ontology that this mapping targets, by its ID or ARN.
dataFilter (dict) --
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.
filters (list) --
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.
(dict) --
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.
fileType (string) --
The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.
excludeTags (list) --
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.
(string) --
A single tag value within a TagSet.
includeTags (list) --
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.
(string) --
A single tag value within a TagSet.
updatedAfter (datetime) --
Documents updated after this time match. Applies to all connection types.
createdAfter (datetime) --
Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.
maxDocumentSizeBytes (integer) --
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).
extractionDepth (string) --
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
pathSegments (list) --
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.
(dict) --
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.
level (string) -- [REQUIRED]
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (string) -- [REQUIRED]
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.
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.
dict
The agent context's trace analysis settings. Optional. You can change it with UpdateAgentContext.
status (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 (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.
includeContextAgentTraces (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.
dict
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.
status (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.
signInUrl (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.
dict
Optional entity resolution settings. When the config or its status is absent, status reads ENABLED. You can change it with UpdateAgentContext.
status (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.
list
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.
(dict) --
An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.
identityStoreArn (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.
identityProviderArn (string) --
An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
list
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.
(string) --
A curation policy, by ID or by its full curation-policy/ ARN. An ARN must name your account and the current Region. The ID is lowercase letters and digits in single-hyphen-separated runs ( ^[a-z0-9]+(-[a-z0-9]+)*$).
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'description': 'string',
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'connectionMappings': [
{
'connectionId': 'string',
'ontologyMappings': [
{
'ontologyId': 'string'
},
],
'dataFilter': {
'filters': [
{
'fileType': 'string',
'excludeTags': [
'string',
],
'includeTags': [
'string',
],
'updatedAfter': datetime(2015, 1, 1),
'createdAfter': datetime(2015, 1, 1),
'maxDocumentSizeBytes': 123
},
]
},
'extractionDepth': 'string',
'pathSegments': [
{
'level': 'string',
'id': 'string'
},
],
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE'
},
],
'encryptionConfig': {
'encryptionMode': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'keyArn': 'string'
},
'traceAnalysisConfig': {
'status': 'ENABLED'|'DISABLED',
'traceAnalysisRole': 'string',
'includeContextAgentTraces': 'ENABLED'|'DISABLED'
},
'workforceSignInConfig': {
'status': 'ENABLED'|'DISABLED',
'signInUrl': 'string'
},
'entityResolutionConfig': {
'status': 'ENABLED'|'DISABLED'
},
'mcpServerUrl': 'string',
'trustedIdentitySources': [
{
'identityStoreArn': 'string',
'identityProviderArn': 'string'
},
]
}
Response Structure
(dict) --
An agent context, as returned by CreateAgentContext, GetAgentContext, and UpdateAgentContext.
id (string) --
The agent context's opaque ID.
arn (string) --
The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id>.
name (string) --
The name of the agent context. If you didn't specify a name when you created it, the name is default.
description (string) --
A human-readable description, if one was set.
status (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.
createdAt (datetime) --
The date and time when the agent context was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
connectionMappings (list) --
The agent context's connection mappings.
(dict) --
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.
connectionId (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.
ontologyMappings (list) --
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.
(dict) --
A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.
ontologyId (string) --
The ontology that this mapping targets, by its ID or ARN.
dataFilter (dict) --
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.
filters (list) --
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.
(dict) --
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.
fileType (string) --
The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.
excludeTags (list) --
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.
(string) --
A single tag value within a TagSet.
includeTags (list) --
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.
(string) --
A single tag value within a TagSet.
updatedAfter (datetime) --
Documents updated after this time match. Applies to all connection types.
createdAfter (datetime) --
Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn't exclude any document.
maxDocumentSizeBytes (integer) --
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).
extractionDepth (string) --
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
pathSegments (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
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.
encryptionConfig (dict) --
The agent context's encryption settings.
encryptionMode (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 (string) --
The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED. Absent for AWS_OWNED.
traceAnalysisConfig (dict) --
The agent context's trace analysis settings.
status (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 (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.
includeContextAgentTraces (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.
workforceSignInConfig (dict) --
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.
status (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.
signInUrl (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.
entityResolutionConfig (dict) --
The agent context's entity resolution settings. Populated on every response path that returns the resource.
status (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.
mcpServerUrl (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.
trustedIdentitySources (list) --
Identity sources this agent context trusts in addition to its owner's account. Absent or empty: only the owner's account is trusted.
(dict) --
An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.
identityStoreArn (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.
identityProviderArn (string) --
An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com.
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.
See also: AWS API Documentation
Request Syntax
client.create_ontology(
clientToken='string',
name='string',
description='string',
sourceFormat='TURTLE',
source='string',
tags={
'string': 'string'
}
)
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.
This field is autopopulated if not provided.
string
[REQUIRED]
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.
string
Optional description of the ontology. Part of the idempotency comparison on a replay.
string
[REQUIRED]
The format of source. The only supported value is TURTLE.
string
[REQUIRED]
An OWL ontology to derive the template from, in sourceFormat.
dict
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.
(string) --
A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.
(string) --
A tag value. Leading and trailing whitespace is trimmed.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'updatedAt': datetime(2015, 1, 1),
'name': 'string',
'description': 'string',
'version': 'string',
'validationIssues': [
{
'code': 'string',
'message': 'string',
'line': 123,
'subject': 'string'
},
]
}
Response Structure
(dict) --
The created ontology's identity, and any derivation warnings. GetOntology returns the version's details, and ListOntologies ( OntologySummary) returns its node and edge type counts.
id (string) --
The ID of the ontology, assigned by AWS Context.
arn (string) --
The ARN of the created ontology.
updatedAt (datetime) --
When the ontology last changed. On create, the creation time. On a replay, the current value.
name (string) --
The display name as stored. On a replay, the current one.
description (string) --
The description as stored. Absent when there is none. On a replay, the current one.
version (string) --
The initial version that CreateOntology created, in MAJOR.MINOR.PATCH form, for example 1.0.0.
validationIssues (list) --
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.
(dict) --
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.
code (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.
message (string) --
A human-readable description of the issue.
line (integer) --
1-based line in the uploaded source, when the failure is attributable to a specific triple.
subject (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.
Rejects a curation proposal. Its change is not applied to the agent context.
See also: AWS API Documentation
Request Syntax
client.reject_curation_proposal(
curationProposalId='string',
agentContextId='string',
revisionId='string',
clientToken='string'
)
string
[REQUIRED]
The ID of the proposal to reject.
string
[REQUIRED]
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.
string
[REQUIRED]
The revisionId the curator observed. A mismatch means a stale view.
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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'changeSetId': 'string',
'title': 'string',
'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',
'revisionId': 'string',
'status': 'PENDING_REVIEW'|'APPROVED'|'REJECTED'|'SUPERSEDED'|'FAILED'|'PUBLISHING'|'ARCHIVED',
'statusReasonCode': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'agentContextId': 'string',
'expiresAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string',
'triggeringPolicies': [
{
'policyId': 'string'
},
]
}
Response Structure
(dict) --
The proposal after this call, in its new status.
changeSetId (string) --
The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.
title (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 ….
generatedBy (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.
revisionId (string) --
An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.
status (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.
statusReasonCode (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.
accessControl (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 (string) --
The agent context's ID.
expiresAt (datetime) --
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.
createdAt (datetime) --
The date and time when the curation proposal was created.
updatedAt (datetime) --
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.
statusReason (dict) --
Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The proposal's opaque instance ID. Requests take it as curationProposalId.
triggeringPolicies (list) --
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.
(dict) --
A policy that routed the change set to review.
policyId (string) --
The ID of the curation policy that routed the change set to review.
Returns an ontology induction's status, and, once it is a draft, the ontology it created.
See also: AWS API Documentation
Request Syntax
client.get_ontology_induction(
ontologyInductionId='string'
)
string
[REQUIRED]
The ID or Amazon Resource Name (ARN) of the ontology induction to return.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'status': 'INDUCING'|'DRAFT'|'FAILED'|'CANCELLED',
'failure': {
'code': 'string',
'message': 'string'
},
'ontologyName': 'string',
'ontologyDescription': 'string',
'ontologyId': 'string',
'ontologyArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'seedOntologyId': 'string',
'prompt': 'string',
'inputConfig': {
'documents': [
{
'name': 'string',
'sizeBytes': 123,
'contentType': 'PDF'|'TXT'|'MARKDOWN'|'CSV'|'JSON'|'YAML'|'DOC'|'DOCX'|'HTML'
},
]
}
}
Response Structure
(dict) --
id (string) --
The ID of the induction, assigned by AWS Context.
arn (string) --
The Amazon Resource Name (ARN) of the ontology induction.
status (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.
failure (dict) --
Why the induction is FAILED. Absent in every other status.
code (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 (string) --
A human-readable description of why the induction failed. Use code, not message, to decide how to respond.
ontologyName (string) --
The name the induction's ontology gets, as StartOntologyInduction took it ( ontologyName). Once the ontology exists, its current name is GetOntology's.
ontologyDescription (string) --
The description the induction's ontology gets ( ontologyDescription). Absent when there is none.
ontologyId (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.
ontologyArn (string) --
The ARN of ontologyId. Present when it is.
createdAt (datetime) --
The date and time when the ontology induction was created.
updatedAt (datetime) --
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.
seedOntologyId (string) --
The seed ontology the induction started from. Absent when started without a seed. Returned in every status.
prompt (string) --
The prompt that the induction was started with. Absent if the induction was started without a prompt.
inputConfig (dict) --
What the induction was started from, without the document content.
documents (list) --
The documents uploaded in the request, in the order given.
(dict) --
An uploaded document as recorded.
name (string) --
The document's name, as uploaded.
sizeBytes (integer) --
The document's size in bytes.
contentType (string) --
The document's content type, as declared in the StartOntologyInduction request. Absent only for an induction started before StartOntologyInduction required a content type.
Returns a connection's configuration and status.
See also: AWS API Documentation
Request Syntax
client.get_connection(
connectionId='string'
)
string
[REQUIRED]
The connection to return, by its ID (which starts with conn-) or its ARN.
dict
Response Syntax
{
'id': 'string',
'arn': 'string',
'name': 'string',
'dataSource': {
'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
'location': {
'arn': 'string'
}
},
'scope': {
'selectors': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
]
},
]
},
'accessConfig': {
'iamRole': {
'roleArn': 'string'
}
},
'syncSchedule': {
'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
'cronExpression': 'string'
},
'ingestionConfig': {
'roleArn': 'string'
},
'glueConnectionMappings': [
{
'path': [
{
'level': 'string',
'id': 'string'
},
],
'glueConnectionArn': 'string'
},
],
'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
'failure': {
'code': 'GLUE_CONNECTION_UNAVAILABLE',
'message': 'string'
},
'subStatus': 'GLUE_CONNECTION_CREATED'|'GLUE_CONNECTION_VALIDATED'|'SYNC_JOB_CREATED',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
A connection, as returned by CreateConnection, GetConnection, and UpdateConnection. id, arn, name, dataSource, status, createdAt, and updatedAt are always present. Every other member is optional.
id (string) --
The ID of the connection.
arn (string) --
The ARN of the connection.
name (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.
dataSource (dict) --
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.
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.
location (dict) --
Where the data source lives. For this scope, an AWS ARN only.
arn (string) --
The ARN of the data source. Its account segment must be your account when you create the connection.
scope (dict) --
The hierarchical subset of the data source this connection ingests.
selectors (list) --
The selectors describing which parts of the data source are in scope.
(dict) --
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).
path (list) --
Ordered hierarchy path from the root to the selected resource. Must be non-empty.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
accessConfig (dict) --
Per-connection access configuration: the IAM role used for data access.
iamRole (dict) --
Assume-role access. The service assumes roleArn to read the connection's data source.
roleArn (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.
syncSchedule (dict) --
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.
frequency (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.
cronExpression (string) --
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
ingestionConfig (dict) --
The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.
roleArn (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.
glueConnectionMappings (list) --
The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.
(dict) --
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.
path (list) --
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.
(dict) --
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.
level (string) --
The hierarchy level name for this segment (for example, "database", "table"). Non-blank, no whitespace.
id (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.
glueConnectionArn (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.
status (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.
failure (dict) --
The reason the connection is FAILED. Absent in every other status.
code (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 (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.
subStatus (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.
createdAt (datetime) --
The date and time when the connection was created.
updatedAt (datetime) --
When the resource last changed. Equal to createdAt until the first update.
Lists an agent context's curation proposals, newest first. A curation proposal holds a change to the agent context for review.
See also: AWS API Documentation
Request Syntax
client.list_curation_proposals(
agentContextId='string',
status='PENDING_REVIEW'|'APPROVED'|'REJECTED'|'SUPERSEDED'|'FAILED'|'PUBLISHING'|'ARCHIVED',
accessControl='ACL_RESTRICTED'|'NO_ACL',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The agent context whose proposals you want to list, by its ID or ARN.
string
[REQUIRED]
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.
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.
integer
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.
string
Opaque pagination cursor from a prior response. Omit for the first page.
dict
Response Syntax
{
'items': [
{
'changeSetId': 'string',
'title': 'string',
'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',
'revisionId': 'string',
'status': 'PENDING_REVIEW'|'APPROVED'|'REJECTED'|'SUPERSEDED'|'FAILED'|'PUBLISHING'|'ARCHIVED',
'statusReasonCode': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'accessControl': 'ACL_RESTRICTED'|'NO_ACL',
'agentContextId': 'string',
'expiresAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'statusReason': {
'code': 'REQUEST_EXPIRED'|'CONNECTION_REMOVED',
'message': 'string'
},
'id': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The curation proposals, as summaries. Always present, and empty when there are none.
(dict) --
A summary of a curation proposal, as returned by ListCurationProposals.
changeSetId (string) --
The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.
title (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 ….
generatedBy (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.
revisionId (string) --
An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.
status (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.
statusReasonCode (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.
accessControl (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 (string) --
The agent context's ID.
expiresAt (datetime) --
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.
createdAt (datetime) --
The date and time when the curation proposal was created.
updatedAt (datetime) --
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.
statusReason (dict) --
Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.
code (string) --
Why the change happened. AWS Context currently sets CONNECTION_REMOVED. Handle a value you don't recognize.
message (string) --
A human-readable description. Don't parse it.
id (string) --
The proposal's opaque instance ID. Requests take it as curationProposalId.
nextToken (string) --
Pagination cursor for the next page. Absent when no more results exist.