예제 #1
0
 private PutFileS3(SnowflakePutResponse response, AmazonS3Client client, string matDesc, BucketMeta bucket, CryptoMeta crypto, DateTime expiryDate)
 {
     Response   = response;
     Client     = client;
     MatDesc    = matDesc;
     Bucket     = bucket;
     Crypto     = crypto;
     ExpiryDate = expiryDate;
 }
예제 #2
0
        internal static IPutFile Create(SnowflakePutResponse response, DateTime expiryDate)
        {
            var stageInfo   = response.StageInfo;
            var r           = Amazon.RegionEndpoint.GetBySystemName(stageInfo.Region);
            var credentials = stageInfo.Credentials;

            var meta = CryptoManager.CreateCrypto(
                response.EncryptionMaterial.QueryStageMasterKey
                );

            return(new PutFileS3(
                       response,
                       new AmazonS3Client(
                           credentials.AwsKeyId,
                           credentials.AwsSecretKey,
                           credentials.AwsToken,
                           r
                           ),
                       ConvertToString(response.EncryptionMaterial, meta.KeySize),
                       BucketMeta.Create(stageInfo.Location),
                       meta,
                       expiryDate
                       ));
        }