-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_types.go
419 lines (332 loc) · 13.9 KB
/
api_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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package route53resolver
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// For List operations, an optional specification to return a subset of objects,
// such as resolver endpoints or resolver rules.
type Filter struct {
_ struct{} `type:"structure"`
// When you're using a List operation and you want the operation to return a
// subset of objects, such as resolver endpoints or resolver rules, the name
// of the parameter that you want to use to filter objects. For example, to
// list only inbound resolver endpoints, specify Direction for the value of
// Name.
Name *string `min:"1" type:"string"`
// When you're using a List operation and you want the operation to return a
// subset of objects, such as resolver endpoints or resolver rules, the value
// of the parameter that you want to use to filter objects. For example, to
// list only inbound resolver endpoints, specify INBOUND for the value of Values.
Values []string `type:"list"`
}
// String returns the string representation
func (s Filter) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Filter) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Filter"}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// In an CreateResolverEndpoint request, a subnet and IP address that you want
// to use for DNS queries.
type IpAddressRequest struct {
_ struct{} `type:"structure"`
// The IP address that you want to use for DNS queries.
Ip *string `min:"7" type:"string"`
// The subnet that contains the IP address.
//
// SubnetId is a required field
SubnetId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s IpAddressRequest) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *IpAddressRequest) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "IpAddressRequest"}
if s.Ip != nil && len(*s.Ip) < 7 {
invalidParams.Add(aws.NewErrParamMinLen("Ip", 7))
}
if s.SubnetId == nil {
invalidParams.Add(aws.NewErrParamRequired("SubnetId"))
}
if s.SubnetId != nil && len(*s.SubnetId) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("SubnetId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// In the response to a GetResolverEndpoint request, information about the IP
// addresses that the resolver endpoint uses for DNS queries.
type IpAddressResponse struct {
_ struct{} `type:"structure"`
// The date and time that the IP address was created, in Unix time format and
// Coordinated Universal Time (UTC).
CreationTime *string `min:"20" type:"string"`
// One IP address that the resolver endpoint uses for DNS queries.
Ip *string `min:"7" type:"string"`
// The ID of one IP address.
IpId *string `min:"1" type:"string"`
// The date and time that the IP address was last modified, in Unix time format
// and Coordinated Universal Time (UTC).
ModificationTime *string `min:"20" type:"string"`
// A status code that gives the current status of the request.
Status IpAddressStatus `type:"string" enum:"true"`
// A message that provides additional information about the status of the request.
StatusMessage *string `type:"string"`
// The ID of one subnet.
SubnetId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s IpAddressResponse) String() string {
return awsutil.Prettify(s)
}
// In an UpdateResolverEndpoint request, information about an IP address to
// update.
type IpAddressUpdate struct {
_ struct{} `type:"structure"`
// The new IP address.
Ip *string `min:"7" type:"string"`
// Only when removing an IP address from a resolver endpoint: The ID of the
// IP address that you want to remove. To get this ID, use GetResolverEndpoint.
IpId *string `min:"1" type:"string"`
// The ID of the subnet that includes the IP address that you want to update.
// To get this ID, use GetResolverEndpoint.
SubnetId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s IpAddressUpdate) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *IpAddressUpdate) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "IpAddressUpdate"}
if s.Ip != nil && len(*s.Ip) < 7 {
invalidParams.Add(aws.NewErrParamMinLen("Ip", 7))
}
if s.IpId != nil && len(*s.IpId) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("IpId", 1))
}
if s.SubnetId != nil && len(*s.SubnetId) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("SubnetId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// In the response to a CreateResolverEndpoint, DeleteResolverEndpoint, GetResolverEndpoint,
// ListResolverEndpoints, or UpdateResolverEndpoint request, a complex type
// that contains settings for an existing inbound or outbound resolver endpoint.
type ResolverEndpoint struct {
_ struct{} `type:"structure"`
// The ARN (Amazon Resource Name) for the resolver endpoint.
Arn *string `min:"1" type:"string"`
// The date and time that the endpoint was created, in Unix time format and
// Coordinated Universal Time (UTC).
CreationTime *string `min:"20" type:"string"`
// A unique string that identifies the request that created the resolver endpoint.
// The CreatorRequestId allows failed requests to be retried without the risk
// of executing the operation twice.
CreatorRequestId *string `min:"1" type:"string"`
// Indicates whether the resolver endpoint allows inbound or outbound DNS queries:
//
// * INBOUND: allows DNS queries to your VPC from your network or another
// VPC
//
// * OUTBOUND: allows DNS queries from your VPC to your network or another
// VPC
Direction ResolverEndpointDirection `type:"string" enum:"true"`
// The ID of the VPC that you want to create the resolver endpoint in.
HostVPCId *string `min:"1" type:"string"`
// The ID of the resolver endpoint.
Id *string `min:"1" type:"string"`
// The number of IP addresses that the resolver endpoint can use for DNS queries.
IpAddressCount *int64 `type:"integer"`
// The date and time that the endpoint was last modified, in Unix time format
// and Coordinated Universal Time (UTC).
ModificationTime *string `min:"20" type:"string"`
// The name that you assigned to the resolver endpoint when you submitted a
// CreateResolverEndpoint request.
Name *string `type:"string"`
// The ID of one or more security groups that control access to this VPC. The
// security group must include one or more inbound resolver rules.
SecurityGroupIds []string `type:"list"`
// A code that specifies the current status of the resolver endpoint.
Status ResolverEndpointStatus `type:"string" enum:"true"`
// A detailed description of the status of the resolver endpoint.
StatusMessage *string `type:"string"`
}
// String returns the string representation
func (s ResolverEndpoint) String() string {
return awsutil.Prettify(s)
}
// For queries that originate in your VPC, detailed information about a resolver
// rule, which specifies how to route DNS queries out of the VPC. The ResolverRule
// parameter appears in the response to a CreateResolverRule, DeleteResolverRule,
// GetResolverRule, ListResolverRules, or UpdateResolverRule request.
type ResolverRule struct {
_ struct{} `type:"structure"`
// The ARN (Amazon Resource Name) for the resolver rule specified by Id.
Arn *string `min:"1" type:"string"`
// A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies
// the request and allows failed requests to be retried without the risk of
// executing the operation twice.
CreatorRequestId *string `min:"1" type:"string"`
// DNS queries for this domain name are forwarded to the IP addresses that are
// specified in TargetIps. If a query matches multiple resolver rules (example.com
// and www.example.com), the query is routed using the resolver rule that contains
// the most specific domain name (www.example.com).
DomainName *string `min:"1" type:"string"`
// The ID that Resolver assigned to the resolver rule when you created it.
Id *string `min:"1" type:"string"`
// The name for the resolver rule, which you specified when you created the
// resolver rule.
Name *string `type:"string"`
// When a rule is shared with another AWS account, the account ID of the account
// that the rule is shared with.
OwnerId *string `min:"12" type:"string"`
// The ID of the endpoint that the rule is associated with.
ResolverEndpointId *string `min:"1" type:"string"`
// This value is always FORWARD. Other resolver rule types aren't supported.
RuleType RuleTypeOption `type:"string" enum:"true"`
// Whether the rules is shared and, if so, whether the current account is sharing
// the rule with another account, or another account is sharing the rule with
// the current account.
ShareStatus ShareStatus `type:"string" enum:"true"`
// A code that specifies the current status of the resolver rule.
Status ResolverRuleStatus `type:"string" enum:"true"`
// A detailed description of the status of a resolver rule.
StatusMessage *string `type:"string"`
// An array that contains the IP addresses and ports that you want to forward
TargetIps []TargetAddress `min:"1" type:"list"`
}
// String returns the string representation
func (s ResolverRule) String() string {
return awsutil.Prettify(s)
}
// In the response to an AssociateResolverRule, DisassociateResolverRule, or
// ListResolverRuleAssociations request, information about an association between
// a resolver rule and a VPC.
type ResolverRuleAssociation struct {
_ struct{} `type:"structure"`
// The ID of the association between a resolver rule and a VPC. Resolver assigns
// this value when you submit an AssociateResolverRule request.
Id *string `min:"1" type:"string"`
// The name of an association between a resolver rule and a VPC.
Name *string `type:"string"`
// The ID of the resolver rule that you associated with the VPC that is specified
// by VPCId.
ResolverRuleId *string `min:"1" type:"string"`
// A code that specifies the current status of the association between a resolver
// rule and a VPC.
Status ResolverRuleAssociationStatus `type:"string" enum:"true"`
// A detailed description of the status of the association between a resolver
// rule and a VPC.
StatusMessage *string `type:"string"`
// The ID of the VPC that you associated the resolver rule with.
VPCId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ResolverRuleAssociation) String() string {
return awsutil.Prettify(s)
}
// In an UpdateResolverRule request, information about the changes that you
// want to make.
type ResolverRuleConfig struct {
_ struct{} `type:"structure"`
// The new name for the resolver rule. The name that you specify appears in
// the Resolver dashboard in the Route 53 console.
Name *string `type:"string"`
// The ID of the new outbound resolver endpoint that you want to use to route
// DNS queries to the IP addresses that you specify in TargetIps.
ResolverEndpointId *string `min:"1" type:"string"`
// For DNS queries that originate in your VPC, the new IP addresses that you
// want to route outbound DNS queries to.
TargetIps []TargetAddress `min:"1" type:"list"`
}
// String returns the string representation
func (s ResolverRuleConfig) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResolverRuleConfig) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ResolverRuleConfig"}
if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("ResolverEndpointId", 1))
}
if s.TargetIps != nil && len(s.TargetIps) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("TargetIps", 1))
}
if s.TargetIps != nil {
for i, v := range s.TargetIps {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetIps", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// One tag that you want to add to the specified resource. A tag consists of
// a Key (a name for the tag) and a Value.
type Tag struct {
_ struct{} `type:"structure"`
// The name for the tag. For example, if you want to associate Resolver resources
// with the account IDs of your customers for billing purposes, the value of
// Key might be account-id.
Key *string `type:"string"`
// The value for the tag. For example, if Key is account-id, then Value might
// be the ID of the customer account that you're creating the resource for.
Value *string `type:"string"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// In a CreateResolverRule request, an array of the IPs that you want to forward
// DNS queries to.
type TargetAddress struct {
_ struct{} `type:"structure"`
// One IP address that you want to forward DNS queries to. You can specify only
// IPv4 addresses.
//
// Ip is a required field
Ip *string `min:"7" type:"string" required:"true"`
// The port at Ip that you want to forward DNS queries to.
Port *int64 `type:"integer"`
}
// String returns the string representation
func (s TargetAddress) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TargetAddress) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "TargetAddress"}
if s.Ip == nil {
invalidParams.Add(aws.NewErrParamRequired("Ip"))
}
if s.Ip != nil && len(*s.Ip) < 7 {
invalidParams.Add(aws.NewErrParamMinLen("Ip", 7))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}