Struct aws_sdk_elasticloadbalancing::model::Listener
source · #[non_exhaustive]pub struct Listener { /* private fields */ }
Expand description
Information about a listener.
For information about the protocols and the ports supported by Elastic Load Balancing, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
Implementations§
source§impl Listener
impl Listener
sourcepub fn protocol(&self) -> Option<&str>
pub fn protocol(&self) -> Option<&str>
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
sourcepub fn load_balancer_port(&self) -> i32
pub fn load_balancer_port(&self) -> i32
The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
sourcepub fn instance_protocol(&self) -> Option<&str>
pub fn instance_protocol(&self) -> Option<&str>
The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.
If the front-end protocol is TCP or SSL, the back-end protocol must be TCP or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol must be HTTP or HTTPS.
If there is another listener with the same InstancePort
whose InstanceProtocol
is secure, (HTTPS or SSL), the listener's InstanceProtocol
must also be secure.
If there is another listener with the same InstancePort
whose InstanceProtocol
is HTTP or TCP, the listener's InstanceProtocol
must be HTTP or TCP.
sourcepub fn instance_port(&self) -> i32
pub fn instance_port(&self) -> i32
The port on which the instance is listening.
sourcepub fn ssl_certificate_id(&self) -> Option<&str>
pub fn ssl_certificate_id(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the server certificate.
source§impl Listener
impl Listener
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture Listener
.
Examples found in repository?
3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275
pub fn deser_structure_crate_model_listener(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Listener, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Listener::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Protocol") /* Protocol com.amazonaws.elasticloadbalancing#Listener$Protocol */ => {
let var_112 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_112);
}
,
s if s.matches("LoadBalancerPort") /* LoadBalancerPort com.amazonaws.elasticloadbalancing#Listener$LoadBalancerPort */ => {
let var_113 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.elasticloadbalancing#AccessPointPort`)"))
}
?
)
;
builder = builder.set_load_balancer_port(var_113);
}
,
s if s.matches("InstanceProtocol") /* InstanceProtocol com.amazonaws.elasticloadbalancing#Listener$InstanceProtocol */ => {
let var_114 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_protocol(var_114);
}
,
s if s.matches("InstancePort") /* InstancePort com.amazonaws.elasticloadbalancing#Listener$InstancePort */ => {
let var_115 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.elasticloadbalancing#InstancePort`)"))
}
?
)
;
builder = builder.set_instance_port(var_115);
}
,
s if s.matches("SSLCertificateId") /* SSLCertificateId com.amazonaws.elasticloadbalancing#Listener$SSLCertificateId */ => {
let var_116 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ssl_certificate_id(var_116);
}
,
_ => {}
}
}
Ok(builder.build())
}