Method: AWS::S3::ACL::Grantee#type

Defined in:
lib/aws-matt/s3/acl.rb

#typeObject

Returns the type of grantee. Will be one of CanonicalUser, AmazonCustomerByEmail or Group.



405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/aws-matt/s3/acl.rb', line 405

def type
  return attributes['type'] if attributes['type']
  
  # Lookups are in order of preference so if, for example, you set the uri but display_name and id are also
  # set, we'd rather go with the canonical representation.
  if display_name && id
    'CanonicalUser'
  elsif email_address
    'AmazonCustomerByEmail'
  elsif uri
    'Group'
  end
end