We recommend new projects start with resources from the AWS provider.
aws-native.lightsail.LoadBalancer
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::Lightsail::LoadBalancer
Create LoadBalancer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancer(resource_name: str,
args: LoadBalancerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LoadBalancer(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_port: Optional[int] = None,
attached_instances: Optional[Sequence[str]] = None,
health_check_path: Optional[str] = None,
ip_address_type: Optional[str] = None,
load_balancer_name: Optional[str] = None,
session_stickiness_enabled: Optional[bool] = None,
session_stickiness_lb_cookie_duration_seconds: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
tls_policy_name: Optional[str] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
public LoadBalancer(String name, LoadBalancerArgs args)
public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
type: aws-native:lightsail:LoadBalancer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
LoadBalancer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LoadBalancer resource accepts the following input properties:
- Instance
Port int - The instance port where you're creating your load balancer.
- Attached
Instances List<string> - The names of the instances attached to the load balancer.
- Health
Check stringPath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- Ip
Address stringType - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- Load
Balancer stringName - The name of your load balancer.
- Session
Stickiness boolEnabled - Configuration option to enable session stickiness.
- string
- Configuration option to adjust session stickiness cookie duration parameter.
- List<Pulumi.
Aws Native. Inputs. Tag> - An array of key-value pairs to apply to this resource.
- Tls
Policy stringName - The name of the TLS policy to apply to the load balancer.
- Instance
Port int - The instance port where you're creating your load balancer.
- Attached
Instances []string - The names of the instances attached to the load balancer.
- Health
Check stringPath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- Ip
Address stringType - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- Load
Balancer stringName - The name of your load balancer.
- Session
Stickiness boolEnabled - Configuration option to enable session stickiness.
- string
- Configuration option to adjust session stickiness cookie duration parameter.
- Tag
Args - An array of key-value pairs to apply to this resource.
- Tls
Policy stringName - The name of the TLS policy to apply to the load balancer.
- instance
Port Integer - The instance port where you're creating your load balancer.
- attached
Instances List<String> - The names of the instances attached to the load balancer.
- health
Check StringPath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- ip
Address StringType - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- load
Balancer StringName - The name of your load balancer.
- session
Stickiness BooleanEnabled - Configuration option to enable session stickiness.
- String
- Configuration option to adjust session stickiness cookie duration parameter.
- List<Tag>
- An array of key-value pairs to apply to this resource.
- tls
Policy StringName - The name of the TLS policy to apply to the load balancer.
- instance
Port number - The instance port where you're creating your load balancer.
- attached
Instances string[] - The names of the instances attached to the load balancer.
- health
Check stringPath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- ip
Address stringType - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- load
Balancer stringName - The name of your load balancer.
- session
Stickiness booleanEnabled - Configuration option to enable session stickiness.
- string
- Configuration option to adjust session stickiness cookie duration parameter.
- Tag[]
- An array of key-value pairs to apply to this resource.
- tls
Policy stringName - The name of the TLS policy to apply to the load balancer.
- instance_
port int - The instance port where you're creating your load balancer.
- attached_
instances Sequence[str] - The names of the instances attached to the load balancer.
- health_
check_ strpath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- ip_
address_ strtype - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- load_
balancer_ strname - The name of your load balancer.
- session_
stickiness_ boolenabled - Configuration option to enable session stickiness.
- str
- Configuration option to adjust session stickiness cookie duration parameter.
- Sequence[Tag
Args] - An array of key-value pairs to apply to this resource.
- tls_
policy_ strname - The name of the TLS policy to apply to the load balancer.
- instance
Port Number - The instance port where you're creating your load balancer.
- attached
Instances List<String> - The names of the instances attached to the load balancer.
- health
Check StringPath - The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
- ip
Address StringType - The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
- load
Balancer StringName - The name of your load balancer.
- session
Stickiness BooleanEnabled - Configuration option to enable session stickiness.
- String
- Configuration option to adjust session stickiness cookie duration parameter.
- List<Property Map>
- An array of key-value pairs to apply to this resource.
- tls
Policy StringName - The name of the TLS policy to apply to the load balancer.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringArn - The Amazon Resource Name (ARN) of the load balancer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringArn - The Amazon Resource Name (ARN) of the load balancer.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringArn - The Amazon Resource Name (ARN) of the load balancer.
- id string
- The provider-assigned unique ID for this managed resource.
- load
Balancer stringArn - The Amazon Resource Name (ARN) of the load balancer.
- id str
- The provider-assigned unique ID for this managed resource.
- load_
balancer_ strarn - The Amazon Resource Name (ARN) of the load balancer.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringArn - The Amazon Resource Name (ARN) of the load balancer.
Supporting Types
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.