ruby/example_code/s3/determine_object_encryption_state.rb
# Full example call:
# Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon S3 .
def run_me
  bucket_name = 'doc-example-bucket'
  object_key = 'my-file.txt'
  region = 'us-west-2'
  s3_client = Aws::S3::Client.new(region: region)
  puts "Getting server-side encryption state for object '#{object_key}' " \
    "in bucket '#{bucket_name}'..."
  state = get_server_side_encryption_state(
    s3_client,
    bucket_name,
    object_key
  )
  puts "Encryption state is #{state}."
end
def run_me bucket_name = 'doc-example-bucket' object_key = 'my-file.txt' region = 'us-west-2' s3_client = Aws :: S3 :: Client . new ( region : region ) puts "Getting server-side encryption state for object '#{object_key}' " "in bucket '#{bucket_name}'..." state = get_server_side_encryption_state ( s3_client , bucket_name , object_key ) puts "Encryption state is #{state}." end
Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon S3 .