#[non_exhaustive]pub struct ConnectionMappingBuilder { /* private fields */ }Expand description
A builder for ConnectionMapping.
Implementations§
Source§impl ConnectionMappingBuilder
impl ConnectionMappingBuilder
Sourcepub fn connection_id(self, input: impl Into<String>) -> Self
pub fn connection_id(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_connection_id(self, input: Option<String>) -> Self
pub fn set_connection_id(self, input: Option<String>) -> Self
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.
Sourcepub fn get_connection_id(&self) -> &Option<String>
pub fn get_connection_id(&self) -> &Option<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.
Sourcepub fn ontology_mappings(self, input: OntologyMapping) -> Self
pub fn ontology_mappings(self, input: OntologyMapping) -> Self
Appends an item to ontology_mappings.
To override the contents of this collection use set_ontology_mappings.
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.
Sourcepub fn set_ontology_mappings(self, input: Option<Vec<OntologyMapping>>) -> Self
pub fn set_ontology_mappings(self, input: Option<Vec<OntologyMapping>>) -> Self
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.
Sourcepub fn get_ontology_mappings(&self) -> &Option<Vec<OntologyMapping>>
pub fn get_ontology_mappings(&self) -> &Option<Vec<OntologyMapping>>
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.
Sourcepub fn data_filter(self, input: DataFilter) -> Self
pub fn data_filter(self, input: DataFilter) -> Self
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.
Sourcepub fn set_data_filter(self, input: Option<DataFilter>) -> Self
pub fn set_data_filter(self, input: Option<DataFilter>) -> Self
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.
Sourcepub fn get_data_filter(&self) -> &Option<DataFilter>
pub fn get_data_filter(&self) -> &Option<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.
Sourcepub fn extraction_depth(self, input: impl Into<String>) -> Self
pub fn extraction_depth(self, input: impl Into<String>) -> Self
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
Sourcepub fn set_extraction_depth(self, input: Option<String>) -> Self
pub fn set_extraction_depth(self, input: Option<String>) -> Self
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
Sourcepub fn get_extraction_depth(&self) -> &Option<String>
pub fn get_extraction_depth(&self) -> &Option<String>
Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.
Sourcepub fn path_segments(self, input: PathSegment) -> Self
pub fn path_segments(self, input: PathSegment) -> Self
Appends an item to path_segments.
To override the contents of this collection use set_path_segments.
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.
Sourcepub fn set_path_segments(self, input: Option<Vec<PathSegment>>) -> Self
pub fn set_path_segments(self, input: Option<Vec<PathSegment>>) -> Self
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.
Sourcepub fn get_path_segments(&self) -> &Option<Vec<PathSegment>>
pub fn get_path_segments(&self) -> &Option<Vec<PathSegment>>
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.
Sourcepub fn type(self, input: ConnectionType) -> Self
pub fn type(self, input: ConnectionType) -> Self
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.
Sourcepub fn set_type(self, input: Option<ConnectionType>) -> Self
pub fn set_type(self, input: Option<ConnectionType>) -> Self
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.
Sourcepub fn get_type(&self) -> &Option<ConnectionType>
pub fn get_type(&self) -> &Option<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.
Sourcepub fn build(self) -> Result<ConnectionMapping, BuildError>
pub fn build(self) -> Result<ConnectionMapping, BuildError>
Consumes the builder and constructs a ConnectionMapping.
This method will fail if any of the following fields are not set:
Trait Implementations§
Source§impl Clone for ConnectionMappingBuilder
impl Clone for ConnectionMappingBuilder
Source§impl Debug for ConnectionMappingBuilder
impl Debug for ConnectionMappingBuilder
Source§impl Default for ConnectionMappingBuilder
impl Default for ConnectionMappingBuilder
Source§impl PartialEq for ConnectionMappingBuilder
impl PartialEq for ConnectionMappingBuilder
impl StructuralPartialEq for ConnectionMappingBuilder
Auto Trait Implementations§
impl Forget for ConnectionMappingBuilder
impl Freeze for ConnectionMappingBuilderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<OntologyMapping>: Freeze,
PhantomData<Filter>: Freeze,
PhantomData<PathSegment>: Freeze,
impl Move for ConnectionMappingBuilder
impl RefUnwindSafe for ConnectionMappingBuilder
impl Send for ConnectionMappingBuilderwhere
RawVecInner: Send,
impl Sync for ConnectionMappingBuilderwhere
RawVecInner: Sync,
impl Unpin for ConnectionMappingBuilder
impl UnsafeUnpin for ConnectionMappingBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<OntologyMapping>: UnsafeUnpin,
PhantomData<Filter>: UnsafeUnpin,
PhantomData<PathSegment>: UnsafeUnpin,
impl UnwindSafe for ConnectionMappingBuilderwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);