How to use list_multi_region_access_points method in localstack

Best Python code snippet using localstack_python

client.pyi

Source:client.pyi Github

copy

Full Screen

...472 30 days for the Amazon Web Services account making the request.473 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/s3control.html#S3Control.Client.list_jobs)474 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_s3control/client.html#list_jobs)475 """476 def list_multi_region_access_points(477 self, *, AccountId: str, NextToken: str = None, MaxResults: int = None478 ) -> ListMultiRegionAccessPointsResultTypeDef:479 """480 Returns a list of the Multi-Region Access Points currently associated with the481 specified Amazon Web Services account.482 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/s3control.html#S3Control.Client.list_multi_region_access_points)483 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_s3control/client.html#list_multi_region_access_points)484 """485 def list_regional_buckets(486 self,487 *,488 AccountId: str,489 NextToken: str = None,490 MaxResults: int = None,...

Full Screen

Full Screen

s3control.py

Source:s3control.py Github

copy

Full Screen

1# Copyright The Cloud Custodian Authors.2# SPDX-License-Identifier: Apache-2.03from c7n.actions import Action4from c7n.filters.iamaccess import CrossAccountAccessFilter5from c7n.manager import resources6from c7n.resources.aws import Arn7from c7n.query import QueryResourceManager, TypeInfo, DescribeSource8from c7n.utils import local_session, type_schema9class AccessPointDescribe(DescribeSource):10 def get_query_params(self, query_params):11 query_params = query_params or {}12 query_params['AccountId'] = self.manager.config.account_id13 return query_params14 def augment(self, resources):15 client = local_session(self.manager.session_factory).client('s3control')16 results = []17 for r in resources:18 arn = Arn.parse(r['AccessPointArn'])19 ap = client.get_access_point(AccountId=arn.account_id, Name=r['Name'])20 ap.pop('ResponseMetadata', None)21 ap['AccessPointArn'] = arn.arn22 results.append(ap)23 return results24@resources.register('s3-access-point')25class AccessPoint(QueryResourceManager):26 class resource_type(TypeInfo):27 service = 's3control'28 id = name = 'Name'29 enum_spec = ('list_access_points', 'AccessPointList', None)30 arn = 'AccessPointArn'31 arn_service = 's3'32 arn_type = 'accesspoint'33 cfn_type = 'AWS::S3::AccessPoint'34 permission_prefix = 's3'35 source_mapping = {'describe': AccessPointDescribe}36@AccessPoint.filter_registry.register('cross-account')37class AccessPointCrossAccount(CrossAccountAccessFilter):38 policy_attribute = 'c7n:Policy'39 permissions = ('s3:GetAccessPointPolicy',)40 def process(self, resources, event=None):41 client = local_session(self.manager.session_factory).client('s3control')42 for r in resources:43 if self.policy_attribute in r:44 continue45 arn = Arn.parse(r['AccessPointArn'])46 r[self.policy_attribute] = client.get_access_point_policy(47 AccountId=arn.account_id, Name=r['Name']48 ).get('Policy')49 return super().process(resources, event)50@AccessPoint.action_registry.register('delete')51class Delete(Action):52 schema = type_schema('delete')53 permissions = ('s3:DeleteAccessPoint',)54 def process(self, resources):55 client = local_session(self.manager.session_factory).client('s3control')56 for r in resources:57 arn = Arn.parse(r['AccessPointArn'])58 try:59 client.delete_access_point(AccountId=arn.account_id, Name=r['Name'])60 except client.NotFoundException:61 continue62class MultiRegionAccessPointDescribe(DescribeSource):63 def get_query_params(self, query_params):64 query_params = query_params or {}65 query_params['AccountId'] = self.manager.config.account_id66 return query_params67@resources.register('s3-access-point-multi')68class MultiRegionAccessPoint(QueryResourceManager):69 class resource_type(TypeInfo):70 service = 's3control'71 id = name = 'Name'72 enum_spec = ('list_multi_region_access_points', 'AccessPoints', None)73 arn_service = 's3'74 arn_type = 'accesspoint'75 cfn_type = 'AWS::S3::MultiRegionAccessPoint'76 permission_prefix = 's3'...

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