def _filter_update_security_group_rule(rule):
allowed = ['<STR_LIT>', '<STR_LIT>']<EOL>filtered = {}<EOL>for k, val in rule.iteritems():<EOL><INDENT>if k in allowed:<EOL><INDENT>if isinstance(val, basestring) andlen(val) <= GROUP_NAME_MAX_LENGTH:<EOL><INDENT>filtered[k] = val<EOL><DEDENT><DEDENT><DEDENT>return filtered<EOL>
Only two fields are allowed for modification:

        external_service and external_service_id