#[non_exhaustive]pub struct ProtocolDetailsBuilder { /* private fields */ }
Expand description
A builder for ProtocolDetails
.
Implementations§
Source§impl ProtocolDetailsBuilder
impl ProtocolDetailsBuilder
Sourcepub fn passive_ip(self, input: impl Into<String>) -> Self
pub fn passive_ip(self, input: impl Into<String>) -> Self
Indicates passive mode, for FTP and FTPS protocols. Enter a single IPv4 address, such as the public IP address of a firewall, router, or load balancer. For example:
aws transfer update-server --protocol-details PassiveIp=0.0.0.0
Replace 0.0.0.0
in the example above with the actual IP address you want to use.
If you change the PassiveIp
value, you must stop and then restart your Transfer Family server for the change to take effect. For details on using passive mode (PASV) in a NAT environment, see Configuring your FTPS server behind a firewall or NAT with Transfer Family.
Special values
The AUTO
and 0.0.0.0
are special values for the PassiveIp
parameter. The value PassiveIp=AUTO
is assigned by default to FTP and FTPS type servers. In this case, the server automatically responds with one of the endpoint IPs within the PASV response. PassiveIp=0.0.0.0
has a more unique application for its usage. For example, if you have a High Availability (HA) Network Load Balancer (NLB) environment, where you have 3 subnets, you can only specify a single IP address using the PassiveIp
parameter. This reduces the effectiveness of having High Availability. In this case, you can specify PassiveIp=0.0.0.0
. This tells the client to use the same IP address as the Control connection and utilize all AZs for their connections. Note, however, that not all FTP clients support the PassiveIp=0.0.0.0
response. FileZilla and WinSCP do support it. If you are using other clients, check to see if your client supports the PassiveIp=0.0.0.0
response.
Sourcepub fn set_passive_ip(self, input: Option<String>) -> Self
pub fn set_passive_ip(self, input: Option<String>) -> Self
Indicates passive mode, for FTP and FTPS protocols. Enter a single IPv4 address, such as the public IP address of a firewall, router, or load balancer. For example:
aws transfer update-server --protocol-details PassiveIp=0.0.0.0
Replace 0.0.0.0
in the example above with the actual IP address you want to use.
If you change the PassiveIp
value, you must stop and then restart your Transfer Family server for the change to take effect. For details on using passive mode (PASV) in a NAT environment, see Configuring your FTPS server behind a firewall or NAT with Transfer Family.
Special values
The AUTO
and 0.0.0.0
are special values for the PassiveIp
parameter. The value PassiveIp=AUTO
is assigned by default to FTP and FTPS type servers. In this case, the server automatically responds with one of the endpoint IPs within the PASV response. PassiveIp=0.0.0.0
has a more unique application for its usage. For example, if you have a High Availability (HA) Network Load Balancer (NLB) environment, where you have 3 subnets, you can only specify a single IP address using the PassiveIp
parameter. This reduces the effectiveness of having High Availability. In this case, you can specify PassiveIp=0.0.0.0
. This tells the client to use the same IP address as the Control connection and utilize all AZs for their connections. Note, however, that not all FTP clients support the PassiveIp=0.0.0.0
response. FileZilla and WinSCP do support it. If you are using other clients, check to see if your client supports the PassiveIp=0.0.0.0
response.
Sourcepub fn get_passive_ip(&self) -> &Option<String>
pub fn get_passive_ip(&self) -> &Option<String>
Indicates passive mode, for FTP and FTPS protocols. Enter a single IPv4 address, such as the public IP address of a firewall, router, or load balancer. For example:
aws transfer update-server --protocol-details PassiveIp=0.0.0.0
Replace 0.0.0.0
in the example above with the actual IP address you want to use.
If you change the PassiveIp
value, you must stop and then restart your Transfer Family server for the change to take effect. For details on using passive mode (PASV) in a NAT environment, see Configuring your FTPS server behind a firewall or NAT with Transfer Family.
Special values
The AUTO
and 0.0.0.0
are special values for the PassiveIp
parameter. The value PassiveIp=AUTO
is assigned by default to FTP and FTPS type servers. In this case, the server automatically responds with one of the endpoint IPs within the PASV response. PassiveIp=0.0.0.0
has a more unique application for its usage. For example, if you have a High Availability (HA) Network Load Balancer (NLB) environment, where you have 3 subnets, you can only specify a single IP address using the PassiveIp
parameter. This reduces the effectiveness of having High Availability. In this case, you can specify PassiveIp=0.0.0.0
. This tells the client to use the same IP address as the Control connection and utilize all AZs for their connections. Note, however, that not all FTP clients support the PassiveIp=0.0.0.0
response. FileZilla and WinSCP do support it. If you are using other clients, check to see if your client supports the PassiveIp=0.0.0.0
response.
Sourcepub fn tls_session_resumption_mode(
self,
input: TlsSessionResumptionMode,
) -> Self
pub fn tls_session_resumption_mode( self, input: TlsSessionResumptionMode, ) -> Self
A property used with Transfer Family servers that use the FTPS protocol. TLS Session Resumption provides a mechanism to resume or share a negotiated secret key between the control and data connection for an FTPS session. TlsSessionResumptionMode
determines whether or not the server resumes recent, negotiated sessions through a unique session ID. This property is available during CreateServer
and UpdateServer
calls. If a TlsSessionResumptionMode
value is not specified during CreateServer
, it is set to ENFORCED
by default.
-
DISABLED
: the server does not process TLS session resumption client requests and creates a new TLS session for each request. -
ENABLED
: the server processes and accepts clients that are performing TLS session resumption. The server doesn't reject client data connections that do not perform the TLS session resumption client processing. -
ENFORCED
: the server processes and accepts clients that are performing TLS session resumption. The server rejects client data connections that do not perform the TLS session resumption client processing. Before you set the value toENFORCED
, test your clients.Not all FTPS clients perform TLS session resumption. So, if you choose to enforce TLS session resumption, you prevent any connections from FTPS clients that don't perform the protocol negotiation. To determine whether or not you can use the
ENFORCED
value, you need to test your clients.
Sourcepub fn set_tls_session_resumption_mode(
self,
input: Option<TlsSessionResumptionMode>,
) -> Self
pub fn set_tls_session_resumption_mode( self, input: Option<TlsSessionResumptionMode>, ) -> Self
A property used with Transfer Family servers that use the FTPS protocol. TLS Session Resumption provides a mechanism to resume or share a negotiated secret key between the control and data connection for an FTPS session. TlsSessionResumptionMode
determines whether or not the server resumes recent, negotiated sessions through a unique session ID. This property is available during CreateServer
and UpdateServer
calls. If a TlsSessionResumptionMode
value is not specified during CreateServer
, it is set to ENFORCED
by default.
-
DISABLED
: the server does not process TLS session resumption client requests and creates a new TLS session for each request. -
ENABLED
: the server processes and accepts clients that are performing TLS session resumption. The server doesn't reject client data connections that do not perform the TLS session resumption client processing. -
ENFORCED
: the server processes and accepts clients that are performing TLS session resumption. The server rejects client data connections that do not perform the TLS session resumption client processing. Before you set the value toENFORCED
, test your clients.Not all FTPS clients perform TLS session resumption. So, if you choose to enforce TLS session resumption, you prevent any connections from FTPS clients that don't perform the protocol negotiation. To determine whether or not you can use the
ENFORCED
value, you need to test your clients.
Sourcepub fn get_tls_session_resumption_mode(
&self,
) -> &Option<TlsSessionResumptionMode>
pub fn get_tls_session_resumption_mode( &self, ) -> &Option<TlsSessionResumptionMode>
A property used with Transfer Family servers that use the FTPS protocol. TLS Session Resumption provides a mechanism to resume or share a negotiated secret key between the control and data connection for an FTPS session. TlsSessionResumptionMode
determines whether or not the server resumes recent, negotiated sessions through a unique session ID. This property is available during CreateServer
and UpdateServer
calls. If a TlsSessionResumptionMode
value is not specified during CreateServer
, it is set to ENFORCED
by default.
-
DISABLED
: the server does not process TLS session resumption client requests and creates a new TLS session for each request. -
ENABLED
: the server processes and accepts clients that are performing TLS session resumption. The server doesn't reject client data connections that do not perform the TLS session resumption client processing. -
ENFORCED
: the server processes and accepts clients that are performing TLS session resumption. The server rejects client data connections that do not perform the TLS session resumption client processing. Before you set the value toENFORCED
, test your clients.Not all FTPS clients perform TLS session resumption. So, if you choose to enforce TLS session resumption, you prevent any connections from FTPS clients that don't perform the protocol negotiation. To determine whether or not you can use the
ENFORCED
value, you need to test your clients.
Sourcepub fn set_stat_option(self, input: SetStatOption) -> Self
pub fn set_stat_option(self, input: SetStatOption) -> Self
Use the SetStatOption
to ignore the error that is generated when the client attempts to use SETSTAT
on a file you are uploading to an S3 bucket.
Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as SETSTAT
when uploading the file. However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when the file is otherwise successfully uploaded.
Set the value to ENABLE_NO_OP
to have the Transfer Family server ignore the SETSTAT
command, and upload files without needing to make any changes to your SFTP client. While the SetStatOption
ENABLE_NO_OP
setting ignores the error, it does generate a log entry in Amazon CloudWatch Logs, so you can determine when the client is making a SETSTAT
call.
If you want to preserve the original timestamp for your file, and modify other file attributes using SETSTAT
, you can use Amazon EFS as backend storage with Transfer Family.
Sourcepub fn set_set_stat_option(self, input: Option<SetStatOption>) -> Self
pub fn set_set_stat_option(self, input: Option<SetStatOption>) -> Self
Use the SetStatOption
to ignore the error that is generated when the client attempts to use SETSTAT
on a file you are uploading to an S3 bucket.
Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as SETSTAT
when uploading the file. However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when the file is otherwise successfully uploaded.
Set the value to ENABLE_NO_OP
to have the Transfer Family server ignore the SETSTAT
command, and upload files without needing to make any changes to your SFTP client. While the SetStatOption
ENABLE_NO_OP
setting ignores the error, it does generate a log entry in Amazon CloudWatch Logs, so you can determine when the client is making a SETSTAT
call.
If you want to preserve the original timestamp for your file, and modify other file attributes using SETSTAT
, you can use Amazon EFS as backend storage with Transfer Family.
Sourcepub fn get_set_stat_option(&self) -> &Option<SetStatOption>
pub fn get_set_stat_option(&self) -> &Option<SetStatOption>
Use the SetStatOption
to ignore the error that is generated when the client attempts to use SETSTAT
on a file you are uploading to an S3 bucket.
Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as SETSTAT
when uploading the file. However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when the file is otherwise successfully uploaded.
Set the value to ENABLE_NO_OP
to have the Transfer Family server ignore the SETSTAT
command, and upload files without needing to make any changes to your SFTP client. While the SetStatOption
ENABLE_NO_OP
setting ignores the error, it does generate a log entry in Amazon CloudWatch Logs, so you can determine when the client is making a SETSTAT
call.
If you want to preserve the original timestamp for your file, and modify other file attributes using SETSTAT
, you can use Amazon EFS as backend storage with Transfer Family.
Sourcepub fn as2_transports(self, input: As2Transport) -> Self
pub fn as2_transports(self, input: As2Transport) -> Self
Appends an item to as2_transports
.
To override the contents of this collection use set_as2_transports
.
Indicates the transport method for the AS2 messages. Currently, only HTTP is supported.
Sourcepub fn set_as2_transports(self, input: Option<Vec<As2Transport>>) -> Self
pub fn set_as2_transports(self, input: Option<Vec<As2Transport>>) -> Self
Indicates the transport method for the AS2 messages. Currently, only HTTP is supported.
Sourcepub fn get_as2_transports(&self) -> &Option<Vec<As2Transport>>
pub fn get_as2_transports(&self) -> &Option<Vec<As2Transport>>
Indicates the transport method for the AS2 messages. Currently, only HTTP is supported.
Sourcepub fn build(self) -> ProtocolDetails
pub fn build(self) -> ProtocolDetails
Consumes the builder and constructs a ProtocolDetails
.
Trait Implementations§
Source§impl Clone for ProtocolDetailsBuilder
impl Clone for ProtocolDetailsBuilder
Source§fn clone(&self) -> ProtocolDetailsBuilder
fn clone(&self) -> ProtocolDetailsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProtocolDetailsBuilder
impl Debug for ProtocolDetailsBuilder
Source§impl Default for ProtocolDetailsBuilder
impl Default for ProtocolDetailsBuilder
Source§fn default() -> ProtocolDetailsBuilder
fn default() -> ProtocolDetailsBuilder
Source§impl PartialEq for ProtocolDetailsBuilder
impl PartialEq for ProtocolDetailsBuilder
impl StructuralPartialEq for ProtocolDetailsBuilder
Auto Trait Implementations§
impl Freeze for ProtocolDetailsBuilder
impl RefUnwindSafe for ProtocolDetailsBuilder
impl Send for ProtocolDetailsBuilder
impl Sync for ProtocolDetailsBuilder
impl Unpin for ProtocolDetailsBuilder
impl UnwindSafe for ProtocolDetailsBuilder
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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);