This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
elasticloadbalancing¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.
- class
pulumi_aws.elasticloadbalancing.AppCookieStickinessPolicy(resource_name, opts=None, cookie_name=None, lb_port=None, load_balancer=None, name=None, __props__=None, __name__=None, __opts__=None)¶ Provides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie’s expiration to a cookie generated by your application.
import pulumi import pulumi_aws as aws lb = aws.elb.LoadBalancer("lb", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 8000, "instanceProtocol": "http", "lb_port": 80, "lbProtocol": "http", }]) foo = aws.elb.AppCookieStickinessPolicy("foo", cookie_name="MyAppCookie", lb_port=80, load_balancer=lb.name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cookie_name (pulumi.Input[str]) – The application cookie whose lifetime the ELB’s cookie should follow.
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The name of load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the stickiness policy.
The application cookie whose lifetime the ELB’s cookie should follow.
lb_port: pulumi.Output[float] = None¶The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer: pulumi.Output[str] = None¶The name of load balancer to which the policy should be attached.
name: pulumi.Output[str] = None¶The name of the stickiness policy.
- static
get(resource_name, id, opts=None, cookie_name=None, lb_port=None, load_balancer=None, name=None)¶ Get an existing AppCookieStickinessPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cookie_name (pulumi.Input[str]) – The application cookie whose lifetime the ELB’s cookie should follow.
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The name of load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the stickiness policy.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.Attachment(resource_name, opts=None, elb=None, instance=None, __props__=None, __name__=None, __opts__=None)¶ Attaches an EC2 instance to an Elastic Load Balancer (ELB). For attaching resources with Application Load Balancer (ALB) or Network Load Balancer (NLB), see the
lb.TargetGroupAttachmentresource.NOTE on ELB Instances and ELB Attachments: This provider currently provides both a standalone ELB Attachment resource (describing an instance attached to an ELB), and an Elastic Load Balancer resource with
instancesdefined in-line. At this time you cannot use an ELB with in-line instances in conjunction with an ELB Attachment resource. Doing so will cause a conflict and will overwrite attachments.import pulumi import pulumi_aws as aws # Create a new load balancer attachment baz = aws.elb.Attachment("baz", elb=aws_elb["bar"]["id"], instance=aws_instance["foo"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
elb (pulumi.Input[str]) – The name of the ELB.
instance (pulumi.Input[str]) – Instance ID to place in the ELB pool.
elb: pulumi.Output[str] = None¶The name of the ELB.
instance: pulumi.Output[str] = None¶Instance ID to place in the ELB pool.
- static
get(resource_name, id, opts=None, elb=None, instance=None)¶ Get an existing Attachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
elb (pulumi.Input[str]) – The name of the ELB.
instance (pulumi.Input[str]) – Instance ID to place in the ELB pool.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.AwaitableGetHostedZoneIdResult(id=None, region=None)¶
- class
pulumi_aws.elasticloadbalancing.AwaitableGetLoadBalancerResult(access_logs=None, arn=None, availability_zones=None, connection_draining=None, connection_draining_timeout=None, cross_zone_load_balancing=None, dns_name=None, health_check=None, id=None, idle_timeout=None, instances=None, internal=None, listeners=None, name=None, security_groups=None, source_security_group=None, source_security_group_id=None, subnets=None, tags=None, zone_id=None)¶
- class
pulumi_aws.elasticloadbalancing.AwaitableGetServiceAccountResult(arn=None, id=None, region=None)¶
- class
pulumi_aws.elasticloadbalancing.GetHostedZoneIdResult(id=None, region=None)¶ A collection of values returned by getHostedZoneId.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_aws.elasticloadbalancing.GetLoadBalancerResult(access_logs=None, arn=None, availability_zones=None, connection_draining=None, connection_draining_timeout=None, cross_zone_load_balancing=None, dns_name=None, health_check=None, id=None, idle_timeout=None, instances=None, internal=None, listeners=None, name=None, security_groups=None, source_security_group=None, source_security_group_id=None, subnets=None, tags=None, zone_id=None)¶ A collection of values returned by getLoadBalancer.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_aws.elasticloadbalancing.GetServiceAccountResult(arn=None, id=None, region=None)¶ A collection of values returned by getServiceAccount.
arn= None¶The ARN of the AWS ELB service account in the selected region.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_aws.elasticloadbalancing.ListenerPolicy(resource_name, opts=None, load_balancer_name=None, load_balancer_port=None, policy_names=None, __props__=None, __name__=None, __opts__=None)¶ Attaches a load balancer policy to an ELB Listener.
import pulumi import pulumi_aws as aws wu_tang = aws.elb.LoadBalancer("wu-tang", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 443, "instanceProtocol": "http", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net", }], tags={ "Name": "wu-tang", }) wu_tang_ssl = aws.elb.LoadBalancerPolicy("wu-tang-ssl", load_balancer_name=wu_tang.name, policy_attributes=[ { "name": "ECDHE-ECDSA-AES128-GCM-SHA256", "value": "true", }, { "name": "Protocol-TLSv1.2", "value": "true", }, ], policy_name="wu-tang-ssl", policy_type_name="SSLNegotiationPolicyType") wu_tang_listener_policies_443 = aws.elb.ListenerPolicy("wu-tang-listener-policies-443", load_balancer_name=wu_tang.name, load_balancer_port=443, policy_names=[wu_tang_ssl.policy_name])
import pulumi import pulumi_aws as aws wu_tang = aws.elb.LoadBalancer("wu-tang", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 443, "instanceProtocol": "http", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net", }], tags={ "Name": "wu-tang", }) wu_tang_ssl_tls_1_1 = aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "Reference-Security-Policy", "value": "ELBSecurityPolicy-TLS-1-1-2017-01", }], policy_name="wu-tang-ssl", policy_type_name="SSLNegotiationPolicyType") wu_tang_listener_policies_443 = aws.elb.ListenerPolicy("wu-tang-listener-policies-443", load_balancer_name=wu_tang.name, load_balancer_port=443, policy_names=[wu_tang_ssl_tls_1_1.policy_name])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
load_balancer_name (pulumi.Input[str]) – The load balancer to attach the policy to.
load_balancer_port (pulumi.Input[float]) – The load balancer listener port to apply the policy to.
policy_names (pulumi.Input[list]) – List of Policy Names to apply to the backend server.
load_balancer_name: pulumi.Output[str] = None¶The load balancer to attach the policy to.
load_balancer_port: pulumi.Output[float] = None¶The load balancer listener port to apply the policy to.
policy_names: pulumi.Output[list] = None¶List of Policy Names to apply to the backend server.
- static
get(resource_name, id, opts=None, load_balancer_name=None, load_balancer_port=None, policy_names=None)¶ Get an existing ListenerPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
load_balancer_name (pulumi.Input[str]) – The load balancer to attach the policy to.
load_balancer_port (pulumi.Input[float]) – The load balancer listener port to apply the policy to.
policy_names (pulumi.Input[list]) – List of Policy Names to apply to the backend server.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.LoadBalancer(resource_name, opts=None, access_logs=None, availability_zones=None, connection_draining=None, connection_draining_timeout=None, cross_zone_load_balancing=None, health_check=None, idle_timeout=None, instances=None, internal=None, listeners=None, name=None, name_prefix=None, security_groups=None, source_security_group=None, subnets=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Elastic Load Balancer resource, also known as a “Classic Load Balancer” after the release of
Application/Network Load Balancers.NOTE on ELB Instances and ELB Attachments: This provider currently provides both a standalone ELB Attachment resource (describing an instance attached to an ELB), and an ELB resource with
instancesdefined in-line. At this time you cannot use an ELB with in-line instances in conjunction with a ELB Attachment resources. Doing so will cause a conflict and will overwrite attachments.import pulumi import pulumi_aws as aws # Create a new load balancer bar = aws.elb.LoadBalancer("bar", access_logs={ "bucket": "foo", "bucket_prefix": "bar", "interval": 60, }, availability_zones=[ "us-west-2a", "us-west-2b", "us-west-2c", ], connection_draining=True, connection_draining_timeout=400, cross_zone_load_balancing=True, health_check={ "healthyThreshold": 2, "interval": 30, "target": "HTTP:8000/", "timeout": 3, "unhealthyThreshold": 2, }, idle_timeout=400, instances=[aws_instance["foo"]["id"]], listeners=[ { "instance_port": 8000, "instanceProtocol": "http", "lb_port": 80, "lbProtocol": "http", }, { "instance_port": 8000, "instanceProtocol": "http", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::123456789012:server-certificate/certName", }, ], tags={ "Name": "foobar-elb", })
If the ARN of the
ssl_certificate_idthat is pointed to references a certificate that was signed by an ECDSA key, note that ELB only supports the P256 and P384 curves. Using a certificate signed by a key using a different curve could produce the errorERR_SSL_VERSION_OR_CIPHER_MISMATCHin your browser.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
access_logs (pulumi.Input[dict]) – An Access Logs block. Access Logs documented below.
availability_zones (pulumi.Input[list]) – The AZ’s to serve traffic in.
connection_draining (pulumi.Input[bool]) – Boolean to enable connection draining. Default:
falseconnection_draining_timeout (pulumi.Input[float]) – The time in seconds to allow for connections to drain. Default:
300cross_zone_load_balancing (pulumi.Input[bool]) – Enable cross-zone load balancing. Default:
truehealth_check (pulumi.Input[dict]) – A health_check block. Health Check documented below.
idle_timeout (pulumi.Input[float]) – The time in seconds that the connection is allowed to be idle. Default:
60instances (pulumi.Input[list]) – A list of instance ids to place in the ELB pool.
internal (pulumi.Input[bool]) – If true, ELB will be an internal ELB.
listeners (pulumi.Input[list]) – A list of listener blocks. Listeners documented below.
name (pulumi.Input[str]) – The name of the ELB. By default generated by this provider.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.security_groups (pulumi.Input[list]) – A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
source_security_group (pulumi.Input[str]) – The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
subnets (pulumi.Input[list]) – A list of subnet IDs to attach to the ELB.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
The access_logs object supports the following:
bucket(pulumi.Input[str]) - The S3 bucket name to store the logs in.bucket_prefix(pulumi.Input[str]) - The S3 bucket prefix. Logs are stored in the root if not configured.enabled(pulumi.Input[bool]) - Boolean to enable / disableaccess_logs. Default istrueinterval(pulumi.Input[float]) - The publishing interval in minutes. Default: 60 minutes.
The health_check object supports the following:
healthyThreshold(pulumi.Input[float]) - The number of checks before the instance is declared healthy.interval(pulumi.Input[float]) - The interval between checks.target(pulumi.Input[str]) - The target of the check. Valid pattern is “${PROTOCOL}:${PORT}${PATH}”, where PROTOCOL values are:HTTP,HTTPS- PORT and PATH are requiredTCP,SSL- PORT is required, PATH is not supported
timeout(pulumi.Input[float]) - The length of time before the check times out.unhealthyThreshold(pulumi.Input[float]) - The number of checks before the instance is declared unhealthy.
The listeners object supports the following:
instance_port(pulumi.Input[float]) - The port on the instance to route toinstanceProtocol(pulumi.Input[str]) - The protocol to use to the instance. Valid values areHTTP,HTTPS,TCP, orSSLlb_port(pulumi.Input[float]) - The port to listen on for the load balancerlbProtocol(pulumi.Input[str]) - The protocol to listen on. Valid values areHTTP,HTTPS,TCP, orSSLsslCertificateId(pulumi.Input[str]) - The ARN of an SSL certificate you have uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when ``lb_protocol`` is either HTTPS or SSL
access_logs: pulumi.Output[dict] = None¶An Access Logs block. Access Logs documented below.
bucket(str) - The S3 bucket name to store the logs in.bucket_prefix(str) - The S3 bucket prefix. Logs are stored in the root if not configured.enabled(bool) - Boolean to enable / disableaccess_logs. Default istrueinterval(float) - The publishing interval in minutes. Default: 60 minutes.
arn: pulumi.Output[str] = None¶The ARN of the ELB
availability_zones: pulumi.Output[list] = None¶The AZ’s to serve traffic in.
connection_draining: pulumi.Output[bool] = None¶Boolean to enable connection draining. Default:
false
connection_draining_timeout: pulumi.Output[float] = None¶The time in seconds to allow for connections to drain. Default:
300
cross_zone_load_balancing: pulumi.Output[bool] = None¶Enable cross-zone load balancing. Default:
true
dns_name: pulumi.Output[str] = None¶The DNS name of the ELB
health_check: pulumi.Output[dict] = None¶A health_check block. Health Check documented below.
healthyThreshold(float) - The number of checks before the instance is declared healthy.interval(float) - The interval between checks.target(str) - The target of the check. Valid pattern is “${PROTOCOL}:${PORT}${PATH}”, where PROTOCOL values are:HTTP,HTTPS- PORT and PATH are requiredTCP,SSL- PORT is required, PATH is not supported
timeout(float) - The length of time before the check times out.unhealthyThreshold(float) - The number of checks before the instance is declared unhealthy.
idle_timeout: pulumi.Output[float] = None¶The time in seconds that the connection is allowed to be idle. Default:
60
instances: pulumi.Output[list] = None¶A list of instance ids to place in the ELB pool.
internal: pulumi.Output[bool] = None¶If true, ELB will be an internal ELB.
listeners: pulumi.Output[list] = None¶A list of listener blocks. Listeners documented below.
instance_port(float) - The port on the instance to route toinstanceProtocol(str) - The protocol to use to the instance. Valid values areHTTP,HTTPS,TCP, orSSLlb_port(float) - The port to listen on for the load balancerlbProtocol(str) - The protocol to listen on. Valid values areHTTP,HTTPS,TCP, orSSLsslCertificateId(str) - The ARN of an SSL certificate you have uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when ``lb_protocol`` is either HTTPS or SSL
name: pulumi.Output[str] = None¶The name of the ELB. By default generated by this provider.
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
security_groups: pulumi.Output[list] = None¶A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
source_security_group: pulumi.Output[str] = None¶The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
source_security_group_id: pulumi.Output[str] = None¶The ID of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Only available on ELBs launched in a VPC.
subnets: pulumi.Output[list] = None¶A list of subnet IDs to attach to the ELB.
A map of tags to assign to the resource.
zone_id: pulumi.Output[str] = None¶The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
- static
get(resource_name, id, opts=None, access_logs=None, arn=None, availability_zones=None, connection_draining=None, connection_draining_timeout=None, cross_zone_load_balancing=None, dns_name=None, health_check=None, idle_timeout=None, instances=None, internal=None, listeners=None, name=None, name_prefix=None, security_groups=None, source_security_group=None, source_security_group_id=None, subnets=None, tags=None, zone_id=None)¶ Get an existing LoadBalancer resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
access_logs (pulumi.Input[dict]) – An Access Logs block. Access Logs documented below.
arn (pulumi.Input[str]) – The ARN of the ELB
availability_zones (pulumi.Input[list]) – The AZ’s to serve traffic in.
connection_draining (pulumi.Input[bool]) – Boolean to enable connection draining. Default:
falseconnection_draining_timeout (pulumi.Input[float]) – The time in seconds to allow for connections to drain. Default:
300cross_zone_load_balancing (pulumi.Input[bool]) – Enable cross-zone load balancing. Default:
truedns_name (pulumi.Input[str]) – The DNS name of the ELB
health_check (pulumi.Input[dict]) – A health_check block. Health Check documented below.
idle_timeout (pulumi.Input[float]) – The time in seconds that the connection is allowed to be idle. Default:
60instances (pulumi.Input[list]) – A list of instance ids to place in the ELB pool.
internal (pulumi.Input[bool]) – If true, ELB will be an internal ELB.
listeners (pulumi.Input[list]) – A list of listener blocks. Listeners documented below.
name (pulumi.Input[str]) – The name of the ELB. By default generated by this provider.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.security_groups (pulumi.Input[list]) – A list of security group IDs to assign to the ELB. Only valid if creating an ELB within a VPC
source_security_group (pulumi.Input[str]) – The name of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Use this for Classic or Default VPC only.
source_security_group_id (pulumi.Input[str]) – The ID of the security group that you can use as part of your inbound rules for your load balancer’s back-end application instances. Only available on ELBs launched in a VPC.
subnets (pulumi.Input[list]) – A list of subnet IDs to attach to the ELB.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
zone_id (pulumi.Input[str]) – The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)
The access_logs object supports the following:
bucket(pulumi.Input[str]) - The S3 bucket name to store the logs in.bucket_prefix(pulumi.Input[str]) - The S3 bucket prefix. Logs are stored in the root if not configured.enabled(pulumi.Input[bool]) - Boolean to enable / disableaccess_logs. Default istrueinterval(pulumi.Input[float]) - The publishing interval in minutes. Default: 60 minutes.
The health_check object supports the following:
healthyThreshold(pulumi.Input[float]) - The number of checks before the instance is declared healthy.interval(pulumi.Input[float]) - The interval between checks.target(pulumi.Input[str]) - The target of the check. Valid pattern is “${PROTOCOL}:${PORT}${PATH}”, where PROTOCOL values are:HTTP,HTTPS- PORT and PATH are requiredTCP,SSL- PORT is required, PATH is not supported
timeout(pulumi.Input[float]) - The length of time before the check times out.unhealthyThreshold(pulumi.Input[float]) - The number of checks before the instance is declared unhealthy.
The listeners object supports the following:
instance_port(pulumi.Input[float]) - The port on the instance to route toinstanceProtocol(pulumi.Input[str]) - The protocol to use to the instance. Valid values areHTTP,HTTPS,TCP, orSSLlb_port(pulumi.Input[float]) - The port to listen on for the load balancerlbProtocol(pulumi.Input[str]) - The protocol to listen on. Valid values areHTTP,HTTPS,TCP, orSSLsslCertificateId(pulumi.Input[str]) - The ARN of an SSL certificate you have uploaded to AWS IAM. Note ECDSA-specific restrictions below. Only valid when ``lb_protocol`` is either HTTPS or SSL
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.LoadBalancerBackendServerPolicy(resource_name, opts=None, instance_port=None, load_balancer_name=None, policy_names=None, __props__=None, __name__=None, __opts__=None)¶ Attaches a load balancer policy to an ELB backend server.
import pulumi import pulumi_aws as aws wu_tang = aws.elb.LoadBalancer("wu-tang", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 443, "instanceProtocol": "http", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net", }], tags={ "Name": "wu-tang", }) wu_tang_ca_pubkey_policy = aws.elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "PublicKey", "value": (lambda path: open(path).read())("wu-tang-pubkey"), }], policy_name="wu-tang-ca-pubkey-policy", policy_type_name="PublicKeyPolicyType") wu_tang_root_ca_backend_auth_policy = aws.elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "PublicKeyPolicyName", "value": aws_load_balancer_policy["wu-tang-root-ca-pubkey-policy"]["policy_name"], }], policy_name="wu-tang-root-ca-backend-auth-policy", policy_type_name="BackendServerAuthenticationPolicyType") wu_tang_backend_auth_policies_443 = aws.elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", instance_port=443, load_balancer_name=wu_tang.name, policy_names=[wu_tang_root_ca_backend_auth_policy.policy_name])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance_port (pulumi.Input[float]) – The instance port to apply the policy to.
load_balancer_name (pulumi.Input[str]) – The load balancer to attach the policy to.
policy_names (pulumi.Input[list]) – List of Policy Names to apply to the backend server.
instance_port: pulumi.Output[float] = None¶The instance port to apply the policy to.
load_balancer_name: pulumi.Output[str] = None¶The load balancer to attach the policy to.
policy_names: pulumi.Output[list] = None¶List of Policy Names to apply to the backend server.
- static
get(resource_name, id, opts=None, instance_port=None, load_balancer_name=None, policy_names=None)¶ Get an existing LoadBalancerBackendServerPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
instance_port (pulumi.Input[float]) – The instance port to apply the policy to.
load_balancer_name (pulumi.Input[str]) – The load balancer to attach the policy to.
policy_names (pulumi.Input[list]) – List of Policy Names to apply to the backend server.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.LoadBalancerCookieStickinessPolicy(resource_name, opts=None, cookie_expiration_period=None, lb_port=None, load_balancer=None, name=None, __props__=None, __name__=None, __opts__=None)¶ Provides a load balancer cookie stickiness policy, which allows an ELB to control the sticky session lifetime of the browser.
import pulumi import pulumi_aws as aws lb = aws.elb.LoadBalancer("lb", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 8000, "instanceProtocol": "http", "lb_port": 80, "lbProtocol": "http", }]) foo = aws.elb.LoadBalancerCookieStickinessPolicy("foo", cookie_expiration_period=600, lb_port=80, load_balancer=lb.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cookie_expiration_period (pulumi.Input[float]) – The time period after which the session cookie should be considered stale, expressed in seconds.
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the stickiness policy.
The time period after which the session cookie should be considered stale, expressed in seconds.
lb_port: pulumi.Output[float] = None¶The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer: pulumi.Output[str] = None¶The load balancer to which the policy should be attached.
name: pulumi.Output[str] = None¶The name of the stickiness policy.
- static
get(resource_name, id, opts=None, cookie_expiration_period=None, lb_port=None, load_balancer=None, name=None)¶ Get an existing LoadBalancerCookieStickinessPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cookie_expiration_period (pulumi.Input[float]) – The time period after which the session cookie should be considered stale, expressed in seconds.
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the stickiness policy.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.LoadBalancerPolicy(resource_name, opts=None, load_balancer_name=None, policy_attributes=None, policy_name=None, policy_type_name=None, __props__=None, __name__=None, __opts__=None)¶ Provides a load balancer policy, which can be attached to an ELB listener or backend server.
import pulumi import pulumi_aws as aws wu_tang = aws.elb.LoadBalancer("wu-tang", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 443, "instanceProtocol": "http", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net", }], tags={ "Name": "wu-tang", }) wu_tang_ca_pubkey_policy = aws.elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "PublicKey", "value": (lambda path: open(path).read())("wu-tang-pubkey"), }], policy_name="wu-tang-ca-pubkey-policy", policy_type_name="PublicKeyPolicyType") wu_tang_root_ca_backend_auth_policy = aws.elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "PublicKeyPolicyName", "value": aws_load_balancer_policy["wu-tang-root-ca-pubkey-policy"]["policy_name"], }], policy_name="wu-tang-root-ca-backend-auth-policy", policy_type_name="BackendServerAuthenticationPolicyType") wu_tang_ssl = aws.elb.LoadBalancerPolicy("wu-tang-ssl", load_balancer_name=wu_tang.name, policy_attributes=[ { "name": "ECDHE-ECDSA-AES128-GCM-SHA256", "value": "true", }, { "name": "Protocol-TLSv1.2", "value": "true", }, ], policy_name="wu-tang-ssl", policy_type_name="SSLNegotiationPolicyType") wu_tang_ssl_tls_1_1 = aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", load_balancer_name=wu_tang.name, policy_attributes=[{ "name": "Reference-Security-Policy", "value": "ELBSecurityPolicy-TLS-1-1-2017-01", }], policy_name="wu-tang-ssl", policy_type_name="SSLNegotiationPolicyType") wu_tang_backend_auth_policies_443 = aws.elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", instance_port=443, load_balancer_name=wu_tang.name, policy_names=[wu_tang_root_ca_backend_auth_policy.policy_name]) wu_tang_listener_policies_443 = aws.elb.ListenerPolicy("wu-tang-listener-policies-443", load_balancer_name=wu_tang.name, load_balancer_port=443, policy_names=[wu_tang_ssl.policy_name])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
load_balancer_name (pulumi.Input[str]) – The load balancer on which the policy is defined.
policy_attributes (pulumi.Input[list]) – Policy attribute to apply to the policy.
policy_name (pulumi.Input[str]) – The name of the load balancer policy.
policy_type_name (pulumi.Input[str]) – The policy type.
The policy_attributes object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
load_balancer_name: pulumi.Output[str] = None¶The load balancer on which the policy is defined.
policy_attributes: pulumi.Output[list] = None¶Policy attribute to apply to the policy.
name(str)value(str)
policy_name: pulumi.Output[str] = None¶The name of the load balancer policy.
policy_type_name: pulumi.Output[str] = None¶The policy type.
- static
get(resource_name, id, opts=None, load_balancer_name=None, policy_attributes=None, policy_name=None, policy_type_name=None)¶ Get an existing LoadBalancerPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
load_balancer_name (pulumi.Input[str]) – The load balancer on which the policy is defined.
policy_attributes (pulumi.Input[list]) – Policy attribute to apply to the policy.
policy_name (pulumi.Input[str]) – The name of the load balancer policy.
policy_type_name (pulumi.Input[str]) – The policy type.
The policy_attributes object supports the following:
name(pulumi.Input[str])value(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_aws.elasticloadbalancing.SslNegotiationPolicy(resource_name, opts=None, attributes=None, lb_port=None, load_balancer=None, name=None, __props__=None, __name__=None, __opts__=None)¶ Provides a load balancer SSL negotiation policy, which allows an ELB to control the ciphers and protocols that are supported during SSL negotiations between a client and a load balancer.
import pulumi import pulumi_aws as aws lb = aws.elb.LoadBalancer("lb", availability_zones=["us-east-1a"], listeners=[{ "instance_port": 8000, "instanceProtocol": "https", "lb_port": 443, "lbProtocol": "https", "sslCertificateId": "arn:aws:iam::123456789012:server-certificate/certName", }]) foo = aws.elb.SslNegotiationPolicy("foo", attributes=[ { "name": "Protocol-TLSv1", "value": "false", }, { "name": "Protocol-TLSv1.1", "value": "false", }, { "name": "Protocol-TLSv1.2", "value": "true", }, { "name": "Server-Defined-Cipher-Order", "value": "true", }, { "name": "ECDHE-RSA-AES128-GCM-SHA256", "value": "true", }, { "name": "AES128-GCM-SHA256", "value": "true", }, { "name": "EDH-RSA-DES-CBC3-SHA", "value": "false", }, ], lb_port=443, load_balancer=lb.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
attributes (pulumi.Input[list]) – An SSL Negotiation policy attribute. Each has two properties:
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the attribute
The attributes object supports the following:
name(pulumi.Input[str]) - The name of the attributevalue(pulumi.Input[str]) - The value of the attribute
attributes: pulumi.Output[list] = None¶An SSL Negotiation policy attribute. Each has two properties:
name(str) - The name of the attributevalue(str) - The value of the attribute
lb_port: pulumi.Output[float] = None¶The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer: pulumi.Output[str] = None¶The load balancer to which the policy should be attached.
name: pulumi.Output[str] = None¶The name of the attribute
- static
get(resource_name, id, opts=None, attributes=None, lb_port=None, load_balancer=None, name=None)¶ Get an existing SslNegotiationPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
attributes (pulumi.Input[list]) – An SSL Negotiation policy attribute. Each has two properties:
lb_port (pulumi.Input[float]) – The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.
name (pulumi.Input[str]) – The name of the attribute
The attributes object supports the following:
name(pulumi.Input[str]) - The name of the attributevalue(pulumi.Input[str]) - The value of the attribute
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_aws.elasticloadbalancing.get_hosted_zone_id(region=None, opts=None)¶Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
import pulumi import pulumi_aws as aws main = aws.elb.get_hosted_zone_id() www = aws.route53.Record("www", aliases=[{ "evaluateTargetHealth": True, "name": aws_elb["main"]["dns_name"], "zone_id": main.id, }], name="example.com", type="A", zone_id=aws_route53_zone["primary"]["zone_id"])
- Parameters
region (str) – Name of the region whose AWS ELB HostedZoneId is desired. Defaults to the region from the AWS provider configuration.
pulumi_aws.elasticloadbalancing.get_load_balancer(name=None, tags=None, opts=None)¶Provides information about a “classic” Elastic Load Balancer (ELB). See
LBData Source if you are looking for “v2” Application Load Balancer (ALB) or Network Load Balancer (NLB).This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc.
import pulumi import pulumi_aws as aws config = pulumi.Config() lb_name = config.get("lbName") if lb_name is None: lb_name = "" test = aws.elb.get_load_balancer(name=lb_name)
- Parameters
name (str) – The unique name of the load balancer.
pulumi_aws.elasticloadbalancing.get_service_account(region=None, opts=None)¶Use this data source to get the Account ID of the AWS Elastic Load Balancing Service Account in a given region for the purpose of whitelisting in S3 bucket policy.
import pulumi import pulumi_aws as aws main = aws.elb.get_service_account() elb_logs = aws.s3.Bucket("elbLogs", acl="private", policy=f"""{{ "Id": "Policy", "Version": "2012-10-17", "Statement": [ {{ "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": {{ "AWS": [ "{main.arn}" ] }} }} ] }} """) bar = aws.elb.LoadBalancer("bar", access_logs={ "bucket": elb_logs.bucket, "interval": 5, }, availability_zones=["us-west-2a"], listeners=[{ "instance_port": 8000, "instanceProtocol": "http", "lb_port": 80, "lbProtocol": "http", }])
- Parameters
region (str) – Name of the region whose AWS ELB account ID is desired. Defaults to the region from the AWS provider configuration.