We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Using --ip-permissions with --group-id causes validation error
If you attempt to use the --ip-permissions option with `aws ec2 authorize-security-group-*` subcommands while using a `--group-id` option to specify a VPC group, you receive this validation error:

```
ValueError: The --group_id option is not compatible with the --ip-permissions option
```

This should be allowed, though.  The workaround is to use the simplified, scalar options to set the permissions.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `awscli/customizations/ec2secgroupsimplify.py`
Content:
```
1 # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"). You
4 # may not use this file except in compliance with the License. A copy of
5 # the License is located at
6 #
7 #     http://aws.amazon.com/apache2.0/
8 #
9 # or in the "license" file accompanying this file. This file is
10 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11 # ANY KIND, either express or implied. See the License for the specific
12 # language governing permissions and limitations under the License.
13 """
14 This customization adds the following scalar parameters to the
15 authorize operations:
16 
17 * --protocol: tcp | udp | icmp or any protocol number
18 * --port:  A single integer or a range (min-max). You can specify ``all``
19   to mean all ports (for example, port range 0-65535)
20 * --source-group-name
21 * --source-group-id
22 * --cidr -  The CIDR range. Cannot be used when specifying a source or
23   destination security group.
24 """
25 
26 from awscli.arguments import CustomArgument
27 
28 
29 def _add_params(argument_table, operation, **kwargs):
30     arg = ProtocolArgument('protocol',
31                            help_text=PROTOCOL_DOCS)
32     argument_table['protocol'] = arg
33     arg = PortArgument('port', help_text=PORT_DOCS)
34     argument_table['port'] = arg
35     arg = CidrArgument('cidr', help_text=CIDR_DOCS)
36     argument_table['cidr'] = arg
37     arg = SourceGroupArgument('source-group',
38                               help_text=SOURCEGROUP_DOCS)
39     argument_table['source-group'] = arg
40     arg = GroupOwnerArgument('group-owner',
41                              help_text=GROUPOWNER_DOCS)
42     argument_table['group-owner'] = arg
43 
44 
45 def _check_args(parsed_args, **kwargs):
46     # This function checks the parsed args.  If the user specified
47     # the --ip-permissions option with any of the scalar options we
48     # raise an error.
49     arg_dict = vars(parsed_args)
50     if arg_dict['ip_permissions']:
51         for key in ('protocol', 'group_id', 'port', 'cidr',
52                     'source_group', 'group_owner'):
53             if arg_dict[key]:
54                 msg = ('Mixing the --ip-permissions option '
55                        'with the simple, scalar options is '
56                        'not recommended.')
57                 raise ValueError(msg)
58 
59 def _add_docs(help_command, **kwargs):
60     doc = help_command.doc
61     doc.style.new_paragraph()
62     doc.style.start_note()
63     msg = ('To specify multiple rules in a single command '
64            'use the <code>--ip-permissions</code> option')
65     doc.include_doc_string(msg)
66     doc.style.end_note()
67 
68 
69 EVENTS = [
70     ('building-argument-table.ec2.authorize-security-group-ingress', _add_params),
71     ('building-argument-table.ec2.authorize-security-group-egress', _add_params),
72     ('building-argument-table.ec2.revoke-security-group-ingress', _add_params),
73     ('building-argument-table.ec2.revoke-security-group-egress', _add_params),
74     ('operation-args-parsed.ec2.authorize-security-group-ingress', _check_args),
75     ('operation-args-parsed.ec2.authorize-security-group-egress', _check_args),
76     ('operation-args-parsed.ec2.revoke-security-group-ingress', _check_args),
77     ('operation-args-parsed.ec2.revoke-security-group-egress', _check_args),
78     ('doc-description.ec2.authorize-security-group-ingress', _add_docs),
79     ('doc-description.ec2.authorize-security-group-egress', _add_docs),
80     ('doc-description.ec2.revoke-security-group-ingress', _add_docs),
81     ('doc-description.ec2.revoke-security-groupdoc-ingress', _add_docs),
82     ]
83 PROTOCOL_DOCS = ('<p>The IP protocol of this permission.</p>'
84                  '<p>Valid protocol values: <code>tcp</code>, '
85                  '<code>udp</code>, <code>icmp</code></p>')
86 PORT_DOCS = ('<p>For TCP or UDP: The range of ports to allow.'
87              '  A single integer or a range (min-max). You can '
88              'specify <code>all</code> to mean all ports</p>')
89 CIDR_DOCS = '<p>The CIDR IP range.</p>'
90 SOURCEGROUP_DOCS = ('<p>The name of the source security group. '
91                     'Cannot be used when specifying a CIDR IP address.')
92 GROUPOWNER_DOCS = ('<p>The AWS account ID that owns the source security '
93                    'group. Cannot be used when specifying a CIDR IP '
94                    'address.</p>')
95 
96 def register_secgroup(event_handler):
97     for event, handler in EVENTS:
98         event_handler.register(event, handler)
99 
100 
101 def _build_ip_permissions(params, key, value):
102     if 'ip_permissions' not in params:
103         params['ip_permissions'] = [{}]
104     if key == 'CidrIp':
105         if 'IpRanges' not in params['ip_permissions'][0]:
106             params['ip_permissions'][0]['IpRanges'] = []
107         params['ip_permissions'][0]['IpRanges'].append(value)
108     elif key in ('GroupId', 'GroupName', 'UserId'):
109         if 'UserIdGroupPairs' not in params['ip_permissions'][0]:
110             params['ip_permissions'][0]['UserIdGroupPairs'] = [{}]
111         params['ip_permissions'][0]['UserIdGroupPairs'][0][key] = value
112     else:
113         params['ip_permissions'][0][key] = value
114 
115 
116 class ProtocolArgument(CustomArgument):
117 
118     def add_to_params(self, parameters, value):
119         if value:
120             try:
121                 int_value = int(value)
122                 if int_value < 0 or int_value > 255:
123                     msg = ('protocol numbers must be in the range 0-255')
124                     raise ValueError(msg)
125             except ValueError:
126                 if value not in ('tcp', 'udp', 'icmp'):
127                     msg = ('protocol parameter should be one of: '
128                            'tcp|udp|icmp or any valid protocol number.')
129                     raise ValueError(msg)
130             _build_ip_permissions(parameters, 'IpProtocol', value)
131 
132 
133 class PortArgument(CustomArgument):
134 
135     def add_to_params(self, parameters, value):
136         if value:
137             try:
138                 if value == '-1' or value == 'all':
139                     fromstr = '-1'
140                     tostr = '-1'
141                 elif '-' in value:
142                     fromstr, tostr = value.split('-')
143                 else:
144                     fromstr, tostr = (value, value)
145                 _build_ip_permissions(parameters, 'FromPort', int(fromstr))
146                 _build_ip_permissions(parameters, 'ToPort', int(tostr))
147             except ValueError:
148                 msg = ('port parameter should be of the '
149                        'form <from[-to]> (e.g. 22 or 22-25)')
150                 raise ValueError(msg)
151 
152 
153 class CidrArgument(CustomArgument):
154 
155     def add_to_params(self, parameters, value):
156         if value:
157             value = [{'CidrIp': value}]
158             _build_ip_permissions(parameters, 'IpRanges', value)
159 
160 
161 class SourceGroupArgument(CustomArgument):
162 
163     def add_to_params(self, parameters, value):
164         if value:
165             if value.startswith('sg-'):
166                 _build_ip_permissions(parameters, 'GroupId', value)
167             else:
168                 _build_ip_permissions(parameters, 'GroupName', value)
169 
170 
171 class GroupOwnerArgument(CustomArgument):
172 
173     def add_to_params(self, parameters, value):
174         if value:
175             _build_ip_permissions(parameters, 'UserId', value)
176
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/awscli/customizations/ec2secgroupsimplify.py b/awscli/customizations/ec2secgroupsimplify.py
--- a/awscli/customizations/ec2secgroupsimplify.py
+++ b/awscli/customizations/ec2secgroupsimplify.py
@@ -48,12 +48,11 @@
     # raise an error.
     arg_dict = vars(parsed_args)
     if arg_dict['ip_permissions']:
-        for key in ('protocol', 'group_id', 'port', 'cidr',
+        for key in ('protocol', 'port', 'cidr',
                     'source_group', 'group_owner'):
             if arg_dict[key]:
-                msg = ('Mixing the --ip-permissions option '
-                       'with the simple, scalar options is '
-                       'not recommended.')
+                msg = ('The --%s option is not compatible '
+                       'with the --ip-permissions option ') % key
                 raise ValueError(msg)
 
 def _add_docs(help_command, **kwargs):

{"golden_diff": "diff --git a/awscli/customizations/ec2secgroupsimplify.py b/awscli/customizations/ec2secgroupsimplify.py\n--- a/awscli/customizations/ec2secgroupsimplify.py\n+++ b/awscli/customizations/ec2secgroupsimplify.py\n@@ -48,12 +48,11 @@\n     # raise an error.\n     arg_dict = vars(parsed_args)\n     if arg_dict['ip_permissions']:\n-        for key in ('protocol', 'group_id', 'port', 'cidr',\n+        for key in ('protocol', 'port', 'cidr',\n                     'source_group', 'group_owner'):\n             if arg_dict[key]:\n-                msg = ('Mixing the --ip-permissions option '\n-                       'with the simple, scalar options is '\n-                       'not recommended.')\n+                msg = ('The --%s option is not compatible '\n+                       'with the --ip-permissions option ') % key\n                 raise ValueError(msg)\n \n def _add_docs(help_command, **kwargs):\n", "issue": "Using --ip-permissions with --group-id causes validation error\nIf you attempt to use the --ip-permissions option with `aws ec2 authorize-security-group-*` subcommands while using a `--group-id` option to specify a VPC group, you receive this validation error:\n\n```\nValueError: The --group_id option is not compatible with the --ip-permissions option\n```\n\nThis should be allowed, though.  The workaround is to use the simplified, scalar options to set the permissions.\n\n", "before_files": [{"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n#     http://aws.amazon.com/apache2.0/\n#\n# or in the \"license\" file accompanying this file. This file is\n# distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\n\"\"\"\nThis customization adds the following scalar parameters to the\nauthorize operations:\n\n* --protocol: tcp | udp | icmp or any protocol number\n* --port:  A single integer or a range (min-max). You can specify ``all``\n  to mean all ports (for example, port range 0-65535)\n* --source-group-name\n* --source-group-id\n* --cidr -  The CIDR range. Cannot be used when specifying a source or\n  destination security group.\n\"\"\"\n\nfrom awscli.arguments import CustomArgument\n\n\ndef _add_params(argument_table, operation, **kwargs):\n    arg = ProtocolArgument('protocol',\n                           help_text=PROTOCOL_DOCS)\n    argument_table['protocol'] = arg\n    arg = PortArgument('port', help_text=PORT_DOCS)\n    argument_table['port'] = arg\n    arg = CidrArgument('cidr', help_text=CIDR_DOCS)\n    argument_table['cidr'] = arg\n    arg = SourceGroupArgument('source-group',\n                              help_text=SOURCEGROUP_DOCS)\n    argument_table['source-group'] = arg\n    arg = GroupOwnerArgument('group-owner',\n                             help_text=GROUPOWNER_DOCS)\n    argument_table['group-owner'] = arg\n\n\ndef _check_args(parsed_args, **kwargs):\n    # This function checks the parsed args.  If the user specified\n    # the --ip-permissions option with any of the scalar options we\n    # raise an error.\n    arg_dict = vars(parsed_args)\n    if arg_dict['ip_permissions']:\n        for key in ('protocol', 'group_id', 'port', 'cidr',\n                    'source_group', 'group_owner'):\n            if arg_dict[key]:\n                msg = ('Mixing the --ip-permissions option '\n                       'with the simple, scalar options is '\n                       'not recommended.')\n                raise ValueError(msg)\n\ndef _add_docs(help_command, **kwargs):\n    doc = help_command.doc\n    doc.style.new_paragraph()\n    doc.style.start_note()\n    msg = ('To specify multiple rules in a single command '\n           'use the <code>--ip-permissions</code> option')\n    doc.include_doc_string(msg)\n    doc.style.end_note()\n\n\nEVENTS = [\n    ('building-argument-table.ec2.authorize-security-group-ingress', _add_params),\n    ('building-argument-table.ec2.authorize-security-group-egress', _add_params),\n    ('building-argument-table.ec2.revoke-security-group-ingress', _add_params),\n    ('building-argument-table.ec2.revoke-security-group-egress', _add_params),\n    ('operation-args-parsed.ec2.authorize-security-group-ingress', _check_args),\n    ('operation-args-parsed.ec2.authorize-security-group-egress', _check_args),\n    ('operation-args-parsed.ec2.revoke-security-group-ingress', _check_args),\n    ('operation-args-parsed.ec2.revoke-security-group-egress', _check_args),\n    ('doc-description.ec2.authorize-security-group-ingress', _add_docs),\n    ('doc-description.ec2.authorize-security-group-egress', _add_docs),\n    ('doc-description.ec2.revoke-security-group-ingress', _add_docs),\n    ('doc-description.ec2.revoke-security-groupdoc-ingress', _add_docs),\n    ]\nPROTOCOL_DOCS = ('<p>The IP protocol of this permission.</p>'\n                 '<p>Valid protocol values: <code>tcp</code>, '\n                 '<code>udp</code>, <code>icmp</code></p>')\nPORT_DOCS = ('<p>For TCP or UDP: The range of ports to allow.'\n             '  A single integer or a range (min-max). You can '\n             'specify <code>all</code> to mean all ports</p>')\nCIDR_DOCS = '<p>The CIDR IP range.</p>'\nSOURCEGROUP_DOCS = ('<p>The name of the source security group. '\n                    'Cannot be used when specifying a CIDR IP address.')\nGROUPOWNER_DOCS = ('<p>The AWS account ID that owns the source security '\n                   'group. Cannot be used when specifying a CIDR IP '\n                   'address.</p>')\n\ndef register_secgroup(event_handler):\n    for event, handler in EVENTS:\n        event_handler.register(event, handler)\n\n\ndef _build_ip_permissions(params, key, value):\n    if 'ip_permissions' not in params:\n        params['ip_permissions'] = [{}]\n    if key == 'CidrIp':\n        if 'IpRanges' not in params['ip_permissions'][0]:\n            params['ip_permissions'][0]['IpRanges'] = []\n        params['ip_permissions'][0]['IpRanges'].append(value)\n    elif key in ('GroupId', 'GroupName', 'UserId'):\n        if 'UserIdGroupPairs' not in params['ip_permissions'][0]:\n            params['ip_permissions'][0]['UserIdGroupPairs'] = [{}]\n        params['ip_permissions'][0]['UserIdGroupPairs'][0][key] = value\n    else:\n        params['ip_permissions'][0][key] = value\n\n\nclass ProtocolArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            try:\n                int_value = int(value)\n                if int_value < 0 or int_value > 255:\n                    msg = ('protocol numbers must be in the range 0-255')\n                    raise ValueError(msg)\n            except ValueError:\n                if value not in ('tcp', 'udp', 'icmp'):\n                    msg = ('protocol parameter should be one of: '\n                           'tcp|udp|icmp or any valid protocol number.')\n                    raise ValueError(msg)\n            _build_ip_permissions(parameters, 'IpProtocol', value)\n\n\nclass PortArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            try:\n                if value == '-1' or value == 'all':\n                    fromstr = '-1'\n                    tostr = '-1'\n                elif '-' in value:\n                    fromstr, tostr = value.split('-')\n                else:\n                    fromstr, tostr = (value, value)\n                _build_ip_permissions(parameters, 'FromPort', int(fromstr))\n                _build_ip_permissions(parameters, 'ToPort', int(tostr))\n            except ValueError:\n                msg = ('port parameter should be of the '\n                       'form <from[-to]> (e.g. 22 or 22-25)')\n                raise ValueError(msg)\n\n\nclass CidrArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            value = [{'CidrIp': value}]\n            _build_ip_permissions(parameters, 'IpRanges', value)\n\n\nclass SourceGroupArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            if value.startswith('sg-'):\n                _build_ip_permissions(parameters, 'GroupId', value)\n            else:\n                _build_ip_permissions(parameters, 'GroupName', value)\n\n\nclass GroupOwnerArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            _build_ip_permissions(parameters, 'UserId', value)\n", "path": "awscli/customizations/ec2secgroupsimplify.py"}], "after_files": [{"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n#     http://aws.amazon.com/apache2.0/\n#\n# or in the \"license\" file accompanying this file. This file is\n# distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\n\"\"\"\nThis customization adds the following scalar parameters to the\nauthorize operations:\n\n* --protocol: tcp | udp | icmp or any protocol number\n* --port:  A single integer or a range (min-max). You can specify ``all``\n  to mean all ports (for example, port range 0-65535)\n* --source-group-name\n* --source-group-id\n* --cidr -  The CIDR range. Cannot be used when specifying a source or\n  destination security group.\n\"\"\"\n\nfrom awscli.arguments import CustomArgument\n\n\ndef _add_params(argument_table, operation, **kwargs):\n    arg = ProtocolArgument('protocol',\n                           help_text=PROTOCOL_DOCS)\n    argument_table['protocol'] = arg\n    arg = PortArgument('port', help_text=PORT_DOCS)\n    argument_table['port'] = arg\n    arg = CidrArgument('cidr', help_text=CIDR_DOCS)\n    argument_table['cidr'] = arg\n    arg = SourceGroupArgument('source-group',\n                              help_text=SOURCEGROUP_DOCS)\n    argument_table['source-group'] = arg\n    arg = GroupOwnerArgument('group-owner',\n                             help_text=GROUPOWNER_DOCS)\n    argument_table['group-owner'] = arg\n\n\ndef _check_args(parsed_args, **kwargs):\n    # This function checks the parsed args.  If the user specified\n    # the --ip-permissions option with any of the scalar options we\n    # raise an error.\n    arg_dict = vars(parsed_args)\n    if arg_dict['ip_permissions']:\n        for key in ('protocol', 'port', 'cidr',\n                    'source_group', 'group_owner'):\n            if arg_dict[key]:\n                msg = ('The --%s option is not compatible '\n                       'with the --ip-permissions option ') % key\n                raise ValueError(msg)\n\ndef _add_docs(help_command, **kwargs):\n    doc = help_command.doc\n    doc.style.new_paragraph()\n    doc.style.start_note()\n    msg = ('To specify multiple rules in a single command '\n           'use the <code>--ip-permissions</code> option')\n    doc.include_doc_string(msg)\n    doc.style.end_note()\n\n\nEVENTS = [\n    ('building-argument-table.ec2.authorize-security-group-ingress', _add_params),\n    ('building-argument-table.ec2.authorize-security-group-egress', _add_params),\n    ('building-argument-table.ec2.revoke-security-group-ingress', _add_params),\n    ('building-argument-table.ec2.revoke-security-group-egress', _add_params),\n    ('operation-args-parsed.ec2.authorize-security-group-ingress', _check_args),\n    ('operation-args-parsed.ec2.authorize-security-group-egress', _check_args),\n    ('operation-args-parsed.ec2.revoke-security-group-ingress', _check_args),\n    ('operation-args-parsed.ec2.revoke-security-group-egress', _check_args),\n    ('doc-description.ec2.authorize-security-group-ingress', _add_docs),\n    ('doc-description.ec2.authorize-security-group-egress', _add_docs),\n    ('doc-description.ec2.revoke-security-group-ingress', _add_docs),\n    ('doc-description.ec2.revoke-security-groupdoc-ingress', _add_docs),\n    ]\nPROTOCOL_DOCS = ('<p>The IP protocol of this permission.</p>'\n                 '<p>Valid protocol values: <code>tcp</code>, '\n                 '<code>udp</code>, <code>icmp</code></p>')\nPORT_DOCS = ('<p>For TCP or UDP: The range of ports to allow.'\n             '  A single integer or a range (min-max). You can '\n             'specify <code>all</code> to mean all ports</p>')\nCIDR_DOCS = '<p>The CIDR IP range.</p>'\nSOURCEGROUP_DOCS = ('<p>The name of the source security group. '\n                    'Cannot be used when specifying a CIDR IP address.')\nGROUPOWNER_DOCS = ('<p>The AWS account ID that owns the source security '\n                   'group. Cannot be used when specifying a CIDR IP '\n                   'address.</p>')\n\ndef register_secgroup(event_handler):\n    for event, handler in EVENTS:\n        event_handler.register(event, handler)\n\n\ndef _build_ip_permissions(params, key, value):\n    if 'ip_permissions' not in params:\n        params['ip_permissions'] = [{}]\n    if key == 'CidrIp':\n        if 'IpRanges' not in params['ip_permissions'][0]:\n            params['ip_permissions'][0]['IpRanges'] = []\n        params['ip_permissions'][0]['IpRanges'].append(value)\n    elif key in ('GroupId', 'GroupName', 'UserId'):\n        if 'UserIdGroupPairs' not in params['ip_permissions'][0]:\n            params['ip_permissions'][0]['UserIdGroupPairs'] = [{}]\n        params['ip_permissions'][0]['UserIdGroupPairs'][0][key] = value\n    else:\n        params['ip_permissions'][0][key] = value\n\n\nclass ProtocolArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            try:\n                int_value = int(value)\n                if int_value < 0 or int_value > 255:\n                    msg = ('protocol numbers must be in the range 0-255')\n                    raise ValueError(msg)\n            except ValueError:\n                if value not in ('tcp', 'udp', 'icmp'):\n                    msg = ('protocol parameter should be one of: '\n                           'tcp|udp|icmp or any valid protocol number.')\n                    raise ValueError(msg)\n            _build_ip_permissions(parameters, 'IpProtocol', value)\n\n\nclass PortArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            try:\n                if value == '-1' or value == 'all':\n                    fromstr = '-1'\n                    tostr = '-1'\n                elif '-' in value:\n                    fromstr, tostr = value.split('-')\n                else:\n                    fromstr, tostr = (value, value)\n                _build_ip_permissions(parameters, 'FromPort', int(fromstr))\n                _build_ip_permissions(parameters, 'ToPort', int(tostr))\n            except ValueError:\n                msg = ('port parameter should be of the '\n                       'form <from[-to]> (e.g. 22 or 22-25)')\n                raise ValueError(msg)\n\n\nclass CidrArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            value = [{'CidrIp': value}]\n            _build_ip_permissions(parameters, 'IpRanges', value)\n\n\nclass SourceGroupArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            if value.startswith('sg-'):\n                _build_ip_permissions(parameters, 'GroupId', value)\n            else:\n                _build_ip_permissions(parameters, 'GroupName', value)\n\n\nclass GroupOwnerArgument(CustomArgument):\n\n    def add_to_params(self, parameters, value):\n        if value:\n            _build_ip_permissions(parameters, 'UserId', value)\n", "path": "awscli/customizations/ec2secgroupsimplify.py"}]}