CmdID

CmdID / aws / aws elbv2

aws elbv2 set-security-groups

Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To associate a security group with a load balancer

The following set-security-groups example associates the specified security group with the specified load balancer.

aws elbv2 set-security-groups --load-balancer-arn arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188 --security-groups sg-5943793cIdentify
--load-balancer-arnThe Amazon Resource Name (ARN) of the load balancer.
--security-groupsThe IDs of the security groups.
Its output
{
    "SecurityGroupIds": [
        "sg-5943793c"
    ]
}

For more information, see Security groups for your Application Load Balancer in the Application Load Balancers Guide.

Options

3 in the AWS CLI reference
--enforce-security-group-inbound-rules-on-private-link-trafficIndicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink.
--load-balancer-arnThe Amazon Resource Name (ARN) of the load balancer.
--security-groupsThe IDs of the security groups.