Skip to content

ConnectionMapping

Source code in docs_src/capo_context/types/connection_mapping.py
class ConnectionMapping(TypedDict, closed=True):
    connection_id: "capo_context.types.connection_identifier.ConnectionIdentifier"
    """<p>The connection, by its ID (which starts with <code>conn-</code>) or its full ARN. Required. AWS Context resolves an ID to an ARN in your account and the current Region.</p>"""
    ontology_mappings: "capo_context.types.ontology_mapping_list.OntologyMappingList"
    """<p>The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets. <code>BEDROCK_KNOWLEDGE_BASE</code> rejects the AWS managed Data ontology. <code>GLUE_DATA_CATALOG</code> rejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only on <code>BEDROCK_KNOWLEDGE_BASE</code>. An incompatible mapping, or an ontology that isn't <code>PUBLISHED</code>, fails with <code>ValidationException</code>.</p>"""
    data_filter: NotRequired["capo_context.types.data_filter.DataFilter"]
    """<p>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.</p>"""
    extraction_depth: NotRequired["capo_context.types.extraction_depth.ExtractionDepth"]
    """<p>Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.</p>"""
    path_segments: NotRequired["capo_context.types.path_segment_list.PathSegmentList"]
    """<p>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:</p> <ul> <li> <p> <code>GLUE_DATA_CATALOG</code> - The native branch (<code>glueDatabase, glueTable</code>) and one branch for each federated AWS data source: <code>redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable</code>, <code>rdsInstance, rdsDatabase, rdsSchema, rdsTable</code>, <code>s3TableBucket, s3Namespace, s3Table</code>, and <code>sagemakerModelGroup</code>.</p> </li> <li> <p> <code>SNOWFLAKE</code> - <code>snowflakeDatabase, snowflakeSchema, snowflakeTable</code>.</p> </li> <li> <p> <code>DATABRICKS</code> - <code>databricksCatalog, databricksSchema, databricksTable</code>.</p> </li> </ul> <p>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.</p>"""
    type: NotRequired["capo_context.types.connection_type.ConnectionType"]
    """<p>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.</p> <p>Valid values:</p> <ul> <li> <p> <code>GLUE_DATA_CATALOG</code> - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.</p> </li> <li> <p> <code>BEDROCK_KNOWLEDGE_BASE</code> - An Amazon Bedrock knowledge base.</p> </li> <li> <p> <code>DATABRICKS</code> - A Databricks third-party catalog.</p> </li> <li> <p> <code>SNOWFLAKE</code> - A Snowflake third-party catalog.</p> </li> </ul>"""

connection_id instance-attribute

connection_id: ConnectionIdentifier

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.

data_filter instance-attribute

data_filter: NotRequired[DataFilter]

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.

extraction_depth instance-attribute

extraction_depth: NotRequired[ExtractionDepth]

Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.

ontology_mappings instance-attribute

ontology_mappings: OntologyMappingList

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.

path_segments instance-attribute

path_segments: NotRequired[PathSegmentList]

The path segments that scope ingestion within the data source, 0–100 segments. Optional. An empty list is the same as omitting the field and matches everything. The segments name levels from one branch of the connection type's level hierarchy. The container levels form a contiguous prefix of that branch that starts at its root, and a link can also name the table level. AWS Context rejects a link that mixes branches. The branches are the following:

  • GLUE_DATA_CATALOG - The native branch (glueDatabase, glueTable) and one branch for each federated AWS data source: redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable, rdsInstance, rdsDatabase, rdsSchema, rdsTable, s3TableBucket, s3Namespace, s3Table, and sagemakerModelGroup.

  • SNOWFLAKE - snowflakeDatabase, snowflakeSchema, snowflakeTable.

  • DATABRICKS - databricksCatalog, databricksSchema, databricksTable.

The connection holds the source's identity, such as the account locator or metastore ID, so it isn't a segment. AWS Context matches IDs as opaque strings against the source's coordinate values.

type instance-attribute

type: NotRequired[ConnectionType]

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.