Best Python code snippet using localstack_python
client.py
Source:client.py
...644 def reset_snapshot_attribute(self, Attribute: str, SnapshotId: str, DryRun: bool = None):645 pass646 def restore_address_to_classic(self, PublicIp: str, DryRun: bool = None) -> Dict:647 pass648 def revoke_client_vpn_ingress(self, ClientVpnEndpointId: str, TargetNetworkCidr: str, AccessGroupId: str = None, RevokeAllGroups: bool = None, DryRun: bool = None) -> Dict:649 pass650 def revoke_security_group_egress(self, GroupId: str, DryRun: bool = None, IpPermissions: List = None, CidrIp: str = None, FromPort: int = None, IpProtocol: str = None, ToPort: int = None, SourceSecurityGroupName: str = None, SourceSecurityGroupOwnerId: str = None):651 pass652 def revoke_security_group_ingress(self, CidrIp: str = None, FromPort: int = None, GroupId: str = None, GroupName: str = None, IpPermissions: List = None, IpProtocol: str = None, SourceSecurityGroupName: str = None, SourceSecurityGroupOwnerId: str = None, ToPort: int = None, DryRun: bool = None):653 pass654 def run_instances(self, MaxCount: int, MinCount: int, BlockDeviceMappings: List = None, ImageId: str = None, InstanceType: str = None, Ipv6AddressCount: int = None, Ipv6Addresses: List = None, KernelId: str = None, KeyName: str = None, Monitoring: Dict = None, Placement: Dict = None, RamdiskId: str = None, SecurityGroupIds: List = None, SecurityGroups: List = None, SubnetId: str = None, UserData: str = None, AdditionalInfo: str = None, ClientToken: str = None, DisableApiTermination: bool = None, DryRun: bool = None, EbsOptimized: bool = None, IamInstanceProfile: Dict = None, InstanceInitiatedShutdownBehavior: str = None, NetworkInterfaces: List = None, PrivateIpAddress: str = None, ElasticGpuSpecification: List = None, ElasticInferenceAccelerators: List = None, TagSpecifications: List = None, LaunchTemplate: Dict = None, InstanceMarketOptions: Dict = None, CreditSpecification: Dict = None, CpuOptions: Dict = None, CapacityReservationSpecification: Dict = None, HibernationOptions: Dict = None, LicenseSpecifications: List = None) -> Dict:655 pass656 def run_scheduled_instances(self, LaunchSpecification: Dict, ScheduledInstanceId: str, ClientToken: str = None, DryRun: bool = None, InstanceCount: int = None) -> Dict:657 pass658 def search_transit_gateway_routes(self, TransitGatewayRouteTableId: str, Filters: List, MaxResults: int = None, DryRun: bool = None) -> Dict:659 pass660 def start_instances(self, InstanceIds: List, AdditionalInfo: str = None, DryRun: bool = None) -> Dict:661 pass662 def stop_instances(self, InstanceIds: List, Hibernate: bool = None, DryRun: bool = None, Force: bool = None) -> Dict:...
app.py
Source:app.py
...43 else:44 args['AccessGroupId'] = group45 46 try:47 client.revoke_client_vpn_ingress(**args)48 except ClientError as e:49 if e.response['Error']['Code'] == 'ConcurrentMutationLimitExceeded':50 logger.warn(f"revoking auth is being rate limited", exc_info=True)51 elif e.response['Error']['Code'] == 'InvalidClientVpnEndpointAuthorizationRuleNotFound':52 logger.info(f"rule not found when revoking", exc_info=True)53 else:54 raise e55def authorize_route(client, event, cidr, lookup_item, group = None):56 description = f"cfnvpn auto generated authorization for lookup {lookup_item}."57 if event['Description']:58 description += f" {event['Description']}"59 args = {60 'ClientVpnEndpointId': event['ClientVpnEndpointId'],61 'TargetNetworkCidr': cidr,...
purge.py
Source:purge.py
...85 if vpn_endpoint_id is None or subnet_cidr_block is None:86 print('There is no VPN ingress to revoke')87 else:88 try:89 ec2_client.revoke_client_vpn_ingress(90 ClientVpnEndpointId=vpn_endpoint_id,91 TargetNetworkCidr=subnet_cidr_block,92 RevokeAllGroups=True,93 )94 except Exception as e:95 print('Failed to delete client VPN ingress: %s' % e)96 client_vpn_ingress_success = False97 else:98 print('Successfully removed client VPN ingress')99 if association_id is None:100 print('There is no VPN association ID to delete')101 else:102 try:103 ec2_client.disassociate_client_vpn_target_network(...
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!!