/
types.go
1090 lines (904 loc) · 36.1 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"time"
)
// Information about an action. Each rule must include exactly one of the following
// types of actions: forward, fixed-response, or redirect, and it must be the last
// action to be performed.
type Action struct {
// The type of action.
//
// This member is required.
Type ActionTypeEnum
// [HTTPS listeners] Information for using Amazon Cognito to authenticate users.
// Specify only when Type is authenticate-cognito.
AuthenticateCognitoConfig *AuthenticateCognitoActionConfig
// [HTTPS listeners] Information about an identity provider that is compliant with
// OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
AuthenticateOidcConfig *AuthenticateOidcActionConfig
// [Application Load Balancer] Information for creating an action that returns a
// custom HTTP response. Specify only when Type is fixed-response.
FixedResponseConfig *FixedResponseActionConfig
// Information for creating an action that distributes requests among one or more
// target groups. For Network Load Balancers, you can specify a single target
// group. Specify only when Type is forward. If you specify both ForwardConfig and
// TargetGroupArn, you can specify only one target group using ForwardConfig and it
// must be the same target group specified in TargetGroupArn.
ForwardConfig *ForwardActionConfig
// The order for the action. This value is required for rules with multiple
// actions. The action with the lowest value for order is performed first.
Order *int32
// [Application Load Balancer] Information for creating a redirect action. Specify
// only when Type is redirect.
RedirectConfig *RedirectActionConfig
// The Amazon Resource Name (ARN) of the target group. Specify only when Type is
// forward and you want to route to a single target group. To route to one or more
// target groups, use ForwardConfig instead.
TargetGroupArn *string
}
// Request parameters to use when integrating with Amazon Cognito to authenticate
// users.
type AuthenticateCognitoActionConfig struct {
// The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
//
// This member is required.
UserPoolArn *string
// The ID of the Amazon Cognito user pool client.
//
// This member is required.
UserPoolClientId *string
// The domain prefix or fully-qualified domain name of the Amazon Cognito user
// pool.
//
// This member is required.
UserPoolDomain *string
// The query parameters (up to 10) to include in the redirect request to the
// authorization endpoint.
AuthenticationRequestExtraParams map[string]string
// The behavior if the user is not authenticated. The following are possible
// values:
//
// * deny - Return an HTTP 401 Unauthorized error.
//
// * allow - Allow the
// request to be forwarded to the target.
//
// * authenticate - Redirect the request to
// the IdP authorization endpoint. This is the default value.
OnUnauthenticatedRequest AuthenticateCognitoActionConditionalBehaviorEnum
// The set of user claims to be requested from the IdP. The default is openid. To
// verify which scope values your IdP supports and how to separate multiple values,
// see the documentation for your IdP.
Scope *string
// The name of the cookie used to maintain session information. The default is
// AWSELBAuthSessionCookie.
SessionCookieName *string
// The maximum duration of the authentication session, in seconds. The default is
// 604800 seconds (7 days).
SessionTimeout *int64
}
// Request parameters when using an identity provider (IdP) that is compliant with
// OpenID Connect (OIDC) to authenticate users.
type AuthenticateOidcActionConfig struct {
// The authorization endpoint of the IdP. This must be a full URL, including the
// HTTPS protocol, the domain, and the path.
//
// This member is required.
AuthorizationEndpoint *string
// The OAuth 2.0 client identifier.
//
// This member is required.
ClientId *string
// The OIDC issuer identifier of the IdP. This must be a full URL, including the
// HTTPS protocol, the domain, and the path.
//
// This member is required.
Issuer *string
// The token endpoint of the IdP. This must be a full URL, including the HTTPS
// protocol, the domain, and the path.
//
// This member is required.
TokenEndpoint *string
// The user info endpoint of the IdP. This must be a full URL, including the HTTPS
// protocol, the domain, and the path.
//
// This member is required.
UserInfoEndpoint *string
// The query parameters (up to 10) to include in the redirect request to the
// authorization endpoint.
AuthenticationRequestExtraParams map[string]string
// The OAuth 2.0 client secret. This parameter is required if you are creating a
// rule. If you are modifying a rule, you can omit this parameter if you set
// UseExistingClientSecret to true.
ClientSecret *string
// The behavior if the user is not authenticated. The following are possible
// values:
//
// * deny - Return an HTTP 401 Unauthorized error.
//
// * allow - Allow the
// request to be forwarded to the target.
//
// * authenticate - Redirect the request to
// the IdP authorization endpoint. This is the default value.
OnUnauthenticatedRequest AuthenticateOidcActionConditionalBehaviorEnum
// The set of user claims to be requested from the IdP. The default is openid. To
// verify which scope values your IdP supports and how to separate multiple values,
// see the documentation for your IdP.
Scope *string
// The name of the cookie used to maintain session information. The default is
// AWSELBAuthSessionCookie.
SessionCookieName *string
// The maximum duration of the authentication session, in seconds. The default is
// 604800 seconds (7 days).
SessionTimeout *int64
// Indicates whether to use the existing client secret when modifying a rule. If
// you are creating a rule, you can omit this parameter or set it to false.
UseExistingClientSecret *bool
}
// Information about an Availability Zone.
type AvailabilityZone struct {
// [Network Load Balancers] If you need static IP addresses for your load balancer,
// you can specify one Elastic IP address per Availability Zone when you create an
// internal-facing load balancer. For internal load balancers, you can specify a
// private IP address from the IPv4 range of the subnet.
LoadBalancerAddresses []LoadBalancerAddress
// [Application Load Balancers on Outposts] The ID of the Outpost.
OutpostId *string
// The ID of the subnet. You can specify one subnet per Availability Zone.
SubnetId *string
// The name of the Availability Zone.
ZoneName *string
}
// Information about an SSL server certificate.
type Certificate struct {
// The Amazon Resource Name (ARN) of the certificate.
CertificateArn *string
// Indicates whether the certificate is the default certificate. Do not set this
// value when specifying a certificate as an input. This value is not included in
// the output when describing a listener, but is included when describing listener
// certificates.
IsDefault *bool
}
// Information about a cipher used in a policy.
type Cipher struct {
// The name of the cipher.
Name *string
// The priority of the cipher.
Priority int32
}
// Information about an action that returns a custom HTTP response.
type FixedResponseActionConfig struct {
// The HTTP response code (2XX, 4XX, or 5XX).
//
// This member is required.
StatusCode *string
// The content type. Valid Values: text/plain | text/css | text/html |
// application/javascript | application/json
ContentType *string
// The message.
MessageBody *string
}
// Information about a forward action.
type ForwardActionConfig struct {
// The target group stickiness for the rule.
TargetGroupStickinessConfig *TargetGroupStickinessConfig
// One or more target groups. For Network Load Balancers, you can specify a single
// target group.
TargetGroups []TargetGroupTuple
}
// Information about a host header condition.
type HostHeaderConditionConfig struct {
// One or more host names. The maximum size of each name is 128 characters. The
// comparison is case insensitive. The following wildcard characters are supported:
// * (matches 0 or more characters) and ? (matches exactly 1 character). If you
// specify multiple strings, the condition is satisfied if one of the strings
// matches the host name.
Values []string
}
// Information about an HTTP header condition. There is a set of standard HTTP
// header fields. You can also define custom HTTP header fields.
type HttpHeaderConditionConfig struct {
// The name of the HTTP header field. The maximum size is 40 characters. The header
// name is case insensitive. The allowed characters are specified by RFC 7230.
// Wildcards are not supported. You can't use an HTTP header condition to specify
// the host header. Use HostHeaderConditionConfig to specify a host header
// condition.
HttpHeaderName *string
// One or more strings to compare against the value of the HTTP header. The maximum
// size of each string is 128 characters. The comparison strings are case
// insensitive. The following wildcard characters are supported: * (matches 0 or
// more characters) and ? (matches exactly 1 character). If the same header appears
// multiple times in the request, we search them in order until a match is found.
// If you specify multiple strings, the condition is satisfied if one of the
// strings matches the value of the HTTP header. To require that all of the strings
// are a match, create one condition per string.
Values []string
}
// Information about an HTTP method condition. HTTP defines a set of request
// methods, also referred to as HTTP verbs. For more information, see the HTTP
// Method Registry
// (https://www.iana.org/assignments/http-methods/http-methods.xhtml). You can also
// define custom HTTP methods.
type HttpRequestMethodConditionConfig struct {
// The name of the request method. The maximum size is 40 characters. The allowed
// characters are A-Z, hyphen (-), and underscore (_). The comparison is case
// sensitive. Wildcards are not supported; therefore, the method name must be an
// exact match. If you specify multiple strings, the condition is satisfied if one
// of the strings matches the HTTP request method. We recommend that you route GET
// and HEAD requests in the same way, because the response to a HEAD request may be
// cached.
Values []string
}
// Information about an Elastic Load Balancing resource limit for your AWS account.
type Limit struct {
// The maximum value of the limit.
Max *string
// The name of the limit. The possible values are:
//
// * application-load-balancers
//
// *
// condition-values-per-alb-rule
//
// * condition-wildcards-per-alb-rule
//
// *
// gateway-load-balancers
//
// * gateway-load-balancers-per-vpc
//
// *
// geneve-target-groups
//
// * listeners-per-application-load-balancer
//
// *
// listeners-per-network-load-balancer
//
// * network-load-balancers
//
// *
// rules-per-application-load-balancer
//
// * target-groups
//
// *
// target-groups-per-action-on-application-load-balancer
//
// *
// target-groups-per-action-on-network-load-balancer
//
// *
// target-groups-per-application-load-balancer
//
// *
// targets-per-application-load-balancer
//
// *
// targets-per-availability-zone-per-gateway-load-balancer
//
// *
// targets-per-availability-zone-per-network-load-balancer
//
// *
// targets-per-network-load-balancer
Name *string
}
// Information about a listener.
type Listener struct {
// [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN)
// policy.
AlpnPolicy []string
// [HTTPS or TLS listener] The default certificate for the listener.
Certificates []Certificate
// The default actions for the listener.
DefaultActions []Action
// The Amazon Resource Name (ARN) of the listener.
ListenerArn *string
// The Amazon Resource Name (ARN) of the load balancer.
LoadBalancerArn *string
// The port on which the load balancer is listening.
Port *int32
// The protocol for connections from clients to the load balancer.
Protocol ProtocolEnum
// [HTTPS or TLS listener] The security policy that defines which protocols and
// ciphers are supported.
SslPolicy *string
}
// Information about a load balancer.
type LoadBalancer struct {
// The subnets for the load balancer.
AvailabilityZones []AvailabilityZone
// The ID of the Amazon Route 53 hosted zone associated with the load balancer.
CanonicalHostedZoneId *string
// The date and time the load balancer was created.
CreatedTime *time.Time
// [Application Load Balancers on Outposts] The ID of the customer-owned address
// pool.
CustomerOwnedIpv4Pool *string
// The public DNS name of the load balancer.
DNSName *string
// The type of IP addresses used by the subnets for your load balancer. The
// possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6
// addresses).
IpAddressType IpAddressType
// The Amazon Resource Name (ARN) of the load balancer.
LoadBalancerArn *string
// The name of the load balancer.
LoadBalancerName *string
// The nodes of an Internet-facing load balancer have public IP addresses. The DNS
// name of an Internet-facing load balancer is publicly resolvable to the public IP
// addresses of the nodes. Therefore, Internet-facing load balancers can route
// requests from clients over the internet. The nodes of an internal load balancer
// have only private IP addresses. The DNS name of an internal load balancer is
// publicly resolvable to the private IP addresses of the nodes. Therefore,
// internal load balancers can route requests only from clients with access to the
// VPC for the load balancer.
Scheme LoadBalancerSchemeEnum
// The IDs of the security groups for the load balancer.
SecurityGroups []string
// The state of the load balancer.
State *LoadBalancerState
// The type of load balancer.
Type LoadBalancerTypeEnum
// The ID of the VPC for the load balancer.
VpcId *string
}
// Information about a static IP address for a load balancer.
type LoadBalancerAddress struct {
// [Network Load Balancers] The allocation ID of the Elastic IP address for an
// internal-facing load balancer.
AllocationId *string
// [Network Load Balancers] The IPv6 address.
IPv6Address *string
// The static IP address.
IpAddress *string
// [Network Load Balancers] The private IPv4 address for an internal load balancer.
PrivateIPv4Address *string
}
// Information about a load balancer attribute.
type LoadBalancerAttribute struct {
// The name of the attribute. The following attribute is supported by all load
// balancers:
//
// * deletion_protection.enabled - Indicates whether deletion
// protection is enabled. The value is true or false. The default is false.
//
// The
// following attributes are supported by both Application Load Balancers and
// Network Load Balancers:
//
// * access_logs.s3.enabled - Indicates whether access
// logs are enabled. The value is true or false. The default is false.
//
// *
// access_logs.s3.bucket - The name of the S3 bucket for the access logs. This
// attribute is required if access logs are enabled. The bucket must exist in the
// same region as the load balancer and have a bucket policy that grants Elastic
// Load Balancing permissions to write to the bucket.
//
// * access_logs.s3.prefix -
// The prefix for the location in the S3 bucket for the access logs.
//
// The following
// attributes are supported by only Application Load Balancers:
//
// *
// idle_timeout.timeout_seconds - The idle timeout value, in seconds. The valid
// range is 1-4000 seconds. The default is 60 seconds.
//
// *
// routing.http.desync_mitigation_mode - Determines how the load balancer handles
// requests that might pose a security risk to your application. The possible
// values are monitor, defensive, and strictest. The default is defensive.
//
// *
// routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP
// headers
//
// with invalid header fields are removed by the load balancer (true) or
// routed to targets (false). The default is false.
//
// * routing.http2.enabled -
// Indicates whether HTTP/2 is enabled. The value is true or false. The default is
// true. Elastic Load Balancing requires that message header names contain only
// alphanumeric characters and hyphens.
//
// * waf.fail_open.enabled - Indicates
// whether to allow a WAF-enabled load balancer to route requests to targets if it
// is unable to forward the request to AWS WAF. The value is true or false. The
// default is false.
//
// The following attribute is supported by Network Load
// Balancers and Gateway Load Balancers:
//
// * load_balancing.cross_zone.enabled -
// Indicates whether cross-zone load balancing is enabled. The value is true or
// false. The default is false.
Key *string
// The value of the attribute.
Value *string
}
// Information about the state of the load balancer.
type LoadBalancerState struct {
// The state code. The initial state of the load balancer is provisioning. After
// the load balancer is fully set up and ready to route traffic, its state is
// active. If the load balancer could not be set up, its state is failed.
Code LoadBalancerStateEnum
// A description of the state.
Reason *string
}
// The codes to use when checking for a successful response from a target. If the
// protocol version is gRPC, these are gRPC codes. Otherwise, these are HTTP codes.
type Matcher struct {
// You can specify values between 0 and 99. You can specify multiple values (for
// example, "0,1") or a range of values (for example, "0-5"). The default value is
// 12.
GrpcCode *string
// For Application Load Balancers, you can specify values between 200 and 499, and
// the default value is 200. You can specify multiple values (for example,
// "200,202") or a range of values (for example, "200-299"). For Network Load
// Balancers and Gateway Load Balancers, this must be "200–399".
HttpCode *string
}
// Information about a path pattern condition.
type PathPatternConditionConfig struct {
// One or more path patterns to compare against the request URL. The maximum size
// of each string is 128 characters. The comparison is case sensitive. The
// following wildcard characters are supported: * (matches 0 or more characters)
// and ? (matches exactly 1 character). If you specify multiple strings, the
// condition is satisfied if one of them matches the request URL. The path pattern
// is compared only to the path of the URL, not to its query string. To compare
// against the query string, use QueryStringConditionConfig.
Values []string
}
// Information about a query string condition. The query string component of a URI
// starts after the first '?' character and is terminated by either a '#' character
// or the end of the URI. A typical query string contains key/value pairs separated
// by '&' characters. The allowed characters are specified by RFC 3986. Any
// character can be percentage encoded.
type QueryStringConditionConfig struct {
// One or more key/value pairs or values to find in the query string. The maximum
// size of each string is 128 characters. The comparison is case insensitive. The
// following wildcard characters are supported: * (matches 0 or more characters)
// and ? (matches exactly 1 character). To search for a literal '*' or '?'
// character in a query string, you must escape these characters in Values using a
// '\' character. If you specify multiple key/value pairs or values, the condition
// is satisfied if one of them is found in the query string.
Values []QueryStringKeyValuePair
}
// Information about a key/value pair.
type QueryStringKeyValuePair struct {
// The key. You can omit the key.
Key *string
// The value.
Value *string
}
// Information about a redirect action. A URI consists of the following components:
// protocol://hostname:port/path?query. You must modify at least one of the
// following components to avoid a redirect loop: protocol, hostname, port, or
// path. Any components that you do not modify retain their original values. You
// can reuse URI components using the following reserved keywords:
//
// *
// #{protocol}
//
// * #{host}
//
// * #{port}
//
// * #{path} (the leading "/" is removed)
//
// *
// #{query}
//
// For example, you can change the path to "/new/#{path}", the hostname
// to "example.#{host}", or the query to "#{query}&value=xyz".
type RedirectActionConfig struct {
// The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary
// (HTTP 302).
//
// This member is required.
StatusCode RedirectActionStatusCodeEnum
// The hostname. This component is not percent-encoded. The hostname can contain
// #{host}.
Host *string
// The absolute path, starting with the leading "/". This component is not
// percent-encoded. The path can contain #{host}, #{path}, and #{port}.
Path *string
// The port. You can specify a value from 1 to 65535 or #{port}.
Port *string
// The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP
// to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.
Protocol *string
// The query parameters, URL-encoded when necessary, but not percent-encoded. Do
// not include the leading "?", as it is automatically added. You can specify any
// of the reserved keywords.
Query *string
}
// Information about a rule.
type Rule struct {
// The actions. Each rule must include exactly one of the following types of
// actions: forward, redirect, or fixed-response, and it must be the last action to
// be performed.
Actions []Action
// The conditions. Each rule can include zero or one of the following conditions:
// http-request-method, host-header, path-pattern, and source-ip, and zero or more
// of the following conditions: http-header and query-string.
Conditions []RuleCondition
// Indicates whether this is the default rule.
IsDefault bool
// The priority.
Priority *string
// The Amazon Resource Name (ARN) of the rule.
RuleArn *string
}
// Information about a condition for a rule. Each rule can optionally include up to
// one of each of the following conditions: http-request-method, host-header,
// path-pattern, and source-ip. Each rule can also optionally include one or more
// of each of the following conditions: http-header and query-string.
type RuleCondition struct {
// The field in the HTTP request. The following are the possible values:
//
// *
// http-header
//
// * http-request-method
//
// * host-header
//
// * path-pattern
//
// *
// query-string
//
// * source-ip
Field *string
// Information for a host header condition. Specify only when Field is host-header.
HostHeaderConfig *HostHeaderConditionConfig
// Information for an HTTP header condition. Specify only when Field is
// http-header.
HttpHeaderConfig *HttpHeaderConditionConfig
// Information for an HTTP method condition. Specify only when Field is
// http-request-method.
HttpRequestMethodConfig *HttpRequestMethodConditionConfig
// Information for a path pattern condition. Specify only when Field is
// path-pattern.
PathPatternConfig *PathPatternConditionConfig
// Information for a query string condition. Specify only when Field is
// query-string.
QueryStringConfig *QueryStringConditionConfig
// Information for a source IP condition. Specify only when Field is source-ip.
SourceIpConfig *SourceIpConditionConfig
// The condition value. Specify only when Field is host-header or path-pattern.
// Alternatively, to specify multiple host names or multiple path patterns, use
// HostHeaderConfig or PathPatternConfig. If Field is host-header and you are not
// using HostHeaderConfig, you can specify a single host name (for example,
// my.example.com) in Values. A host name is case insensitive, can be up to 128
// characters in length, and can contain any of the following characters.
//
// * A-Z,
// a-z, 0-9
//
// * - .
//
// * * (matches 0 or more characters)
//
// * ? (matches exactly 1
// character)
//
// If Field is path-pattern and you are not using PathPatternConfig,
// you can specify a single path pattern (for example, /img/*) in Values. A path
// pattern is case-sensitive, can be up to 128 characters in length, and can
// contain any of the following characters.
//
// * A-Z, a-z, 0-9
//
// * _ - . $ / ~ " ' @ :
// +
//
// * & (using &)
//
// * * (matches 0 or more characters)
//
// * ? (matches exactly 1
// character)
Values []string
}
// Information about the priorities for the rules for a listener.
type RulePriorityPair struct {
// The rule priority.
Priority *int32
// The Amazon Resource Name (ARN) of the rule.
RuleArn *string
}
// Information about a source IP condition. You can use this condition to route
// based on the IP address of the source that connects to the load balancer. If a
// client is behind a proxy, this is the IP address of the proxy not the IP address
// of the client.
type SourceIpConditionConfig struct {
// One or more source IP addresses, in CIDR format. You can use both IPv4 and IPv6
// addresses. Wildcards are not supported. If you specify multiple addresses, the
// condition is satisfied if the source IP address of the request matches one of
// the CIDR blocks. This condition is not satisfied by the addresses in the
// X-Forwarded-For header. To search for addresses in the X-Forwarded-For header,
// use HttpHeaderConditionConfig.
Values []string
}
// Information about a policy used for SSL negotiation.
type SslPolicy struct {
// The ciphers.
Ciphers []Cipher
// The name of the policy.
Name *string
// The protocols.
SslProtocols []string
}
// Information about a subnet mapping.
type SubnetMapping struct {
// [Network Load Balancers] The allocation ID of the Elastic IP address for an
// internet-facing load balancer.
AllocationId *string
// [Network Load Balancers] The IPv6 address.
IPv6Address *string
// [Network Load Balancers] The private IPv4 address for an internal load balancer.
PrivateIPv4Address *string
// The ID of the subnet.
SubnetId *string
}
// Information about a tag.
type Tag struct {
// The key of the tag.
//
// This member is required.
Key *string
// The value of the tag.
Value *string
}
// The tags associated with a resource.
type TagDescription struct {
// The Amazon Resource Name (ARN) of the resource.
ResourceArn *string
// Information about the tags.
Tags []Tag
}
// Information about a target.
type TargetDescription struct {
// The ID of the target. If the target type of the target group is instance,
// specify an instance ID. If the target type is ip, specify an IP address. If the
// target type is lambda, specify the ARN of the Lambda function.
//
// This member is required.
Id *string
// An Availability Zone or all. This determines whether the target receives traffic
// from the load balancer nodes in the specified Availability Zone or from all
// enabled Availability Zones for the load balancer. This parameter is not
// supported if the target type of the target group is instance. If the target type
// is ip and the IP address is in a subnet of the VPC for the target group, the
// Availability Zone is automatically detected and this parameter is optional. If
// the IP address is outside the VPC, this parameter is required. With an
// Application Load Balancer, if the target type is ip and the IP address is
// outside the VPC for the target group, the only supported value is all. If the
// target type is lambda, this parameter is optional and the only supported value
// is all.
AvailabilityZone *string
// The port on which the target is listening. If the target group protocol is
// GENEVE, the supported port is 6081. Not used if the target is a Lambda function.
Port *int32
}
// Information about a target group.
type TargetGroup struct {
// Indicates whether health checks are enabled.
HealthCheckEnabled *bool
// The approximate amount of time, in seconds, between health checks of an
// individual target.
HealthCheckIntervalSeconds *int32
// The destination for health checks on the targets.
HealthCheckPath *string
// The port to use to connect with the target.
HealthCheckPort *string
// The protocol to use to connect with the target. The GENEVE, TLS, UDP, and
// TCP_UDP protocols are not supported for health checks.
HealthCheckProtocol ProtocolEnum
// The amount of time, in seconds, during which no response means a failed health
// check.
HealthCheckTimeoutSeconds *int32
// The number of consecutive health checks successes required before considering an
// unhealthy target healthy.
HealthyThresholdCount *int32
// The Amazon Resource Names (ARN) of the load balancers that route traffic to this
// target group.
LoadBalancerArns []string
// The HTTP or gRPC codes to use when checking for a successful response from a
// target.
Matcher *Matcher
// The port on which the targets are listening. Not used if the target is a Lambda
// function.
Port *int32
// The protocol to use for routing traffic to the targets.
Protocol ProtocolEnum
// [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1,
// and HTTP2.
ProtocolVersion *string
// The Amazon Resource Name (ARN) of the target group.
TargetGroupArn *string
// The name of the target group.
TargetGroupName *string
// The type of target that you must specify when registering targets with this
// target group. The possible values are instance (register targets by instance
// ID), ip (register targets by IP address), or lambda (register a single Lambda
// function as a target).
TargetType TargetTypeEnum
// The number of consecutive health check failures required before considering the
// target unhealthy.
UnhealthyThresholdCount *int32
// The ID of the VPC for the targets.
VpcId *string
}
// Information about a target group attribute.
type TargetGroupAttribute struct {
// The name of the attribute. The following attribute is supported by all load
// balancers:
//
// * deregistration_delay.timeout_seconds - The amount of time, in
// seconds, for Elastic Load Balancing to wait before changing the state of a
// deregistering target from draining to unused. The range is 0-3600 seconds. The
// default value is 300 seconds. If the target is a Lambda function, this attribute
// is not supported.
//
// The following attributes are supported by both Application
// Load Balancers and Network Load Balancers:
//
// * stickiness.enabled - Indicates
// whether sticky sessions are enabled. The value is true or false. The default is
// false.
//
// * stickiness.type - The type of sticky sessions. The possible values
// are
//
// lb_cookie for Application Load Balancers or source_ip for Network Load
// Balancers.
//
// The following attributes are supported only if the load balancer is
// an Application Load Balancer and the target is an instance or an IP address:
//
// *
// load_balancing.algorithm.type - The load balancing algorithm determines how the
// load balancer selects targets when routing requests. The value is round_robin or
// least_outstanding_requests. The default is round_robin.
//
// *
// slow_start.duration_seconds - The time period, in seconds, during which a newly
// registered target receives an increasing share of the traffic to the target
// group. After this time period ends, the target receives its full share of
// traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds
// (disabled).
//
// * stickiness.lb_cookie.duration_seconds - The time period, in
// seconds, during which requests from a client should be routed to the same
// target. After this time period expires, the load balancer-generated cookie is
// considered stale. The range is 1 second to 1 week (604800 seconds). The default
// value is 1 day (86400 seconds).
//
// The following attribute is supported only if
// the load balancer is an Application Load Balancer and the target is a Lambda
// function:
//
// * lambda.multi_value_headers.enabled - Indicates whether the request
// and response headers that are exchanged between the load balancer and the Lambda
// function include arrays of values or strings. The value is true or false. The
// default is false. If the value is false and the request contains a duplicate
// header field name or query parameter key, the load balancer uses the last value
// sent by the client.
//
// The following attributes are supported only by Network Load
// Balancers:
//
// * deregistration_delay.connection_termination.enabled - Indicates
// whether the load balancer terminates connections at the end of the
// deregistration timeout. The value is true or false. The default is false.
//
// *
// proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version 2 is
// enabled. The value is true or false. The default is false.
Key *string
// The value of the attribute.
Value *string
}
// Information about the target group stickiness for a rule.
type TargetGroupStickinessConfig struct {
// The time period, in seconds, during which requests from a client should be
// routed to the same target group. The range is 1-604800 seconds (7 days).
DurationSeconds *int32
// Indicates whether target group stickiness is enabled.
Enabled *bool
}
// Information about how traffic will be distributed between multiple target groups
// in a forward rule.
type TargetGroupTuple struct {
// The Amazon Resource Name (ARN) of the target group.
TargetGroupArn *string