How to use describe_archive method in localstack

Best Python code snippet using localstack_python

responses.py

Source:responses.py Github

copy

Full Screen

...249 }250 ),251 self.response_headers,252 )253 def describe_archive(self):254 name = self._get_param("ArchiveName")255 result = self.events_backend.describe_archive(name)256 return json.dumps(result), self.response_headers257 def list_archives(self):258 name_prefix = self._get_param("NamePrefix")259 source_arn = self._get_param("EventSourceArn")260 state = self._get_param("State")261 result = self.events_backend.list_archives(name_prefix, source_arn, state)262 return json.dumps({"Archives": result}), self.response_headers263 def update_archive(self):264 name = self._get_param("ArchiveName")265 description = self._get_param("Description")266 event_pattern = self._get_param("EventPattern")267 retention = self._get_param("RetentionDays")268 result = self.events_backend.update_archive(269 name, description, event_pattern, retention...

Full Screen

Full Screen

test_events_cloudformation.py

Source:test_events_cloudformation.py Github

copy

Full Screen

...44 archive_arn = "arn:aws:events:eu-central-1:{0}:archive/{1}".format(ACCOUNT_ID, name)45 stack = cfn_client.describe_stacks(StackName=stack_name)["Stacks"][0]46 stack["Outputs"][0]["OutputValue"].should.equal(archive_arn)47 events_client = boto3.client("events", region_name="eu-central-1")48 response = events_client.describe_archive(ArchiveName=name)49 response["ArchiveArn"].should.equal(archive_arn)50@mock_events51@mock_cloudformation52def test_update_archive():53 # given54 cfn_client = boto3.client("cloudformation", region_name="eu-central-1")55 name = "test-archive"56 stack_name = "test-stack"57 template = archive_template.substitute({"archive_name": name})58 cfn_client.create_stack(StackName=stack_name, TemplateBody=template)59 template_update = copy.deepcopy(json.loads(template))60 template_update["Resources"]["Archive"]["Properties"][61 "Description"62 ] = "test archive"63 # when64 cfn_client.update_stack(65 StackName=stack_name, TemplateBody=json.dumps(template_update)66 )67 # then68 events_client = boto3.client("events", region_name="eu-central-1")69 response = events_client.describe_archive(ArchiveName=name)70 response["ArchiveArn"].should.equal(71 "arn:aws:events:eu-central-1:{0}:archive/{1}".format(ACCOUNT_ID, name)72 )73 response["Description"].should.equal("test archive")74@mock_events75@mock_cloudformation76def test_delete_archive():77 # given78 cfn_client = boto3.client("cloudformation", region_name="eu-central-1")79 name = "test-archive"80 stack_name = "test-stack"81 template = archive_template.substitute({"archive_name": name})82 cfn_client.create_stack(StackName=stack_name, TemplateBody=template)83 # when...

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