#[non_exhaustive]pub struct PostgreSqlSettings {Show 25 fields
pub after_connect_script: Option<String>,
pub capture_ddls: Option<bool>,
pub max_file_size: Option<i32>,
pub database_name: Option<String>,
pub ddl_artifacts_schema: Option<String>,
pub execute_timeout: Option<i32>,
pub fail_tasks_on_lob_truncation: Option<bool>,
pub heartbeat_enable: Option<bool>,
pub heartbeat_schema: Option<String>,
pub heartbeat_frequency: Option<i32>,
pub password: Option<String>,
pub port: Option<i32>,
pub server_name: Option<String>,
pub username: Option<String>,
pub slot_name: Option<String>,
pub plugin_name: Option<PluginNameValue>,
pub secrets_manager_access_role_arn: Option<String>,
pub secrets_manager_secret_id: Option<String>,
pub trim_space_in_char: Option<bool>,
pub map_boolean_as_boolean: Option<bool>,
pub map_jsonb_as_clob: Option<bool>,
pub map_long_varchar_as: Option<LongVarcharMappingType>,
pub database_mode: Option<DatabaseMode>,
pub babelfish_database_name: Option<String>,
pub disable_unicode_source_filter: Option<bool>,
}
Expand description
Provides information that defines a PostgreSQL endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.after_connect_script: Option<String>
For use with change data capture (CDC) only, this attribute has DMS bypass foreign keys and user triggers to reduce the time it takes to bulk load data.
Example: afterConnectScript=SET session_replication_role='replica'
capture_ddls: Option<bool>
To capture DDL events, DMS creates various artifacts in the PostgreSQL database when the task starts. You can later remove these artifacts.
The default value is true
.
If this value is set to N
, you don't have to create tables or triggers on the source database.
max_file_size: Option<i32>
Specifies the maximum size (in KB) of any .csv file used to transfer data to PostgreSQL.
The default value is 32,768 KB (32 MB).
Example: maxFileSize=512
database_name: Option<String>
Database name for the endpoint.
ddl_artifacts_schema: Option<String>
The schema in which the operational DDL database artifacts are created.
The default value is public
.
Example: ddlArtifactsSchema=xyzddlschema;
execute_timeout: Option<i32>
Sets the client statement timeout for the PostgreSQL instance, in seconds. The default value is 60 seconds.
Example: executeTimeout=100;
fail_tasks_on_lob_truncation: Option<bool>
When set to true
, this value causes a task to fail if the actual size of a LOB column is greater than the specified LobMaxSize
.
The default value is false
.
If task is set to Limited LOB mode and this option is set to true, the task fails instead of truncating the LOB data.
heartbeat_enable: Option<bool>
The write-ahead log (WAL) heartbeat feature mimics a dummy transaction. By doing this, it prevents idle logical replication slots from holding onto old WAL logs, which can result in storage full situations on the source. This heartbeat keeps restart_lsn
moving and prevents storage full scenarios.
The default value is false
.
heartbeat_schema: Option<String>
Sets the schema in which the heartbeat artifacts are created.
The default value is public
.
heartbeat_frequency: Option<i32>
Sets the WAL heartbeat frequency (in minutes).
The default value is 5 minutes.
password: Option<String>
Endpoint connection password.
port: Option<i32>
Endpoint TCP port. The default is 5432.
server_name: Option<String>
The host name of the endpoint database.
For an Amazon RDS PostgreSQL instance, this is the output of DescribeDBInstances, in the Endpoint.Address
field.
For an Aurora PostgreSQL instance, this is the output of DescribeDBClusters, in the Endpoint
field.
username: Option<String>
Endpoint connection user name.
slot_name: Option<String>
Sets the name of a previously created logical replication slot for a change data capture (CDC) load of the PostgreSQL source instance.
When used with the CdcStartPosition
request parameter for the DMS API , this attribute also makes it possible to use native CDC start points. DMS verifies that the specified logical replication slot exists before starting the CDC load task. It also verifies that the task was created with a valid setting of CdcStartPosition
. If the specified slot doesn't exist or the task doesn't have a valid CdcStartPosition
setting, DMS raises an error.
For more information about setting the CdcStartPosition
request parameter, see Determining a CDC native start point in the Database Migration Service User Guide. For more information about using CdcStartPosition
, see CreateReplicationTask, StartReplicationTask, and ModifyReplicationTask.
plugin_name: Option<PluginNameValue>
Specifies the plugin to use to create a replication slot.
The default value is pglogical
.
secrets_manager_access_role_arn: Option<String>
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the PostgreSQL endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
secrets_manager_secret_id: Option<String>
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the PostgreSQL endpoint connection details.
trim_space_in_char: Option<bool>
Use the TrimSpaceInChar
source endpoint setting to trim data on CHAR and NCHAR data types during migration. The default value is true
.
map_boolean_as_boolean: Option<bool>
When true, lets PostgreSQL migrate the boolean type as boolean. By default, PostgreSQL migrates booleans as varchar(5)
. You must set this setting on both the source and target endpoints for it to take effect.
The default value is false
.
map_jsonb_as_clob: Option<bool>
When true, DMS migrates JSONB values as CLOB.
The default value is false
.
map_long_varchar_as: Option<LongVarcharMappingType>
Sets what datatype to map LONG values as.
The default value is wstring
.
database_mode: Option<DatabaseMode>
Specifies the default behavior of the replication's handling of PostgreSQL- compatible endpoints that require some additional configuration, such as Babelfish endpoints.
babelfish_database_name: Option<String>
The Babelfish for Aurora PostgreSQL database name for the endpoint.
disable_unicode_source_filter: Option<bool>
Disables the Unicode source filter with PostgreSQL, for values passed into the Selection rule filter on Source Endpoint column values. By default DMS performs source filter comparisons using a Unicode string which can cause look ups to ignore the indexes in the text columns and slow down migrations.
Unicode support should only be disabled when using a selection rule filter is on a text column in the Source database that is indexed.
Implementations§
Source§impl PostgreSqlSettings
impl PostgreSqlSettings
Sourcepub fn after_connect_script(&self) -> Option<&str>
pub fn after_connect_script(&self) -> Option<&str>
For use with change data capture (CDC) only, this attribute has DMS bypass foreign keys and user triggers to reduce the time it takes to bulk load data.
Example: afterConnectScript=SET session_replication_role='replica'
Sourcepub fn capture_ddls(&self) -> Option<bool>
pub fn capture_ddls(&self) -> Option<bool>
To capture DDL events, DMS creates various artifacts in the PostgreSQL database when the task starts. You can later remove these artifacts.
The default value is true
.
If this value is set to N
, you don't have to create tables or triggers on the source database.
Sourcepub fn max_file_size(&self) -> Option<i32>
pub fn max_file_size(&self) -> Option<i32>
Specifies the maximum size (in KB) of any .csv file used to transfer data to PostgreSQL.
The default value is 32,768 KB (32 MB).
Example: maxFileSize=512
Sourcepub fn database_name(&self) -> Option<&str>
pub fn database_name(&self) -> Option<&str>
Database name for the endpoint.
Sourcepub fn ddl_artifacts_schema(&self) -> Option<&str>
pub fn ddl_artifacts_schema(&self) -> Option<&str>
The schema in which the operational DDL database artifacts are created.
The default value is public
.
Example: ddlArtifactsSchema=xyzddlschema;
Sourcepub fn execute_timeout(&self) -> Option<i32>
pub fn execute_timeout(&self) -> Option<i32>
Sets the client statement timeout for the PostgreSQL instance, in seconds. The default value is 60 seconds.
Example: executeTimeout=100;
Sourcepub fn fail_tasks_on_lob_truncation(&self) -> Option<bool>
pub fn fail_tasks_on_lob_truncation(&self) -> Option<bool>
When set to true
, this value causes a task to fail if the actual size of a LOB column is greater than the specified LobMaxSize
.
The default value is false
.
If task is set to Limited LOB mode and this option is set to true, the task fails instead of truncating the LOB data.
Sourcepub fn heartbeat_enable(&self) -> Option<bool>
pub fn heartbeat_enable(&self) -> Option<bool>
The write-ahead log (WAL) heartbeat feature mimics a dummy transaction. By doing this, it prevents idle logical replication slots from holding onto old WAL logs, which can result in storage full situations on the source. This heartbeat keeps restart_lsn
moving and prevents storage full scenarios.
The default value is false
.
Sourcepub fn heartbeat_schema(&self) -> Option<&str>
pub fn heartbeat_schema(&self) -> Option<&str>
Sets the schema in which the heartbeat artifacts are created.
The default value is public
.
Sourcepub fn heartbeat_frequency(&self) -> Option<i32>
pub fn heartbeat_frequency(&self) -> Option<i32>
Sets the WAL heartbeat frequency (in minutes).
The default value is 5 minutes.
Sourcepub fn server_name(&self) -> Option<&str>
pub fn server_name(&self) -> Option<&str>
The host name of the endpoint database.
For an Amazon RDS PostgreSQL instance, this is the output of DescribeDBInstances, in the Endpoint.Address
field.
For an Aurora PostgreSQL instance, this is the output of DescribeDBClusters, in the Endpoint
field.
Sourcepub fn slot_name(&self) -> Option<&str>
pub fn slot_name(&self) -> Option<&str>
Sets the name of a previously created logical replication slot for a change data capture (CDC) load of the PostgreSQL source instance.
When used with the CdcStartPosition
request parameter for the DMS API , this attribute also makes it possible to use native CDC start points. DMS verifies that the specified logical replication slot exists before starting the CDC load task. It also verifies that the task was created with a valid setting of CdcStartPosition
. If the specified slot doesn't exist or the task doesn't have a valid CdcStartPosition
setting, DMS raises an error.
For more information about setting the CdcStartPosition
request parameter, see Determining a CDC native start point in the Database Migration Service User Guide. For more information about using CdcStartPosition
, see CreateReplicationTask, StartReplicationTask, and ModifyReplicationTask.
Sourcepub fn plugin_name(&self) -> Option<&PluginNameValue>
pub fn plugin_name(&self) -> Option<&PluginNameValue>
Specifies the plugin to use to create a replication slot.
The default value is pglogical
.
Sourcepub fn secrets_manager_access_role_arn(&self) -> Option<&str>
pub fn secrets_manager_access_role_arn(&self) -> Option<&str>
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the PostgreSQL endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
Sourcepub fn secrets_manager_secret_id(&self) -> Option<&str>
pub fn secrets_manager_secret_id(&self) -> Option<&str>
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the PostgreSQL endpoint connection details.
Sourcepub fn trim_space_in_char(&self) -> Option<bool>
pub fn trim_space_in_char(&self) -> Option<bool>
Use the TrimSpaceInChar
source endpoint setting to trim data on CHAR and NCHAR data types during migration. The default value is true
.
Sourcepub fn map_boolean_as_boolean(&self) -> Option<bool>
pub fn map_boolean_as_boolean(&self) -> Option<bool>
When true, lets PostgreSQL migrate the boolean type as boolean. By default, PostgreSQL migrates booleans as varchar(5)
. You must set this setting on both the source and target endpoints for it to take effect.
The default value is false
.
Sourcepub fn map_jsonb_as_clob(&self) -> Option<bool>
pub fn map_jsonb_as_clob(&self) -> Option<bool>
When true, DMS migrates JSONB values as CLOB.
The default value is false
.
Sourcepub fn map_long_varchar_as(&self) -> Option<&LongVarcharMappingType>
pub fn map_long_varchar_as(&self) -> Option<&LongVarcharMappingType>
Sets what datatype to map LONG values as.
The default value is wstring
.
Sourcepub fn database_mode(&self) -> Option<&DatabaseMode>
pub fn database_mode(&self) -> Option<&DatabaseMode>
Specifies the default behavior of the replication's handling of PostgreSQL- compatible endpoints that require some additional configuration, such as Babelfish endpoints.
Sourcepub fn babelfish_database_name(&self) -> Option<&str>
pub fn babelfish_database_name(&self) -> Option<&str>
The Babelfish for Aurora PostgreSQL database name for the endpoint.
Sourcepub fn disable_unicode_source_filter(&self) -> Option<bool>
pub fn disable_unicode_source_filter(&self) -> Option<bool>
Disables the Unicode source filter with PostgreSQL, for values passed into the Selection rule filter on Source Endpoint column values. By default DMS performs source filter comparisons using a Unicode string which can cause look ups to ignore the indexes in the text columns and slow down migrations.
Unicode support should only be disabled when using a selection rule filter is on a text column in the Source database that is indexed.
Source§impl PostgreSqlSettings
impl PostgreSqlSettings
Sourcepub fn builder() -> PostgreSqlSettingsBuilder
pub fn builder() -> PostgreSqlSettingsBuilder
Creates a new builder-style object to manufacture PostgreSqlSettings
.
Trait Implementations§
Source§impl Clone for PostgreSqlSettings
impl Clone for PostgreSqlSettings
Source§fn clone(&self) -> PostgreSqlSettings
fn clone(&self) -> PostgreSqlSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PostgreSqlSettings
impl Debug for PostgreSqlSettings
Source§impl PartialEq for PostgreSqlSettings
impl PartialEq for PostgreSqlSettings
impl StructuralPartialEq for PostgreSqlSettings
Auto Trait Implementations§
impl Freeze for PostgreSqlSettings
impl RefUnwindSafe for PostgreSqlSettings
impl Send for PostgreSqlSettings
impl Sync for PostgreSqlSettings
impl Unpin for PostgreSqlSettings
impl UnwindSafe for PostgreSqlSettings
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
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>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
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>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
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>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
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>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
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>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
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>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
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 underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
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>
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);