-
Notifications
You must be signed in to change notification settings - Fork 17
/
awsstepfunctionstasks_MessageAttributeDataType.go
72 lines (68 loc) · 2.54 KB
/
awsstepfunctionstasks_MessageAttributeDataType.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package awsstepfunctionstasks
// The data type set for the SNS message attributes.
//
// Example:
// topic := sns.NewTopic(this, jsii.String("Topic"))
//
// // Use a field from the execution data as message.
// task1 := tasks.NewSnsPublish(this, jsii.String("Publish1"), &snsPublishProps{
// topic: topic,
// integrationPattern: sfn.integrationPattern_REQUEST_RESPONSE,
// message: sfn.taskInput.fromDataAt(jsii.String("$.state.message")),
// messageAttributes: map[string]messageAttribute{
// "place": &messageAttribute{
// "value": sfn.JsonPath.stringAt(jsii.String("$.place")),
// },
// "pic": &messageAttribute{
// // BINARY must be explicitly set
// "dataType": tasks.MessageAttributeDataType_BINARY,
// "value": sfn.JsonPath.stringAt(jsii.String("$.pic")),
// },
// "people": &messageAttribute{
// "value": jsii.Number(4),
// },
// "handles": &messageAttribute{
// "value": []interface{}{
// jsii.String("@kslater"),
// jsii.String("@jjf"),
// nil,
// jsii.String("@mfanning"),
// },
// },
// },
// })
//
// // Combine a field from the execution data with
// // a literal object.
// task2 := tasks.NewSnsPublish(this, jsii.String("Publish2"), &snsPublishProps{
// topic: topic,
// message: sfn.*taskInput.fromObject(map[string]interface{}{
// "field1": jsii.String("somedata"),
// "field2": sfn.JsonPath.stringAt(jsii.String("$.field2")),
// }),
// })
//
// See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes
//
// Experimental.
type MessageAttributeDataType string
const (
// Strings are Unicode with UTF-8 binary encoding.
// Experimental.
MessageAttributeDataType_STRING MessageAttributeDataType = "STRING"
// An array, formatted as a string.
// See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes
//
// Experimental.
MessageAttributeDataType_STRING_ARRAY MessageAttributeDataType = "STRING_ARRAY"
// Numbers are positive or negative integers or floating-point numbers.
// See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes
//
// Experimental.
MessageAttributeDataType_NUMBER MessageAttributeDataType = "NUMBER"
// Binary type attributes can store any binary data.
// See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes
//
// Experimental.
MessageAttributeDataType_BINARY MessageAttributeDataType = "BINARY"
)