Exemplo n.º 1
0
        public S3Bucket(AwsRegion region, string bucketName)
        {
            this.bucketName = bucketName ?? throw new ArgumentNullException(nameof(bucketName));

            var credential = new InstanceRoleCredential(); // this will be fetched on first use

            this.client = new S3Client(region, credential);
        }
Exemplo n.º 2
0
        public S3Bucket(string bucketName, S3Client client)
        {
            #region Preconditions

            if (bucketName == null)
            {
                throw new ArgumentNullException(nameof(bucketName));
            }

            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            #endregion

            this.bucketName = bucketName;

            this.client = client;
        }
Exemplo n.º 3
0
 public S3Bucket(string bucketName, S3Client client)
 {
     this.bucketName = bucketName ?? throw new ArgumentNullException(nameof(bucketName));
     this.client     = client ?? throw new ArgumentNullException(nameof(client));
 }