class AWS::SimpleEmailService::Identity
false
when there is both a bounce_topic
and complaint_topic
.
notifications will not be forwarded via email. Can only be set to
@attr [Boolean] forwarding_enabled When false
, complaint and bounce
@attr [String] complaint_topic_arn
@attr [String] bounce_topic_arn
@attr_reader [String,nil] verification_token
@attr_reader [String] verification_status
def bounce_topic
-
(SNS::Topic, nil)
-
def bounce_topic if arn = bounce_topic_arn SNS::Topic.new(arn, :config => config) end end
def bounce_topic= topic
-
topic
(String, SNS::Topic
) -- The topic (ARN string or topic
def bounce_topic= topic arn = topic.respond_to?(:arn) ? topic.arn : topic self.bounce_topic_arn = arn end
def complaint_topic
-
(SNS::Topic, nil)
-
def complaint_topic if arn = complaint_topic_arn SNS::Topic.new(arn, :config => config) end end
def complaint_topic= topic
-
topic
(String, SNS::Topic
) -- The topic (ARN string or topic
def complaint_topic= topic arn = topic.respond_to?(:arn) ? topic.arn : topic self.complaint_topic_arn = arn end
def delete
-
(nil)
-
def delete client.delete_identity(:identity => identity) nil end
def domain?
-
(Boolean)
- Returns +true+ if this {Identity} represents a
def domain? !email_address? end
def email_address?
-
(Boolean)
- Returns +true+ if this {Identity} represents an
def email_address? identity =~ /@/ ? true : false end
def exists?
-
(Boolean)
- Returns true if the identity exists.
def exists? !!get_resource[:verification_attributes][identity] end
def get_resource attr
def get_resource attr client_opts = {} client_opts[:identities] = [identity] if attr.name.to_s.match(/verification/) client.get_identity_verification_attributes(client_opts) else client.get_identity_notification_attributes(client_opts) end end
def initialize email_address_or_domain, options = {}
- Private: -
def initialize email_address_or_domain, options = {} @identity = email_address_or_domain super end
def pending?
-
(Boolean)
- Returns +true+ if verification for this email
def pending? verification_status == 'Pending' end
def resource_identifiers
def resource_identifiers [[:identity, identity]] end
def update_resource attr, value
def update_resource attr, value client_opts = {} client_opts[:identity] = identity case attr.name when :bounce_topic_arn method = :set_identity_notification_topic client_opts[:notification_type] = 'Bounce' client_opts[:sns_topic] = value if value when :complaint_topic_arn method = :set_identity_notification_topic client_opts[:notification_type] = 'Complaint' client_opts[:sns_topic] = value if value when :forwarding_enabled method = :set_identity_feedback_forwarding_enabled client_opts[:forwarding_enabled] = value else raise "unhandled attribute: #{attr.name}" end client.send(method, client_opts) end
def verified?
-
(Boolean)
- Returns +true+ if this email address/domain has
def verified? verification_status == 'Success' end