@epilot360/icons 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/bundle.js.map +1 -1
  3. package/index.js.map +1 -1
  4. package/package.json +35 -8
  5. package/react/Close/index.d.ts +4 -0
  6. package/react/Close/index.js +28 -0
  7. package/react/Close/index.js.map +1 -0
  8. package/react/ContentCopy/index.d.ts +4 -0
  9. package/react/ContentCopy/index.js +28 -0
  10. package/react/ContentCopy/index.js.map +1 -0
  11. package/react/DataObject/index.d.ts +4 -0
  12. package/react/DataObject/index.js +28 -0
  13. package/react/DataObject/index.js.map +1 -0
  14. package/react/Edit/index.d.ts +4 -0
  15. package/react/Edit/index.js +28 -0
  16. package/react/Edit/index.js.map +1 -0
  17. package/react/EpilotIcon.d.ts +21 -0
  18. package/react/EpilotIcon.js +41 -0
  19. package/react/EpilotIcon.js.map +1 -0
  20. package/react/OpenInNew/index.d.ts +4 -0
  21. package/react/OpenInNew/index.js +28 -0
  22. package/react/OpenInNew/index.js.map +1 -0
  23. package/react/Share/index.d.ts +4 -0
  24. package/react/Share/index.js +28 -0
  25. package/react/Share/index.js.map +1 -0
  26. package/react/index.d.ts +6 -0
  27. package/react/index.js +6 -0
  28. package/react/index.js.map +1 -1
  29. package/react/types.d.ts +7 -0
  30. package/react/types.js +9 -0
  31. package/react/types.js.map +1 -0
  32. package/src/stories/Readme.mdx +53 -0
  33. package/iac/node_modules/@balena/dockerignore/LICENSE.md +0 -206
  34. package/iac/node_modules/@balena/dockerignore/README.md +0 -261
  35. package/iac/node_modules/@cspotcode/source-map-support/LICENSE.md +0 -21
  36. package/iac/node_modules/@cspotcode/source-map-support/README.md +0 -289
  37. package/iac/node_modules/@jridgewell/resolve-uri/LICENSE +0 -19
  38. package/iac/node_modules/@jridgewell/resolve-uri/README.md +0 -40
  39. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +0 -1
  40. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +0 -1
  41. package/iac/node_modules/@jridgewell/sourcemap-codec/LICENSE +0 -21
  42. package/iac/node_modules/@jridgewell/sourcemap-codec/README.md +0 -200
  43. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  44. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +0 -1
  45. package/iac/node_modules/@jridgewell/trace-mapping/LICENSE +0 -19
  46. package/iac/node_modules/@jridgewell/trace-mapping/README.md +0 -193
  47. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +0 -1
  48. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +0 -1
  49. package/iac/node_modules/@tsconfig/node10/LICENSE +0 -21
  50. package/iac/node_modules/@tsconfig/node10/README.md +0 -40
  51. package/iac/node_modules/@tsconfig/node12/LICENSE +0 -21
  52. package/iac/node_modules/@tsconfig/node12/README.md +0 -40
  53. package/iac/node_modules/@tsconfig/node14/LICENSE +0 -21
  54. package/iac/node_modules/@tsconfig/node14/README.md +0 -40
  55. package/iac/node_modules/@tsconfig/node16/LICENSE +0 -21
  56. package/iac/node_modules/@tsconfig/node16/README.md +0 -40
  57. package/iac/node_modules/@types/jest/LICENSE +0 -21
  58. package/iac/node_modules/@types/jest/README.md +0 -17
  59. package/iac/node_modules/@types/node/LICENSE +0 -21
  60. package/iac/node_modules/@types/node/README.md +0 -16
  61. package/iac/node_modules/@types/prettier/LICENSE +0 -21
  62. package/iac/node_modules/@types/prettier/README.md +0 -16
  63. package/iac/node_modules/acorn/LICENSE +0 -21
  64. package/iac/node_modules/acorn/README.md +0 -273
  65. package/iac/node_modules/acorn-walk/LICENSE +0 -21
  66. package/iac/node_modules/acorn-walk/README.md +0 -126
  67. package/iac/node_modules/ansi-regex/license +0 -9
  68. package/iac/node_modules/ansi-regex/readme.md +0 -78
  69. package/iac/node_modules/ansi-styles/license +0 -9
  70. package/iac/node_modules/ansi-styles/readme.md +0 -144
  71. package/iac/node_modules/arg/LICENSE.md +0 -21
  72. package/iac/node_modules/arg/README.md +0 -280
  73. package/iac/node_modules/at-least-node/LICENSE +0 -6
  74. package/iac/node_modules/at-least-node/README.md +0 -25
  75. package/iac/node_modules/aws-cdk/LICENSE +0 -201
  76. package/iac/node_modules/aws-cdk/README.md +0 -742
  77. package/iac/node_modules/aws-cdk/lib/init-templates/LICENSE +0 -16
  78. package/iac/node_modules/aws-cdk/lib/init-templates/app/csharp/README.md +0 -14
  79. package/iac/node_modules/aws-cdk/lib/init-templates/app/fsharp/README.md +0 -18
  80. package/iac/node_modules/aws-cdk/lib/init-templates/app/go/README.md +0 -12
  81. package/iac/node_modules/aws-cdk/lib/init-templates/app/java/README.md +0 -18
  82. package/iac/node_modules/aws-cdk/lib/init-templates/app/javascript/README.md +0 -12
  83. package/iac/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md +0 -58
  84. package/iac/node_modules/aws-cdk/lib/init-templates/app/typescript/README.md +0 -14
  85. package/iac/node_modules/aws-cdk/lib/init-templates/lib/typescript/README.template.md +0 -12
  86. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md +0 -19
  87. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md +0 -20
  88. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/go/README.md +0 -12
  89. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/java/README.template.md +0 -19
  90. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md +0 -13
  91. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/python/README.template.md +0 -65
  92. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md +0 -15
  93. package/iac/node_modules/aws-cdk/test/integ/cli/README.md +0 -48
  94. package/iac/node_modules/aws-cdk/test/integ/cli-regression-patches/README.md +0 -54
  95. package/iac/node_modules/aws-cdk-lib/LICENSE +0 -201
  96. package/iac/node_modules/aws-cdk-lib/README.md +0 -1119
  97. package/iac/node_modules/aws-cdk-lib/alexa-ask/README.md +0 -27
  98. package/iac/node_modules/aws-cdk-lib/assertions/README.md +0 -571
  99. package/iac/node_modules/aws-cdk-lib/assets/README.md +0 -4
  100. package/iac/node_modules/aws-cdk-lib/aws-accessanalyzer/README.md +0 -27
  101. package/iac/node_modules/aws-cdk-lib/aws-acmpca/README.md +0 -59
  102. package/iac/node_modules/aws-cdk-lib/aws-amazonmq/README.md +0 -27
  103. package/iac/node_modules/aws-cdk-lib/aws-amplify/README.md +0 -32
  104. package/iac/node_modules/aws-cdk-lib/aws-amplifyuibuilder/README.md +0 -27
  105. package/iac/node_modules/aws-cdk-lib/aws-apigateway/README.md +0 -1335
  106. package/iac/node_modules/aws-cdk-lib/aws-apigatewayv2/README.md +0 -32
  107. package/iac/node_modules/aws-cdk-lib/aws-appconfig/README.md +0 -27
  108. package/iac/node_modules/aws-cdk-lib/aws-appflow/README.md +0 -27
  109. package/iac/node_modules/aws-cdk-lib/aws-appintegrations/README.md +0 -27
  110. package/iac/node_modules/aws-cdk-lib/aws-applicationautoscaling/README.md +0 -246
  111. package/iac/node_modules/aws-cdk-lib/aws-applicationinsights/README.md +0 -27
  112. package/iac/node_modules/aws-cdk-lib/aws-appmesh/README.md +0 -883
  113. package/iac/node_modules/aws-cdk-lib/aws-apprunner/README.md +0 -32
  114. package/iac/node_modules/aws-cdk-lib/aws-appstream/README.md +0 -27
  115. package/iac/node_modules/aws-cdk-lib/aws-appsync/README.md +0 -32
  116. package/iac/node_modules/aws-cdk-lib/aws-aps/README.md +0 -27
  117. package/iac/node_modules/aws-cdk-lib/aws-athena/README.md +0 -27
  118. package/iac/node_modules/aws-cdk-lib/aws-auditmanager/README.md +0 -27
  119. package/iac/node_modules/aws-cdk-lib/aws-autoscaling/README.md +0 -540
  120. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-common/README.md +0 -8
  121. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-hooktargets/README.md +0 -18
  122. package/iac/node_modules/aws-cdk-lib/aws-autoscalingplans/README.md +0 -27
  123. package/iac/node_modules/aws-cdk-lib/aws-backup/README.md +0 -210
  124. package/iac/node_modules/aws-cdk-lib/aws-batch/README.md +0 -32
  125. package/iac/node_modules/aws-cdk-lib/aws-billingconductor/README.md +0 -27
  126. package/iac/node_modules/aws-cdk-lib/aws-budgets/README.md +0 -27
  127. package/iac/node_modules/aws-cdk-lib/aws-cassandra/README.md +0 -27
  128. package/iac/node_modules/aws-cdk-lib/aws-ce/README.md +0 -27
  129. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/README.md +0 -166
  130. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/README.md +0 -2
  131. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/suffixes/README.txt +0 -8
  132. package/iac/node_modules/aws-cdk-lib/aws-chatbot/README.md +0 -44
  133. package/iac/node_modules/aws-cdk-lib/aws-cloud9/README.md +0 -32
  134. package/iac/node_modules/aws-cdk-lib/aws-cloudformation/README.md +0 -4
  135. package/iac/node_modules/aws-cdk-lib/aws-cloudfront/README.md +0 -973
  136. package/iac/node_modules/aws-cdk-lib/aws-cloudfront-origins/README.md +0 -126
  137. package/iac/node_modules/aws-cdk-lib/aws-cloudtrail/README.md +0 -189
  138. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch/README.md +0 -579
  139. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch-actions/README.md +0 -43
  140. package/iac/node_modules/aws-cdk-lib/aws-codeartifact/README.md +0 -27
  141. package/iac/node_modules/aws-cdk-lib/aws-codebuild/README.md +0 -759
  142. package/iac/node_modules/aws-cdk-lib/aws-codecommit/README.md +0 -85
  143. package/iac/node_modules/aws-cdk-lib/aws-codedeploy/README.md +0 -319
  144. package/iac/node_modules/aws-cdk-lib/aws-codeguruprofiler/README.md +0 -37
  145. package/iac/node_modules/aws-cdk-lib/aws-codegurureviewer/README.md +0 -27
  146. package/iac/node_modules/aws-cdk-lib/aws-codepipeline/README.md +0 -481
  147. package/iac/node_modules/aws-cdk-lib/aws-codepipeline-actions/README.md +0 -1203
  148. package/iac/node_modules/aws-cdk-lib/aws-codestar/README.md +0 -32
  149. package/iac/node_modules/aws-cdk-lib/aws-codestarconnections/README.md +0 -27
  150. package/iac/node_modules/aws-cdk-lib/aws-codestarnotifications/README.md +0 -68
  151. package/iac/node_modules/aws-cdk-lib/aws-cognito/README.md +0 -843
  152. package/iac/node_modules/aws-cdk-lib/aws-config/README.md +0 -218
  153. package/iac/node_modules/aws-cdk-lib/aws-connect/README.md +0 -27
  154. package/iac/node_modules/aws-cdk-lib/aws-controltower/README.md +0 -27
  155. package/iac/node_modules/aws-cdk-lib/aws-cur/README.md +0 -27
  156. package/iac/node_modules/aws-cdk-lib/aws-customerprofiles/README.md +0 -27
  157. package/iac/node_modules/aws-cdk-lib/aws-databrew/README.md +0 -27
  158. package/iac/node_modules/aws-cdk-lib/aws-datapipeline/README.md +0 -27
  159. package/iac/node_modules/aws-cdk-lib/aws-datasync/README.md +0 -27
  160. package/iac/node_modules/aws-cdk-lib/aws-dax/README.md +0 -27
  161. package/iac/node_modules/aws-cdk-lib/aws-detective/README.md +0 -27
  162. package/iac/node_modules/aws-cdk-lib/aws-devopsguru/README.md +0 -27
  163. package/iac/node_modules/aws-cdk-lib/aws-directoryservice/README.md +0 -27
  164. package/iac/node_modules/aws-cdk-lib/aws-dlm/README.md +0 -27
  165. package/iac/node_modules/aws-cdk-lib/aws-dms/README.md +0 -27
  166. package/iac/node_modules/aws-cdk-lib/aws-docdb/README.md +0 -153
  167. package/iac/node_modules/aws-cdk-lib/aws-dynamodb/README.md +0 -200
  168. package/iac/node_modules/aws-cdk-lib/aws-ec2/README.md +0 -1514
  169. package/iac/node_modules/aws-cdk-lib/aws-ecr/README.md +0 -110
  170. package/iac/node_modules/aws-cdk-lib/aws-ecr-assets/README.md +0 -167
  171. package/iac/node_modules/aws-cdk-lib/aws-ecs/README.md +0 -1225
  172. package/iac/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md +0 -980
  173. package/iac/node_modules/aws-cdk-lib/aws-efs/README.md +0 -154
  174. package/iac/node_modules/aws-cdk-lib/aws-eks/README.md +0 -1450
  175. package/iac/node_modules/aws-cdk-lib/aws-elasticache/README.md +0 -27
  176. package/iac/node_modules/aws-cdk-lib/aws-elasticbeanstalk/README.md +0 -27
  177. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancing/README.md +0 -40
  178. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +0 -569
  179. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-actions/README.md +0 -68
  180. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-targets/README.md +0 -4
  181. package/iac/node_modules/aws-cdk-lib/aws-elasticsearch/README.md +0 -441
  182. package/iac/node_modules/aws-cdk-lib/aws-emr/README.md +0 -27
  183. package/iac/node_modules/aws-cdk-lib/aws-emrcontainers/README.md +0 -27
  184. package/iac/node_modules/aws-cdk-lib/aws-emrserverless/README.md +0 -27
  185. package/iac/node_modules/aws-cdk-lib/aws-events/README.md +0 -249
  186. package/iac/node_modules/aws-cdk-lib/aws-events-targets/README.md +0 -339
  187. package/iac/node_modules/aws-cdk-lib/aws-eventschemas/README.md +0 -27
  188. package/iac/node_modules/aws-cdk-lib/aws-evidently/README.md +0 -27
  189. package/iac/node_modules/aws-cdk-lib/aws-finspace/README.md +0 -27
  190. package/iac/node_modules/aws-cdk-lib/aws-fis/README.md +0 -27
  191. package/iac/node_modules/aws-cdk-lib/aws-fms/README.md +0 -27
  192. package/iac/node_modules/aws-cdk-lib/aws-forecast/README.md +0 -27
  193. package/iac/node_modules/aws-cdk-lib/aws-frauddetector/README.md +0 -27
  194. package/iac/node_modules/aws-cdk-lib/aws-fsx/README.md +0 -200
  195. package/iac/node_modules/aws-cdk-lib/aws-gamelift/README.md +0 -27
  196. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator/README.md +0 -182
  197. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator-endpoints/README.md +0 -10
  198. package/iac/node_modules/aws-cdk-lib/aws-glue/README.md +0 -32
  199. package/iac/node_modules/aws-cdk-lib/aws-greengrass/README.md +0 -27
  200. package/iac/node_modules/aws-cdk-lib/aws-greengrassv2/README.md +0 -27
  201. package/iac/node_modules/aws-cdk-lib/aws-groundstation/README.md +0 -27
  202. package/iac/node_modules/aws-cdk-lib/aws-guardduty/README.md +0 -27
  203. package/iac/node_modules/aws-cdk-lib/aws-healthlake/README.md +0 -27
  204. package/iac/node_modules/aws-cdk-lib/aws-iam/README.md +0 -509
  205. package/iac/node_modules/aws-cdk-lib/aws-imagebuilder/README.md +0 -27
  206. package/iac/node_modules/aws-cdk-lib/aws-inspector/README.md +0 -27
  207. package/iac/node_modules/aws-cdk-lib/aws-inspectorv2/README.md +0 -27
  208. package/iac/node_modules/aws-cdk-lib/aws-iot/README.md +0 -32
  209. package/iac/node_modules/aws-cdk-lib/aws-iot1click/README.md +0 -27
  210. package/iac/node_modules/aws-cdk-lib/aws-iotanalytics/README.md +0 -27
  211. package/iac/node_modules/aws-cdk-lib/aws-iotcoredeviceadvisor/README.md +0 -27
  212. package/iac/node_modules/aws-cdk-lib/aws-iotevents/README.md +0 -32
  213. package/iac/node_modules/aws-cdk-lib/aws-iotfleethub/README.md +0 -27
  214. package/iac/node_modules/aws-cdk-lib/aws-iotsitewise/README.md +0 -27
  215. package/iac/node_modules/aws-cdk-lib/aws-iotthingsgraph/README.md +0 -27
  216. package/iac/node_modules/aws-cdk-lib/aws-iottwinmaker/README.md +0 -27
  217. package/iac/node_modules/aws-cdk-lib/aws-iotwireless/README.md +0 -27
  218. package/iac/node_modules/aws-cdk-lib/aws-ivs/README.md +0 -32
  219. package/iac/node_modules/aws-cdk-lib/aws-kafkaconnect/README.md +0 -27
  220. package/iac/node_modules/aws-cdk-lib/aws-kendra/README.md +0 -27
  221. package/iac/node_modules/aws-cdk-lib/aws-kinesis/README.md +0 -188
  222. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalytics/README.md +0 -27
  223. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalyticsv2/README.md +0 -27
  224. package/iac/node_modules/aws-cdk-lib/aws-kinesisfirehose/README.md +0 -32
  225. package/iac/node_modules/aws-cdk-lib/aws-kinesisvideo/README.md +0 -27
  226. package/iac/node_modules/aws-cdk-lib/aws-kms/README.md +0 -209
  227. package/iac/node_modules/aws-cdk-lib/aws-lakeformation/README.md +0 -27
  228. package/iac/node_modules/aws-cdk-lib/aws-lambda/README.md +0 -985
  229. package/iac/node_modules/aws-cdk-lib/aws-lambda-destinations/README.md +0 -147
  230. package/iac/node_modules/aws-cdk-lib/aws-lambda-event-sources/README.md +0 -281
  231. package/iac/node_modules/aws-cdk-lib/aws-lambda-nodejs/README.md +0 -317
  232. package/iac/node_modules/aws-cdk-lib/aws-lex/README.md +0 -27
  233. package/iac/node_modules/aws-cdk-lib/aws-licensemanager/README.md +0 -27
  234. package/iac/node_modules/aws-cdk-lib/aws-lightsail/README.md +0 -27
  235. package/iac/node_modules/aws-cdk-lib/aws-location/README.md +0 -27
  236. package/iac/node_modules/aws-cdk-lib/aws-logs/README.md +0 -322
  237. package/iac/node_modules/aws-cdk-lib/aws-logs-destinations/README.md +0 -7
  238. package/iac/node_modules/aws-cdk-lib/aws-lookoutequipment/README.md +0 -27
  239. package/iac/node_modules/aws-cdk-lib/aws-lookoutmetrics/README.md +0 -27
  240. package/iac/node_modules/aws-cdk-lib/aws-lookoutvision/README.md +0 -27
  241. package/iac/node_modules/aws-cdk-lib/aws-m2/README.md +0 -27
  242. package/iac/node_modules/aws-cdk-lib/aws-macie/README.md +0 -27
  243. package/iac/node_modules/aws-cdk-lib/aws-managedblockchain/README.md +0 -27
  244. package/iac/node_modules/aws-cdk-lib/aws-mediaconnect/README.md +0 -27
  245. package/iac/node_modules/aws-cdk-lib/aws-mediaconvert/README.md +0 -27
  246. package/iac/node_modules/aws-cdk-lib/aws-medialive/README.md +0 -27
  247. package/iac/node_modules/aws-cdk-lib/aws-mediapackage/README.md +0 -27
  248. package/iac/node_modules/aws-cdk-lib/aws-mediastore/README.md +0 -27
  249. package/iac/node_modules/aws-cdk-lib/aws-mediatailor/README.md +0 -27
  250. package/iac/node_modules/aws-cdk-lib/aws-memorydb/README.md +0 -27
  251. package/iac/node_modules/aws-cdk-lib/aws-msk/README.md +0 -32
  252. package/iac/node_modules/aws-cdk-lib/aws-mwaa/README.md +0 -27
  253. package/iac/node_modules/aws-cdk-lib/aws-neptune/README.md +0 -32
  254. package/iac/node_modules/aws-cdk-lib/aws-networkfirewall/README.md +0 -27
  255. package/iac/node_modules/aws-cdk-lib/aws-networkmanager/README.md +0 -27
  256. package/iac/node_modules/aws-cdk-lib/aws-nimblestudio/README.md +0 -27
  257. package/iac/node_modules/aws-cdk-lib/aws-opensearchservice/README.md +0 -378
  258. package/iac/node_modules/aws-cdk-lib/aws-opsworks/README.md +0 -27
  259. package/iac/node_modules/aws-cdk-lib/aws-opsworkscm/README.md +0 -27
  260. package/iac/node_modules/aws-cdk-lib/aws-panorama/README.md +0 -27
  261. package/iac/node_modules/aws-cdk-lib/aws-personalize/README.md +0 -27
  262. package/iac/node_modules/aws-cdk-lib/aws-pinpoint/README.md +0 -27
  263. package/iac/node_modules/aws-cdk-lib/aws-pinpointemail/README.md +0 -27
  264. package/iac/node_modules/aws-cdk-lib/aws-qldb/README.md +0 -27
  265. package/iac/node_modules/aws-cdk-lib/aws-quicksight/README.md +0 -27
  266. package/iac/node_modules/aws-cdk-lib/aws-ram/README.md +0 -27
  267. package/iac/node_modules/aws-cdk-lib/aws-rds/README.md +0 -704
  268. package/iac/node_modules/aws-cdk-lib/aws-redshift/README.md +0 -32
  269. package/iac/node_modules/aws-cdk-lib/aws-redshiftserverless/README.md +0 -27
  270. package/iac/node_modules/aws-cdk-lib/aws-refactorspaces/README.md +0 -27
  271. package/iac/node_modules/aws-cdk-lib/aws-rekognition/README.md +0 -27
  272. package/iac/node_modules/aws-cdk-lib/aws-resiliencehub/README.md +0 -27
  273. package/iac/node_modules/aws-cdk-lib/aws-resourcegroups/README.md +0 -27
  274. package/iac/node_modules/aws-cdk-lib/aws-robomaker/README.md +0 -27
  275. package/iac/node_modules/aws-cdk-lib/aws-route53/README.md +0 -281
  276. package/iac/node_modules/aws-cdk-lib/aws-route53-patterns/README.md +0 -45
  277. package/iac/node_modules/aws-cdk-lib/aws-route53-targets/README.md +0 -181
  278. package/iac/node_modules/aws-cdk-lib/aws-route53recoverycontrol/README.md +0 -27
  279. package/iac/node_modules/aws-cdk-lib/aws-route53recoveryreadiness/README.md +0 -27
  280. package/iac/node_modules/aws-cdk-lib/aws-route53resolver/README.md +0 -32
  281. package/iac/node_modules/aws-cdk-lib/aws-rum/README.md +0 -27
  282. package/iac/node_modules/aws-cdk-lib/aws-s3/README.md +0 -581
  283. package/iac/node_modules/aws-cdk-lib/aws-s3-assets/README.md +0 -179
  284. package/iac/node_modules/aws-cdk-lib/aws-s3-deployment/README.md +0 -349
  285. package/iac/node_modules/aws-cdk-lib/aws-s3-notifications/README.md +0 -46
  286. package/iac/node_modules/aws-cdk-lib/aws-s3objectlambda/README.md +0 -32
  287. package/iac/node_modules/aws-cdk-lib/aws-s3outposts/README.md +0 -27
  288. package/iac/node_modules/aws-cdk-lib/aws-sagemaker/README.md +0 -27
  289. package/iac/node_modules/aws-cdk-lib/aws-sam/README.md +0 -27
  290. package/iac/node_modules/aws-cdk-lib/aws-sdb/README.md +0 -27
  291. package/iac/node_modules/aws-cdk-lib/aws-secretsmanager/README.md +0 -285
  292. package/iac/node_modules/aws-cdk-lib/aws-securityhub/README.md +0 -27
  293. package/iac/node_modules/aws-cdk-lib/aws-servicecatalog/README.md +0 -491
  294. package/iac/node_modules/aws-cdk-lib/aws-servicecatalogappregistry/README.md +0 -32
  295. package/iac/node_modules/aws-cdk-lib/aws-servicediscovery/README.md +0 -45
  296. package/iac/node_modules/aws-cdk-lib/aws-ses/README.md +0 -194
  297. package/iac/node_modules/aws-cdk-lib/aws-ses-actions/README.md +0 -16
  298. package/iac/node_modules/aws-cdk-lib/aws-signer/README.md +0 -41
  299. package/iac/node_modules/aws-cdk-lib/aws-sns/README.md +0 -184
  300. package/iac/node_modules/aws-cdk-lib/aws-sns-subscriptions/README.md +0 -120
  301. package/iac/node_modules/aws-cdk-lib/aws-sqs/README.md +0 -57
  302. package/iac/node_modules/aws-cdk-lib/aws-ssm/README.md +0 -99
  303. package/iac/node_modules/aws-cdk-lib/aws-ssmcontacts/README.md +0 -27
  304. package/iac/node_modules/aws-cdk-lib/aws-ssmincidents/README.md +0 -27
  305. package/iac/node_modules/aws-cdk-lib/aws-sso/README.md +0 -27
  306. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions/README.md +0 -884
  307. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/README.md +0 -1288
  308. package/iac/node_modules/aws-cdk-lib/aws-supportapp/README.md +0 -27
  309. package/iac/node_modules/aws-cdk-lib/aws-synthetics/README.md +0 -32
  310. package/iac/node_modules/aws-cdk-lib/aws-timestream/README.md +0 -27
  311. package/iac/node_modules/aws-cdk-lib/aws-transfer/README.md +0 -27
  312. package/iac/node_modules/aws-cdk-lib/aws-voiceid/README.md +0 -27
  313. package/iac/node_modules/aws-cdk-lib/aws-waf/README.md +0 -27
  314. package/iac/node_modules/aws-cdk-lib/aws-wafregional/README.md +0 -27
  315. package/iac/node_modules/aws-cdk-lib/aws-wafv2/README.md +0 -27
  316. package/iac/node_modules/aws-cdk-lib/aws-wisdom/README.md +0 -27
  317. package/iac/node_modules/aws-cdk-lib/aws-workspaces/README.md +0 -27
  318. package/iac/node_modules/aws-cdk-lib/aws-xray/README.md +0 -27
  319. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/README.md +0 -55
  320. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/schema/README.md +0 -5
  321. package/iac/node_modules/aws-cdk-lib/cloudformation-include/README.md +0 -466
  322. package/iac/node_modules/aws-cdk-lib/core/README.md +0 -1078
  323. package/iac/node_modules/aws-cdk-lib/custom-resources/README.md +0 -624
  324. package/iac/node_modules/aws-cdk-lib/cx-api/README.md +0 -98
  325. package/iac/node_modules/aws-cdk-lib/lambda-layer-awscli/README.md +0 -19
  326. package/iac/node_modules/aws-cdk-lib/lambda-layer-kubectl/README.md +0 -20
  327. package/iac/node_modules/aws-cdk-lib/lambda-layer-node-proxy-agent/README.md +0 -18
  328. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md +0 -206
  329. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md +0 -261
  330. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/LICENSE +0 -6
  331. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/README.md +0 -25
  332. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/LICENSE.md +0 -21
  333. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/README.md +0 -97
  334. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/LICENSE +0 -21
  335. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/README.md +0 -129
  336. package/iac/node_modules/aws-cdk-lib/node_modules/case/LICENSE +0 -22
  337. package/iac/node_modules/aws-cdk-lib/node_modules/case/README.md +0 -139
  338. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.min.js.map +0 -1
  339. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.plus.min.js.map +0 -1
  340. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/LICENSE +0 -18
  341. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/README.markdown +0 -62
  342. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/LICENSE +0 -15
  343. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/README.md +0 -264
  344. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/LICENSE +0 -15
  345. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/README.md +0 -143
  346. package/iac/node_modules/aws-cdk-lib/node_modules/ignore/README.md +0 -412
  347. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/LICENSE +0 -15
  348. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/README.md +0 -230
  349. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/LICENSE +0 -21
  350. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/README.md +0 -421
  351. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/LICENSE +0 -15
  352. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/README.md +0 -166
  353. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/LICENSE +0 -15
  354. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/README.md +0 -230
  355. package/iac/node_modules/aws-cdk-lib/node_modules/punycode/README.md +0 -122
  356. package/iac/node_modules/aws-cdk-lib/node_modules/semver/LICENSE +0 -15
  357. package/iac/node_modules/aws-cdk-lib/node_modules/semver/README.md +0 -568
  358. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/LICENSE +0 -20
  359. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/README.md +0 -76
  360. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/LICENSE +0 -15
  361. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/README.md +0 -204
  362. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/LICENSE +0 -13
  363. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/README.md +0 -127
  364. package/iac/node_modules/aws-cdk-lib/pipelines/README.md +0 -1573
  365. package/iac/node_modules/aws-cdk-lib/region-info/README.md +0 -84
  366. package/iac/node_modules/aws-cdk-lib/triggers/README.md +0 -86
  367. package/iac/node_modules/balanced-match/LICENSE.md +0 -21
  368. package/iac/node_modules/balanced-match/README.md +0 -97
  369. package/iac/node_modules/brace-expansion/LICENSE +0 -21
  370. package/iac/node_modules/brace-expansion/README.md +0 -129
  371. package/iac/node_modules/buffer-from/LICENSE +0 -21
  372. package/iac/node_modules/buffer-from/readme.md +0 -69
  373. package/iac/node_modules/case/LICENSE +0 -22
  374. package/iac/node_modules/case/README.md +0 -139
  375. package/iac/node_modules/case/dist/Case.min.js.map +0 -1
  376. package/iac/node_modules/case/dist/Case.plus.min.js.map +0 -1
  377. package/iac/node_modules/chalk/license +0 -9
  378. package/iac/node_modules/chalk/node_modules/ansi-styles/license +0 -9
  379. package/iac/node_modules/chalk/node_modules/ansi-styles/readme.md +0 -152
  380. package/iac/node_modules/chalk/readme.md +0 -341
  381. package/iac/node_modules/color-convert/LICENSE +0 -21
  382. package/iac/node_modules/color-convert/README.md +0 -68
  383. package/iac/node_modules/color-name/LICENSE +0 -8
  384. package/iac/node_modules/color-name/README.md +0 -11
  385. package/iac/node_modules/concat-map/LICENSE +0 -18
  386. package/iac/node_modules/concat-map/README.markdown +0 -62
  387. package/iac/node_modules/constructs/LICENSE +0 -202
  388. package/iac/node_modules/constructs/README.md +0 -28
  389. package/iac/node_modules/create-require/LICENSE +0 -25
  390. package/iac/node_modules/create-require/README.md +0 -46
  391. package/iac/node_modules/diff/LICENSE +0 -31
  392. package/iac/node_modules/diff/README.md +0 -207
  393. package/iac/node_modules/diff-sequences/LICENSE +0 -21
  394. package/iac/node_modules/diff-sequences/README.md +0 -404
  395. package/iac/node_modules/fs-extra/LICENSE +0 -15
  396. package/iac/node_modules/fs-extra/README.md +0 -264
  397. package/iac/node_modules/fsevents/LICENSE +0 -22
  398. package/iac/node_modules/fsevents/README.md +0 -83
  399. package/iac/node_modules/graceful-fs/LICENSE +0 -15
  400. package/iac/node_modules/graceful-fs/README.md +0 -143
  401. package/iac/node_modules/has-flag/license +0 -9
  402. package/iac/node_modules/has-flag/readme.md +0 -89
  403. package/iac/node_modules/ignore/README.md +0 -412
  404. package/iac/node_modules/jest-diff/LICENSE +0 -21
  405. package/iac/node_modules/jest-diff/README.md +0 -671
  406. package/iac/node_modules/jest-get-type/LICENSE +0 -21
  407. package/iac/node_modules/jest-matcher-utils/LICENSE +0 -21
  408. package/iac/node_modules/jest-matcher-utils/README.md +0 -24
  409. package/iac/node_modules/jsonfile/LICENSE +0 -15
  410. package/iac/node_modules/jsonfile/README.md +0 -230
  411. package/iac/node_modules/jsonschema/LICENSE +0 -21
  412. package/iac/node_modules/jsonschema/README.md +0 -421
  413. package/iac/node_modules/lru-cache/LICENSE +0 -15
  414. package/iac/node_modules/lru-cache/README.md +0 -166
  415. package/iac/node_modules/make-error/LICENSE +0 -5
  416. package/iac/node_modules/make-error/README.md +0 -112
  417. package/iac/node_modules/minimatch/LICENSE +0 -15
  418. package/iac/node_modules/minimatch/README.md +0 -230
  419. package/iac/node_modules/pretty-format/LICENSE +0 -21
  420. package/iac/node_modules/pretty-format/README.md +0 -458
  421. package/iac/node_modules/punycode/README.md +0 -122
  422. package/iac/node_modules/react-is/LICENSE +0 -21
  423. package/iac/node_modules/react-is/README.md +0 -104
  424. package/iac/node_modules/semver/LICENSE +0 -15
  425. package/iac/node_modules/semver/README.md +0 -568
  426. package/iac/node_modules/source-map/LICENSE +0 -28
  427. package/iac/node_modules/source-map/README.md +0 -742
  428. package/iac/node_modules/source-map/dist/source-map.min.js.map +0 -1
  429. package/iac/node_modules/source-map-support/LICENSE.md +0 -21
  430. package/iac/node_modules/source-map-support/README.md +0 -284
  431. package/iac/node_modules/supports-color/license +0 -9
  432. package/iac/node_modules/supports-color/readme.md +0 -76
  433. package/iac/node_modules/ts-node/LICENSE +0 -21
  434. package/iac/node_modules/ts-node/README.md +0 -1442
  435. package/iac/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
  436. package/iac/node_modules/ts-node/dist/bin-esm.js.map +0 -1
  437. package/iac/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
  438. package/iac/node_modules/ts-node/dist/bin-script.js.map +0 -1
  439. package/iac/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
  440. package/iac/node_modules/ts-node/dist/bin.js.map +0 -1
  441. package/iac/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
  442. package/iac/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
  443. package/iac/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
  444. package/iac/node_modules/ts-node/dist/child/child-require.js.map +0 -1
  445. package/iac/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
  446. package/iac/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
  447. package/iac/node_modules/ts-node/dist/configuration.js.map +0 -1
  448. package/iac/node_modules/ts-node/dist/esm.js.map +0 -1
  449. package/iac/node_modules/ts-node/dist/file-extensions.js.map +0 -1
  450. package/iac/node_modules/ts-node/dist/index.js.map +0 -1
  451. package/iac/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
  452. package/iac/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
  453. package/iac/node_modules/ts-node/dist/repl.js.map +0 -1
  454. package/iac/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
  455. package/iac/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
  456. package/iac/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
  457. package/iac/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
  458. package/iac/node_modules/ts-node/dist/ts-internals.js.map +0 -1
  459. package/iac/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
  460. package/iac/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
  461. package/iac/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
  462. package/iac/node_modules/ts-node/dist/util.js.map +0 -1
  463. package/iac/node_modules/ts-node/dist-raw/README.md +0 -36
  464. package/iac/node_modules/typescript/LICENSE.txt +0 -55
  465. package/iac/node_modules/typescript/README.md +0 -104
  466. package/iac/node_modules/typescript/lib/README.md +0 -5
  467. package/iac/node_modules/universalify/LICENSE +0 -20
  468. package/iac/node_modules/universalify/README.md +0 -76
  469. package/iac/node_modules/v8-compile-cache-lib/LICENSE +0 -21
  470. package/iac/node_modules/v8-compile-cache-lib/README.md +0 -60
  471. package/iac/node_modules/yallist/LICENSE +0 -15
  472. package/iac/node_modules/yallist/README.md +0 -204
  473. package/iac/node_modules/yaml/LICENSE +0 -13
  474. package/iac/node_modules/yaml/README.md +0 -127
  475. package/iac/node_modules/yn/license +0 -9
  476. package/iac/node_modules/yn/readme.md +0 -83
  477. package/react/Edit.d.ts +0 -3
  478. package/react/Edit.js +0 -10
  479. package/react/Edit.js.map +0 -1
