pub struct CreateLoadBalancer { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateLoadBalancer
.
Creates a Classic Load Balancer.
You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners
, ApplySecurityGroupsToLoadBalancer
, AttachLoadBalancerToSubnets
, and AddTags
.
To describe your current load balancers, see DescribeLoadBalancers
. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer
.
You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.
Implementations§
source§impl CreateLoadBalancer
impl CreateLoadBalancer
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateLoadBalancer, AwsResponseRetryClassifier>, SdkError<CreateLoadBalancerError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CreateLoadBalancer, AwsResponseRetryClassifier>, SdkError<CreateLoadBalancerError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CreateLoadBalancerOutput, SdkError<CreateLoadBalancerError>>
pub async fn send(
self
) -> Result<CreateLoadBalancerOutput, SdkError<CreateLoadBalancerError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
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.
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
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.
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
sourcepub fn listeners(self, input: Listener) -> Self
pub fn listeners(self, input: Listener) -> Self
Appends an item to Listeners
.
To override the contents of this collection use set_listeners
.
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
sourcepub fn set_listeners(self, input: Option<Vec<Listener>>) -> Self
pub fn set_listeners(self, input: Option<Vec<Listener>>) -> Self
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
sourcepub fn availability_zones(self, input: impl Into<String>) -> Self
pub fn availability_zones(self, input: impl Into<String>) -> Self
Appends an item to AvailabilityZones
.
To override the contents of this collection use set_availability_zones
.
One or more Availability Zones from the same region as the load balancer.
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer
.
sourcepub fn set_availability_zones(self, input: Option<Vec<String>>) -> Self
pub fn set_availability_zones(self, input: Option<Vec<String>>) -> Self
One or more Availability Zones from the same region as the load balancer.
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer
.
sourcepub fn subnets(self, input: impl Into<String>) -> Self
pub fn subnets(self, input: impl Into<String>) -> Self
Appends an item to Subnets
.
To override the contents of this collection use set_subnets
.
The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone specified in AvailabilityZones
.
sourcepub fn set_subnets(self, input: Option<Vec<String>>) -> Self
pub fn set_subnets(self, input: Option<Vec<String>>) -> Self
The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone specified in AvailabilityZones
.
sourcepub fn security_groups(self, input: impl Into<String>) -> Self
pub fn security_groups(self, input: impl Into<String>) -> Self
Appends an item to SecurityGroups
.
To override the contents of this collection use set_security_groups
.
The IDs of the security groups to assign to the load balancer.
sourcepub fn set_security_groups(self, input: Option<Vec<String>>) -> Self
pub fn set_security_groups(self, input: Option<Vec<String>>) -> Self
The IDs of the security groups to assign to the load balancer.
sourcepub fn scheme(self, input: impl Into<String>) -> Self
pub fn scheme(self, input: impl Into<String>) -> Self
The type of a load balancer. Valid only for load balancers in a VPC.
By default, Elastic Load Balancing creates an Internet-facing load balancer with a DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal
to create a load balancer with a DNS name that resolves to private IP addresses.
sourcepub fn set_scheme(self, input: Option<String>) -> Self
pub fn set_scheme(self, input: Option<String>) -> Self
The type of a load balancer. Valid only for load balancers in a VPC.
By default, Elastic Load Balancing creates an Internet-facing load balancer with a DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal
to create a load balancer with a DNS name that resolves to private IP addresses.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
Trait Implementations§
source§impl Clone for CreateLoadBalancer
impl Clone for CreateLoadBalancer
source§fn clone(&self) -> CreateLoadBalancer
fn clone(&self) -> CreateLoadBalancer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more