

# ConnectionMapping

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.

## Contents
<a name="API_ConnectionMapping_Contents"></a>

 ** connectionId **   <a name="context-Type-ConnectionMapping-connectionId"></a>
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.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `(arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:connection/)?[a-z0-9]+(-[a-z0-9]+)*`   
Required: Yes

 ** ontologyMappings **   <a name="context-Type-ConnectionMapping-ontologyMappings"></a>
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`.  
Type: Array of [OntologyMapping](API_OntologyMapping.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

 ** dataFilter **   <a name="context-Type-ConnectionMapping-dataFilter"></a>
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.  
Type: [DataFilter](API_DataFilter.md) object  
Required: No

 ** extractionDepth **   <a name="context-Type-ConnectionMapping-extractionDepth"></a>
Optional extraction depth override for BEDROCK\_KNOWLEDGE\_BASE connections.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Z][A-Z0-9_]*`   
Required: No

 ** pathSegments **   <a name="context-Type-ConnectionMapping-pathSegments"></a>
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: Array of [PathSegment](API_PathSegment.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 100 items.  
Required: No

 ** type **   <a name="context-Type-ConnectionMapping-type"></a>
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.
Type: String  
Valid Values: `GLUE_DATA_CATALOG | BEDROCK_KNOWLEDGE_BASE | DATABRICKS | SNOWFLAKE`   
Required: No

## See Also
<a name="API_ConnectionMapping_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/context-2022-07-26/ConnectionMapping) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/ConnectionMapping) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/ConnectionMapping) 