class Aws::S3::BucketTagging

def bucket

Returns:
  • (Bucket) -
def bucket
  Bucket.new(
    name: @bucket_name,
    client: @client
  )
end

def bucket_name

Returns:
  • (String) -
def bucket_name
  @bucket_name
end

def client

Returns:
  • (Client) -
def client
  @client
end

def data

Returns:
  • (Types::GetBucketTaggingOutput) -
def data
  load unless @data
  @data
end

def data_loaded?

Returns:
  • (Boolean) -
def data_loaded?
  !!@data
end

def delete(options = {})

Returns:
  • (EmptyStructure) -

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def delete(options = {})
  options = options.merge(bucket: @bucket_name)
  resp = @client.delete_bucket_tagging(options)
  resp.data
end

def extract_bucket_name(args, options)

def extract_bucket_name(args, options)
  value = args[0] || options.delete(:bucket_name)
  case value
  when String then value
  when nil then raise ArgumentError, "missing required option :bucket_name"
  else
    msg = "expected :bucket_name to be a String, got #{value.class}"
    raise ArgumentError, msg
  end
end

def identifiers

Other tags:
    Api: - private

Deprecated:
def identifiers
  { bucket_name: @bucket_name }
end

def initialize(*args)

Options Hash: (**options)
  • :client (Client) --
  • :bucket_name (required, String) --
  • :client (Client) --

Overloads:
  • def initialize(options = {})
  • def initialize(bucket_name, options = {})

Parameters:
  • bucket_name (String) --
def initialize(*args)
  options = Hash === args.last ? args.pop.dup : {}
  @bucket_name = extract_bucket_name(args, options)
  @data = options.delete(:data)
  @client = options.delete(:client) || Client.new(options)
end

def load

Returns:
  • (self) -
def load
  resp = @client.get_bucket_tagging(bucket: @bucket_name)
  @data = resp.data
  self
end

def put(options = {})

Returns:
  • (EmptyStructure) -

Options Hash: (**options)
  • :tagging (required, Types::Tagging) --
  • :content_md5 (String) --

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def put(options = {})
  options = options.merge(bucket: @bucket_name)
  resp = @client.put_bucket_tagging(options)
  resp.data
end

def tag_set

Returns:
  • (Array) -
def tag_set
  data.tag_set
end