Enum MessageAttributeDataType
java.lang.Object
java.lang.Enum<MessageAttributeDataType>
software.amazon.awscdk.services.stepfunctions.tasks.MessageAttributeDataType
- All Implemented Interfaces:
Serializable
,Comparable<MessageAttributeDataType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.117Z")
@Stability(Stable)
public enum MessageAttributeDataType
extends Enum<MessageAttributeDataType>
The data type set for the SNS message attributes.
Example:
Topic topic = new Topic(this, "Topic"); // Use a field from the execution data as message. SnsPublish task1 = SnsPublish.Builder.create(this, "Publish1") .topic(topic) .integrationPattern(IntegrationPattern.REQUEST_RESPONSE) .message(TaskInput.fromDataAt("$.state.message")) .messageAttributes(Map.of( "place", MessageAttribute.builder() .value(JsonPath.stringAt("$.place")) .build(), "pic", MessageAttribute.builder() // BINARY must be explicitly set .dataType(MessageAttributeDataType.BINARY) .value(JsonPath.stringAt("$.pic")) .build(), "people", MessageAttribute.builder() .value(4) .build(), "handles", MessageAttribute.builder() .value(List.of("@kslater", "@jjf", null, "@mfanning")) .build())) .build(); // Combine a field from the execution data with // a literal object. SnsPublish task2 = SnsPublish.Builder.create(this, "Publish2") .topic(topic) .message(TaskInput.fromObject(Map.of( "field1", "somedata", "field2", JsonPath.stringAt("$.field2")))) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBinary type attributes can store any binary data.Numbers are positive or negative integers or floating-point numbers.Strings are Unicode with UTF-8 binary encoding.An array, formatted as a string. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageAttributeDataType
Returns the enum constant of this type with the specified name.static MessageAttributeDataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
STRING
Strings are Unicode with UTF-8 binary encoding. -
STRING_ARRAY
An array, formatted as a string.- See Also:
-
NUMBER
Numbers are positive or negative integers or floating-point numbers.- See Also:
-
BINARY
Binary type attributes can store any binary data.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-