-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathAPIGateway_shapes.swift
More file actions
5846 lines (5097 loc) · 297 KB
/
APIGateway_shapes.swift
File metadata and controls
5846 lines (5097 loc) · 297 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.
#if os(Linux) && compiler(<5.10)
// swift-corelibs-foundation hasn't been updated with Sendable conformances
@preconcurrency import Foundation
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore
extension APIGateway {
// MARK: Enums
public enum AccessAssociationSourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case vpce = "VPCE"
public var description: String { return self.rawValue }
}
public enum ApiKeySourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case authorizer = "AUTHORIZER"
case header = "HEADER"
public var description: String { return self.rawValue }
}
public enum ApiKeysFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case csv = "csv"
public var description: String { return self.rawValue }
}
public enum AuthorizerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case cognitoUserPools = "COGNITO_USER_POOLS"
case request = "REQUEST"
case token = "TOKEN"
public var description: String { return self.rawValue }
}
public enum CacheClusterSize: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case size0Point5Gb = "0.5"
case size118Gb = "118"
case size13Point5Gb = "13.5"
case size1Point6Gb = "1.6"
case size237Gb = "237"
case size28Point4Gb = "28.4"
case size58Point2Gb = "58.2"
case size6Point1Gb = "6.1"
public var description: String { return self.rawValue }
}
public enum CacheClusterStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case available = "AVAILABLE"
case createInProgress = "CREATE_IN_PROGRESS"
case deleteInProgress = "DELETE_IN_PROGRESS"
case flushInProgress = "FLUSH_IN_PROGRESS"
case notAvailable = "NOT_AVAILABLE"
public var description: String { return self.rawValue }
}
public enum ConnectionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case internet = "INTERNET"
case vpcLink = "VPC_LINK"
public var description: String { return self.rawValue }
}
public enum ContentHandlingStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case convertToBinary = "CONVERT_TO_BINARY"
case convertToText = "CONVERT_TO_TEXT"
public var description: String { return self.rawValue }
}
public enum DocumentationPartType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case api = "API"
case authorizer = "AUTHORIZER"
case method = "METHOD"
case model = "MODEL"
case pathParameter = "PATH_PARAMETER"
case queryParameter = "QUERY_PARAMETER"
case requestBody = "REQUEST_BODY"
case requestHeader = "REQUEST_HEADER"
case resource = "RESOURCE"
case response = "RESPONSE"
case responseBody = "RESPONSE_BODY"
case responseHeader = "RESPONSE_HEADER"
public var description: String { return self.rawValue }
}
public enum DomainNameStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case available = "AVAILABLE"
case pending = "PENDING"
case pendingCertificateReimport = "PENDING_CERTIFICATE_REIMPORT"
case pendingOwnershipVerification = "PENDING_OWNERSHIP_VERIFICATION"
case updating = "UPDATING"
public var description: String { return self.rawValue }
}
public enum EndpointType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case `private` = "PRIVATE"
case edge = "EDGE"
case regional = "REGIONAL"
public var description: String { return self.rawValue }
}
public enum GatewayResponseType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case accessDenied = "ACCESS_DENIED"
case apiConfigurationError = "API_CONFIGURATION_ERROR"
case authorizerConfigurationError = "AUTHORIZER_CONFIGURATION_ERROR"
case authorizerFailure = "AUTHORIZER_FAILURE"
case badRequestBody = "BAD_REQUEST_BODY"
case badRequestParameters = "BAD_REQUEST_PARAMETERS"
case default4Xx = "DEFAULT_4XX"
case default5Xx = "DEFAULT_5XX"
case expiredToken = "EXPIRED_TOKEN"
case integrationFailure = "INTEGRATION_FAILURE"
case integrationTimeout = "INTEGRATION_TIMEOUT"
case invalidApiKey = "INVALID_API_KEY"
case invalidSignature = "INVALID_SIGNATURE"
case missingAuthenticationToken = "MISSING_AUTHENTICATION_TOKEN"
case quotaExceeded = "QUOTA_EXCEEDED"
case requestTooLarge = "REQUEST_TOO_LARGE"
case resourceNotFound = "RESOURCE_NOT_FOUND"
case throttled = "THROTTLED"
case unauthorized = "UNAUTHORIZED"
case unsupportedMediaType = "UNSUPPORTED_MEDIA_TYPE"
case wafFiltered = "WAF_FILTERED"
public var description: String { return self.rawValue }
}
public enum IntegrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case aws = "AWS"
case awsProxy = "AWS_PROXY"
case http = "HTTP"
case httpProxy = "HTTP_PROXY"
case mock = "MOCK"
public var description: String { return self.rawValue }
}
public enum LocationStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case documented = "DOCUMENTED"
case undocumented = "UNDOCUMENTED"
public var description: String { return self.rawValue }
}
public enum Op: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case add = "add"
case copy = "copy"
case move = "move"
case remove = "remove"
case replace = "replace"
case test = "test"
public var description: String { return self.rawValue }
}
public enum PutMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case merge = "merge"
case overwrite = "overwrite"
public var description: String { return self.rawValue }
}
public enum QuotaPeriodType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case day = "DAY"
case month = "MONTH"
case week = "WEEK"
public var description: String { return self.rawValue }
}
public enum ResourceOwner: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case _self = "SELF"
case otherAccounts = "OTHER_ACCOUNTS"
public var description: String { return self.rawValue }
}
public enum SecurityPolicy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case tls10 = "TLS_1_0"
case tls12 = "TLS_1_2"
public var description: String { return self.rawValue }
}
public enum UnauthorizedCacheControlHeaderStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case failWith403 = "FAIL_WITH_403"
case succeedWithResponseHeader = "SUCCEED_WITH_RESPONSE_HEADER"
case succeedWithoutResponseHeader = "SUCCEED_WITHOUT_RESPONSE_HEADER"
public var description: String { return self.rawValue }
}
public enum VpcLinkStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
case available = "AVAILABLE"
case deleting = "DELETING"
case failed = "FAILED"
case pending = "PENDING"
public var description: String { return self.rawValue }
}
// MARK: Shapes
public struct AccessLogSettings: AWSDecodableShape {
/// The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-.
public let destinationArn: String?
/// A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
public let format: String?
@inlinable
public init(destinationArn: String? = nil, format: String? = nil) {
self.destinationArn = destinationArn
self.format = format
}
private enum CodingKeys: String, CodingKey {
case destinationArn = "destinationArn"
case format = "format"
}
}
public struct Account: AWSDecodableShape {
/// The version of the API keys used for the account.
public let apiKeyVersion: String?
/// The ARN of an Amazon CloudWatch role for the current Account.
public let cloudwatchRoleArn: String?
/// A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".
public let features: [String]?
/// Specifies the API request limits configured for the current Account.
public let throttleSettings: ThrottleSettings?
@inlinable
public init(apiKeyVersion: String? = nil, cloudwatchRoleArn: String? = nil, features: [String]? = nil, throttleSettings: ThrottleSettings? = nil) {
self.apiKeyVersion = apiKeyVersion
self.cloudwatchRoleArn = cloudwatchRoleArn
self.features = features
self.throttleSettings = throttleSettings
}
private enum CodingKeys: String, CodingKey {
case apiKeyVersion = "apiKeyVersion"
case cloudwatchRoleArn = "cloudwatchRoleArn"
case features = "features"
case throttleSettings = "throttleSettings"
}
}
public struct ApiKey: AWSDecodableShape {
/// The timestamp when the API Key was created.
public let createdDate: Date?
/// An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
public let customerId: String?
/// The description of the API Key.
public let description: String?
/// Specifies whether the API Key can be used by callers.
public let enabled: Bool?
/// The identifier of the API Key.
public let id: String?
/// The timestamp when the API Key was last updated.
public let lastUpdatedDate: Date?
/// The name of the API Key.
public let name: String?
/// A list of Stage resources that are associated with the ApiKey resource.
public let stageKeys: [String]?
/// The collection of tags. Each tag element is associated with a given resource.
public let tags: [String: String]?
/// The value of the API Key.
public let value: String?
@inlinable
public init(createdDate: Date? = nil, customerId: String? = nil, description: String? = nil, enabled: Bool? = nil, id: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, stageKeys: [String]? = nil, tags: [String: String]? = nil, value: String? = nil) {
self.createdDate = createdDate
self.customerId = customerId
self.description = description
self.enabled = enabled
self.id = id
self.lastUpdatedDate = lastUpdatedDate
self.name = name
self.stageKeys = stageKeys
self.tags = tags
self.value = value
}
private enum CodingKeys: String, CodingKey {
case createdDate = "createdDate"
case customerId = "customerId"
case description = "description"
case enabled = "enabled"
case id = "id"
case lastUpdatedDate = "lastUpdatedDate"
case name = "name"
case stageKeys = "stageKeys"
case tags = "tags"
case value = "value"
}
}
public struct ApiKeyIds: AWSDecodableShape {
/// A list of all the ApiKey identifiers.
public let ids: [String]?
/// A list of warning messages.
public let warnings: [String]?
@inlinable
public init(ids: [String]? = nil, warnings: [String]? = nil) {
self.ids = ids
self.warnings = warnings
}
private enum CodingKeys: String, CodingKey {
case ids = "ids"
case warnings = "warnings"
}
}
public struct ApiKeys: AWSDecodableShape {
/// The current page of elements from this collection.
public let items: [ApiKey]?
/// The current pagination position in the paged result set.
public let position: String?
/// A list of warning messages logged during the import of API keys when the failOnWarnings option is set to true.
public let warnings: [String]?
@inlinable
public init(items: [ApiKey]? = nil, position: String? = nil, warnings: [String]? = nil) {
self.items = items
self.position = position
self.warnings = warnings
}
private enum CodingKeys: String, CodingKey {
case items = "item"
case position = "position"
case warnings = "warnings"
}
}
public struct ApiStage: AWSEncodableShape & AWSDecodableShape {
/// API Id of the associated API stage in a usage plan.
public let apiId: String?
/// API stage name of the associated API stage in a usage plan.
public let stage: String?
/// Map containing method level throttling information for API stage in a usage plan.
public let throttle: [String: ThrottleSettings]?
@inlinable
public init(apiId: String? = nil, stage: String? = nil, throttle: [String: ThrottleSettings]? = nil) {
self.apiId = apiId
self.stage = stage
self.throttle = throttle
}
private enum CodingKeys: String, CodingKey {
case apiId = "apiId"
case stage = "stage"
case throttle = "throttle"
}
}
public struct Authorizer: AWSDecodableShape {
/// Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
public let authorizerCredentials: String?
/// The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
public let authorizerResultTtlInSeconds: Int?
/// Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.
public let authorizerUri: String?
/// Optional customer-defined field, used in OpenAPI imports and exports without functional impact.
public let authType: String?
/// The identifier for the authorizer resource.
public let id: String?
/// The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
public let identitySource: String?
/// A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.
public let identityValidationExpression: String?
/// The name of the authorizer.
public let name: String?
/// A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.
public let providerARNs: [String]?
/// The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.
public let type: AuthorizerType?
@inlinable
public init(authorizerCredentials: String? = nil, authorizerResultTtlInSeconds: Int? = nil, authorizerUri: String? = nil, authType: String? = nil, id: String? = nil, identitySource: String? = nil, identityValidationExpression: String? = nil, name: String? = nil, providerARNs: [String]? = nil, type: AuthorizerType? = nil) {
self.authorizerCredentials = authorizerCredentials
self.authorizerResultTtlInSeconds = authorizerResultTtlInSeconds
self.authorizerUri = authorizerUri
self.authType = authType
self.id = id
self.identitySource = identitySource
self.identityValidationExpression = identityValidationExpression
self.name = name
self.providerARNs = providerARNs
self.type = type
}
private enum CodingKeys: String, CodingKey {
case authorizerCredentials = "authorizerCredentials"
case authorizerResultTtlInSeconds = "authorizerResultTtlInSeconds"
case authorizerUri = "authorizerUri"
case authType = "authType"
case id = "id"
case identitySource = "identitySource"
case identityValidationExpression = "identityValidationExpression"
case name = "name"
case providerARNs = "providerARNs"
case type = "type"
}
}
public struct Authorizers: AWSDecodableShape {
/// The current page of elements from this collection.
public let items: [Authorizer]?
/// The current pagination position in the paged result set.
public let position: String?
@inlinable
public init(items: [Authorizer]? = nil, position: String? = nil) {
self.items = items
self.position = position
}
private enum CodingKeys: String, CodingKey {
case items = "item"
case position = "position"
}
}
public struct BasePathMapping: AWSDecodableShape {
/// The base path name that callers of the API must provide as part of the URL after the domain name.
public let basePath: String?
/// The string identifier of the associated RestApi.
public let restApiId: String?
/// The name of the associated stage.
public let stage: String?
@inlinable
public init(basePath: String? = nil, restApiId: String? = nil, stage: String? = nil) {
self.basePath = basePath
self.restApiId = restApiId
self.stage = stage
}
private enum CodingKeys: String, CodingKey {
case basePath = "basePath"
case restApiId = "restApiId"
case stage = "stage"
}
}
public struct BasePathMappings: AWSDecodableShape {
/// The current page of elements from this collection.
public let items: [BasePathMapping]?
/// The current pagination position in the paged result set.
public let position: String?
@inlinable
public init(items: [BasePathMapping]? = nil, position: String? = nil) {
self.items = items
self.position = position
}
private enum CodingKeys: String, CodingKey {
case items = "item"
case position = "position"
}
}
public struct CanarySettings: AWSEncodableShape & AWSDecodableShape {
/// The ID of the canary deployment.
public let deploymentId: String?
/// The percent (0-100) of traffic diverted to a canary deployment.
public let percentTraffic: Double?
/// Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.
public let stageVariableOverrides: [String: String]?
/// A Boolean flag to indicate whether the canary deployment uses the stage cache or not.
public let useStageCache: Bool?
@inlinable
public init(deploymentId: String? = nil, percentTraffic: Double? = nil, stageVariableOverrides: [String: String]? = nil, useStageCache: Bool? = nil) {
self.deploymentId = deploymentId
self.percentTraffic = percentTraffic
self.stageVariableOverrides = stageVariableOverrides
self.useStageCache = useStageCache
}
private enum CodingKeys: String, CodingKey {
case deploymentId = "deploymentId"
case percentTraffic = "percentTraffic"
case stageVariableOverrides = "stageVariableOverrides"
case useStageCache = "useStageCache"
}
}
public struct ClientCertificate: AWSDecodableShape {
/// The identifier of the client certificate.
public let clientCertificateId: String?
/// The timestamp when the client certificate was created.
public let createdDate: Date?
/// The description of the client certificate.
public let description: String?
/// The timestamp when the client certificate will expire.
public let expirationDate: Date?
/// The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
public let pemEncodedCertificate: String?
/// The collection of tags. Each tag element is associated with a given resource.
public let tags: [String: String]?
@inlinable
public init(clientCertificateId: String? = nil, createdDate: Date? = nil, description: String? = nil, expirationDate: Date? = nil, pemEncodedCertificate: String? = nil, tags: [String: String]? = nil) {
self.clientCertificateId = clientCertificateId
self.createdDate = createdDate
self.description = description
self.expirationDate = expirationDate
self.pemEncodedCertificate = pemEncodedCertificate
self.tags = tags
}
private enum CodingKeys: String, CodingKey {
case clientCertificateId = "clientCertificateId"
case createdDate = "createdDate"
case description = "description"
case expirationDate = "expirationDate"
case pemEncodedCertificate = "pemEncodedCertificate"
case tags = "tags"
}
}
public struct ClientCertificates: AWSDecodableShape {
/// The current page of elements from this collection.
public let items: [ClientCertificate]?
/// The current pagination position in the paged result set.
public let position: String?
@inlinable
public init(items: [ClientCertificate]? = nil, position: String? = nil) {
self.items = items
self.position = position
}
private enum CodingKeys: String, CodingKey {
case items = "item"
case position = "position"
}
}
public struct CreateApiKeyRequest: AWSEncodableShape {
/// An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.
public let customerId: String?
/// The description of the ApiKey.
public let description: String?
/// Specifies whether the ApiKey can be used by callers.
public let enabled: Bool?
/// Specifies whether (true) or not (false) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.
public let generateDistinctId: Bool?
/// The name of the ApiKey.
public let name: String?
/// DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
public let stageKeys: [StageKey]?
/// The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.
public let tags: [String: String]?
/// Specifies a value of the API key.
public let value: String?
@inlinable
public init(customerId: String? = nil, description: String? = nil, enabled: Bool? = nil, generateDistinctId: Bool? = nil, name: String? = nil, stageKeys: [StageKey]? = nil, tags: [String: String]? = nil, value: String? = nil) {
self.customerId = customerId
self.description = description
self.enabled = enabled
self.generateDistinctId = generateDistinctId
self.name = name
self.stageKeys = stageKeys
self.tags = tags
self.value = value
}
private enum CodingKeys: String, CodingKey {
case customerId = "customerId"
case description = "description"
case enabled = "enabled"
case generateDistinctId = "generateDistinctId"
case name = "name"
case stageKeys = "stageKeys"
case tags = "tags"
case value = "value"
}
}
public struct CreateAuthorizerRequest: AWSEncodableShape {
/// Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
public let authorizerCredentials: String?
/// The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
public let authorizerResultTtlInSeconds: Int?
/// Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.
public let authorizerUri: String?
/// Optional customer-defined field, used in OpenAPI imports and exports without functional impact.
public let authType: String?
/// The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
public let identitySource: String?
/// A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.
public let identityValidationExpression: String?
/// The name of the authorizer.
public let name: String
/// A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.
public let providerARNs: [String]?
/// The string identifier of the associated RestApi.
public let restApiId: String
/// The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.
public let type: AuthorizerType
@inlinable
public init(authorizerCredentials: String? = nil, authorizerResultTtlInSeconds: Int? = nil, authorizerUri: String? = nil, authType: String? = nil, identitySource: String? = nil, identityValidationExpression: String? = nil, name: String, providerARNs: [String]? = nil, restApiId: String, type: AuthorizerType) {
self.authorizerCredentials = authorizerCredentials
self.authorizerResultTtlInSeconds = authorizerResultTtlInSeconds
self.authorizerUri = authorizerUri
self.authType = authType
self.identitySource = identitySource
self.identityValidationExpression = identityValidationExpression
self.name = name
self.providerARNs = providerARNs
self.restApiId = restApiId
self.type = type
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.authorizerCredentials, forKey: .authorizerCredentials)
try container.encodeIfPresent(self.authorizerResultTtlInSeconds, forKey: .authorizerResultTtlInSeconds)
try container.encodeIfPresent(self.authorizerUri, forKey: .authorizerUri)
try container.encodeIfPresent(self.authType, forKey: .authType)
try container.encodeIfPresent(self.identitySource, forKey: .identitySource)
try container.encodeIfPresent(self.identityValidationExpression, forKey: .identityValidationExpression)
try container.encode(self.name, forKey: .name)
try container.encodeIfPresent(self.providerARNs, forKey: .providerARNs)
request.encodePath(self.restApiId, key: "restApiId")
try container.encode(self.type, forKey: .type)
}
private enum CodingKeys: String, CodingKey {
case authorizerCredentials = "authorizerCredentials"
case authorizerResultTtlInSeconds = "authorizerResultTtlInSeconds"
case authorizerUri = "authorizerUri"
case authType = "authType"
case identitySource = "identitySource"
case identityValidationExpression = "identityValidationExpression"
case name = "name"
case providerARNs = "providerARNs"
case type = "type"
}
}
public struct CreateBasePathMappingRequest: AWSEncodableShape {
/// The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify a base path name after the domain name.
public let basePath: String?
/// The domain name of the BasePathMapping resource to create.
public let domainName: String
/// The identifier for the domain name resource. Required for private custom domain names.
public let domainNameId: String?
/// The string identifier of the associated RestApi.
public let restApiId: String
/// The name of the API's stage that you want to use for this mapping. Specify '(none)' if you want callers to explicitly specify the stage name after any base path name.
public let stage: String?
@inlinable
public init(basePath: String? = nil, domainName: String, domainNameId: String? = nil, restApiId: String, stage: String? = nil) {
self.basePath = basePath
self.domainName = domainName
self.domainNameId = domainNameId
self.restApiId = restApiId
self.stage = stage
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.basePath, forKey: .basePath)
request.encodePath(self.domainName, key: "domainName")
request.encodeQuery(self.domainNameId, key: "domainNameId")
try container.encode(self.restApiId, forKey: .restApiId)
try container.encodeIfPresent(self.stage, forKey: .stage)
}
private enum CodingKeys: String, CodingKey {
case basePath = "basePath"
case restApiId = "restApiId"
case stage = "stage"
}
}
public struct CreateDeploymentRequest: AWSEncodableShape {
/// Enables a cache cluster for the Stage resource specified in the input.
public let cacheClusterEnabled: Bool?
/// The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.
public let cacheClusterSize: CacheClusterSize?
/// The input configuration for the canary deployment when the deployment is a canary release deployment.
public let canarySettings: DeploymentCanarySettings?
/// The description for the Deployment resource to create.
public let description: String?
/// The string identifier of the associated RestApi.
public let restApiId: String
/// The description of the Stage resource for the Deployment resource to create.
public let stageDescription: String?
/// The name of the Stage resource for the Deployment resource to create.
public let stageName: String?
/// Specifies whether active tracing with X-ray is enabled for the Stage.
public let tracingEnabled: Bool?
/// A map that defines the stage variables for the Stage resource that is associated with the new deployment. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
public let variables: [String: String]?
@inlinable
public init(cacheClusterEnabled: Bool? = nil, cacheClusterSize: CacheClusterSize? = nil, canarySettings: DeploymentCanarySettings? = nil, description: String? = nil, restApiId: String, stageDescription: String? = nil, stageName: String? = nil, tracingEnabled: Bool? = nil, variables: [String: String]? = nil) {
self.cacheClusterEnabled = cacheClusterEnabled
self.cacheClusterSize = cacheClusterSize
self.canarySettings = canarySettings
self.description = description
self.restApiId = restApiId
self.stageDescription = stageDescription
self.stageName = stageName
self.tracingEnabled = tracingEnabled
self.variables = variables
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.cacheClusterEnabled, forKey: .cacheClusterEnabled)
try container.encodeIfPresent(self.cacheClusterSize, forKey: .cacheClusterSize)
try container.encodeIfPresent(self.canarySettings, forKey: .canarySettings)
try container.encodeIfPresent(self.description, forKey: .description)
request.encodePath(self.restApiId, key: "restApiId")
try container.encodeIfPresent(self.stageDescription, forKey: .stageDescription)
try container.encodeIfPresent(self.stageName, forKey: .stageName)
try container.encodeIfPresent(self.tracingEnabled, forKey: .tracingEnabled)
try container.encodeIfPresent(self.variables, forKey: .variables)
}
private enum CodingKeys: String, CodingKey {
case cacheClusterEnabled = "cacheClusterEnabled"
case cacheClusterSize = "cacheClusterSize"
case canarySettings = "canarySettings"
case description = "description"
case stageDescription = "stageDescription"
case stageName = "stageName"
case tracingEnabled = "tracingEnabled"
case variables = "variables"
}
}
public struct CreateDocumentationPartRequest: AWSEncodableShape {
/// The location of the targeted API entity of the to-be-created documentation part.
public let location: DocumentationPartLocation
/// The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published.
public let properties: String
/// The string identifier of the associated RestApi.
public let restApiId: String
@inlinable
public init(location: DocumentationPartLocation, properties: String, restApiId: String) {
self.location = location
self.properties = properties
self.restApiId = restApiId
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(self.location, forKey: .location)
try container.encode(self.properties, forKey: .properties)
request.encodePath(self.restApiId, key: "restApiId")
}
public func validate(name: String) throws {
try self.location.validate(name: "\(name).location")
}
private enum CodingKeys: String, CodingKey {
case location = "location"
case properties = "properties"
}
}
public struct CreateDocumentationVersionRequest: AWSEncodableShape {
/// A description about the new documentation snapshot.
public let description: String?
/// The version identifier of the new snapshot.
public let documentationVersion: String
/// The string identifier of the associated RestApi.
public let restApiId: String
/// The stage name to be associated with the new documentation snapshot.
public let stageName: String?
@inlinable
public init(description: String? = nil, documentationVersion: String, restApiId: String, stageName: String? = nil) {
self.description = description
self.documentationVersion = documentationVersion
self.restApiId = restApiId
self.stageName = stageName
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.description, forKey: .description)
try container.encode(self.documentationVersion, forKey: .documentationVersion)
request.encodePath(self.restApiId, key: "restApiId")
try container.encodeIfPresent(self.stageName, forKey: .stageName)
}
private enum CodingKeys: String, CodingKey {
case description = "description"
case documentationVersion = "documentationVersion"
case stageName = "stageName"
}
}
public struct CreateDomainNameAccessAssociationRequest: AWSEncodableShape {
/// The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.
public let accessAssociationSource: String
/// The type of the domain name access association source.
public let accessAssociationSourceType: AccessAssociationSourceType
/// The ARN of the domain name.
public let domainNameArn: String
/// The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.
public let tags: [String: String]?
@inlinable
public init(accessAssociationSource: String, accessAssociationSourceType: AccessAssociationSourceType, domainNameArn: String, tags: [String: String]? = nil) {
self.accessAssociationSource = accessAssociationSource
self.accessAssociationSourceType = accessAssociationSourceType
self.domainNameArn = domainNameArn
self.tags = tags
}
private enum CodingKeys: String, CodingKey {
case accessAssociationSource = "accessAssociationSource"
case accessAssociationSourceType = "accessAssociationSourceType"
case domainNameArn = "domainNameArn"
case tags = "tags"
}
}
public struct CreateDomainNameRequest: AWSEncodableShape {
/// The reference to an Amazon Web Services-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. Certificate Manager is the only supported source.
public let certificateArn: String?
/// [Deprecated] The body of the server certificate that will be used by edge-optimized endpoint or private endpoint for this domain name provided by your certificate authority.
public let certificateBody: String?
/// [Deprecated] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.
public let certificateChain: String?
/// The user-friendly name of the certificate that will be used by edge-optimized endpoint or private endpoint for this domain name.
public let certificateName: String?
/// [Deprecated] Your edge-optimized endpoint's domain name certificate's private key.
public let certificatePrivateKey: String?
/// The name of the DomainName resource.
public let domainName: String
/// The endpoint configuration of this DomainName showing the endpoint types of the domain name.
public let endpointConfiguration: EndpointConfiguration?
public let mutualTlsAuthentication: MutualTlsAuthenticationInput?
/// The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.
public let ownershipVerificationCertificateArn: String?
/// A stringified JSON policy document that applies to the execute-api service for this DomainName regardless of the caller and Method configuration. Supported only for private custom domain names.
public let policy: String?
/// The reference to an Amazon Web Services-managed certificate that will be used by regional endpoint for this domain name. Certificate Manager is the only supported source.
public let regionalCertificateArn: String?
/// The user-friendly name of the certificate that will be used by regional endpoint for this domain name.
public let regionalCertificateName: String?
/// The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2.
public let securityPolicy: SecurityPolicy?
/// The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.
public let tags: [String: String]?
@inlinable
public init(certificateArn: String? = nil, certificateBody: String? = nil, certificateChain: String? = nil, certificateName: String? = nil, certificatePrivateKey: String? = nil, domainName: String, endpointConfiguration: EndpointConfiguration? = nil, mutualTlsAuthentication: MutualTlsAuthenticationInput? = nil, ownershipVerificationCertificateArn: String? = nil, policy: String? = nil, regionalCertificateArn: String? = nil, regionalCertificateName: String? = nil, securityPolicy: SecurityPolicy? = nil, tags: [String: String]? = nil) {
self.certificateArn = certificateArn
self.certificateBody = certificateBody
self.certificateChain = certificateChain
self.certificateName = certificateName
self.certificatePrivateKey = certificatePrivateKey
self.domainName = domainName
self.endpointConfiguration = endpointConfiguration
self.mutualTlsAuthentication = mutualTlsAuthentication
self.ownershipVerificationCertificateArn = ownershipVerificationCertificateArn
self.policy = policy
self.regionalCertificateArn = regionalCertificateArn
self.regionalCertificateName = regionalCertificateName
self.securityPolicy = securityPolicy
self.tags = tags
}
private enum CodingKeys: String, CodingKey {
case certificateArn = "certificateArn"
case certificateBody = "certificateBody"
case certificateChain = "certificateChain"
case certificateName = "certificateName"
case certificatePrivateKey = "certificatePrivateKey"
case domainName = "domainName"
case endpointConfiguration = "endpointConfiguration"
case mutualTlsAuthentication = "mutualTlsAuthentication"
case ownershipVerificationCertificateArn = "ownershipVerificationCertificateArn"
case policy = "policy"
case regionalCertificateArn = "regionalCertificateArn"
case regionalCertificateName = "regionalCertificateName"
case securityPolicy = "securityPolicy"
case tags = "tags"
}
}
public struct CreateModelRequest: AWSEncodableShape {
/// The content-type for the model.
public let contentType: String
/// The description of the model.
public let description: String?
/// The name of the model. Must be alphanumeric.
public let name: String
/// The RestApi identifier under which the Model will be created.
public let restApiId: String
/// The schema for the model. For application/json models, this should be JSON schema draft 4 model. The maximum size of the model is 400 KB.
public let schema: String?
@inlinable
public init(contentType: String, description: String? = nil, name: String, restApiId: String, schema: String? = nil) {
self.contentType = contentType
self.description = description
self.name = name
self.restApiId = restApiId
self.schema = schema
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(self.contentType, forKey: .contentType)
try container.encodeIfPresent(self.description, forKey: .description)
try container.encode(self.name, forKey: .name)
request.encodePath(self.restApiId, key: "restApiId")
try container.encodeIfPresent(self.schema, forKey: .schema)
}
private enum CodingKeys: String, CodingKey {
case contentType = "contentType"
case description = "description"
case name = "name"
case schema = "schema"
}
}
public struct CreateRequestValidatorRequest: AWSEncodableShape {
/// The name of the to-be-created RequestValidator.
public let name: String?
/// The string identifier of the associated RestApi.
public let restApiId: String
/// A Boolean flag to indicate whether to validate request body according to the configured model schema for the method (true) or not (false).
public let validateRequestBody: Bool?
/// A Boolean flag to indicate whether to validate request parameters, true, or not false.
public let validateRequestParameters: Bool?
@inlinable
public init(name: String? = nil, restApiId: String, validateRequestBody: Bool? = nil, validateRequestParameters: Bool? = nil) {
self.name = name
self.restApiId = restApiId
self.validateRequestBody = validateRequestBody
self.validateRequestParameters = validateRequestParameters
}
public func encode(to encoder: Encoder) throws {
let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(self.name, forKey: .name)
request.encodePath(self.restApiId, key: "restApiId")
try container.encodeIfPresent(self.validateRequestBody, forKey: .validateRequestBody)
try container.encodeIfPresent(self.validateRequestParameters, forKey: .validateRequestParameters)
}
private enum CodingKeys: String, CodingKey {
case name = "name"
case validateRequestBody = "validateRequestBody"
case validateRequestParameters = "validateRequestParameters"
}
}
public struct CreateResourceRequest: AWSEncodableShape {
/// The parent resource's identifier.
public let parentId: String
/// The last path segment for this resource.
public let pathPart: String
/// The string identifier of the associated RestApi.
public let restApiId: String
@inlinable
public init(parentId: String, pathPart: String, restApiId: String) {
self.parentId = parentId
self.pathPart = pathPart
self.restApiId = restApiId
}
public func encode(to encoder: Encoder) throws {