/#Action=ApplySecurityGroupsToLoadBalancer
http://elasticloadbalancing.{region}.amazonaws.com/#Action=ApplySecurityGroupsToLoadBalancer<p>Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups">Security Groups for Load Balancers in a VPC</a> in the <i>Classic Load Balancers Guide</i>.</p>
Query Params
The name of the load balancer.
The IDs of the security groups to associate with the load balancer. Note that you cannot specify the name of the security group.
Responses
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request GET \2 --url 'http://elasticloadbalancing.{region}.amazonaws.com/#Action=ApplySecurityGroupsToLoadBalancer' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}