Skip to content

Set Security Groups

elbv2_set_security_groups R Documentation

Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer

Description

Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer. The specified security groups override the previously associated security groups.

You can't perform this operation on a Network Load Balancer unless you specified a security group for the load balancer when you created it.

You can't associate a security group with a Gateway Load Balancer.

Usage

elbv2_set_security_groups(LoadBalancerArn, SecurityGroups,
  EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic)

Arguments

LoadBalancerArn

[required] The Amazon Resource Name (ARN) of the load balancer.

SecurityGroups

[required] The IDs of the security groups.

EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. The default is on.

Value

A list with the following syntax:

list(
  SecurityGroupIds = list(
    "string"
  ),
  EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "on"|"off"
)

Request syntax

svc$set_security_groups(
  LoadBalancerArn = "string",
  SecurityGroups = list(
    "string"
  ),
  EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "on"|"off"
)

Examples

## Not run: 
# This example associates the specified security group with the specified
# load balancer.
svc$set_security_groups(
  LoadBalancerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:lo...",
  SecurityGroups = list(
    "sg-5943793c"
  )
)

## End(Not run)