public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMediaStoreDataConfig config = new AmazonMediaStoreDataConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonMediaStoreDataClient client = new AmazonMediaStoreDataClient(creds, config);

            ListItemsResponse resp = new ListItemsResponse();

            do
            {
                ListItemsRequest req = new ListItemsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListItems(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Items)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        private static async Task <AmazonMediaStoreDataClient> CreateStoreDataClientAsync(AmazonMediaStoreClient client, string containerName, BasicAWSCredentials credentials)
        {
            //var request = new ListContainersRequest();
            //var containers = await client.ListContainersAsync(request);
            //var container = containers.Containers.SingleOrDefault(c => c.Name == containerName);
            var config = new AmazonMediaStoreDataConfig
            {
                ServiceURL = "https://qdzszkjdcpfevy.data.mediastore.eu-central-1.amazonaws.com"
            };

            return(new AmazonMediaStoreDataClient(credentials, config));
        }
        protected IAmazonMediaStoreData CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonMediaStoreDataConfig {
                RegionEndpoint = region
            };

            Amazon.PowerShell.Utils.Common.PopulateConfig(this, config);
            this.CustomizeClientConfig(config);
            var client = new AmazonMediaStoreDataClient(credentials, config);

            client.BeforeRequestEvent += RequestEventHandler;
            client.AfterResponseEvent += ResponseEventHandler;
            return(client);
        }