Best Python code snippet using localstack_python
client.pyi
Source:client.pyi  
...589        Services account.590        [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/s3control.html#S3Control.Client.put_public_access_block)591        [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_s3control/client.html#put_public_access_block)592        """593    def put_storage_lens_configuration(594        self,595        *,596        ConfigId: str,597        AccountId: str,598        StorageLensConfiguration: "StorageLensConfigurationTypeDef",599        Tags: List["StorageLensTagTypeDef"] = None600    ) -> None:601        """602        Puts an Amazon S3 Storage Lens configuration.603        [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/s3control.html#S3Control.Client.put_storage_lens_configuration)604        [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_s3control/client.html#put_storage_lens_configuration)605        """606    def put_storage_lens_configuration_tagging(607        self, *, ConfigId: str, AccountId: str, Tags: List["StorageLensTagTypeDef"]...s3_storage_lens_subset.py
Source:s3_storage_lens_subset.py  
...123        logger.error("Sorry, found %s buckets and the max is %s." % (len(storageLensConfig["Include"]["Buckets"]),MAXBUCKETS))124    else:125        logger.info("Modifying %s dashboard with new configuration", dashboardName)126        logger.debug("Storage Lens Config: %s", json.dumps(storageLensConfig))127        response = s3control.put_storage_lens_configuration(128            ConfigId = dashboardName,129            AccountId = accountId,130            StorageLensConfiguration = storageLensConfig131        )132def main():133    """ Main program run """134    boto3_min_version = "1.16.21"135    # Verify if the version of Boto3 we are running has correct APIs for S3 storage lens included136    if packaging.version.parse(boto3.__version__) < packaging.version.parse(boto3_min_version):137        logger.error("Your Boto3 version (%s) is less than %s. You must ugprade to run this script (pip3 upgrade boto3)" % (boto3.__version__, boto3_min_version))138        sys.exit()139    logger.info("Script version %s" % __version__)140    logger.info("Starting Boto %s Session" % boto3.__version__)141    ACCOUNTID = boto3.client('sts').get_caller_identity().get('Account')...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!!
