Best Python code snippet using localstack_python
provider.py
Source:provider.py  
...129        tags: TagList = None,130    ) -> CreateFirewallDomainListResponse:131        """Create a Firewall Domain List."""132        region_details = Route53ResolverBackend.get()133        id = get_route53_resolver_firewall_domain_list_id()134        arn = aws_stack.get_route53_resolver_firewall_domain_list_arn(id)135        firewall_domain_list = FirewallDomainList(136            Id=id,137            Arn=arn,138            Name=name,139            DomainCount=0,140            Status="COMPLETE",141            StatusMessage="Created Firewall Domain List",142            ManagedOwnerName=context.account_id,143            CreatorRequestId=creator_request_id,144            CreationTime=datetime.now(timezone.utc).isoformat(),145            ModificationTime=datetime.now(timezone.utc).isoformat(),146        )147        region_details.firewall_domain_lists[id] = firewall_domain_list...utils.py
Source:utils.py  
2from localstack.utils.aws import aws_stack3from localstack.utils.strings import get_random_hex4def get_route53_resolver_firewall_rule_group_id():5    return f"rslvr-frg-{get_random_hex(17)}"6def get_route53_resolver_firewall_domain_list_id():7    return f"rslvr-fdl-{get_random_hex(17)}"8def get_route53_resolver_firewall_rule_group_association_id():9    return f"rslvr-frgassoc-{get_random_hex(17)}"10def validate_priority(priority):11    # value of priority can be null in case of update12    if priority:13        if priority not in range(100, 9900):14            raise ValidationException(15                f"[RSLVR-02017] The priority value you provided is reserved. Provide a number between '100' and '9900'. Trace Id: '{aws_stack.get_trace_id()}'"16            )17def validate_mutation_protection(mutation_protection):18    if mutation_protection:19        if mutation_protection not in ["ENABLED", "DISABLED"]:20            raise ValidationException(...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!!
