You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::SNS::Types::MessageAttributeValue

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-sns/lib/aws-sdk-sns/types.rb

Overview

Note:

When making an API call, you may pass MessageAttributeValue data as a hash:

{
  data_type: "String", # required
  string_value: "String",
  binary_value: "data",
}

The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see Publish.

Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes). For more information, see Using Amazon SNS Message Attributes.

Instance Attribute Summary collapse

Instance Attribute Details

#binary_valueString

Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

Returns:

  • (String)


927
928
929
930
931
932
# File 'gems/aws-sdk-sns/lib/aws-sdk-sns/types.rb', line 927

class MessageAttributeValue < Struct.new(
  :data_type,
  :string_value,
  :binary_value)
  include Aws::Structure
end

#data_typeString

Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.

Returns:

  • (String)


927
928
929
930
931
932
# File 'gems/aws-sdk-sns/lib/aws-sdk-sns/types.rb', line 927

class MessageAttributeValue < Struct.new(
  :data_type,
  :string_value,
  :binary_value)
  include Aws::Structure
end

#string_valueString

Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

Returns:

  • (String)


927
928
929
930
931
932
# File 'gems/aws-sdk-sns/lib/aws-sdk-sns/types.rb', line 927

class MessageAttributeValue < Struct.new(
  :data_type,
  :string_value,
  :binary_value)
  include Aws::Structure
end