Class AmazonS3EncryptionClient
- Namespace
- Amazon.S3.Encryption
- Assembly
- AWSSDK.S3.dll
This class extends the AmazonS3Client and provides client side encryption when reading or writing S3 objects.
[Obsolete("This feature is in maintenance mode, no new updates will be released. Please transition to https://www.nuget.org/packages/Amazon.Extensions.S3.Encryption and see https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html for more information.")]
public class AmazonS3EncryptionClient : AmazonS3Client, IAmazonS3, IDisposable, ICoreAmazonS3, IAmazonService, IAmazonS3Encryption
- Inheritance
-
AmazonS3EncryptionClient
- Implements
-
ICoreAmazonS3IAmazonService
- Inherited Members
-
AmazonS3Client.GetBucketOwnershipControlsAsync(GetBucketOwnershipControlsRequest, CancellationToken)AmazonS3Client.GetObjectLockConfigurationAsync(GetObjectLockConfigurationRequest, CancellationToken)AmazonS3Client.PutBucketOwnershipControlsAsync(PutBucketOwnershipControlsRequest, CancellationToken)
Constructors
AmazonS3EncryptionClient(RegionEndpoint, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
public AmazonS3EncryptionClient(RegionEndpoint region, EncryptionMaterials materials)
Parameters
region
RegionEndpointThe region to connect.
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(AWSCredentials, RegionEndpoint, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Credentials, Region and Encryption materials
public AmazonS3EncryptionClient(AWSCredentials credentials, RegionEndpoint region, EncryptionMaterials materials)
Parameters
credentials
AWSCredentialsAWS Credentials
region
RegionEndpointThe region to connect.
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(AWSCredentials, AmazonS3CryptoConfiguration, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object and Encryption materials
public AmazonS3EncryptionClient(AWSCredentials credentials, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)
Parameters
credentials
AWSCredentialsAWS Credentials
config
AmazonS3CryptoConfigurationThe AmazonS3EncryptionClient CryptoConfiguration Object
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(AWSCredentials, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Credentials and Encryption materials.
public AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials materials)
Parameters
credentials
AWSCredentialsAWS Credentials
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(AmazonS3CryptoConfiguration, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with the Encryption materials, AmazonS3 CryptoConfiguration object and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
public AmazonS3EncryptionClient(AmazonS3CryptoConfiguration config, EncryptionMaterials materials)
Parameters
config
AmazonS3CryptoConfigurationThe AmazonS3EncryptionClient CryptoConfiguration Object
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(EncryptionMaterials)
Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
public AmazonS3EncryptionClient(EncryptionMaterials materials)
Parameters
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, RegionEndpoint, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key, Region and Encryption materials
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
region
RegionEndpointThe region to connect.
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, AmazonS3CryptoConfiguration, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, AmazonS3 CryptoConfiguration object and Encryption materials.
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
config
AmazonS3CryptoConfigurationThe AmazonS3EncryptionClient CryptoConfiguration Object
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key and Encryption materials
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, string, RegionEndpoint, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken, Region and Encryption materials.
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
awsSessionToken
stringAWS Session Token
region
RegionEndpointThe region to connect.
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, string, AmazonS3CryptoConfiguration, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials.
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
awsSessionToken
stringAWS Session Token
config
AmazonS3CryptoConfigurationThe AmazonS3EncryptionClient CryptoConfiguration Object
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
AmazonS3EncryptionClient(string, string, string, EncryptionMaterials)
Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken and Encryption materials.
public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, EncryptionMaterials materials)
Parameters
awsAccessKeyId
stringAWS Access Key ID
awsSecretAccessKey
stringAWS Secret Access Key
awsSessionToken
stringAWS Session Token
materials
EncryptionMaterialsThe encryption materials to be used to encrypt and decrypt envelope key.
Properties
SupportResponseLogging
Turn off response logging because it will interfere with decrypt of the data coming back from S3.
protected override bool SupportResponseLogging { get; }
Property Value
Methods
CustomizeRuntimePipeline(RuntimePipeline)
Customize the pipeline to allow encryption.
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
Parameters
pipeline
RuntimePipeline
Dispose(bool)
Dispose this instance
protected override void Dispose(bool disposing)
Parameters
disposing
bool