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; }
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 )); }