CmdID

CmdID / aws / aws ec2

aws ec2 modify-security-group-rules

Modifies the rules of a security group. 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 modify a security group rules to update the rule description, the IP protocol, and the CidrIpv4 address range

The following modify-security-group-rules example updates the description, the IP protocol, and the IPV4 CIDR range of a specified security group rule. Use the security-group-rules parameter to enter the updates for the specified security group rules. -1 specifies all protocols.

aws ec2 modify-security-group-rules --group-id sg-1234567890abcdef0 --security-group-rules SecurityGroupRuleId=sgr-abcdef01234567890,SecurityGroupRule='{Description=test,IpProtocol=-1,CidrIpv4=0.0.0.0/0}'Identify
--group-idThe ID of the security group.
--security-group-rulesInformation about the security group properties to update.
Its output
{
    "Return": true
}

For more information about security group rules, see Security group rules in the Amazon EC2 User Guide.

Options

3 in the AWS CLI reference
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--group-idThe ID of the security group.
--security-group-rulesInformation about the security group properties to update.