/// <summary> /// Sets the server side encryption method for the S3 Object Version to the value /// specified. /// </summary> /// <param name="s3ObjectVer">The S3 Object Version</param> /// <param name="method">The server side encryption method</param> /// <param name="s3Client">The Amazon S3 Client to use for S3 specific operations.</param> public static void SetServerSideEncryption(S3ObjectVersion s3ObjectVer, ServerSideEncryptionMethod method, AmazonS3 s3Client) { SetServerSideEncryption(s3ObjectVer.BucketName, s3ObjectVer.Key, s3ObjectVer.VersionId, method, s3Client); }
/// <summary> /// Sets the storage class for the S3 Object Version to the value /// specified. /// </summary> /// <param name="s3ObjectVer">The S3 Object Version whose storage class needs changing</param> /// <param name="sClass">The new Storage Class for the object</param> /// <param name="s3Client">The Amazon S3 Client to use for S3 specific operations.</param> /// <seealso cref="T:Amazon.S3.Model.S3StorageClass"/> public static void SetObjectStorageClass(S3ObjectVersion s3ObjectVer, S3StorageClass sClass, AmazonS3 s3Client) { SetObjectStorageClass(s3ObjectVer.BucketName, s3ObjectVer.Key, s3ObjectVer.VersionId, sClass, s3Client); }
private async Task<Snapshot> GetSnapshotFromVersion(S3ObjectVersion version) { var req = new GetObjectMetadataRequest { BucketName = _bucket, Key = version.Key, VersionId = version.VersionId }; var res = await _client.GetObjectMetadataAsync(req).ConfigureAwait(false); return new Snapshot { Id = version.VersionId, Metadata = ActualMetadata(res.Metadata, res.VersionId, res.LastModified, res.ContentLength, res.Headers.ContentType, res.ETag) }; }