Exemplo n.º 1
0
        static async Task Main(string[] args)
        {
            IReadOnlyCollection <string> profiles = AwsCliCredentials.EnumerateProfiles();

            IBlobStorage bs = StorageFactory.Blobs.AwsS3("***", "***", "eu-west-1");
            IReadOnlyCollection <Blob> all = await bs.ListAsync();

            //var ibs = StorageFactory.Blobs.AwsS3()
        }
Exemplo n.º 2
0
        public void RefreshAwsCliProfiles()
        {
            _awsCliProfiles.Children.Clear();

            try
            {
                foreach (string profileName in AwsCliCredentials.EnumerateProfiles())
                {
                    AWSCredentials creds = AwsCliCredentials.GetCredentials(profileName);

                    _awsCliProfiles.Children.Add(new AwsCliProfile(profileName, creds));
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, "discovery failed");
            }
        }
Exemplo n.º 3
0
        //https://github.com/awslabs/aws-sdk-net-samples/blob/master/ConsoleSamples/AmazonS3Sample/AmazonS3Sample/S3Sample.cs


#if !NET16
        public static AwsS3BlobStorage FromAwsCliProfile(string profileName, string bucketName, string region)
        {
            return(new AwsS3BlobStorage(bucketName, region, AwsCliCredentials.GetCredentials(profileName)));
        }