How to use validate_destination_arn method in localstack

Best Python code snippet using localstack_python

provider.py

Source:provider.py Github

copy

Full Screen

...470 destination_arn: DestinationArn,471 creator_request_id: CreatorRequestId,472 tags: TagList = None,473 ) -> CreateResolverQueryLogConfigResponse:474 validate_destination_arn(destination_arn)475 region_details = Route53ResolverBackend.get()476 id = get_resolver_query_log_config_id()477 arn = aws_stack.get_resolver_query_log_config_arn(id)478 resolver_query_log_config: ResolverQueryLogConfig = ResolverQueryLogConfig(479 Id=id,480 Arn=arn,481 Name=name,482 AssociationCount=0,483 Status="CREATED",484 OwnerId=context.account_id,485 ShareStatus="NOT_SHARED",486 DestinationArn=destination_arn,487 CreatorRequestId=creator_request_id,488 CreationTime=datetime.now(timezone.utc).isoformat(),...

Full Screen

Full Screen

utils.py

Source:utils.py Github

copy

Full Screen

...27 if mutation_protection not in ["ENABLED", "DISABLED"]:28 raise ValidationException(29 f"[RSLVR-02018] The mutation protection value you provided is reserved. Provide a value of 'ENABLED' or 'DISABLED'. Trace Id: '{aws_stack.get_trace_id()}'"30 )31def validate_destination_arn(destination_arn):32 arn_pattern = r"arn:aws:(kinesis|logs|s3):?(.*)"33 if not re.match(arn_pattern, destination_arn):34 raise ResourceNotFoundException(35 f"[RSLVR-01014] An Amazon Resource Name (ARN) for the destination is required. Trace Id: '{aws_stack.get_trace_id()}'"36 )37def validate_vpc(vpc_id, region):38 backend = ec2_backends[region]39 if vpc_id not in backend.vpcs:40 raise ValidationException(41 f"[RSLVR-02025] Can't find the resource with ID : '{vpc_id}'. Trace Id: '{aws_stack.get_trace_id()}'"...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful