@tradedal/aws-client-sfn 0.0.0-stage → 0.0.5

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 (3) hide show
  1. package/index.ts +1552 -0
  2. package/package.json +23 -3
  3. package/README.md +0 -3
package/index.ts ADDED
@@ -0,0 +1,1552 @@
1
+ // Generated from Smithy's official OpenAPI transformation. Do not edit.
2
+ // biome-ignore-all lint/complexity/useRegexLiterals: Preserve Effect's generated regular expressions.
3
+
4
+ import { AwsClient } from "@tradedal/aws-client-core";
5
+ import { awsJsonRpcEmptyOutput } from "@tradedal/aws-client-core/http-operation";
6
+ import type {
7
+ AwsJsonRpcOperation,
8
+ AwsServiceDefinition,
9
+ } from "@tradedal/aws-client-core/model";
10
+ import { Effect, Schema } from "effect";
11
+ import { HttpApi, HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
12
+
13
+ export const StateMachineType = Schema.Literals([
14
+ "STANDARD",
15
+ "EXPRESS",
16
+ ]).annotate({ identifier: "StateMachineType" });
17
+
18
+ export type StateMachineType = typeof StateMachineType.Type;
19
+
20
+ export const LogLevel = Schema.Literals([
21
+ "ALL",
22
+ "ERROR",
23
+ "FATAL",
24
+ "OFF",
25
+ ]).annotate({ identifier: "LogLevel" });
26
+
27
+ export type LogLevel = typeof LogLevel.Type;
28
+
29
+ export const CloudWatchLogsLogGroup = Schema.StructWithRest(
30
+ Schema.Struct({
31
+ logGroupArn: Schema.optionalKey(
32
+ Schema.String.check(
33
+ Schema.isMinLength(1).annotate({
34
+ expected: "a value with a length of at least 1",
35
+ }),
36
+ ).check(
37
+ Schema.isMaxCodePoints(256).annotate({
38
+ expected: "a string with at most 256 code points",
39
+ }),
40
+ ),
41
+ ),
42
+ }),
43
+ [
44
+ Schema.Record(
45
+ Schema.String,
46
+ Schema.Json.annotate({ expected: "JSON value" }),
47
+ ),
48
+ ],
49
+ ).annotate({ identifier: "CloudWatchLogsLogGroup" });
50
+
51
+ export type CloudWatchLogsLogGroup = typeof CloudWatchLogsLogGroup.Type;
52
+
53
+ export const Tag = Schema.StructWithRest(
54
+ Schema.Struct({
55
+ key: Schema.optionalKey(
56
+ Schema.String.check(
57
+ Schema.isMinLength(1).annotate({
58
+ expected: "a value with a length of at least 1",
59
+ }),
60
+ ).check(
61
+ Schema.isMaxCodePoints(128).annotate({
62
+ expected: "a string with at most 128 code points",
63
+ }),
64
+ ),
65
+ ),
66
+ value: Schema.optionalKey(
67
+ Schema.String.check(
68
+ Schema.isMinCodePoints(0).annotate({
69
+ expected: "a string with at least 0 code points",
70
+ }),
71
+ ).check(
72
+ Schema.isMaxCodePoints(256).annotate({
73
+ expected: "a string with at most 256 code points",
74
+ }),
75
+ ),
76
+ ),
77
+ }),
78
+ [
79
+ Schema.Record(
80
+ Schema.String,
81
+ Schema.Json.annotate({ expected: "JSON value" }),
82
+ ),
83
+ ],
84
+ ).annotate({ identifier: "Tag" });
85
+
86
+ export type Tag = typeof Tag.Type;
87
+
88
+ export const TracingConfiguration = Schema.StructWithRest(
89
+ Schema.Struct({
90
+ enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
91
+ }),
92
+ [
93
+ Schema.Record(
94
+ Schema.String,
95
+ Schema.Json.annotate({ expected: "JSON value" }),
96
+ ),
97
+ ],
98
+ ).annotate({ identifier: "TracingConfiguration" });
99
+
100
+ export type TracingConfiguration = typeof TracingConfiguration.Type;
101
+
102
+ export const EncryptionType = Schema.Literals([
103
+ "AWS_OWNED_KEY",
104
+ "CUSTOMER_MANAGED_KMS_KEY",
105
+ ]).annotate({ identifier: "EncryptionType" });
106
+
107
+ export type EncryptionType = typeof EncryptionType.Type;
108
+
109
+ export const ValidationExceptionReason = Schema.Literals([
110
+ "API_DOES_NOT_SUPPORT_LABELED_ARNS",
111
+ "MISSING_REQUIRED_PARAMETER",
112
+ "CANNOT_UPDATE_COMPLETED_MAP_RUN",
113
+ "INVALID_ROUTING_CONFIGURATION",
114
+ ]).annotate({ identifier: "ValidationExceptionReason" });
115
+
116
+ export type ValidationExceptionReason = typeof ValidationExceptionReason.Type;
117
+
118
+ export const IncludedData = Schema.Literals([
119
+ "ALL_DATA",
120
+ "METADATA_ONLY",
121
+ ]).annotate({ identifier: "IncludedData" });
122
+
123
+ export type IncludedData = typeof IncludedData.Type;
124
+
125
+ export const StateMachineStatus = Schema.Literals([
126
+ "ACTIVE",
127
+ "DELETING",
128
+ ]).annotate({ identifier: "StateMachineStatus" });
129
+
130
+ export type StateMachineStatus = typeof StateMachineStatus.Type;
131
+
132
+ export const VariableReferences = Schema.Record(
133
+ Schema.String,
134
+ Schema.Array(Schema.String.annotate({ format: "password" })),
135
+ )
136
+ .annotate({ format: "password" })
137
+ .check(
138
+ Schema.isPropertyNames(
139
+ Schema.String.check(
140
+ Schema.isMinLength(1).annotate({
141
+ expected: "a value with a length of at least 1",
142
+ }),
143
+ ).check(
144
+ Schema.isMaxCodePoints(80).annotate({
145
+ expected: "a string with at most 80 code points",
146
+ }),
147
+ ),
148
+ ).annotate({
149
+ expected: "an object with property names matching the schema",
150
+ identifier: "VariableReferences",
151
+ }),
152
+ );
153
+
154
+ export type VariableReferences = typeof VariableReferences.Type;
155
+
156
+ export const KmsKeyState = Schema.Literals([
157
+ "DISABLED",
158
+ "PENDING_DELETION",
159
+ "PENDING_IMPORT",
160
+ "UNAVAILABLE",
161
+ "CREATING",
162
+ ]).annotate({ identifier: "KmsKeyState" });
163
+
164
+ export type KmsKeyState = typeof KmsKeyState.Type;
165
+
166
+ export const LogDestination = Schema.StructWithRest(
167
+ Schema.Struct({
168
+ cloudWatchLogsLogGroup: Schema.optionalKey(CloudWatchLogsLogGroup),
169
+ }),
170
+ [
171
+ Schema.Record(
172
+ Schema.String,
173
+ Schema.Json.annotate({ expected: "JSON value" }),
174
+ ),
175
+ ],
176
+ ).annotate({ identifier: "LogDestination" });
177
+
178
+ export type LogDestination = typeof LogDestination.Type;
179
+
180
+ export const EncryptionConfiguration = Schema.StructWithRest(
181
+ Schema.Struct({
182
+ kmsKeyId: Schema.optionalKey(
183
+ Schema.String.check(
184
+ Schema.isMinLength(1).annotate({
185
+ expected: "a value with a length of at least 1",
186
+ }),
187
+ ).check(
188
+ Schema.isMaxCodePoints(2048).annotate({
189
+ expected: "a string with at most 2048 code points",
190
+ }),
191
+ ),
192
+ ),
193
+ kmsDataKeyReusePeriodSeconds: Schema.optionalKey(
194
+ Schema.Number.annotate({ format: "int32" })
195
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
196
+ .check(
197
+ Schema.isGreaterThanOrEqualTo(60).annotate({
198
+ expected: "a value greater than or equal to 60",
199
+ }),
200
+ )
201
+ .check(
202
+ Schema.isLessThanOrEqualTo(900).annotate({
203
+ expected: "a value less than or equal to 900",
204
+ }),
205
+ ),
206
+ ),
207
+ type: EncryptionType,
208
+ }),
209
+ [
210
+ Schema.Record(
211
+ Schema.String,
212
+ Schema.Json.annotate({ expected: "JSON value" }),
213
+ ),
214
+ ],
215
+ ).annotate({ identifier: "EncryptionConfiguration" });
216
+
217
+ export type EncryptionConfiguration = typeof EncryptionConfiguration.Type;
218
+
219
+ export const LoggingConfiguration = Schema.StructWithRest(
220
+ Schema.Struct({
221
+ level: Schema.optionalKey(LogLevel),
222
+ includeExecutionData: Schema.optionalKey(
223
+ Schema.Boolean.annotate({ default: false }),
224
+ ),
225
+ destinations: Schema.optionalKey(Schema.Array(LogDestination)),
226
+ }),
227
+ [
228
+ Schema.Record(
229
+ Schema.String,
230
+ Schema.Json.annotate({ expected: "JSON value" }),
231
+ ),
232
+ ],
233
+ ).annotate({ identifier: "LoggingConfiguration" });
234
+
235
+ export type LoggingConfiguration = typeof LoggingConfiguration.Type;
236
+
237
+ export const CreateStateMachineInput = Schema.StructWithRest(
238
+ Schema.Struct({
239
+ name: Schema.String.check(
240
+ Schema.isMinLength(1).annotate({
241
+ expected: "a value with a length of at least 1",
242
+ }),
243
+ ).check(
244
+ Schema.isMaxCodePoints(80).annotate({
245
+ expected: "a string with at most 80 code points",
246
+ }),
247
+ ),
248
+ definition: Schema.String.annotate({ format: "password" })
249
+ .check(
250
+ Schema.isMinLength(1).annotate({
251
+ expected: "a value with a length of at least 1",
252
+ }),
253
+ )
254
+ .check(
255
+ Schema.isMaxCodePoints(1048576).annotate({
256
+ expected: "a string with at most 1048576 code points",
257
+ }),
258
+ ),
259
+ roleArn: Schema.String.check(
260
+ Schema.isMinLength(1).annotate({
261
+ expected: "a value with a length of at least 1",
262
+ }),
263
+ ).check(
264
+ Schema.isMaxCodePoints(256).annotate({
265
+ expected: "a string with at most 256 code points",
266
+ }),
267
+ ),
268
+ type: Schema.optionalKey(StateMachineType),
269
+ loggingConfiguration: Schema.optionalKey(LoggingConfiguration),
270
+ tags: Schema.optionalKey(Schema.Array(Tag)),
271
+ tracingConfiguration: Schema.optionalKey(TracingConfiguration),
272
+ publish: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
273
+ versionDescription: Schema.optionalKey(
274
+ Schema.String.annotate({ format: "password" })
275
+ .check(
276
+ Schema.isMinCodePoints(0).annotate({
277
+ expected: "a string with at least 0 code points",
278
+ }),
279
+ )
280
+ .check(
281
+ Schema.isMaxCodePoints(256).annotate({
282
+ expected: "a string with at most 256 code points",
283
+ }),
284
+ ),
285
+ ),
286
+ encryptionConfiguration: Schema.optionalKey(EncryptionConfiguration),
287
+ }),
288
+ [
289
+ Schema.Record(
290
+ Schema.String,
291
+ Schema.Json.annotate({ expected: "JSON value" }),
292
+ ),
293
+ ],
294
+ );
295
+
296
+ export type CreateStateMachineInput = typeof CreateStateMachineInput.Type;
297
+
298
+ export const CreateStateMachineOutput = Schema.StructWithRest(
299
+ Schema.Struct({
300
+ stateMachineArn: Schema.String.check(
301
+ Schema.isMinLength(1).annotate({
302
+ expected: "a value with a length of at least 1",
303
+ }),
304
+ ).check(
305
+ Schema.isMaxCodePoints(256).annotate({
306
+ expected: "a string with at most 256 code points",
307
+ }),
308
+ ),
309
+ creationDate: Schema.Number.annotate({ format: "double" }).check(
310
+ Schema.isFinite().annotate({ expected: "a finite number" }),
311
+ ),
312
+ stateMachineVersionArn: Schema.optionalKey(
313
+ Schema.String.check(
314
+ Schema.isMinLength(1).annotate({
315
+ expected: "a value with a length of at least 1",
316
+ }),
317
+ ).check(
318
+ Schema.isMaxCodePoints(256).annotate({
319
+ expected: "a string with at most 256 code points",
320
+ }),
321
+ ),
322
+ ),
323
+ }),
324
+ [
325
+ Schema.Record(
326
+ Schema.String,
327
+ Schema.Json.annotate({ expected: "JSON value" }),
328
+ ),
329
+ ],
330
+ );
331
+
332
+ export type CreateStateMachineOutput = typeof CreateStateMachineOutput.Type;
333
+
334
+ export const InvalidArn = Schema.StructWithRest(
335
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
336
+ [
337
+ Schema.Record(
338
+ Schema.String,
339
+ Schema.Json.annotate({ expected: "JSON value" }),
340
+ ),
341
+ ],
342
+ );
343
+
344
+ export type InvalidArn = typeof InvalidArn.Type;
345
+
346
+ export const InvalidDefinition = Schema.StructWithRest(
347
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
348
+ [
349
+ Schema.Record(
350
+ Schema.String,
351
+ Schema.Json.annotate({ expected: "JSON value" }),
352
+ ),
353
+ ],
354
+ );
355
+
356
+ export type InvalidDefinition = typeof InvalidDefinition.Type;
357
+
358
+ export const InvalidEncryptionConfiguration = Schema.StructWithRest(
359
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
360
+ [
361
+ Schema.Record(
362
+ Schema.String,
363
+ Schema.Json.annotate({ expected: "JSON value" }),
364
+ ),
365
+ ],
366
+ );
367
+
368
+ export type InvalidEncryptionConfiguration =
369
+ typeof InvalidEncryptionConfiguration.Type;
370
+
371
+ export const InvalidLoggingConfiguration = Schema.StructWithRest(
372
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
373
+ [
374
+ Schema.Record(
375
+ Schema.String,
376
+ Schema.Json.annotate({ expected: "JSON value" }),
377
+ ),
378
+ ],
379
+ );
380
+
381
+ export type InvalidLoggingConfiguration =
382
+ typeof InvalidLoggingConfiguration.Type;
383
+
384
+ export const InvalidName = Schema.StructWithRest(
385
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
386
+ [
387
+ Schema.Record(
388
+ Schema.String,
389
+ Schema.Json.annotate({ expected: "JSON value" }),
390
+ ),
391
+ ],
392
+ );
393
+
394
+ export type InvalidName = typeof InvalidName.Type;
395
+
396
+ export const InvalidTracingConfiguration = Schema.StructWithRest(
397
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
398
+ [
399
+ Schema.Record(
400
+ Schema.String,
401
+ Schema.Json.annotate({ expected: "JSON value" }),
402
+ ),
403
+ ],
404
+ );
405
+
406
+ export type InvalidTracingConfiguration =
407
+ typeof InvalidTracingConfiguration.Type;
408
+
409
+ export const KmsAccessDeniedException = Schema.StructWithRest(
410
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
411
+ [
412
+ Schema.Record(
413
+ Schema.String,
414
+ Schema.Json.annotate({ expected: "JSON value" }),
415
+ ),
416
+ ],
417
+ );
418
+
419
+ export type KmsAccessDeniedException = typeof KmsAccessDeniedException.Type;
420
+
421
+ export const KmsThrottlingException = Schema.StructWithRest(
422
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
423
+ [
424
+ Schema.Record(
425
+ Schema.String,
426
+ Schema.Json.annotate({ expected: "JSON value" }),
427
+ ),
428
+ ],
429
+ );
430
+
431
+ export type KmsThrottlingException = typeof KmsThrottlingException.Type;
432
+
433
+ export const StateMachineAlreadyExists = Schema.StructWithRest(
434
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
435
+ [
436
+ Schema.Record(
437
+ Schema.String,
438
+ Schema.Json.annotate({ expected: "JSON value" }),
439
+ ),
440
+ ],
441
+ );
442
+
443
+ export type StateMachineAlreadyExists = typeof StateMachineAlreadyExists.Type;
444
+
445
+ export const StateMachineDeleting = Schema.StructWithRest(
446
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
447
+ [
448
+ Schema.Record(
449
+ Schema.String,
450
+ Schema.Json.annotate({ expected: "JSON value" }),
451
+ ),
452
+ ],
453
+ );
454
+
455
+ export type StateMachineDeleting = typeof StateMachineDeleting.Type;
456
+
457
+ export const StateMachineLimitExceeded = Schema.StructWithRest(
458
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
459
+ [
460
+ Schema.Record(
461
+ Schema.String,
462
+ Schema.Json.annotate({ expected: "JSON value" }),
463
+ ),
464
+ ],
465
+ );
466
+
467
+ export type StateMachineLimitExceeded = typeof StateMachineLimitExceeded.Type;
468
+
469
+ export const StateMachineTypeNotSupported = Schema.StructWithRest(
470
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
471
+ [
472
+ Schema.Record(
473
+ Schema.String,
474
+ Schema.Json.annotate({ expected: "JSON value" }),
475
+ ),
476
+ ],
477
+ );
478
+
479
+ export type StateMachineTypeNotSupported =
480
+ typeof StateMachineTypeNotSupported.Type;
481
+
482
+ export const TooManyTags = Schema.StructWithRest(
483
+ Schema.Struct({
484
+ message: Schema.optionalKey(Schema.String),
485
+ resourceName: Schema.optionalKey(
486
+ Schema.String.check(
487
+ Schema.isMinLength(1).annotate({
488
+ expected: "a value with a length of at least 1",
489
+ }),
490
+ ).check(
491
+ Schema.isMaxCodePoints(256).annotate({
492
+ expected: "a string with at most 256 code points",
493
+ }),
494
+ ),
495
+ ),
496
+ }),
497
+ [
498
+ Schema.Record(
499
+ Schema.String,
500
+ Schema.Json.annotate({ expected: "JSON value" }),
501
+ ),
502
+ ],
503
+ );
504
+
505
+ export type TooManyTags = typeof TooManyTags.Type;
506
+
507
+ export const ValidationException = Schema.StructWithRest(
508
+ Schema.Struct({
509
+ message: Schema.optionalKey(Schema.String),
510
+ reason: Schema.optionalKey(ValidationExceptionReason),
511
+ }),
512
+ [
513
+ Schema.Record(
514
+ Schema.String,
515
+ Schema.Json.annotate({ expected: "JSON value" }),
516
+ ),
517
+ ],
518
+ );
519
+
520
+ export type ValidationException = typeof ValidationException.Type;
521
+
522
+ export const ConflictException = Schema.StructWithRest(
523
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
524
+ [
525
+ Schema.Record(
526
+ Schema.String,
527
+ Schema.Json.annotate({ expected: "JSON value" }),
528
+ ),
529
+ ],
530
+ );
531
+
532
+ export type ConflictException = typeof ConflictException.Type;
533
+
534
+ export const DeleteStateMachineInput = Schema.StructWithRest(
535
+ Schema.Struct({
536
+ stateMachineArn: Schema.String.check(
537
+ Schema.isMinLength(1).annotate({
538
+ expected: "a value with a length of at least 1",
539
+ }),
540
+ ).check(
541
+ Schema.isMaxCodePoints(256).annotate({
542
+ expected: "a string with at most 256 code points",
543
+ }),
544
+ ),
545
+ }),
546
+ [
547
+ Schema.Record(
548
+ Schema.String,
549
+ Schema.Json.annotate({ expected: "JSON value" }),
550
+ ),
551
+ ],
552
+ );
553
+
554
+ export type DeleteStateMachineInput = typeof DeleteStateMachineInput.Type;
555
+
556
+ export const DescribeStateMachineInput = Schema.StructWithRest(
557
+ Schema.Struct({
558
+ stateMachineArn: Schema.String.check(
559
+ Schema.isMinLength(1).annotate({
560
+ expected: "a value with a length of at least 1",
561
+ }),
562
+ ).check(
563
+ Schema.isMaxCodePoints(256).annotate({
564
+ expected: "a string with at most 256 code points",
565
+ }),
566
+ ),
567
+ includedData: Schema.optionalKey(IncludedData),
568
+ }),
569
+ [
570
+ Schema.Record(
571
+ Schema.String,
572
+ Schema.Json.annotate({ expected: "JSON value" }),
573
+ ),
574
+ ],
575
+ );
576
+
577
+ export type DescribeStateMachineInput = typeof DescribeStateMachineInput.Type;
578
+
579
+ export const DescribeStateMachineOutput = Schema.StructWithRest(
580
+ Schema.Struct({
581
+ stateMachineArn: Schema.String.check(
582
+ Schema.isMinLength(1).annotate({
583
+ expected: "a value with a length of at least 1",
584
+ }),
585
+ ).check(
586
+ Schema.isMaxCodePoints(256).annotate({
587
+ expected: "a string with at most 256 code points",
588
+ }),
589
+ ),
590
+ name: Schema.String.check(
591
+ Schema.isMinLength(1).annotate({
592
+ expected: "a value with a length of at least 1",
593
+ }),
594
+ ).check(
595
+ Schema.isMaxCodePoints(80).annotate({
596
+ expected: "a string with at most 80 code points",
597
+ }),
598
+ ),
599
+ status: Schema.optionalKey(StateMachineStatus),
600
+ definition: Schema.String.annotate({ format: "password" })
601
+ .check(
602
+ Schema.isMinLength(1).annotate({
603
+ expected: "a value with a length of at least 1",
604
+ }),
605
+ )
606
+ .check(
607
+ Schema.isMaxCodePoints(1048576).annotate({
608
+ expected: "a string with at most 1048576 code points",
609
+ }),
610
+ ),
611
+ roleArn: Schema.String.check(
612
+ Schema.isMinLength(1).annotate({
613
+ expected: "a value with a length of at least 1",
614
+ }),
615
+ ).check(
616
+ Schema.isMaxCodePoints(256).annotate({
617
+ expected: "a string with at most 256 code points",
618
+ }),
619
+ ),
620
+ type: StateMachineType,
621
+ creationDate: Schema.Number.annotate({ format: "double" }).check(
622
+ Schema.isFinite().annotate({ expected: "a finite number" }),
623
+ ),
624
+ loggingConfiguration: Schema.optionalKey(LoggingConfiguration),
625
+ tracingConfiguration: Schema.optionalKey(TracingConfiguration),
626
+ label: Schema.optionalKey(Schema.String),
627
+ revisionId: Schema.optionalKey(Schema.String),
628
+ description: Schema.optionalKey(
629
+ Schema.String.annotate({ format: "password" })
630
+ .check(
631
+ Schema.isMinCodePoints(0).annotate({
632
+ expected: "a string with at least 0 code points",
633
+ }),
634
+ )
635
+ .check(
636
+ Schema.isMaxCodePoints(256).annotate({
637
+ expected: "a string with at most 256 code points",
638
+ }),
639
+ ),
640
+ ),
641
+ encryptionConfiguration: Schema.optionalKey(EncryptionConfiguration),
642
+ variableReferences: Schema.optionalKey(VariableReferences),
643
+ }),
644
+ [
645
+ Schema.Record(
646
+ Schema.String,
647
+ Schema.Json.annotate({ expected: "JSON value" }),
648
+ ),
649
+ ],
650
+ );
651
+
652
+ export type DescribeStateMachineOutput = typeof DescribeStateMachineOutput.Type;
653
+
654
+ export const KmsInvalidStateException = Schema.StructWithRest(
655
+ Schema.Struct({
656
+ kmsKeyState: Schema.optionalKey(KmsKeyState),
657
+ message: Schema.optionalKey(Schema.String),
658
+ }),
659
+ [
660
+ Schema.Record(
661
+ Schema.String,
662
+ Schema.Json.annotate({ expected: "JSON value" }),
663
+ ),
664
+ ],
665
+ );
666
+
667
+ export type KmsInvalidStateException = typeof KmsInvalidStateException.Type;
668
+
669
+ export const StateMachineDoesNotExist = Schema.StructWithRest(
670
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
671
+ [
672
+ Schema.Record(
673
+ Schema.String,
674
+ Schema.Json.annotate({ expected: "JSON value" }),
675
+ ),
676
+ ],
677
+ );
678
+
679
+ export type StateMachineDoesNotExist = typeof StateMachineDoesNotExist.Type;
680
+
681
+ export const UpdateStateMachineInput = Schema.StructWithRest(
682
+ Schema.Struct({
683
+ stateMachineArn: Schema.String.check(
684
+ Schema.isMinLength(1).annotate({
685
+ expected: "a value with a length of at least 1",
686
+ }),
687
+ ).check(
688
+ Schema.isMaxCodePoints(256).annotate({
689
+ expected: "a string with at most 256 code points",
690
+ }),
691
+ ),
692
+ definition: Schema.optionalKey(
693
+ Schema.String.annotate({ format: "password" })
694
+ .check(
695
+ Schema.isMinLength(1).annotate({
696
+ expected: "a value with a length of at least 1",
697
+ }),
698
+ )
699
+ .check(
700
+ Schema.isMaxCodePoints(1048576).annotate({
701
+ expected: "a string with at most 1048576 code points",
702
+ }),
703
+ ),
704
+ ),
705
+ roleArn: Schema.optionalKey(
706
+ Schema.String.check(
707
+ Schema.isMinLength(1).annotate({
708
+ expected: "a value with a length of at least 1",
709
+ }),
710
+ ).check(
711
+ Schema.isMaxCodePoints(256).annotate({
712
+ expected: "a string with at most 256 code points",
713
+ }),
714
+ ),
715
+ ),
716
+ loggingConfiguration: Schema.optionalKey(LoggingConfiguration),
717
+ tracingConfiguration: Schema.optionalKey(TracingConfiguration),
718
+ publish: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
719
+ versionDescription: Schema.optionalKey(
720
+ Schema.String.annotate({ format: "password" })
721
+ .check(
722
+ Schema.isMinCodePoints(0).annotate({
723
+ expected: "a string with at least 0 code points",
724
+ }),
725
+ )
726
+ .check(
727
+ Schema.isMaxCodePoints(256).annotate({
728
+ expected: "a string with at most 256 code points",
729
+ }),
730
+ ),
731
+ ),
732
+ encryptionConfiguration: Schema.optionalKey(EncryptionConfiguration),
733
+ }),
734
+ [
735
+ Schema.Record(
736
+ Schema.String,
737
+ Schema.Json.annotate({ expected: "JSON value" }),
738
+ ),
739
+ ],
740
+ );
741
+
742
+ export type UpdateStateMachineInput = typeof UpdateStateMachineInput.Type;
743
+
744
+ export const UpdateStateMachineOutput = Schema.StructWithRest(
745
+ Schema.Struct({
746
+ updateDate: Schema.Number.annotate({ format: "double" }).check(
747
+ Schema.isFinite().annotate({ expected: "a finite number" }),
748
+ ),
749
+ revisionId: Schema.optionalKey(Schema.String),
750
+ stateMachineVersionArn: Schema.optionalKey(
751
+ Schema.String.check(
752
+ Schema.isMinLength(1).annotate({
753
+ expected: "a value with a length of at least 1",
754
+ }),
755
+ ).check(
756
+ Schema.isMaxCodePoints(256).annotate({
757
+ expected: "a string with at most 256 code points",
758
+ }),
759
+ ),
760
+ ),
761
+ }),
762
+ [
763
+ Schema.Record(
764
+ Schema.String,
765
+ Schema.Json.annotate({ expected: "JSON value" }),
766
+ ),
767
+ ],
768
+ );
769
+
770
+ export type UpdateStateMachineOutput = typeof UpdateStateMachineOutput.Type;
771
+
772
+ export const MissingRequiredParameter = Schema.StructWithRest(
773
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
774
+ [
775
+ Schema.Record(
776
+ Schema.String,
777
+ Schema.Json.annotate({ expected: "JSON value" }),
778
+ ),
779
+ ],
780
+ );
781
+
782
+ export type MissingRequiredParameter = typeof MissingRequiredParameter.Type;
783
+
784
+ export const ServiceQuotaExceededException = Schema.StructWithRest(
785
+ Schema.Struct({ message: Schema.optionalKey(Schema.String) }),
786
+ [
787
+ Schema.Record(
788
+ Schema.String,
789
+ Schema.Json.annotate({ expected: "JSON value" }),
790
+ ),
791
+ ],
792
+ );
793
+
794
+ export type ServiceQuotaExceededException =
795
+ typeof ServiceQuotaExceededException.Type;
796
+
797
+ export const stepFunctionsErrors = {
798
+ InvalidArn: {
799
+ name: "InvalidArn",
800
+ fault: "client",
801
+ httpStatus: 400,
802
+ retryable: null,
803
+ schema: InvalidArn,
804
+ },
805
+ InvalidDefinition: {
806
+ name: "InvalidDefinition",
807
+ fault: "client",
808
+ httpStatus: 400,
809
+ retryable: null,
810
+ schema: InvalidDefinition,
811
+ },
812
+ InvalidEncryptionConfiguration: {
813
+ name: "InvalidEncryptionConfiguration",
814
+ fault: "client",
815
+ httpStatus: 400,
816
+ retryable: null,
817
+ schema: InvalidEncryptionConfiguration,
818
+ },
819
+ InvalidLoggingConfiguration: {
820
+ name: "InvalidLoggingConfiguration",
821
+ fault: "client",
822
+ httpStatus: 400,
823
+ retryable: null,
824
+ schema: InvalidLoggingConfiguration,
825
+ },
826
+ InvalidName: {
827
+ name: "InvalidName",
828
+ fault: "client",
829
+ httpStatus: 400,
830
+ retryable: null,
831
+ schema: InvalidName,
832
+ },
833
+ InvalidTracingConfiguration: {
834
+ name: "InvalidTracingConfiguration",
835
+ fault: "client",
836
+ httpStatus: 400,
837
+ retryable: null,
838
+ schema: InvalidTracingConfiguration,
839
+ },
840
+ KmsAccessDeniedException: {
841
+ name: "KmsAccessDeniedException",
842
+ fault: "client",
843
+ httpStatus: 400,
844
+ retryable: null,
845
+ schema: KmsAccessDeniedException,
846
+ },
847
+ KmsThrottlingException: {
848
+ name: "KmsThrottlingException",
849
+ fault: "client",
850
+ httpStatus: 400,
851
+ retryable: null,
852
+ schema: KmsThrottlingException,
853
+ },
854
+ StateMachineAlreadyExists: {
855
+ name: "StateMachineAlreadyExists",
856
+ fault: "client",
857
+ httpStatus: 400,
858
+ retryable: null,
859
+ schema: StateMachineAlreadyExists,
860
+ },
861
+ StateMachineDeleting: {
862
+ name: "StateMachineDeleting",
863
+ fault: "client",
864
+ httpStatus: 400,
865
+ retryable: null,
866
+ schema: StateMachineDeleting,
867
+ },
868
+ StateMachineLimitExceeded: {
869
+ name: "StateMachineLimitExceeded",
870
+ fault: "client",
871
+ httpStatus: 400,
872
+ retryable: null,
873
+ schema: StateMachineLimitExceeded,
874
+ },
875
+ StateMachineTypeNotSupported: {
876
+ name: "StateMachineTypeNotSupported",
877
+ fault: "client",
878
+ httpStatus: 400,
879
+ retryable: null,
880
+ schema: StateMachineTypeNotSupported,
881
+ },
882
+ TooManyTags: {
883
+ name: "TooManyTags",
884
+ fault: "client",
885
+ httpStatus: 400,
886
+ retryable: null,
887
+ schema: TooManyTags,
888
+ },
889
+ ValidationException: {
890
+ name: "ValidationException",
891
+ fault: "client",
892
+ httpStatus: 400,
893
+ retryable: null,
894
+ schema: ValidationException,
895
+ },
896
+ ConflictException: {
897
+ name: "ConflictException",
898
+ fault: "client",
899
+ httpStatus: 409,
900
+ retryable: null,
901
+ schema: ConflictException,
902
+ },
903
+ KmsInvalidStateException: {
904
+ name: "KmsInvalidStateException",
905
+ fault: "client",
906
+ httpStatus: 400,
907
+ retryable: null,
908
+ schema: KmsInvalidStateException,
909
+ },
910
+ StateMachineDoesNotExist: {
911
+ name: "StateMachineDoesNotExist",
912
+ fault: "client",
913
+ httpStatus: 400,
914
+ retryable: null,
915
+ schema: StateMachineDoesNotExist,
916
+ },
917
+ MissingRequiredParameter: {
918
+ name: "MissingRequiredParameter",
919
+ fault: "client",
920
+ httpStatus: 400,
921
+ retryable: null,
922
+ schema: MissingRequiredParameter,
923
+ },
924
+ ServiceQuotaExceededException: {
925
+ name: "ServiceQuotaExceededException",
926
+ fault: "client",
927
+ httpStatus: 402,
928
+ retryable: null,
929
+ schema: ServiceQuotaExceededException,
930
+ },
931
+ };
932
+
933
+ export const createStateMachineErrors = [
934
+ stepFunctionsErrors.InvalidArn,
935
+ stepFunctionsErrors.InvalidDefinition,
936
+ stepFunctionsErrors.InvalidEncryptionConfiguration,
937
+ stepFunctionsErrors.InvalidLoggingConfiguration,
938
+ stepFunctionsErrors.InvalidName,
939
+ stepFunctionsErrors.InvalidTracingConfiguration,
940
+ stepFunctionsErrors.KmsAccessDeniedException,
941
+ stepFunctionsErrors.KmsThrottlingException,
942
+ stepFunctionsErrors.StateMachineAlreadyExists,
943
+ stepFunctionsErrors.StateMachineDeleting,
944
+ stepFunctionsErrors.StateMachineLimitExceeded,
945
+ stepFunctionsErrors.StateMachineTypeNotSupported,
946
+ stepFunctionsErrors.TooManyTags,
947
+ stepFunctionsErrors.ValidationException,
948
+ stepFunctionsErrors.ConflictException,
949
+ ];
950
+
951
+ export const deleteStateMachineErrors = [
952
+ stepFunctionsErrors.InvalidArn,
953
+ stepFunctionsErrors.ValidationException,
954
+ ];
955
+
956
+ export const describeStateMachineErrors = [
957
+ stepFunctionsErrors.InvalidArn,
958
+ stepFunctionsErrors.KmsAccessDeniedException,
959
+ stepFunctionsErrors.KmsInvalidStateException,
960
+ stepFunctionsErrors.KmsThrottlingException,
961
+ stepFunctionsErrors.StateMachineDoesNotExist,
962
+ ];
963
+
964
+ export const updateStateMachineErrors = [
965
+ stepFunctionsErrors.InvalidArn,
966
+ stepFunctionsErrors.InvalidDefinition,
967
+ stepFunctionsErrors.InvalidEncryptionConfiguration,
968
+ stepFunctionsErrors.InvalidLoggingConfiguration,
969
+ stepFunctionsErrors.InvalidTracingConfiguration,
970
+ stepFunctionsErrors.KmsAccessDeniedException,
971
+ stepFunctionsErrors.KmsThrottlingException,
972
+ stepFunctionsErrors.MissingRequiredParameter,
973
+ stepFunctionsErrors.StateMachineDeleting,
974
+ stepFunctionsErrors.StateMachineDoesNotExist,
975
+ stepFunctionsErrors.ValidationException,
976
+ stepFunctionsErrors.ServiceQuotaExceededException,
977
+ stepFunctionsErrors.ConflictException,
978
+ ];
979
+
980
+ export const createStateMachineOperation: AwsJsonRpcOperation & {
981
+ readonly input: typeof CreateStateMachineInput;
982
+ readonly output: typeof CreateStateMachineOutput;
983
+ } = {
984
+ name: "CreateStateMachine",
985
+ method: "POST",
986
+ path: "/",
987
+ headers: {
988
+ "x-amz-target": "AWSStepFunctions.CreateStateMachine",
989
+ "content-type": "application/x-amz-json-1.0",
990
+ },
991
+ idempotencyTokens: [],
992
+ pagination: {},
993
+ input: CreateStateMachineInput,
994
+ output: CreateStateMachineOutput,
995
+ errors: createStateMachineErrors,
996
+ };
997
+
998
+ export const createStateMachineEndpoint = HttpApiEndpoint.make("POST")(
999
+ "CreateStateMachine",
1000
+ "/",
1001
+ {
1002
+ payload: CreateStateMachineInput,
1003
+ success: CreateStateMachineOutput,
1004
+ },
1005
+ );
1006
+
1007
+ export const DeleteStateMachineOutput = awsJsonRpcEmptyOutput(
1008
+ "application/x-amz-json-1.0",
1009
+ );
1010
+
1011
+ export const deleteStateMachineOperation: AwsJsonRpcOperation & {
1012
+ readonly input: typeof DeleteStateMachineInput;
1013
+ readonly output: typeof DeleteStateMachineOutput;
1014
+ } = {
1015
+ name: "DeleteStateMachine",
1016
+ method: "POST",
1017
+ path: "/",
1018
+ headers: {
1019
+ "x-amz-target": "AWSStepFunctions.DeleteStateMachine",
1020
+ "content-type": "application/x-amz-json-1.0",
1021
+ },
1022
+ idempotencyTokens: [],
1023
+ pagination: {},
1024
+ input: DeleteStateMachineInput,
1025
+ output: DeleteStateMachineOutput,
1026
+ errors: deleteStateMachineErrors,
1027
+ };
1028
+
1029
+ export const deleteStateMachineEndpoint = HttpApiEndpoint.make("POST")(
1030
+ "DeleteStateMachine",
1031
+ "/",
1032
+ {
1033
+ payload: DeleteStateMachineInput,
1034
+ success: DeleteStateMachineOutput,
1035
+ },
1036
+ );
1037
+
1038
+ export const describeStateMachineOperation: AwsJsonRpcOperation & {
1039
+ readonly input: typeof DescribeStateMachineInput;
1040
+ readonly output: typeof DescribeStateMachineOutput;
1041
+ } = {
1042
+ name: "DescribeStateMachine",
1043
+ method: "POST",
1044
+ path: "/",
1045
+ headers: {
1046
+ "x-amz-target": "AWSStepFunctions.DescribeStateMachine",
1047
+ "content-type": "application/x-amz-json-1.0",
1048
+ },
1049
+ idempotencyTokens: [],
1050
+ pagination: {},
1051
+ input: DescribeStateMachineInput,
1052
+ output: DescribeStateMachineOutput,
1053
+ errors: describeStateMachineErrors,
1054
+ };
1055
+
1056
+ export const describeStateMachineEndpoint = HttpApiEndpoint.make("POST")(
1057
+ "DescribeStateMachine",
1058
+ "/",
1059
+ {
1060
+ payload: DescribeStateMachineInput,
1061
+ success: DescribeStateMachineOutput,
1062
+ },
1063
+ );
1064
+
1065
+ export const updateStateMachineOperation: AwsJsonRpcOperation & {
1066
+ readonly input: typeof UpdateStateMachineInput;
1067
+ readonly output: typeof UpdateStateMachineOutput;
1068
+ } = {
1069
+ name: "UpdateStateMachine",
1070
+ method: "POST",
1071
+ path: "/",
1072
+ headers: {
1073
+ "x-amz-target": "AWSStepFunctions.UpdateStateMachine",
1074
+ "content-type": "application/x-amz-json-1.0",
1075
+ },
1076
+ idempotencyTokens: [],
1077
+ pagination: {},
1078
+ input: UpdateStateMachineInput,
1079
+ output: UpdateStateMachineOutput,
1080
+ errors: updateStateMachineErrors,
1081
+ };
1082
+
1083
+ export const updateStateMachineEndpoint = HttpApiEndpoint.make("POST")(
1084
+ "UpdateStateMachine",
1085
+ "/",
1086
+ {
1087
+ payload: UpdateStateMachineInput,
1088
+ success: UpdateStateMachineOutput,
1089
+ },
1090
+ );
1091
+
1092
+ export const stepFunctionsOperations = {
1093
+ CreateStateMachine: createStateMachineOperation,
1094
+ DeleteStateMachine: deleteStateMachineOperation,
1095
+ DescribeStateMachine: describeStateMachineOperation,
1096
+ UpdateStateMachine: updateStateMachineOperation,
1097
+ };
1098
+
1099
+ export const stepFunctionsApi = HttpApi.make("StepFunctions").add(
1100
+ HttpApiGroup.make("stepfunctions").add(
1101
+ createStateMachineEndpoint,
1102
+ deleteStateMachineEndpoint,
1103
+ describeStateMachineEndpoint,
1104
+ updateStateMachineEndpoint,
1105
+ ),
1106
+ );
1107
+
1108
+ export const stepFunctionsService: AwsServiceDefinition = {
1109
+ service: "com.amazonaws.sfn#AWSStepFunctions",
1110
+ version: "2016-11-23",
1111
+ protocol: "awsJson1_0",
1112
+ signingName: "states",
1113
+ endpointRules: {
1114
+ version: "1.0",
1115
+ parameters: {
1116
+ UseDualStack: {
1117
+ type: "boolean",
1118
+ required: true,
1119
+ default: false,
1120
+ },
1121
+ UseFIPS: {
1122
+ type: "boolean",
1123
+ required: true,
1124
+ default: false,
1125
+ },
1126
+ Endpoint: {
1127
+ type: "string",
1128
+ required: false,
1129
+ },
1130
+ Region: {
1131
+ type: "string",
1132
+ required: false,
1133
+ },
1134
+ },
1135
+ rules: [
1136
+ {
1137
+ conditions: [
1138
+ {
1139
+ fn: "isSet",
1140
+ argv: [
1141
+ {
1142
+ ref: "Endpoint",
1143
+ },
1144
+ ],
1145
+ },
1146
+ ],
1147
+ rules: [
1148
+ {
1149
+ conditions: [
1150
+ {
1151
+ fn: "booleanEquals",
1152
+ argv: [
1153
+ {
1154
+ ref: "UseFIPS",
1155
+ },
1156
+ true,
1157
+ ],
1158
+ },
1159
+ ],
1160
+ error:
1161
+ "Invalid Configuration: FIPS and custom endpoint are not supported",
1162
+ type: "error",
1163
+ },
1164
+ {
1165
+ conditions: [],
1166
+ rules: [
1167
+ {
1168
+ conditions: [
1169
+ {
1170
+ fn: "booleanEquals",
1171
+ argv: [
1172
+ {
1173
+ ref: "UseDualStack",
1174
+ },
1175
+ true,
1176
+ ],
1177
+ },
1178
+ ],
1179
+ error:
1180
+ "Invalid Configuration: Dualstack and custom endpoint are not supported",
1181
+ type: "error",
1182
+ },
1183
+ {
1184
+ conditions: [],
1185
+ endpoint: {
1186
+ url: {
1187
+ ref: "Endpoint",
1188
+ },
1189
+ properties: {},
1190
+ headers: {},
1191
+ },
1192
+ type: "endpoint",
1193
+ },
1194
+ ],
1195
+ type: "tree",
1196
+ },
1197
+ ],
1198
+ type: "tree",
1199
+ },
1200
+ {
1201
+ conditions: [],
1202
+ rules: [
1203
+ {
1204
+ conditions: [
1205
+ {
1206
+ fn: "isSet",
1207
+ argv: [
1208
+ {
1209
+ ref: "Region",
1210
+ },
1211
+ ],
1212
+ },
1213
+ ],
1214
+ rules: [
1215
+ {
1216
+ conditions: [
1217
+ {
1218
+ fn: "aws.partition",
1219
+ argv: [
1220
+ {
1221
+ ref: "Region",
1222
+ },
1223
+ ],
1224
+ assign: "PartitionResult",
1225
+ },
1226
+ ],
1227
+ rules: [
1228
+ {
1229
+ conditions: [
1230
+ {
1231
+ fn: "stringEquals",
1232
+ argv: [
1233
+ {
1234
+ ref: "Region",
1235
+ },
1236
+ "us-gov-west-1",
1237
+ ],
1238
+ },
1239
+ {
1240
+ fn: "booleanEquals",
1241
+ argv: [
1242
+ {
1243
+ ref: "UseFIPS",
1244
+ },
1245
+ true,
1246
+ ],
1247
+ },
1248
+ {
1249
+ fn: "booleanEquals",
1250
+ argv: [
1251
+ {
1252
+ ref: "UseDualStack",
1253
+ },
1254
+ false,
1255
+ ],
1256
+ },
1257
+ ],
1258
+ endpoint: {
1259
+ url: "https://states.{Region}.{PartitionResult#dnsSuffix}",
1260
+ properties: {},
1261
+ headers: {},
1262
+ },
1263
+ type: "endpoint",
1264
+ },
1265
+ {
1266
+ conditions: [
1267
+ {
1268
+ fn: "stringEquals",
1269
+ argv: [
1270
+ {
1271
+ fn: "getAttr",
1272
+ argv: [
1273
+ {
1274
+ ref: "PartitionResult",
1275
+ },
1276
+ "name",
1277
+ ],
1278
+ },
1279
+ "aws-us-gov",
1280
+ ],
1281
+ },
1282
+ {
1283
+ fn: "booleanEquals",
1284
+ argv: [
1285
+ {
1286
+ ref: "UseFIPS",
1287
+ },
1288
+ false,
1289
+ ],
1290
+ },
1291
+ {
1292
+ fn: "booleanEquals",
1293
+ argv: [
1294
+ {
1295
+ ref: "UseDualStack",
1296
+ },
1297
+ true,
1298
+ ],
1299
+ },
1300
+ ],
1301
+ endpoint: {
1302
+ url: "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
1303
+ properties: {},
1304
+ headers: {},
1305
+ },
1306
+ type: "endpoint",
1307
+ },
1308
+ {
1309
+ conditions: [
1310
+ {
1311
+ fn: "booleanEquals",
1312
+ argv: [
1313
+ {
1314
+ ref: "UseFIPS",
1315
+ },
1316
+ true,
1317
+ ],
1318
+ },
1319
+ {
1320
+ fn: "booleanEquals",
1321
+ argv: [
1322
+ {
1323
+ ref: "UseDualStack",
1324
+ },
1325
+ true,
1326
+ ],
1327
+ },
1328
+ ],
1329
+ rules: [
1330
+ {
1331
+ conditions: [
1332
+ {
1333
+ fn: "booleanEquals",
1334
+ argv: [
1335
+ true,
1336
+ {
1337
+ fn: "getAttr",
1338
+ argv: [
1339
+ {
1340
+ ref: "PartitionResult",
1341
+ },
1342
+ "supportsFIPS",
1343
+ ],
1344
+ },
1345
+ ],
1346
+ },
1347
+ {
1348
+ fn: "booleanEquals",
1349
+ argv: [
1350
+ true,
1351
+ {
1352
+ fn: "getAttr",
1353
+ argv: [
1354
+ {
1355
+ ref: "PartitionResult",
1356
+ },
1357
+ "supportsDualStack",
1358
+ ],
1359
+ },
1360
+ ],
1361
+ },
1362
+ ],
1363
+ rules: [
1364
+ {
1365
+ conditions: [],
1366
+ endpoint: {
1367
+ url: "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
1368
+ properties: {},
1369
+ headers: {},
1370
+ },
1371
+ type: "endpoint",
1372
+ },
1373
+ ],
1374
+ type: "tree",
1375
+ },
1376
+ {
1377
+ conditions: [],
1378
+ error:
1379
+ "FIPS and DualStack are enabled, but this partition does not support one or both",
1380
+ type: "error",
1381
+ },
1382
+ ],
1383
+ type: "tree",
1384
+ },
1385
+ {
1386
+ conditions: [
1387
+ {
1388
+ fn: "booleanEquals",
1389
+ argv: [
1390
+ {
1391
+ ref: "UseFIPS",
1392
+ },
1393
+ true,
1394
+ ],
1395
+ },
1396
+ {
1397
+ fn: "booleanEquals",
1398
+ argv: [
1399
+ {
1400
+ ref: "UseDualStack",
1401
+ },
1402
+ false,
1403
+ ],
1404
+ },
1405
+ ],
1406
+ rules: [
1407
+ {
1408
+ conditions: [
1409
+ {
1410
+ fn: "booleanEquals",
1411
+ argv: [
1412
+ {
1413
+ fn: "getAttr",
1414
+ argv: [
1415
+ {
1416
+ ref: "PartitionResult",
1417
+ },
1418
+ "supportsFIPS",
1419
+ ],
1420
+ },
1421
+ true,
1422
+ ],
1423
+ },
1424
+ ],
1425
+ rules: [
1426
+ {
1427
+ conditions: [],
1428
+ endpoint: {
1429
+ url: "https://states-fips.{Region}.{PartitionResult#dnsSuffix}",
1430
+ properties: {},
1431
+ headers: {},
1432
+ },
1433
+ type: "endpoint",
1434
+ },
1435
+ ],
1436
+ type: "tree",
1437
+ },
1438
+ {
1439
+ conditions: [],
1440
+ error:
1441
+ "FIPS is enabled but this partition does not support FIPS",
1442
+ type: "error",
1443
+ },
1444
+ ],
1445
+ type: "tree",
1446
+ },
1447
+ {
1448
+ conditions: [
1449
+ {
1450
+ fn: "booleanEquals",
1451
+ argv: [
1452
+ {
1453
+ ref: "UseFIPS",
1454
+ },
1455
+ false,
1456
+ ],
1457
+ },
1458
+ {
1459
+ fn: "booleanEquals",
1460
+ argv: [
1461
+ {
1462
+ ref: "UseDualStack",
1463
+ },
1464
+ true,
1465
+ ],
1466
+ },
1467
+ ],
1468
+ rules: [
1469
+ {
1470
+ conditions: [
1471
+ {
1472
+ fn: "booleanEquals",
1473
+ argv: [
1474
+ true,
1475
+ {
1476
+ fn: "getAttr",
1477
+ argv: [
1478
+ {
1479
+ ref: "PartitionResult",
1480
+ },
1481
+ "supportsDualStack",
1482
+ ],
1483
+ },
1484
+ ],
1485
+ },
1486
+ ],
1487
+ rules: [
1488
+ {
1489
+ conditions: [],
1490
+ endpoint: {
1491
+ url: "https://states.{Region}.{PartitionResult#dualStackDnsSuffix}",
1492
+ properties: {},
1493
+ headers: {},
1494
+ },
1495
+ type: "endpoint",
1496
+ },
1497
+ ],
1498
+ type: "tree",
1499
+ },
1500
+ {
1501
+ conditions: [],
1502
+ error:
1503
+ "DualStack is enabled but this partition does not support DualStack",
1504
+ type: "error",
1505
+ },
1506
+ ],
1507
+ type: "tree",
1508
+ },
1509
+ {
1510
+ conditions: [],
1511
+ endpoint: {
1512
+ url: "https://states.{Region}.{PartitionResult#dnsSuffix}",
1513
+ properties: {},
1514
+ headers: {},
1515
+ },
1516
+ type: "endpoint",
1517
+ },
1518
+ ],
1519
+ type: "tree",
1520
+ },
1521
+ ],
1522
+ type: "tree",
1523
+ },
1524
+ {
1525
+ conditions: [],
1526
+ error: "Invalid Configuration: Missing Region",
1527
+ type: "error",
1528
+ },
1529
+ ],
1530
+ type: "tree",
1531
+ },
1532
+ ],
1533
+ },
1534
+ };
1535
+
1536
+ /** The makeStepFunctionsClient Effect gives callers access to StepFunctions with the region and credentials configured in their AWS runtime. */
1537
+ export const makeStepFunctionsClient = Effect.gen(function* () {
1538
+ const aws = yield* AwsClient;
1539
+
1540
+ const bindOperation = aws.bindOperation(stepFunctionsService);
1541
+
1542
+ return {
1543
+ /** Creates a state machine. A state machine consists of a collection of states that can do work (Task states), determine to which states to transition next (Choice states), stop an execution with an error (Fail states), and so on. State machines are specified using a JSON-based, structured language. For more information, see Amazon States Language in the Step Functions User Guide. */
1544
+ createStateMachine: bindOperation(createStateMachineOperation),
1545
+ /** Deletes a state machine. This is an asynchronous operation. It sets the state machine's status to DELETING and begins the deletion process. A state machine is deleted only when all its executions are completed. On the next state transition, the state machine's executions are terminated. Success means AWS accepted the request. */
1546
+ deleteStateMachine: bindOperation(deleteStateMachineOperation),
1547
+ /** Provides information about a state machine's definition, its IAM role Amazon Resource Name (ARN), and configuration. */
1548
+ describeStateMachine: bindOperation(describeStateMachineOperation),
1549
+ /** Updates an existing state machine by modifying its definition, roleArn, loggingConfiguration, or EncryptionConfiguration. Running executions will continue to use the previous definition and roleArn. You must include at least one of definition or roleArn or you will receive a MissingRequiredParameter error. */
1550
+ updateStateMachine: bindOperation(updateStateMachineOperation),
1551
+ };
1552
+ });