AwsS3Client constructor

AwsS3Client({
  1. required String secretKey,
  2. required String accessKey,
  3. required String bucketId,
  4. String? host,
  5. required String region,
  6. String? sessionToken,
  7. Client? client,
})

Creates a new AwsS3Client instance.

@param secretKey The secret key. Required. see https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html @param accessKey The access key. Required. see https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html @param bucketId The bucket. Required. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro @param host The host, in path-style. Defaults to "s3.$region.amazonaws.com". See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro @param region The region of the bucket. Required. @param sessionToken The session token. Optional. @param client The http client. Optional. Useful for debugging.

Implementation

AwsS3Client(
    {required String secretKey,
    required String accessKey,
    required String bucketId,
    String? host,
    required String region,
    String? sessionToken,
    Client? client})
    : _accessKey = accessKey,
      _secretKey = secretKey,
      _host = host ?? "s3.$region.amazonaws.com",
      _bucketId = bucketId,
      _region = region,
      _sessionToken = sessionToken,
      _client = client ?? Client();