@@ -1,1288 +0,0 @@
1
- # Tasks for AWS Step Functions
2
-
3
-
4
- [AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html) is a web service that enables you to coordinate the
5
- components of distributed applications and microservices using visual workflows.
6
- You build applications from individual components that each perform a discrete
7
- function, or task, allowing you to scale and change applications quickly.
8
-
9
- A [Task](https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html) state represents a single unit of work performed by a state machine.
10
- All work in your state machine is performed by tasks. This module contains a collection of classes that allow you to call various AWS services
11
- from your Step Functions state machine.
12
-
13
- Be sure to familiarize yourself with the [`aws-stepfunctions` module documentation](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions-readme.html) first.
14
-
15
- This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
16
-
17
- ## Table Of Contents
18
-
19
- - [Tasks for AWS Step Functions](#tasks-for-aws-step-functions)
20
- - [Table Of Contents](#table-of-contents)
21
- - [Evaluate Expression](#evaluate-expression)
22
- - [API Gateway](#api-gateway)
23
- - [Call REST API Endpoint](#call-rest-api-endpoint)
24
- - [Call HTTP API Endpoint](#call-http-api-endpoint)
25
- - [AWS SDK](#aws-sdk)
26
- - [Athena](#athena)
27
- - [StartQueryExecution](#startqueryexecution)
28
- - [GetQueryExecution](#getqueryexecution)
29
- - [GetQueryResults](#getqueryresults)
30
- - [StopQueryExecution](#stopqueryexecution)
31
- - [Batch](#batch)
32
- - [SubmitJob](#submitjob)
33
- - [CodeBuild](#codebuild)
34
- - [StartBuild](#startbuild)
35
- - [DynamoDB](#dynamodb)
36
- - [GetItem](#getitem)
37
- - [PutItem](#putitem)
38
- - [DeleteItem](#deleteitem)
39
- - [UpdateItem](#updateitem)
40
- - [ECS](#ecs)
41
- - [RunTask](#runtask)
42
- - [EC2](#ec2)
43
- - [Fargate](#fargate)
44
- - [EMR](#emr)
45
- - [Create Cluster](#create-cluster)
46
- - [Termination Protection](#termination-protection)
47
- - [Terminate Cluster](#terminate-cluster)
48
- - [Add Step](#add-step)
49
- - [Cancel Step](#cancel-step)
50
- - [Modify Instance Fleet](#modify-instance-fleet)
51
- - [Modify Instance Group](#modify-instance-group)
52
- - [EMR on EKS](#emr-on-eks)
53
- - [Create Virtual Cluster](#create-virtual-cluster)
54
- - [Delete Virtual Cluster](#delete-virtual-cluster)
55
- - [Start Job Run](#start-job-run)
56
- - [EKS](#eks)
57
- - [Call](#call)
58
- - [EventBridge](#eventbridge)
59
- - [Put Events](#put-events)
60
- - [Glue](#glue)
61
- - [Glue DataBrew](#glue-databrew)
62
- - [Lambda](#lambda)
63
- - [SageMaker](#sagemaker)
64
- - [Create Training Job](#create-training-job)
65
- - [Create Transform Job](#create-transform-job)
66
- - [Create Endpoint](#create-endpoint)
67
- - [Create Endpoint Config](#create-endpoint-config)
68
- - [Create Model](#create-model)
69
- - [Update Endpoint](#update-endpoint)
70
- - [SNS](#sns)
71
- - [Step Functions](#step-functions)
72
- - [Start Execution](#start-execution)
73
- - [Invoke Activity](#invoke-activity)
74
- - [SQS](#sqs)
75
-
76
- ## Paths
77
-
78
- Learn more about input and output processing in Step Functions [here](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html)
79
-
80
- ## Evaluate Expression
81
-
82
- Use the `EvaluateExpression` to perform simple operations referencing state paths. The
83
- `expression` referenced in the task will be evaluated in a Lambda function
84
- (`eval()`). This allows you to not have to write Lambda code for simple operations.
85
-
86
- Example: convert a wait time from milliseconds to seconds, concat this in a message and wait:
87
-
88
- ```ts
89
- const convertToSeconds = new tasks.EvaluateExpression(this, 'Convert to seconds', {
90
- expression: '$.waitMilliseconds / 1000',
91
- resultPath: '$.waitSeconds',
92
- });
93
-
94
- const createMessage = new tasks.EvaluateExpression(this, 'Create message', {
95
- // Note: this is a string inside a string.
96
- expression: '`Now waiting ${$.waitSeconds} seconds...`',
97
- runtime: lambda.Runtime.NODEJS_14_X,
98
- resultPath: '$.message',
99
- });
100
-
101
- const publishMessage = new tasks.SnsPublish(this, 'Publish message', {
102
- topic: new sns.Topic(this, 'cool-topic'),
103
- message: sfn.TaskInput.fromJsonPathAt('$.message'),
104
- resultPath: '$.sns',
105
- });
106
-
107
- const wait = new sfn.Wait(this, 'Wait', {
108
- time: sfn.WaitTime.secondsPath('$.waitSeconds'),
109
- });
110
-
111
- new sfn.StateMachine(this, 'StateMachine', {
112
- definition: convertToSeconds
113
- .next(createMessage)
114
- .next(publishMessage)
115
- .next(wait),
116
- });
117
- ```
118
-
119
- The `EvaluateExpression` supports a `runtime` prop to specify the Lambda
120
- runtime to use to evaluate the expression. Currently, only runtimes
121
- of the Node.js family are supported.
122
-
123
- ## API Gateway
124
-
125
- Step Functions supports [API Gateway](https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html) through the service integration pattern.
126
-
127
- HTTP APIs are designed for low-latency, cost-effective integrations with AWS services, including AWS Lambda, and HTTP endpoints.
128
- HTTP APIs support OIDC and OAuth 2.0 authorization, and come with built-in support for CORS and automatic deployments.
129
- Previous-generation REST APIs currently offer more features. More details can be found [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html).
130
-
131
- ### Call REST API Endpoint
132
-
133
- The `CallApiGatewayRestApiEndpoint` calls the REST API endpoint.
134
-
135
- ```ts
136
- import * as apigateway from 'aws-cdk-lib/aws-apigateway';
137
- const restApi = new apigateway.RestApi(this, 'MyRestApi');
138
-
139
- const invokeTask = new tasks.CallApiGatewayRestApiEndpoint(this, 'Call REST API', {
140
- api: restApi,
141
- stageName: 'prod',
142
- method: tasks.HttpMethod.GET,
143
- });
144
- ```
145
-
146
- Be aware that the header values must be arrays. When passing the Task Token
147
- in the headers field `WAIT_FOR_TASK_TOKEN` integration, use
148
- `JsonPath.array()` to wrap the token in an array:
149
-
150
- ```ts
151
- import * as apigateway from 'aws-cdk-lib/aws-apigateway';
152
- declare const api: apigateway.RestApi;
153
-
154
- new tasks.CallApiGatewayRestApiEndpoint(this, 'Endpoint', {
155
- api,
156
- stageName: 'Stage',
157
- method: tasks.HttpMethod.PUT,
158
- integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
159
- headers: sfn.TaskInput.fromObject({
160
- TaskToken: sfn.JsonPath.array(sfn.JsonPath.taskToken),
161
- }),
162
- });
163
- ```
164
-
165
- ### Call HTTP API Endpoint
166
-
167
- The `CallApiGatewayHttpApiEndpoint` calls the HTTP API endpoint.
168
-
169
- ```ts
170
- import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
171
- const httpApi = new apigatewayv2.HttpApi(this, 'MyHttpApi');
172
-
173
- const invokeTask = new tasks.CallApiGatewayHttpApiEndpoint(this, 'Call HTTP API', {
174
- apiId: httpApi.apiId,
175
- apiStack: Stack.of(httpApi),
176
- method: tasks.HttpMethod.GET,
177
- });
178
- ```
179
-
180
- ### AWS SDK
181
-
182
- Step Functions supports calling [AWS service's API actions](https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html)
183
- through the service integration pattern.
184
-
185
- You can use Step Functions' AWS SDK integrations to call any of the over two hundred AWS services
186
- directly from your state machine, giving you access to over nine thousand API actions.
187
-
188
- ```ts
189
- declare const myBucket: s3.Bucket;
190
- const getObject = new tasks.CallAwsService(this, 'GetObject', {
191
- service: 's3',
192
- action: 'getObject',
193
- parameters: {
194
- Bucket: myBucket.bucketName,
195
- Key: sfn.JsonPath.stringAt('$.key')
196
- },
197
- iamResources: [myBucket.arnForObjects('*')],
198
- });
199
- ```
200
-
201
- Use camelCase for actions and PascalCase for parameter names.
202
-
203
- The task automatically adds an IAM statement to the state machine role's policy based on the
204
- service and action called. The resources for this statement must be specified in `iamResources`.
205
-
206
- Use the `iamAction` prop to manually specify the IAM action name in the case where the IAM
207
- action name does not match with the API service/action name:
208
-
209
- ```ts
210
- const listBuckets = new tasks.CallAwsService(this, 'ListBuckets', {
211
- service: 's3',
212
- action: 'listBuckets',
213
- iamResources: ['*'],
214
- iamAction: 's3:ListAllMyBuckets',
215
- });
216
- ```
217
-
218
- ## Athena
219
-
220
- Step Functions supports [Athena](https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html) through the service integration pattern.
221
-
222
- ### StartQueryExecution
223
-
224
- The [StartQueryExecution](https://docs.aws.amazon.com/athena/latest/APIReference/API_StartQueryExecution.html) API runs the SQL query statement.
225
-
226
- ```ts
227
- const startQueryExecutionJob = new tasks.AthenaStartQueryExecution(this, 'Start Athena Query', {
228
- queryString: sfn.JsonPath.stringAt('$.queryString'),
229
- queryExecutionContext: {
230
- databaseName: 'mydatabase',
231
- },
232
- resultConfiguration: {
233
- encryptionConfiguration: {
234
- encryptionOption: tasks.EncryptionOption.S3_MANAGED,
235
- },
236
- outputLocation: {
237
- bucketName: 'query-results-bucket',
238
- objectKey: 'folder',
239
- },
240
- },
241
- });
242
- ```
243
-
244
- ### GetQueryExecution
245
-
246
- The [GetQueryExecution](https://docs.aws.amazon.com/athena/latest/APIReference/API_GetQueryExecution.html) API gets information about a single execution of a query.
247
-
248
- ```ts
249
- const getQueryExecutionJob = new tasks.AthenaGetQueryExecution(this, 'Get Query Execution', {
250
- queryExecutionId: sfn.JsonPath.stringAt('$.QueryExecutionId'),
251
- });
252
- ```
253
-
254
- ### GetQueryResults
255
-
256
- The [GetQueryResults](https://docs.aws.amazon.com/athena/latest/APIReference/API_GetQueryResults.html) API that streams the results of a single query execution specified by QueryExecutionId from S3.
257
-
258
- ```ts
259
- const getQueryResultsJob = new tasks.AthenaGetQueryResults(this, 'Get Query Results', {
260
- queryExecutionId: sfn.JsonPath.stringAt('$.QueryExecutionId'),
261
- });
262
- ```
263
-
264
- ### StopQueryExecution
265
-
266
- The [StopQueryExecution](https://docs.aws.amazon.com/athena/latest/APIReference/API_StopQueryExecution.html) API that stops a query execution.
267
-
268
- ```ts
269
- const stopQueryExecutionJob = new tasks.AthenaStopQueryExecution(this, 'Stop Query Execution', {
270
- queryExecutionId: sfn.JsonPath.stringAt('$.QueryExecutionId'),
271
- });
272
- ```
273
-
274
- ## Batch
275
-
276
- Step Functions supports [Batch](https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html) through the service integration pattern.
277
-
278
- ### SubmitJob
279
-
280
- The [SubmitJob](https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html) API submits an AWS Batch job from a job definition.
281
-
282
- ```ts
283
- import * as batch from 'aws-cdk-lib/aws-batch';
284
- declare const batchJobDefinition: batch.JobDefinition;
285
- declare const batchQueue: batch.JobQueue;
286
-
287
- const task = new tasks.BatchSubmitJob(this, 'Submit Job', {
288
- jobDefinitionArn: batchJobDefinition.jobDefinitionArn,
289
- jobName: 'MyJob',
290
- jobQueueArn: batchQueue.jobQueueArn,
291
- });
292
- ```
293
-
294
- ## CodeBuild
295
-
296
- Step Functions supports [CodeBuild](https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html) through the service integration pattern.
297
-
298
- ### StartBuild
299
-
300
- [StartBuild](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html) starts a CodeBuild Project by Project Name.
301
-
302
- ```ts
303
- import * as codebuild from 'aws-cdk-lib/aws-codebuild';
304
-
305
- const codebuildProject = new codebuild.Project(this, 'Project', {
306
- projectName: 'MyTestProject',
307
- buildSpec: codebuild.BuildSpec.fromObject({
308
- version: '0.2',
309
- phases: {
310
- build: {
311
- commands: [
312
- 'echo "Hello, CodeBuild!"',
313
- ],
314
- },
315
- },
316
- }),
317
- });
318
-
319
- const task = new tasks.CodeBuildStartBuild(this, 'Task', {
320
- project: codebuildProject,
321
- integrationPattern: sfn.IntegrationPattern.RUN_JOB,
322
- environmentVariablesOverride: {
323
- ZONE: {
324
- type: codebuild.BuildEnvironmentVariableType.PLAINTEXT,
325
- value: sfn.JsonPath.stringAt('$.envVariables.zone'),
326
- },
327
- },
328
- });
329
- ```
330
-
331
- ## DynamoDB
332
-
333
- You can call DynamoDB APIs from a `Task` state.
334
- Read more about calling DynamoDB APIs [here](https://docs.aws.amazon.com/step-functions/latest/dg/connect-ddb.html)
335
-
336
- ### GetItem
337
-
338
- The [GetItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html) operation returns a set of attributes for the item with the given primary key.
339
-
340
- ```ts
341
- declare const myTable: dynamodb.Table;
342
- new tasks.DynamoGetItem(this, 'Get Item', {
343
- key: { messageId: tasks.DynamoAttributeValue.fromString('message-007') },
344
- table: myTable,
345
- });
346
- ```
347
-
348
- ### PutItem
349
-
350
- The [PutItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html) operation creates a new item, or replaces an old item with a new item.
351
-
352
- ```ts
353
- declare const myTable: dynamodb.Table;
354
- new tasks.DynamoPutItem(this, 'PutItem', {
355
- item: {
356
- MessageId: tasks.DynamoAttributeValue.fromString('message-007'),
357
- Text: tasks.DynamoAttributeValue.fromString(sfn.JsonPath.stringAt('$.bar')),
358
- TotalCount: tasks.DynamoAttributeValue.fromNumber(10),
359
- },
360
- table: myTable,
361
- });
362
- ```
363
-
364
- ### DeleteItem
365
-
366
- The [DeleteItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html) operation deletes a single item in a table by primary key.
367
-
368
- ```ts
369
- declare const myTable: dynamodb.Table;
370
- new tasks.DynamoDeleteItem(this, 'DeleteItem', {
371
- key: { MessageId: tasks.DynamoAttributeValue.fromString('message-007') },
372
- table: myTable,
373
- resultPath: sfn.JsonPath.DISCARD,
374
- });
375
- ```
376
-
377
- ### UpdateItem
378
-
379
- The [UpdateItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html) operation edits an existing item's attributes, or adds a new item
380
- to the table if it does not already exist.
381
-
382
- ```ts
383
- declare const myTable: dynamodb.Table;
384
- new tasks.DynamoUpdateItem(this, 'UpdateItem', {
385
- key: {
386
- MessageId: tasks.DynamoAttributeValue.fromString('message-007')
387
- },
388
- table: myTable,
389
- expressionAttributeValues: {
390
- ':val': tasks.DynamoAttributeValue.numberFromString(sfn.JsonPath.stringAt('$.Item.TotalCount.N')),
391
- ':rand': tasks.DynamoAttributeValue.fromNumber(20),
392
- },
393
- updateExpression: 'SET TotalCount = :val + :rand',
394
- });
395
- ```
396
-
397
- ## ECS
398
-
399
- Step Functions supports [ECS/Fargate](https://docs.aws.amazon.com/step-functions/latest/dg/connect-ecs.html) through the service integration pattern.
400
-
401
- ### RunTask
402
-
403
- [RunTask](https://docs.aws.amazon.com/step-functions/latest/dg/connect-ecs.html) starts a new task using the specified task definition.
404
-
405
- #### EC2
406
-
407
- The EC2 launch type allows you to run your containerized applications on a cluster
408
- of Amazon EC2 instances that you manage.
409
-
410
- When a task that uses the EC2 launch type is launched, Amazon ECS must determine where
411
- to place the task based on the requirements specified in the task definition, such as
412
- CPU and memory. Similarly, when you scale down the task count, Amazon ECS must determine
413
- which tasks to terminate. You can apply task placement strategies and constraints to
414
- customize how Amazon ECS places and terminates tasks. Learn more about [task placement](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement.html)
415
-
416
- The latest ACTIVE revision of the passed task definition is used for running the task.
417
-
418
- The following example runs a job from a task definition on EC2
419
-
420
- ```ts
421
- const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
422
- isDefault: true,
423
- });
424
-
425
- const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc });
426
- cluster.addCapacity('DefaultAutoScalingGroup', {
427
- instanceType: new ec2.InstanceType('t2.micro'),
428
- vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
429
- });
430
-
431
- const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
432
- compatibility: ecs.Compatibility.EC2,
433
- });
434
-
435
- taskDefinition.addContainer('TheContainer', {
436
- image: ecs.ContainerImage.fromRegistry('foo/bar'),
437
- memoryLimitMiB: 256,
438
- });
439
-
440
- const runTask = new tasks.EcsRunTask(this, 'Run', {
441
- integrationPattern: sfn.IntegrationPattern.RUN_JOB,
442
- cluster,
443
- taskDefinition,
444
- launchTarget: new tasks.EcsEc2LaunchTarget({
445
- placementStrategies: [
446
- ecs.PlacementStrategy.spreadAcrossInstances(),
447
- ecs.PlacementStrategy.packedByCpu(),
448
- ecs.PlacementStrategy.randomly(),
449
- ],
450
- placementConstraints: [
451
- ecs.PlacementConstraint.memberOf('blieptuut'),
452
- ],
453
- }),
454
- });
455
- ```
456
-
457
- #### Fargate
458
-
459
- AWS Fargate is a serverless compute engine for containers that works with Amazon
460
- Elastic Container Service (ECS). Fargate makes it easy for you to focus on building
461
- your applications. Fargate removes the need to provision and manage servers, lets you
462
- specify and pay for resources per application, and improves security through application
463
- isolation by design. Learn more about [Fargate](https://aws.amazon.com/fargate/)
464
-
465
- The Fargate launch type allows you to run your containerized applications without the need
466
- to provision and manage the backend infrastructure. Just register your task definition and
467
- Fargate launches the container for you. The latest ACTIVE revision of the passed
468
- task definition is used for running the task. Learn more about
469
- [Fargate Versioning](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTaskDefinition.html)
470
-
471
- The following example runs a job from a task definition on Fargate
472
-
473
- ```ts
474
- const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
475
- isDefault: true,
476
- });
477
-
478
- const cluster = new ecs.Cluster(this, 'FargateCluster', { vpc });
479
-
480
- const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
481
- memoryMiB: '512',
482
- cpu: '256',
483
- compatibility: ecs.Compatibility.FARGATE,
484
- });
485
-
486
- const containerDefinition = taskDefinition.addContainer('TheContainer', {
487
- image: ecs.ContainerImage.fromRegistry('foo/bar'),
488
- memoryLimitMiB: 256,
489
- });
490
-
491
- const runTask = new tasks.EcsRunTask(this, 'RunFargate', {
492
- integrationPattern: sfn.IntegrationPattern.RUN_JOB,
493
- cluster,
494
- taskDefinition,
495
- assignPublicIp: true,
496
- containerOverrides: [{
497
- containerDefinition,
498
- environment: [{ name: 'SOME_KEY', value: sfn.JsonPath.stringAt('$.SomeKey') }],
499
- }],
500
- launchTarget: new tasks.EcsFargateLaunchTarget(),
501
- });
502
- ```
503
-
504
- ## EMR
505
-
506
- Step Functions supports Amazon EMR through the service integration pattern.
507
- The service integration APIs correspond to Amazon EMR APIs but differ in the
508
- parameters that are used.
509
-
510
- [Read more](https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr.html) about the differences when using these service integrations.
511
-
512
- ### Create Cluster
513
-
514
- Creates and starts running a cluster (job flow).
515
- Corresponds to the [`runJobFlow`](https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html) API in EMR.
516
-
517
- ```ts
518
- const clusterRole = new iam.Role(this, 'ClusterRole', {
519
- assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
520
- });
521
-
522
- const serviceRole = new iam.Role(this, 'ServiceRole', {
523
- assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
524
- });
525
-
526
- const autoScalingRole = new iam.Role(this, 'AutoScalingRole', {
527
- assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
528
- });
529
-
530
- autoScalingRole.assumeRolePolicy?.addStatements(
531
- new iam.PolicyStatement({
532
- effect: iam.Effect.ALLOW,
533
- principals: [
534
- new iam.ServicePrincipal('application-autoscaling.amazonaws.com'),
535
- ],
536
- actions: [
537
- 'sts:AssumeRole',
538
- ],
539
- }));
540
- )
541
-
542
- new tasks.EmrCreateCluster(this, 'Create Cluster', {
543
- instances: {},
544
- clusterRole,
545
- name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
546
- serviceRole,
547
- autoScalingRole,
548
- });
549
- ```
550
-
551
- If you want to run multiple steps in [parallel](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-concurrent-steps.html),
552
- you can specify the `stepConcurrencyLevel` property. The concurrency range is between 1
553
- and 256 inclusive, where the default concurrency of 1 means no step concurrency is allowed.
554
- `stepConcurrencyLevel` requires the EMR release label to be 5.28.0 or above.
555
-
556
- ```ts
557
- new tasks.EmrCreateCluster(this, 'Create Cluster', {
558
- instances: {},
559
- name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
560
- stepConcurrencyLevel: 10,
561
- });
562
- ```
563
-
564
- ### Termination Protection
565
-
566
- Locks a cluster (job flow) so the EC2 instances in the cluster cannot be
567
- terminated by user intervention, an API call, or a job-flow error.
568
-
569
- Corresponds to the [`setTerminationProtection`](https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr.html) API in EMR.
570
-
571
- ```ts
572
- new tasks.EmrSetClusterTerminationProtection(this, 'Task', {
573
- clusterId: 'ClusterId',
574
- terminationProtected: false,
575
- });
576
- ```
577
-
578
- ### Terminate Cluster
579
-
580
- Shuts down a cluster (job flow).
581
- Corresponds to the [`terminateJobFlows`](https://docs.aws.amazon.com/emr/latest/APIReference/API_TerminateJobFlows.html) API in EMR.
582
-
583
- ```ts
584
- new tasks.EmrTerminateCluster(this, 'Task', {
585
- clusterId: 'ClusterId',
586
- });
587
- ```
588
-
589
- ### Add Step
590
-
591
- Adds a new step to a running cluster.
592
- Corresponds to the [`addJobFlowSteps`](https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html) API in EMR.
593
-
594
- ```ts
595
- new tasks.EmrAddStep(this, 'Task', {
596
- clusterId: 'ClusterId',
597
- name: 'StepName',
598
- jar: 'Jar',
599
- actionOnFailure: tasks.ActionOnFailure.CONTINUE,
600
- });
601
- ```
602
-
603
- ### Cancel Step
604
-
605
- Cancels a pending step in a running cluster.
606
- Corresponds to the [`cancelSteps`](https://docs.aws.amazon.com/emr/latest/APIReference/API_CancelSteps.html) API in EMR.
607
-
608
- ```ts
609
- new tasks.EmrCancelStep(this, 'Task', {
610
- clusterId: 'ClusterId',
611
- stepId: 'StepId',
612
- });
613
- ```
614
-
615
- ### Modify Instance Fleet
616
-
617
- Modifies the target On-Demand and target Spot capacities for the instance
618
- fleet with the specified InstanceFleetName.
619
-
620
- Corresponds to the [`modifyInstanceFleet`](https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceFleet.html) API in EMR.
621
-
622
- ```ts
623
- new tasks.EmrModifyInstanceFleetByName(this, 'Task', {
624
- clusterId: 'ClusterId',
625
- instanceFleetName: 'InstanceFleetName',
626
- targetOnDemandCapacity: 2,
627
- targetSpotCapacity: 0,
628
- });
629
- ```
630
-
631
- ### Modify Instance Group
632
-
633
- Modifies the number of nodes and configuration settings of an instance group.
634
-
635
- Corresponds to the [`modifyInstanceGroups`](https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceGroups.html) API in EMR.
636
-
637
- ```ts
638
- new tasks.EmrModifyInstanceGroupByName(this, 'Task', {
639
- clusterId: 'ClusterId',
640
- instanceGroupName: sfn.JsonPath.stringAt('$.InstanceGroupName'),
641
- instanceGroup: {
642
- instanceCount: 1,
643
- },
644
- });
645
- ```
646
-
647
- ## EMR on EKS
648
-
649
- Step Functions supports Amazon EMR on EKS through the service integration pattern.
650
- The service integration APIs correspond to Amazon EMR on EKS APIs, but differ in the parameters that are used.
651
-
652
- [Read more](https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html) about the differences when using these service integrations.
653
-
654
- [Setting up](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up.html) the EKS cluster is required.
655
-
656
- ### Create Virtual Cluster
657
-
658
- The [CreateVirtualCluster](https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_CreateVirtualCluster.html) API creates a single virtual cluster that's mapped to a single Kubernetes namespace.
659
-
660
- The EKS cluster containing the Kubernetes namespace where the virtual cluster will be mapped can be passed in from the task input.
661
-
662
- ```ts
663
- new tasks.EmrContainersCreateVirtualCluster(this, 'Create a Virtual Cluster', {
664
- eksCluster: tasks.EksClusterInput.fromTaskInput(sfn.TaskInput.fromText('clusterId')),
665
- });
666
- ```
667
-
668
- The EKS cluster can also be passed in directly.
669
-
670
- ```ts
671
- import * as eks from 'aws-cdk-lib/aws-eks';
672
-
673
- declare const eksCluster: eks.Cluster;
674
-
675
- new tasks.EmrContainersCreateVirtualCluster(this, 'Create a Virtual Cluster', {
676
- eksCluster: tasks.EksClusterInput.fromCluster(eksCluster),
677
- });
678
- ```
679
-
680
- By default, the Kubernetes namespace that a virtual cluster maps to is "default", but a specific namespace within an EKS cluster can be selected.
681
-
682
- ```ts
683
- new tasks.EmrContainersCreateVirtualCluster(this, 'Create a Virtual Cluster', {
684
- eksCluster: tasks.EksClusterInput.fromTaskInput(sfn.TaskInput.fromText('clusterId')),
685
- eksNamespace: 'specified-namespace',
686
- });
687
- ```
688
-
689
- ### Delete Virtual Cluster
690
-
691
- The [DeleteVirtualCluster](https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_DeleteVirtualCluster.html) API deletes a virtual cluster.
692
-
693
- ```ts
694
- new tasks.EmrContainersDeleteVirtualCluster(this, 'Delete a Virtual Cluster', {
695
- virtualClusterId: sfn.TaskInput.fromJsonPathAt('$.virtualCluster'),
696
- });
697
- ```
698
-
699
- ### Start Job Run
700
-
701
- The [StartJobRun](https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_StartJobRun.html) API starts a job run. A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster.
702
-
703
- Required setup:
704
-
705
- - If not done already, follow the [steps](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up.html) to setup EMR on EKS and [create an EKS Cluster](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-eks-readme.html#quick-start).
706
- - Enable [Cluster access](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-cluster-access.html)
707
- - Enable [IAM Role access](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-enable-IAM.html)
708
-
709
- The following actions must be performed if the virtual cluster ID is supplied from the task input. Otherwise, if it is supplied statically in the state machine definition, these actions will be done automatically.
710
-
711
- - Create an [IAM role](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.Role.html)
712
- - Update the [Role Trust Policy](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-trust-policy.html) of the Job Execution Role.
713
-
714
- The job can be configured with spark submit parameters:
715
-
716
- ```ts
717
- new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
718
- virtualCluster: tasks.VirtualClusterInput.fromVirtualClusterId('de92jdei2910fwedz'),
719
- releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
720
- jobDriver: {
721
- sparkSubmitJobDriver: {
722
- entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
723
- sparkSubmitParameters: '--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1',
724
- },
725
- },
726
- });
727
- ```
728
-
729
- Configuring the job can also be done via application configuration:
730
-
731
- ```ts
732
- new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
733
- virtualCluster: tasks.VirtualClusterInput.fromVirtualClusterId('de92jdei2910fwedz'),
734
- releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
735
- jobName: 'EMR-Containers-Job',
736
- jobDriver: {
737
- sparkSubmitJobDriver: {
738
- entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
739
- },
740
- },
741
- applicationConfig: [{
742
- classification: tasks.Classification.SPARK_DEFAULTS,
743
- properties: {
744
- 'spark.executor.instances': '1',
745
- 'spark.executor.memory': '512M',
746
- },
747
- }],
748
- });
749
- ```
750
-
751
- Job monitoring can be enabled if `monitoring.logging` is set true. This automatically generates an S3 bucket and CloudWatch logs.
752
-
753
- ```ts
754
- new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
755
- virtualCluster: tasks.VirtualClusterInput.fromVirtualClusterId('de92jdei2910fwedz'),
756
- releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
757
- jobDriver: {
758
- sparkSubmitJobDriver: {
759
- entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
760
- sparkSubmitParameters: '--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1',
761
- },
762
- },
763
- monitoring: {
764
- logging: true,
765
- },
766
- });
767
- ```
768
-
769
- Otherwise, providing monitoring for jobs with existing log groups and log buckets is also available.
770
-
771
- ```ts
772
- import * as logs from 'aws-cdk-lib/aws-logs';
773
-
774
- const logGroup = new logs.LogGroup(this, 'Log Group');
775
- const logBucket = new s3.Bucket(this, 'S3 Bucket')
776
-
777
- new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
778
- virtualCluster: tasks.VirtualClusterInput.fromVirtualClusterId('de92jdei2910fwedz'),
779
- releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
780
- jobDriver: {
781
- sparkSubmitJobDriver: {
782
- entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
783
- sparkSubmitParameters: '--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1',
784
- },
785
- },
786
- monitoring: {
787
- logGroup: logGroup,
788
- logBucket: logBucket,
789
- },
790
- });
791
- ```
792
-
793
- Users can provide their own existing Job Execution Role.
794
-
795
- ```ts
796
- new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
797
- virtualCluster:tasks.VirtualClusterInput.fromTaskInput(sfn.TaskInput.fromJsonPathAt('$.VirtualClusterId')),
798
- releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
799
- jobName: 'EMR-Containers-Job',
800
- executionRole: iam.Role.fromRoleArn(this, 'Job-Execution-Role', 'arn:aws:iam::xxxxxxxxxxxx:role/JobExecutionRole'),
801
- jobDriver: {
802
- sparkSubmitJobDriver: {
803
- entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
804
- sparkSubmitParameters: '--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1',
805
- },
806
- },
807
- });
808
- ```
809
-
810
- ## EKS
811
-
812
- Step Functions supports Amazon EKS through the service integration pattern.
813
- The service integration APIs correspond to Amazon EKS APIs.
814
-
815
- [Read more](https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html) about the differences when using these service integrations.
816
-
817
- ### Call
818
-
819
- Read and write Kubernetes resource objects via a Kubernetes API endpoint.
820
- Corresponds to the [`call`](https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html) API in Step Functions Connector.
821
-
822
- The following code snippet includes a Task state that uses eks:call to list the pods.
823
-
824
- ```ts
825
- import * as eks from 'aws-cdk-lib/aws-eks';
826
-
827
- const myEksCluster = new eks.Cluster(this, 'my sample cluster', {
828
- version: eks.KubernetesVersion.V1_18,
829
- clusterName: 'myEksCluster',
830
- });
831
-
832
- new tasks.EksCall(this, 'Call a EKS Endpoint', {
833
- cluster: myEksCluster,
834
- httpMethod: tasks.HttpMethods.GET,
835
- httpPath: '/api/v1/namespaces/default/pods',
836
- });
837
- ```
838
-
839
- ## EventBridge
840
-
841
- Step Functions supports Amazon EventBridge through the service integration pattern.
842
- The service integration APIs correspond to Amazon EventBridge APIs.
843
-
844
- [Read more](https://docs.aws.amazon.com/step-functions/latest/dg/connect-eventbridge.html) about the differences when using these service integrations.
845
-
846
- ### Put Events
847
-
848
- Send events to an EventBridge bus.
849
- Corresponds to the [`put-events`](https://docs.aws.amazon.com/step-functions/latest/dg/connect-eventbridge.html) API in Step Functions Connector.
850
-
851
- The following code snippet includes a Task state that uses events:putevents to send an event to the default bus.
852
-
853
- ```ts
854
- import * as events from 'aws-cdk-lib/aws-events';
855
-
856
- const myEventBus = new events.EventBus(this, 'EventBus', {
857
- eventBusName: 'MyEventBus1',
858
- });
859
-
860
- new tasks.EventBridgePutEvents(this, 'Send an event to EventBridge', {
861
- entries: [{
862
- detail: sfn.TaskInput.fromObject({
863
- Message: 'Hello from Step Functions!',
864
- }),
865
- eventBus: myEventBus,
866
- detailType: 'MessageFromStepFunctions',
867
- source: 'step.functions',
868
- }],
869
- });
870
- ```
871
-
872
- ## Glue
873
-
874
- Step Functions supports [AWS Glue](https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html) through the service integration pattern.
875
-
876
- You can call the [`StartJobRun`](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-StartJobRun) API from a `Task` state.
877
-
878
- ```ts
879
- new tasks.GlueStartJobRun(this, 'Task', {
880
- glueJobName: 'my-glue-job',
881
- arguments: sfn.TaskInput.fromObject({
882
- key: 'value',
883
- }),
884
- timeout: Duration.minutes(30),
885
- notifyDelayAfter: Duration.minutes(5),
886
- });
887
- ```
888
-
889
- ## Glue DataBrew
890
-
891
- Step Functions supports [AWS Glue DataBrew](https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html) through the service integration pattern.
892
-
893
- You can call the [`StartJobRun`](https://docs.aws.amazon.com/databrew/latest/dg/API_StartJobRun.html) API from a `Task` state.
894
-
895
- ```ts
896
- new tasks.GlueDataBrewStartJobRun(this, 'Task', {
897
- name: 'databrew-job',
898
- });
899
- ```
900
-
901
- ## Lambda
902
-
903
- [Invoke](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html) a Lambda function.
904
-
905
- You can specify the input to your Lambda function through the `payload` attribute.
906
- By default, Step Functions invokes Lambda function with the state input (JSON path '$')
907
- as the input.
908
-
909
- The following snippet invokes a Lambda Function with the state input as the payload
910
- by referencing the `$` path.
911
-
912
- ```ts
913
- declare const fn: lambda.Function;
914
- new tasks.LambdaInvoke(this, 'Invoke with state input', {
915
- lambdaFunction: fn,
916
- });
917
- ```
918
-
919
- When a function is invoked, the Lambda service sends [these response
920
- elements](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_ResponseElements)
921
- back.
922
-
923
- ⚠️ The response from the Lambda function is in an attribute called `Payload`
924
-
925
- The following snippet invokes a Lambda Function by referencing the `$.Payload` path
926
- to reference the output of a Lambda executed before it.
927
-
928
- ```ts
929
- declare const fn: lambda.Function;
930
- new tasks.LambdaInvoke(this, 'Invoke with empty object as payload', {
931
- lambdaFunction: fn,
932
- payload: sfn.TaskInput.fromObject({}),
933
- });
934
-
935
- // use the output of fn as input
936
- new tasks.LambdaInvoke(this, 'Invoke with payload field in the state input', {
937
- lambdaFunction: fn,
938
- payload: sfn.TaskInput.fromJsonPathAt('$.Payload'),
939
- });
940
- ```
941
-
942
- The following snippet invokes a Lambda and sets the task output to only include
943
- the Lambda function response.
944
-
945
- ```ts
946
- declare const fn: lambda.Function;
947
- new tasks.LambdaInvoke(this, 'Invoke and set function response as task output', {
948
- lambdaFunction: fn,
949
- outputPath: '$.Payload',
950
- });
951
- ```
952
-
953
- If you want to combine the input and the Lambda function response you can use
954
- the `payloadResponseOnly` property and specify the `resultPath`. This will put the
955
- Lambda function ARN directly in the "Resource" string, but it conflicts with the
956
- integrationPattern, invocationType, clientContext, and qualifier properties.
957
-
958
- ```ts
959
- declare const fn: lambda.Function;
960
- new tasks.LambdaInvoke(this, 'Invoke and combine function response with task input', {
961
- lambdaFunction: fn,
962
- payloadResponseOnly: true,
963
- resultPath: '$.fn',
964
- });
965
- ```
966
-
967
- You can have Step Functions pause a task, and wait for an external process to
968
- return a task token. Read more about the [callback pattern](https://docs.aws.amazon.com/step-functions/latest/dg/callback-task-sample-sqs.html#call-back-lambda-example)
969
-
970
- To use the callback pattern, set the `token` property on the task. Call the Step
971
- Functions `SendTaskSuccess` or `SendTaskFailure` APIs with the token to
972
- indicate that the task has completed and the state machine should resume execution.
973
-
974
- The following snippet invokes a Lambda with the task token as part of the input
975
- to the Lambda.
976
-
977
- ```ts
978
- declare const fn: lambda.Function;
979
- new tasks.LambdaInvoke(this, 'Invoke with callback', {
980
- lambdaFunction: fn,
981
- integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
982
- payload: sfn.TaskInput.fromObject({
983
- token: sfn.JsonPath.taskToken,
984
- input: sfn.JsonPath.stringAt('$.someField'),
985
- }),
986
- });
987
- ```
988
-
989
- ⚠️ The task will pause until it receives that task token back with a `SendTaskSuccess` or `SendTaskFailure`
990
- call. Learn more about [Callback with the Task
991
- Token](https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token).
992
-
993
- AWS Lambda can occasionally experience transient service errors. In this case, invoking Lambda
994
- results in a 500 error, such as `ServiceException`, `AWSLambdaException`, or `SdkClientException`.
995
- As a best practice, the `LambdaInvoke` task will retry on those errors with an interval of 2 seconds,
996
- a back-off rate of 2 and 6 maximum attempts. Set the `retryOnServiceExceptions` prop to `false` to
997
- disable this behavior.
998
-
999
- ## SageMaker
1000
-
1001
- Step Functions supports [AWS SageMaker](https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html) through the service integration pattern.
1002
-
1003
- If your training job or model uses resources from AWS Marketplace,
1004
- [network isolation is required](https://docs.aws.amazon.com/sagemaker/latest/dg/mkt-algo-model-internet-free.html).
1005
- To do so, set the `enableNetworkIsolation` property to `true` for `SageMakerCreateModel` or `SageMakerCreateTrainingJob`.
1006
-
1007
- To set environment variables for the Docker container use the `environment` property.
1008
-
1009
- ### Create Training Job
1010
-
1011
- You can call the [`CreateTrainingJob`](https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) API from a `Task` state.
1012
-
1013
- ```ts
1014
- new tasks.SageMakerCreateTrainingJob(this, 'TrainSagemaker', {
1015
- trainingJobName: sfn.JsonPath.stringAt('$.JobName'),
1016
- algorithmSpecification: {
1017
- algorithmName: 'BlazingText',
1018
- trainingInputMode: tasks.InputMode.FILE,
1019
- },
1020
- inputDataConfig: [{
1021
- channelName: 'train',
1022
- dataSource: {
1023
- s3DataSource: {
1024
- s3DataType: tasks.S3DataType.S3_PREFIX,
1025
- s3Location: tasks.S3Location.fromJsonExpression('$.S3Bucket'),
1026
- },
1027
- },
1028
- }],
1029
- outputDataConfig: {
1030
- s3OutputLocation: tasks.S3Location.fromBucket(s3.Bucket.fromBucketName(this, 'Bucket', 'mybucket'), 'myoutputpath'),
1031
- },
1032
- resourceConfig: {
1033
- instanceCount: 1,
1034
- instanceType: new ec2.InstanceType(sfn.JsonPath.stringAt('$.InstanceType')),
1035
- volumeSize: Size.gibibytes(50),
1036
- }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
1037
- stoppingCondition: {
1038
- maxRuntime: Duration.hours(2),
1039
- }, // optional: default is 1 hour
1040
- });
1041
- ```
1042
-
1043
- ### Create Transform Job
1044
-
1045
- You can call the [`CreateTransformJob`](https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html) API from a `Task` state.
1046
-
1047
- ```ts
1048
- new tasks.SageMakerCreateTransformJob(this, 'Batch Inference', {
1049
- transformJobName: 'MyTransformJob',
1050
- modelName: 'MyModelName',
1051
- modelClientOptions: {
1052
- invocationsMaxRetries: 3, // default is 0
1053
- invocationsTimeout: Duration.minutes(5), // default is 60 seconds
1054
- },
1055
- transformInput: {
1056
- transformDataSource: {
1057
- s3DataSource: {
1058
- s3Uri: 's3://inputbucket/train',
1059
- s3DataType: tasks.S3DataType.S3_PREFIX,
1060
- }
1061
- }
1062
- },
1063
- transformOutput: {
1064
- s3OutputPath: 's3://outputbucket/TransformJobOutputPath',
1065
- },
1066
- transformResources: {
1067
- instanceCount: 1,
1068
- instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.XLARGE),
1069
- }
1070
- });
1071
-
1072
- ```
1073
-
1074
- ### Create Endpoint
1075
-
1076
- You can call the [`CreateEndpoint`](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html) API from a `Task` state.
1077
-
1078
- ```ts
1079
- new tasks.SageMakerCreateEndpoint(this, 'SagemakerEndpoint', {
1080
- endpointName: sfn.JsonPath.stringAt('$.EndpointName'),
1081
- endpointConfigName: sfn.JsonPath.stringAt('$.EndpointConfigName'),
1082
- });
1083
- ```
1084
-
1085
- ### Create Endpoint Config
1086
-
1087
- You can call the [`CreateEndpointConfig`](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html) API from a `Task` state.
1088
-
1089
- ```ts
1090
- new tasks.SageMakerCreateEndpointConfig(this, 'SagemakerEndpointConfig', {
1091
- endpointConfigName: 'MyEndpointConfig',
1092
- productionVariants: [{
1093
- initialInstanceCount: 2,
1094
- instanceType: ec2.InstanceType.of(ec2.InstanceClass.M5, ec2.InstanceSize.XLARGE),
1095
- modelName: 'MyModel',
1096
- variantName: 'awesome-variant',
1097
- }],
1098
- });
1099
- ```
1100
-
1101
- ### Create Model
1102
-
1103
- You can call the [`CreateModel`](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) API from a `Task` state.
1104
-
1105
- ```ts
1106
- new tasks.SageMakerCreateModel(this, 'Sagemaker', {
1107
- modelName: 'MyModel',
1108
- primaryContainer: new tasks.ContainerDefinition({
1109
- image: tasks.DockerImage.fromJsonExpression(sfn.JsonPath.stringAt('$.Model.imageName')),
1110
- mode: tasks.Mode.SINGLE_MODEL,
1111
- modelS3Location: tasks.S3Location.fromJsonExpression('$.TrainingJob.ModelArtifacts.S3ModelArtifacts'),
1112
- }),
1113
- });
1114
- ```
1115
-
1116
- ### Update Endpoint
1117
-
1118
- You can call the [`UpdateEndpoint`](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html) API from a `Task` state.
1119
-
1120
- ```ts
1121
- new tasks.SageMakerUpdateEndpoint(this, 'SagemakerEndpoint', {
1122
- endpointName: sfn.JsonPath.stringAt('$.Endpoint.Name'),
1123
- endpointConfigName: sfn.JsonPath.stringAt('$.Endpoint.EndpointConfig'),
1124
- });
1125
- ```
1126
-
1127
- ## SNS
1128
-
1129
- Step Functions supports [Amazon SNS](https://docs.aws.amazon.com/step-functions/latest/dg/connect-sns.html) through the service integration pattern.
1130
-
1131
- You can call the [`Publish`](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) API from a `Task` state to publish to an SNS topic.
1132
-
1133
- ```ts
1134
- const topic = new sns.Topic(this, 'Topic');
1135
-
1136
- // Use a field from the execution data as message.
1137
- const task1 = new tasks.SnsPublish(this, 'Publish1', {
1138
- topic,
1139
- integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE,
1140
- message: sfn.TaskInput.fromDataAt('$.state.message'),
1141
- messageAttributes: {
1142
- place: {
1143
- value: sfn.JsonPath.stringAt('$.place'),
1144
- },
1145
- pic: {
1146
- // BINARY must be explicitly set
1147
- dataType: tasks.MessageAttributeDataType.BINARY,
1148
- value: sfn.JsonPath.stringAt('$.pic'),
1149
- },
1150
- people: {
1151
- value: 4,
1152
- },
1153
- handles: {
1154
- value: ['@kslater', '@jjf', null, '@mfanning'],
1155
- },
1156
- },
1157
- });
1158
-
1159
- // Combine a field from the execution data with
1160
- // a literal object.
1161
- const task2 = new tasks.SnsPublish(this, 'Publish2', {
1162
- topic,
1163
- message: sfn.TaskInput.fromObject({
1164
- field1: 'somedata',
1165
- field2: sfn.JsonPath.stringAt('$.field2'),
1166
- }),
1167
- });
1168
- ```
1169
-
1170
- ## Step Functions
1171
-
1172
- ### Start Execution
1173
-
1174
- You can manage [AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/connect-stepfunctions.html) executions.
1175
-
1176
- AWS Step Functions supports it's own [`StartExecution`](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html) API as a service integration.
1177
-
1178
- ```ts
1179
- // Define a state machine with one Pass state
1180
- const child = new sfn.StateMachine(this, 'ChildStateMachine', {
1181
- definition: sfn.Chain.start(new sfn.Pass(this, 'PassState')),
1182
- });
1183
-
1184
- // Include the state machine in a Task state with callback pattern
1185
- const task = new tasks.StepFunctionsStartExecution(this, 'ChildTask', {
1186
- stateMachine: child,
1187
- integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
1188
- input: sfn.TaskInput.fromObject({
1189
- token: sfn.JsonPath.taskToken,
1190
- foo: 'bar',
1191
- }),
1192
- name: 'MyExecutionName',
1193
- });
1194
-
1195
- // Define a second state machine with the Task state above
1196
- new sfn.StateMachine(this, 'ParentStateMachine', {
1197
- definition: task,
1198
- });
1199
- ```
1200
-
1201
- You can utilize [Associate Workflow Executions](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-nested-workflows.html#nested-execution-startid)
1202
- via the `associateWithParent` property. This allows the Step Functions UI to link child
1203
- executions from parent executions, making it easier to trace execution flow across state machines.
1204
-
1205
- ```ts
1206
- declare const child: sfn.StateMachine;
1207
- const task = new tasks.StepFunctionsStartExecution(this, 'ChildTask', {
1208
- stateMachine: child,
1209
- associateWithParent: true,
1210
- });
1211
- ```
1212
-
1213
- This will add the payload `AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID.$: $$.Execution.Id` to the
1214
- `input`property for you, which will pass the execution ID from the context object to the
1215
- execution input. It requires `input` to be an object or not be set at all.
1216
-
1217
- ### Invoke Activity
1218
-
1219
- You can invoke a [Step Functions Activity](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-activities.html) which enables you to have
1220
- a task in your state machine where the work is performed by a *worker* that can
1221
- be hosted on Amazon EC2, Amazon ECS, AWS Lambda, basically anywhere. Activities
1222
- are a way to associate code running somewhere (known as an activity worker) with
1223
- a specific task in a state machine.
1224
-
1225
- When Step Functions reaches an activity task state, the workflow waits for an
1226
- activity worker to poll for a task. An activity worker polls Step Functions by
1227
- using GetActivityTask, and sending the ARN for the related activity.
1228
-
1229
- After the activity worker completes its work, it can provide a report of its
1230
- success or failure by using `SendTaskSuccess` or `SendTaskFailure`. These two
1231
- calls use the taskToken provided by GetActivityTask to associate the result
1232
- with that task.
1233
-
1234
- The following example creates an activity and creates a task that invokes the activity.
1235
-
1236
- ```ts
1237
- const submitJobActivity = new sfn.Activity(this, 'SubmitJob');
1238
-
1239
- new tasks.StepFunctionsInvokeActivity(this, 'Submit Job', {
1240
- activity: submitJobActivity,
1241
- });
1242
- ```
1243
-
1244
- Use the [Parameters](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters) field to create a collection of key-value pairs that are passed as input.
1245
- The values of each can either be static values that you include in your state machine definition, or selected from either the input or the context object with a path.
1246
-
1247
- ```ts
1248
- const submitJobActivity = new sfn.Activity(this, 'SubmitJob');
1249
-
1250
- new tasks.StepFunctionsInvokeActivity(this, 'Submit Job', {
1251
- activity: submitJobActivity,
1252
- parameters: {
1253
- comment: 'Selecting what I care about.',
1254
- MyDetails: {
1255
- size: sfn.JsonPath.stringAt('$.product.details.size'),
1256
- exists: sfn.JsonPath.stringAt('$.product.availability'),
1257
- StaticValue: 'foo'
1258
- },
1259
- },
1260
- });
1261
- ```
1262
-
1263
- ## SQS
1264
-
1265
- Step Functions supports [Amazon SQS](https://docs.aws.amazon.com/step-functions/latest/dg/connect-sqs.html)
1266
-
1267
- You can call the [`SendMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html) API from a `Task` state
1268
- to send a message to an SQS queue.
1269
-
1270
- ```ts
1271
- const queue = new sqs.Queue(this, 'Queue');
1272
-
1273
- // Use a field from the execution data as message.
1274
- const task1 = new tasks.SqsSendMessage(this, 'Send1', {
1275
- queue,
1276
- messageBody: sfn.TaskInput.fromJsonPathAt('$.message'),
1277
- });
1278
-
1279
- // Combine a field from the execution data with
1280
- // a literal object.
1281
- const task2 = new tasks.SqsSendMessage(this, 'Send2', {
1282
- queue,
1283
- messageBody: sfn.TaskInput.fromObject({
1284
- field1: 'somedata',
1285
- field2: sfn.JsonPath.stringAt('$.field2'),
1286
- }),
1287
- });
1288
- ```