Best Python code snippet using localstack_python
security_groups.py
Source:security_groups.py  
...187                *args188            )189        self.ec2_backend.sg_old_ingress_ruls[group.id] = group.ingress_rules.copy()190        return UPDATE_SECURITY_GROUP_RULE_DESCRIPTIONS_INGRESS191    def update_security_group_rule_descriptions_egress(self):192        for args in self._process_rules_from_querystring():193            group = self.ec2_backend.update_security_group_rule_descriptions_egress(194                *args195            )196        self.ec2_backend.sg_old_egress_ruls[group.id] = group.egress_rules.copy()197        return UPDATE_SECURITY_GROUP_RULE_DESCRIPTIONS_EGRESS198CREATE_SECURITY_GROUP_RESPONSE = """<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">199   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>200   <return>true</return>201   <groupId>{{ group.id }}</groupId>202   <tagSet>203    {% for tag in group.get_tags() %}204        <item>205        <key>{{ tag.key }}</key>206        <value>{{ tag.value }}</value>207        </item>...action.py
Source:action.py  
1from .schema import (2    UpdateSecurityGroupRuleDescriptionsEgressInput,3    UpdateSecurityGroupRuleDescriptionsEgressOutput,4    Component,5)6# Custom imports below7from icon_aws_ec2.util.common import AWSAction8class UpdateSecurityGroupRuleDescriptionsEgress(AWSAction):9    def __init__(self):10        super().__init__(11            name="update_security_group_rule_descriptions_egress",12            description=Component.DESCRIPTION,13            input_=UpdateSecurityGroupRuleDescriptionsEgressInput(),14            output=UpdateSecurityGroupRuleDescriptionsEgressOutput(),15            aws_service="ec2",16            aws_command="update_security_group_rule_descriptions_egress",17            pagination_helper=None,...vpc-change-outbound-rule-description.py
Source:vpc-change-outbound-rule-description.py  
1import boto32vpc = boto3.client('ec2')3res = vpc.update_security_group_rule_descriptions_egress(4    GroupId='sg-04bc984cdfb3f102d',5    IpPermissions=[6        {7            'FromPort': 80,8            'IpProtocol': 'tcp',9            'IpRanges': [10                {11                    'CidrIp': '0.0.0.0/0',12                    'Description': 'New description for outbound rule'13                },14            ],15            'ToPort': 80,16        },17    ],...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
