Class ConnectionMapping
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ConnectionMapping.Builder,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.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionMapping.Builderbuilder()final StringThe connection, by its ID (which starts withconn-) or its full ARN.final DataFilterOptional.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final StringOptional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final booleanFor responses, this returns true if the service returned a value for the OntologyMappings property.final booleanFor responses, this returns true if the service returned a value for the PathSegments property.final List<OntologyMapping> The ontology mappings for this connection mapping.final List<PathSegment> The path segments that scope ingestion within the data source, 0–100 segments.static Class<? extends ConnectionMapping.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final ConnectionTypetype()The connection's data source type.final StringThe connection's data source type.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
connectionId
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.- Returns:
- 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.
-
hasOntologyMappings
public final boolean hasOntologyMappings()For responses, this returns true if the service returned a value for the OntologyMappings property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
ontologyMappings
The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets.
BEDROCK_KNOWLEDGE_BASErejects the AWS managed Data ontology.GLUE_DATA_CATALOGrejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only onBEDROCK_KNOWLEDGE_BASE. An incompatible mapping, or an ontology that isn'tPUBLISHED, fails withValidationException.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOntologyMappings()method.- Returns:
- The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping
targets.
BEDROCK_KNOWLEDGE_BASErejects the AWS managed Data ontology.GLUE_DATA_CATALOGrejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only onBEDROCK_KNOWLEDGE_BASE. An incompatible mapping, or an ontology that isn'tPUBLISHED, fails withValidationException.
-
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.
- Returns:
- Optional. The data filter for this connection mapping. A document matches if it matches any filter in the list. Within a filter, all conditions must match. If you omit it, every document matches.
-
extractionDepth
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
- Returns:
- Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
-
hasPathSegments
public final boolean hasPathSegments()For responses, this returns true if the service returned a value for the PathSegments property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
pathSegments
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, andsagemakerModelGroup. -
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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPathSegments()method.- Returns:
- 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, andsagemakerModelGroup. -
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
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.
If the service returns an enum value that is not available in the current SDK version,
typewill returnConnectionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- 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.
-
- See Also:
-
-
typeAsString
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.
If the service returns an enum value that is not available in the current SDK version,
typewill returnConnectionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- 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.
-
- See Also:
-
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<ConnectionMapping.Builder,ConnectionMapping> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-