Struct aws_sdk_ecs::types::builders::LoadBalancerBuilder
source · #[non_exhaustive]pub struct LoadBalancerBuilder { /* private fields */ }
Expand description
A builder for LoadBalancer
.
Implementations§
source§impl LoadBalancerBuilder
impl LoadBalancerBuilder
sourcepub fn target_group_arn(self, input: impl Into<String>) -> Self
pub fn target_group_arn(self, input: impl Into<String>) -> Self
The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.
A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer.
For services using the ECS
deployment controller, you can specify one or multiple target groups. For more information, see Registering multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.
For services using the CODE_DEPLOY
deployment controller, you're required to define two target groups for the load balancer. For more information, see Blue/green deployment with CodeDeploy in the Amazon Elastic Container Service Developer Guide.
If your service's task definition uses the awsvpc
network mode, you must choose ip
as the target type, not instance
. Do this when creating your target groups because tasks that use the awsvpc
network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
sourcepub fn set_target_group_arn(self, input: Option<String>) -> Self
pub fn set_target_group_arn(self, input: Option<String>) -> Self
The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.
A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer.
For services using the ECS
deployment controller, you can specify one or multiple target groups. For more information, see Registering multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.
For services using the CODE_DEPLOY
deployment controller, you're required to define two target groups for the load balancer. For more information, see Blue/green deployment with CodeDeploy in the Amazon Elastic Container Service Developer Guide.
If your service's task definition uses the awsvpc
network mode, you must choose ip
as the target type, not instance
. Do this when creating your target groups because tasks that use the awsvpc
network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
sourcepub fn get_target_group_arn(&self) -> &Option<String>
pub fn get_target_group_arn(&self) -> &Option<String>
The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.
A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer.
For services using the ECS
deployment controller, you can specify one or multiple target groups. For more information, see Registering multiple target groups with a service in the Amazon Elastic Container Service Developer Guide.
For services using the CODE_DEPLOY
deployment controller, you're required to define two target groups for the load balancer. For more information, see Blue/green deployment with CodeDeploy in the Amazon Elastic Container Service Developer Guide.
If your service's task definition uses the awsvpc
network mode, you must choose ip
as the target type, not instance
. Do this when creating your target groups because tasks that use the awsvpc
network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
sourcepub fn load_balancer_name(self, input: impl Into<String>) -> Self
pub fn load_balancer_name(self, input: impl Into<String>) -> Self
The name of the load balancer to associate with the Amazon ECS service or task set.
If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
sourcepub fn set_load_balancer_name(self, input: Option<String>) -> Self
pub fn set_load_balancer_name(self, input: Option<String>) -> Self
The name of the load balancer to associate with the Amazon ECS service or task set.
If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
sourcepub fn get_load_balancer_name(&self) -> &Option<String>
pub fn get_load_balancer_name(&self) -> &Option<String>
The name of the load balancer to associate with the Amazon ECS service or task set.
If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
sourcepub fn container_name(self, input: impl Into<String>) -> Self
pub fn container_name(self, input: impl Into<String>) -> Self
The name of the container (as it appears in a container definition) to associate with the load balancer.
sourcepub fn set_container_name(self, input: Option<String>) -> Self
pub fn set_container_name(self, input: Option<String>) -> Self
The name of the container (as it appears in a container definition) to associate with the load balancer.
sourcepub fn get_container_name(&self) -> &Option<String>
pub fn get_container_name(&self) -> &Option<String>
The name of the container (as it appears in a container definition) to associate with the load balancer.
sourcepub fn container_port(self, input: i32) -> Self
pub fn container_port(self, input: i32) -> Self
The port on the container to associate with the load balancer. This port must correspond to a containerPort
in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the hostPort
of the port mapping.
sourcepub fn set_container_port(self, input: Option<i32>) -> Self
pub fn set_container_port(self, input: Option<i32>) -> Self
The port on the container to associate with the load balancer. This port must correspond to a containerPort
in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the hostPort
of the port mapping.
sourcepub fn get_container_port(&self) -> &Option<i32>
pub fn get_container_port(&self) -> &Option<i32>
The port on the container to associate with the load balancer. This port must correspond to a containerPort
in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the hostPort
of the port mapping.
sourcepub fn build(self) -> LoadBalancer
pub fn build(self) -> LoadBalancer
Consumes the builder and constructs a LoadBalancer
.
Trait Implementations§
source§impl Clone for LoadBalancerBuilder
impl Clone for LoadBalancerBuilder
source§fn clone(&self) -> LoadBalancerBuilder
fn clone(&self) -> LoadBalancerBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LoadBalancerBuilder
impl Debug for LoadBalancerBuilder
source§impl Default for LoadBalancerBuilder
impl Default for LoadBalancerBuilder
source§fn default() -> LoadBalancerBuilder
fn default() -> LoadBalancerBuilder
source§impl PartialEq for LoadBalancerBuilder
impl PartialEq for LoadBalancerBuilder
source§fn eq(&self, other: &LoadBalancerBuilder) -> bool
fn eq(&self, other: &LoadBalancerBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.