View Source ExAws.ElasticLoadBalancingV2 (ex_aws_elastic_load_balancing v2.2.2)
Operations on AWS ELB (Elastic Load Balancing) V2 API
AWS Elastic Load Balancing supports three types of load balancers: Application
Load Balancers (ALB), Network Load Balancers (NLB), and Classic Load Balancers. You can
select a load balancer based on your application needs. This API covers the
ALB and NLB. Classic Load Balancers are covered by the ExAws.ElasticLoadBalancing
module.
More information:
Summary
Functions
Adds the specified certificate to the specified secure listener.
Adds the specified tags to the specified Elastic Load Balancing resource.
Creates a listener for the specified Application Load Balancer or Network Load Balancer.
Creates an Application Load Balancer or a Network Load Balancer.
Creates a rule for the specified listener.
Creates a target group.
Deletes the specified listener.
Deletes the specified Application Load Balancer or Network Load Balancer and its attached listeners.
Deletes the specified rule.
Deletes the specified target group.
Deregisters the specified targets from the specified target group.
Describes the current Elastic Load Balancing resource limits for your AWS account.
Describes the certificates for the specified secure listener.
Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer.
Describes the attributes for the specified Application Load Balancer or Network Load Balancer.
Describes the specified load balancers or all of your load balancers.
Describes the specified rules or the rules for the specified listener.
Describes the specified policies or all policies used for SSL negotiation.
Describes the tags for the specified resources.
Describes the attributes for the specified target group.
Describes the specified target groups or all of your target groups.
Describes the health of the specified targets or all of your targets.
Modifies the specified properties of the specified listener.
Modifies the specified attributes of the specified Application Load Balancer or Network Load Balancer.
Modifies the specified rule.
Modifies the health checks used when evaluating the health state of the targets in the specified target group.
Modifies the specified attributes of the specified target group.
Registers the specified targets with the specified target group.
Removes the specified certificate from the specified secure listener.
Removes the specified tags from the specified Elastic Load Balancing resource.
Sets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.
Sets the priorities of the specified rules.
Associates the specified security groups with the specified Application Load Balancer.
Enables the Availability Zone for the specified subnets for the specified Application Load Balancer.
Types
@type create_listener_opts() :: [ ssl_policy: binary(), certificates: [certificate(), ...] ]
@type create_target_group_opts() :: [ protocol: binary(), port: integer(), health_check_protocol: binary(), health_check_port: binary(), health_check_path: binary(), health_check_interval_seconds: integer(), health_check_timeout_seconds: integer(), healthy_threshold_count: integer(), unhealthy_threshold_count: integer(), matcher: binary(), target_type: binary() ]
@type describe_target_health_opts() :: [{:targets, target_descriptions()}]
@type modify_rule_opts() :: [ actions: [action(), ...], conditions: [rule_condition(), ...] ]
@type set_subnets_opts() :: [{:subnet_mappings, [subnet_mapping(), ...]}]
@type target_descriptions() :: [target_description()]
Functions
Adds the specified certificate to the specified secure listener.
If the certificate was already added, the call is successful but the certificate is not added again.
To list the certificates for your listener, use describe_listener_certificates/1
.
To remove certificates from your listener, use remove_listener_certificates/1
.
Examples:
iex> certificates = [
...> %{certificate_arn: "certificate1_arn", is_default: true},
...> %{certificate_arn: "certificate2_arn"}
...> ]
[
%{certificate_arn: "certificate1_arn", is_default: true},
%{certificate_arn: "certificate2_arn"}
]
iex> ExAws.ElasticLoadBalancingV2.add_listener_certificates("listener_arn", certificates)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "AddListenerCertificates",
"Certificates.member.1.CertificateArn" => "certificate1_arn",
"Certificates.member.1.IsDefault" => true,
"Certificates.member.2.CertificateArn" => "certificate2_arn",
"ListenerArn" => "listener_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :add_listener_certificates,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Adds the specified tags to the specified Elastic Load Balancing resource.
You can tag your Application Load Balancers, Network Load Balancers, and your target groups.
Each tag consists of a key and an optional value. If a resource already has a tag with the same
key, add_tags/1
updates its value.
To list the current tags for your resources, use describe_tags/1
. To remove tags from
your resources, use remove_tags/1
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.add_tags(["resource_arn1", "resource_arn2"], [%{key: "hello", value: "test"}])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "AddTags",
"ResourceArns.member.1" => "resource_arn1",
"ResourceArns.member.2" => "resource_arn2",
"Tags.member.1.Key" => "hello",
"Tags.member.1.Value" => "test",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :add_tags,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.add_tags(["resource_arn1", "resource_arn2"], [hello: "test"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "AddTags",
"ResourceArns.member.1" => "resource_arn1",
"ResourceArns.member.2" => "resource_arn2",
"Tags.member.1.Key" => "hello",
"Tags.member.1.Value" => "test",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :add_tags,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.add_tags(["resource_arn1", "resource_arn2"], [{:hello, "test"}])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "AddTags",
"ResourceArns.member.1" => "resource_arn1",
"ResourceArns.member.2" => "resource_arn2",
"Tags.member.1.Key" => "hello",
"Tags.member.1.Value" => "test",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :add_tags,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
create_listener(load_balancer_arn, protocol, port, default_actions, opts \\ [])
View Source@spec create_listener( load_balancer_arn :: binary(), protocol :: binary(), port :: integer(), default_actions :: [action(), ...], opts :: create_listener_opts() ) :: ExAws.Operation.Query.t()
Creates a listener for the specified Application Load Balancer or Network Load Balancer.
You can create up to 10 listeners per load balancer.
To update a listener, use modify_listener/1
. When you are finished with a
listener, you can delete it using delete_listener/1
. If you are finished
with both the listener and the load balancer, you can delete them both
using delete_load_balancer/1
.
More information:
- Listeners for Your Application Load Balancers in the Application Load Balancers Guide
- Listeners for Your Network Load Balancers in the Network Load Balancers Guide
Examples:
iex> ExAws.ElasticLoadBalancingV2.create_listener(
...> "load_balancer_arn",
...> "HTTP", 80, [%{type: "forward", target_group_arn: "target_arn"}])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "CreateListener",
"DefaultActions.member.1.TargetGroupArn" => "target_arn",
"DefaultActions.member.1.Type" => "forward",
"LoadBalancerArn" => "load_balancer_arn",
"Port" => 80,
"Protocol" => "HTTP",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :create_listener,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec create_load_balancer(name :: binary(), opts :: create_load_balancer_opts()) :: ExAws.Operation.Query.t()
Creates an Application Load Balancer or a Network Load Balancer.
When you create a load balancer, you can specify security groups, subnets, IP address type, and tags. Otherwise, you could do so later using set_security_groups, set_subnets, set_ip_address_type, and add_tags.
To create listeners for your load balancer, use create_listener/1
. To describe your
current load balancers, see describe_load_balancer/1
. When you are finished with a
load balancer, you can delete it using delete_load_balancer/1
.
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.
More information:
- Limits for Your Application Load Balancer in the Application Load Balancers Guide
- Limits for Your Network Load Balancer in the Network Load Balancers Guide
Examples:
iex> ExAws.ElasticLoadBalancingV2.create_load_balancer("Loader")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "CreateLoadBalancer",
"Name" => "Loader",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :create_load_balancer,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.create_load_balancer("Loader",
...> [schema: "internet-facing",
...> subnet_mappings: [%{subnet_id: "1.2.3.4", allocation_id: "i2234342"}],
...> subnets: ["1.2.3.4", "5.6.7.8"],
...> security_groups: ["Secure123", "Secure456"],
...> type: "application", ip_address_type: "ipv4"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "CreateLoadBalancer",
"IpAddressType" => "ipv4",
"Name" => "Loader",
"Schema" => "internet-facing",
"SecurityGroups.member.1" => "Secure123",
"SecurityGroups.member.2" => "Secure456",
"SubnetMappings.member.1.AllocationId" => "i2234342",
"SubnetMappings.member.1.SubnetId" => "1.2.3.4",
"Subnets.member.1" => "1.2.3.4",
"Subnets.member.2" => "5.6.7.8",
"Type" => "application",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :create_load_balancer,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
create_rule(listener_arn, conditions, priority, actions, opts \\ [])
View SourceCreates a rule for the specified listener.
The listener must be associated with an Application Load Balancer. Rules are evaluated in priority order, from the lowest value to the highest value. When the condition for a rule is met, the specified action is taken. If no conditions are met, the action for the default rule is taken.
More information:
- Listener Rules Application Load Balancers Guide
To view your current rules, use describe_rules/1
. To update a rule, use
modify_rule/1
. To set the priorities of your rules, use set_rule_priorities/1
.
To delete a rule, use delete_rule/1
.
@spec create_target_group( name :: binary(), vpc_id :: binary(), opts :: create_target_group_opts() ) :: ExAws.Operation.Query.t()
Creates a target group.
To register targets with the target group, use register_targets/1
. To
update the health check settings for the target group, use
modify_target_group/1
. To monitor the health of targets in the target group,
use describe_target_health/1
. To route traffic to the targets in a target group,
specify the target group in an action using create_listener/1
or create_rule/1
.
To delete a target group, use delete_target_group/1
.
More information:
- Target Groups for Your Application Load Balancers in the Application Load Balancers Guide
- Target Groups for Your Network Load Balancers in the Network Load Balancers Guide.
Examples:
iex> ExAws.ElasticLoadBalancingV2.create_target_group("target_group_name", "vpc_id")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "CreateTargetGroup",
"Name" => "target_group_name",
"Version" => "2015-12-01",
"VpcId" => "vpc_id"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :create_target_group,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Deletes the specified listener.
Alternatively, your listener is deleted when you delete the load balancer
it is attached to using delete_load_balancer/1
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.delete_listener("listener_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeleteListener",
"ListenerArn" => "listener_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :delete_listener,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Deletes the specified Application Load Balancer or Network Load Balancer and its attached listeners.
You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds.
Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.
Examples:
iex> ExAws.ElasticLoadBalancingV2.delete_load_balancer("load_balancer_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeleteLoadBalancer",
"LoadBalancerArn" => "load_balancer_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :delete_load_balancer,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Deletes the specified rule.
Examples:
iex> ExAws.ElasticLoadBalancingV2.delete_rule("rule_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeleteRule",
"RuleArn" => "rule_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :delete_rule,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Deletes the specified target group.
You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks.
Examples:
iex> ExAws.ElasticLoadBalancingV2.delete_target_group("target_group_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeleteTargetGroup",
"TargetGroupArn" => "target_group_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :delete_target_group,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Deregisters the specified targets from the specified target group.
After the targets are deregistered, they no longer receive traffic from the load balancer.
Examples:
iex> targets = [%{id: "test"}, %{id: "test2", port: 8088, availablility_zone: "us-east-1"}]
[%{id: "test"}, %{id: "test2", port: 8088, availablility_zone: "us-east-1"}]
iex> ExAws.ElasticLoadBalancingV2.deregister_targets("target_group_arn", targets)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeregisterTargets",
"TargetGroupArn" => "target_group_arn",
"Targets.member.1.Id" => "test",
"Targets.member.2.AvailablilityZone" => "us-east-1",
"Targets.member.2.Id" => "test2",
"Targets.member.2.Port" => 8088,
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :deregister_targets,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.deregister_targets("target_group_arn", [%{id: "i-0f76fade435676abd"}])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DeregisterTargets",
"TargetGroupArn" => "target_group_arn",
"Targets.member.1.Id" => "i-0f76fade435676abd",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :deregister_targets,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_account_limits(opts :: describe_account_limits_opts()) :: ExAws.Operation.Query.t()
Describes the current Elastic Load Balancing resource limits for your AWS account.
More information:
- Limits for Your Application Load Balancers in the Application Load Balancer Guide
- Limits for Your Network Load Balancers in the Network Load Balancers Guide.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_account_limits()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeAccountLimits", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_account_limits,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_listener_certificates( listener_arn :: binary(), opts :: describe_listener_certificates_opts() ) :: ExAws.Operation.Query.t()
Describes the certificates for the specified secure listener.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_listener_certificates("listener_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeListenerCertificates",
"ListenerArn" => "listener_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_listener_certificates,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_listeners(opts :: describe_listeners_opts()) :: ExAws.Operation.Query.t()
Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer.
You must specify either a load balancer or one or more listeners.
Example
iex> ExAws.ElasticLoadBalancingV2.describe_listeners()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeListeners", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_listeners,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Describes the attributes for the specified Application Load Balancer or Network Load Balancer.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_load_balancer_attributes("load_balancer_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeLoadBalancerAttributes",
"LoadBalancerArn" => "load_balancer_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_load_balancer_attributes,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_load_balancers(opts :: describe_load_balancers_opts()) :: ExAws.Operation.Query.t()
Describes the specified load balancers or all of your load balancers.
To describe the listeners for a load balancer, use describe_listeners/1
.
To describe the attributes for a load balancer, use describe_load_balancer_attributes/1
.
The options that can be passed into describe_load_balancers/1
allow load_balancer_arns or names
(there would not be a reason ordinarily to specify both). Elastic Load Balancing provides
two versions of ARNS (one for Classic and one for Application Load Balancer). The syntax for
each is below:
Classic Load Balancer ARN Syntax:
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/name
Application Load Balancer ARN Syntax:
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
arn:aws:elasticloadbalancing:region:account-id:listener/app/load-balancer-name/load-balancer-id/listener-id
arn:aws:elasticloadbalancing:region:account-id:listener-rule/app/load-balancer-name/load-balancer-id/listener-id/rule-id
arn:aws:elasticloadbalancing:region:account-id:targetgroup/target-group-name/target-group-id
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_load_balancers()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeLoadBalancers", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_load_balancers,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_rules(opts :: describe_rules_opts()) :: ExAws.Operation.Query.t()
Describes the specified rules or the rules for the specified listener.
You must specify either a listener or one or more rules.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_rules()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeRules", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_rules,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.describe_rules([listener_arn: "listener_arn", rule_arns: ["rule_arns"]])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeRules",
"ListenerArn" => "listener_arn",
"RuleArns.member.1" => "rule_arns",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_rules,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_ssl_policies(opts :: describe_ssl_policies_opts()) :: ExAws.Operation.Query.t()
Describes the specified policies or all policies used for SSL negotiation.
More information:
- Security Policies in the Application Load Balancers Guide.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_ssl_policies()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeSslPolicies", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_ssl_policies,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> ExAws.ElasticLoadBalancingV2.describe_ssl_policies([ssl_policy_names: ["policy1", "policy2"]])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeSslPolicies",
"SslPolicyNames.1" => "policy1",
"SslPolicyNames.2" => "policy2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_ssl_policies,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Describes the tags for the specified resources.
You can describe the tags for one or more Application Load Balancers, Network Load Balancers, and target groups.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_tags(["resource_arn1", "resource_arn2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeTags",
"ResourceArns.member.1" => "resource_arn1",
"ResourceArns.member.2" => "resource_arn2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_tags,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Describes the attributes for the specified target group.
Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_target_group_attributes(["target_group_arn1", "target_group_arn2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeTargetGroupAttributes",
"TargetGroupArn.1" => "target_group_arn1",
"TargetGroupArn.2" => "target_group_arn2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_target_group_attributes,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_target_groups(opts :: describe_target_groups_opts()) :: ExAws.Operation.Query.t()
Describes the specified target groups or all of your target groups.
By default, all target groups are described. Alternatively, you can
specify one of the following to filter the results: the ARN of the
load balancer, the names of one or more target groups, or the ARNs
of one or more target groups. To describe the targets for a
target group, use describe_target_health/1
. To describe the attributes
of a target group, use describe_target_group_attributes/1
.
## Examples:
iex> ExAws.ElasticLoadBalancingV2.describe_target_groups()
%ExAws.Operation.Query{
path: "/",
params: %{"Action" => "DescribeTargetGroups", "Version" => "2015-12-01"},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_target_groups,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> opts = [load_balancer_arn: "load_balancer_arn", target_group_arns: ["target_group_arn1", "target_group_arn2"]]
[
load_balancer_arn: "load_balancer_arn",
target_group_arns: ["target_group_arn1", "target_group_arn2"]
]
iex> ExAws.ElasticLoadBalancingV2.describe_target_groups(opts)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "DescribeTargetGroups",
"LoadBalancerArn" => "load_balancer_arn",
"TargetGroupArns.member.1" => "target_group_arn1",
"TargetGroupArns.member.2" => "target_group_arn2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :describe_target_groups,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec describe_target_health( target_group_arn :: binary(), opts :: describe_target_health_opts() ) :: ExAws.Operation.Query.t()
Describes the health of the specified targets or all of your targets.
@spec modify_listener(listener_arn :: binary(), opts :: modify_listener_opts()) :: ExAws.Operation.Query.t()
Modifies the specified properties of the specified listener.
Any properties that you do not specify retain their current values. However, changing the protocol from HTTPS to HTTP removes the security policy and SSL certificate properties. If you change the protocol from HTTP to HTTPS, you must add the security policy and server certificate.
Examples:
iex> ExAws.ElasticLoadBalancingV2.modify_listener("listener_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "ModifyListener",
"ListenerArn" => "listener_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :modify_listener,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> opts = [port: 80, protocol: "HTTP", certificates: ["certificate1", "certificate2"]]
iex> ExAws.ElasticLoadBalancingV2.modify_listener("listener_arn", opts)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "ModifyListener",
"Certificates.member.1" => "certificate1",
"Certificates.member.2" => "certificate2",
"ListenerArn" => "listener_arn",
"Port" => 80,
"Protocol" => "HTTP",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :modify_listener,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
modify_load_balancer_attributes(load_balancer_arn, attributes, opts \\ [])
View SourceModifies the specified attributes of the specified Application Load Balancer or Network Load Balancer.
If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.
@spec modify_rule(rule_arn :: binary(), opts :: modify_rule_opts()) :: ExAws.Operation.Query.t()
Modifies the specified rule.
Any existing properties that you do not modify retain their current values.
To modify the default action, use modify_listener/1
.
@spec modify_target_group( target_group_arn :: binary(), opts :: modify_target_group_opts() ) :: ExAws.Operation.Query.t()
Modifies the health checks used when evaluating the health state of the targets in the specified target group.
To monitor the health of the targets, use describe_target_health/1
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.modify_target_group("target_group_arn")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "ModifyTargetGroup",
"TargetGroupArn" => "target_group_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :modify_target_group,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
iex> opts = [heath_check_port: 8088, health_check_protocol: "HTTP", health_check_path: "/"]
[heath_check_port: 8088, health_check_protocol: "HTTP", health_check_path: "/"]
iex> ExAws.ElasticLoadBalancingV2.modify_target_group("target_group_arn", opts)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "ModifyTargetGroup",
"HealthCheckPath" => "/",
"HealthCheckProtocol" => "HTTP",
"HeathCheckPort" => 8088,
"TargetGroupArn" => "target_group_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :modify_target_group,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
modify_target_group_attributes(target_group_arn, attributes, opts \\ [])
View SourceModifies the specified attributes of the specified target group.
Examples:
iex> attributes = [{:hello, "test"}]
[hello: "test"]
iex> ExAws.ElasticLoadBalancingV2.modify_target_group_attributes("target_group_arn", attributes)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "ModifyTargetGroupAttributes",
"Attributes.member.1.Key" => "hello",
"Attributes.member.1.Value" => "test",
"TargetGroupArn" => "target_group_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :modify_target_group_attributes,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Registers the specified targets with the specified target group.
You can register targets by instance ID or by IP address. If the
target is an EC2 instance, it must be in the running
state when you
register it.
By default, the load balancer routes requests to registered targets using the protocol and port for the target group. Alternatively, you can override the port for a target when you register it. You can register each EC2 instance or IP address with the same target group multiple times using different ports.
With a Network Load Balancer, you cannot register instances by instance ID if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these types by IP address.
To remove a target from a target group, use deregister_targets/1
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.register_targets("target_group_arn", ["target1", "target2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "RegisterTargets",
"TargetGroupArn" => "target_group_arn",
"Targets.member.1" => "target1",
"Targets.member.2" => "target2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :register_targets,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
remove_listener_certificates(listener_arn, certificates, opts \\ [])
View SourceRemoves the specified certificate from the specified secure listener.
You can't remove the default certificate for a listener. To replace
the default certificate, call modify_listener/1
. To list the certificates
for your listener, use describe_listener_certificates/1
.
Examples:
iex> certificates = [%{certificate_arn: "certificate1_arn", is_default: true}, %{certificate_arn: "certificate2_arn"}]
[
%{certificate_arn: "certificate1_arn", is_default: true},
%{certificate_arn: "certificate2_arn"}
]
iex> ExAws.ElasticLoadBalancingV2.remove_listener_certificates("listener_arn", certificates)
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "RemoveListenerCertificates",
"Certificates.member.1.CertificateArn" => "certificate1_arn",
"Certificates.member.1.IsDefault" => true,
"Certificates.member.2.CertificateArn" => "certificate2_arn",
"ListenerArn" => "listener_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :remove_listener_certificates,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Removes the specified tags from the specified Elastic Load Balancing resource.
To list the current tags for your resources, use describe_tags/1
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.remove_tags(["resource_arn1", "resource_arn2"], ["tag1", "tag2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "RemoveTags",
"ResourceArns.member.1" => "resource_arn1",
"ResourceArns.member.2" => "resource_arn2",
"TagsKeys.1" => "tag1",
"TagsKeys.2" => "tag2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :remove_tags,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
set_ip_address_type(load_balancer_arn, ip_address_type, opts \\ [])
View SourceSets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.
Note: Network Load Balancers must use ipv4
.
Examples:
iex> ExAws.ElasticLoadBalancingV2.set_ip_address_type("load_balancer_arn", "ipv4")
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "SetIpAddressType",
"IpAddressType" => "ipv4",
"LoadBalancerArn" => "load_balancer_arn",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :set_ip_address_type,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
Sets the priorities of the specified rules.
You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.
Examples:
iex> ExAws.ElasticLoadBalancingV2.set_rule_priorities([1,2,3])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "SetRulePriorities",
"RulePriorities.member.1" => 1,
"RulePriorities.member.2" => 2,
"RulePriorities.member.3" => 3,
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :set_rule_priorities,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
set_security_groups(load_balancer_arn, security_groups, opts \\ [])
View SourceAssociates the specified security groups with the specified Application Load Balancer.
The specified security groups override the previously associated security groups.
Note: You can't specify a security group for a Network Load Balancer.
Examples:
iex> ExAws.ElasticLoadBalancingV2.set_security_groups("load_balancer_arn", ["security_group1", "security_group2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "SetSecurityGroups",
"LoadBalancerArn" => "load_balancer_arn",
"SecurityGroups.member.1" => "security_group1",
"SecurityGroups.member.2" => "security_group2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :set_security_groups,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}
@spec set_subnets( load_balancer_arn :: binary(), subnets :: [binary(), ...], opts :: set_subnets_opts() ) :: ExAws.Operation.Query.t()
Enables the Availability Zone for the specified subnets for the specified Application Load Balancer.
The specified subnets replace the previously enabled subnets.
Note: You can't change the subnets for a Network Load Balancer.
Examples:
iex> ExAws.ElasticLoadBalancingV2.set_subnets("load_balancer_arn", ["subnet1", "subnet2"])
%ExAws.Operation.Query{
path: "/",
params: %{
"Action" => "SetSubnets",
"LoadBalancerArn" => "load_balancer_arn",
"Subnets.member.1" => "subnet1",
"Subnets.member.2" => "subnet2",
"Version" => "2015-12-01"
},
content_encoding: "identity",
service: :elasticloadbalancing,
action: :set_subnets,
parser: &ExAws.ElasticLoadBalancingV2.Parsers.parse/2
}