-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
api.go
8385 lines (7270 loc) · 272 KB
/
api.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 private/model/cli/gen-api/main.go. DO NOT EDIT.
package appmesh
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opCreateMesh = "CreateMesh"
// CreateMeshRequest generates a "aws/request.Request" representing the
// client's request for the CreateMesh operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateMesh for more information on using the CreateMesh
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateMeshRequest method.
// req, resp := client.CreateMeshRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateMesh
func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Request, output *CreateMeshOutput) {
op := &request.Operation{
Name: opCreateMesh,
HTTPMethod: "PUT",
HTTPPath: "/v20190125/meshes",
}
if input == nil {
input = &CreateMeshInput{}
}
output = &CreateMeshOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateMesh API operation for AWS App Mesh.
//
// Creates a service mesh. A service mesh is a logical boundary for network
// traffic between the services that reside within it.
//
// After you create your service mesh, you can create virtual services, virtual
// nodes, virtual routers, and routes to distribute traffic between the applications
// in your mesh.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation CreateMesh for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeConflictException "ConflictException"
// The request contains a client token that was used for a previous update resource
// call with different specifications. Try the request again with a new client
// token.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// You have exceeded a service limit for your account. For more information,
// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
// in the AWS App Mesh User Guide.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateMesh
func (c *AppMesh) CreateMesh(input *CreateMeshInput) (*CreateMeshOutput, error) {
req, out := c.CreateMeshRequest(input)
return out, req.Send()
}
// CreateMeshWithContext is the same as CreateMesh with the addition of
// the ability to pass a context and additional request options.
//
// See CreateMesh for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) CreateMeshWithContext(ctx aws.Context, input *CreateMeshInput, opts ...request.Option) (*CreateMeshOutput, error) {
req, out := c.CreateMeshRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateRoute = "CreateRoute"
// CreateRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateRoute operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateRoute for more information on using the CreateRoute
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateRouteRequest method.
// req, resp := client.CreateRouteRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateRoute
func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) {
op := &request.Operation{
Name: opCreateRoute,
HTTPMethod: "PUT",
HTTPPath: "/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes",
}
if input == nil {
input = &CreateRouteInput{}
}
output = &CreateRouteOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateRoute API operation for AWS App Mesh.
//
// Creates a route that is associated with a virtual router.
//
// You can use the prefix parameter in your route specification for path-based
// routing of requests. For example, if your virtual service name is my-service.local
// and you want the route to match requests to my-service.local/metrics, your
// prefix should be /metrics.
//
// If your route matches a request, you can distribute traffic to one or more
// target virtual nodes with relative weighting.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation CreateRoute for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeConflictException "ConflictException"
// The request contains a client token that was used for a previous update resource
// call with different specifications. Try the request again with a new client
// token.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// You have exceeded a service limit for your account. For more information,
// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
// in the AWS App Mesh User Guide.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateRoute
func (c *AppMesh) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
req, out := c.CreateRouteRequest(input)
return out, req.Send()
}
// CreateRouteWithContext is the same as CreateRoute with the addition of
// the ability to pass a context and additional request options.
//
// See CreateRoute for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) {
req, out := c.CreateRouteRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateVirtualNode = "CreateVirtualNode"
// CreateVirtualNodeRequest generates a "aws/request.Request" representing the
// client's request for the CreateVirtualNode operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateVirtualNode for more information on using the CreateVirtualNode
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateVirtualNodeRequest method.
// req, resp := client.CreateVirtualNodeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualNode
func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req *request.Request, output *CreateVirtualNodeOutput) {
op := &request.Operation{
Name: opCreateVirtualNode,
HTTPMethod: "PUT",
HTTPPath: "/v20190125/meshes/{meshName}/virtualNodes",
}
if input == nil {
input = &CreateVirtualNodeInput{}
}
output = &CreateVirtualNodeOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateVirtualNode API operation for AWS App Mesh.
//
// Creates a virtual node within a service mesh.
//
// A virtual node acts as a logical pointer to a particular task group, such
// as an Amazon ECS service or a Kubernetes deployment. When you create a virtual
// node, you can specify the service discovery information for your task group.
//
// Any inbound traffic that your virtual node expects should be specified as
// a listener. Any outbound traffic that your virtual node expects to reach
// should be specified as a backend.
//
// The response metadata for your new virtual node contains the arn that is
// associated with the virtual node. Set this value (either the full ARN or
// the truncated resource name: for example, mesh/default/virtualNode/simpleapp)
// as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's
// Envoy proxy container in your task definition or pod spec. This is then mapped
// to the node.id and node.cluster Envoy parameters.
//
// If you require your Envoy stats or tracing to use a different name, you can
// override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME
// with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation CreateVirtualNode for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeConflictException "ConflictException"
// The request contains a client token that was used for a previous update resource
// call with different specifications. Try the request again with a new client
// token.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// You have exceeded a service limit for your account. For more information,
// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
// in the AWS App Mesh User Guide.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualNode
func (c *AppMesh) CreateVirtualNode(input *CreateVirtualNodeInput) (*CreateVirtualNodeOutput, error) {
req, out := c.CreateVirtualNodeRequest(input)
return out, req.Send()
}
// CreateVirtualNodeWithContext is the same as CreateVirtualNode with the addition of
// the ability to pass a context and additional request options.
//
// See CreateVirtualNode for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) CreateVirtualNodeWithContext(ctx aws.Context, input *CreateVirtualNodeInput, opts ...request.Option) (*CreateVirtualNodeOutput, error) {
req, out := c.CreateVirtualNodeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateVirtualRouter = "CreateVirtualRouter"
// CreateVirtualRouterRequest generates a "aws/request.Request" representing the
// client's request for the CreateVirtualRouter operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateVirtualRouter for more information on using the CreateVirtualRouter
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateVirtualRouterRequest method.
// req, resp := client.CreateVirtualRouterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualRouter
func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (req *request.Request, output *CreateVirtualRouterOutput) {
op := &request.Operation{
Name: opCreateVirtualRouter,
HTTPMethod: "PUT",
HTTPPath: "/v20190125/meshes/{meshName}/virtualRouters",
}
if input == nil {
input = &CreateVirtualRouterInput{}
}
output = &CreateVirtualRouterOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateVirtualRouter API operation for AWS App Mesh.
//
// Creates a virtual router within a service mesh.
//
// Any inbound traffic that your virtual router expects should be specified
// as a listener.
//
// Virtual routers handle traffic for one or more virtual services within your
// mesh. After you create your virtual router, create and associate routes for
// your virtual router that direct incoming requests to different virtual nodes.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation CreateVirtualRouter for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeConflictException "ConflictException"
// The request contains a client token that was used for a previous update resource
// call with different specifications. Try the request again with a new client
// token.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// You have exceeded a service limit for your account. For more information,
// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
// in the AWS App Mesh User Guide.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualRouter
func (c *AppMesh) CreateVirtualRouter(input *CreateVirtualRouterInput) (*CreateVirtualRouterOutput, error) {
req, out := c.CreateVirtualRouterRequest(input)
return out, req.Send()
}
// CreateVirtualRouterWithContext is the same as CreateVirtualRouter with the addition of
// the ability to pass a context and additional request options.
//
// See CreateVirtualRouter for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) CreateVirtualRouterWithContext(ctx aws.Context, input *CreateVirtualRouterInput, opts ...request.Option) (*CreateVirtualRouterOutput, error) {
req, out := c.CreateVirtualRouterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateVirtualService = "CreateVirtualService"
// CreateVirtualServiceRequest generates a "aws/request.Request" representing the
// client's request for the CreateVirtualService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateVirtualService for more information on using the CreateVirtualService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateVirtualServiceRequest method.
// req, resp := client.CreateVirtualServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualService
func (c *AppMesh) CreateVirtualServiceRequest(input *CreateVirtualServiceInput) (req *request.Request, output *CreateVirtualServiceOutput) {
op := &request.Operation{
Name: opCreateVirtualService,
HTTPMethod: "PUT",
HTTPPath: "/v20190125/meshes/{meshName}/virtualServices",
}
if input == nil {
input = &CreateVirtualServiceInput{}
}
output = &CreateVirtualServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateVirtualService API operation for AWS App Mesh.
//
// Creates a virtual service within a service mesh.
//
// A virtual service is an abstraction of a real service that is provided by
// a virtual node directly or indirectly by means of a virtual router. Dependent
// services call your virtual service by its virtualServiceName, and those requests
// are routed to the virtual node or virtual router that is specified as the
// provider for the virtual service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation CreateVirtualService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeConflictException "ConflictException"
// The request contains a client token that was used for a previous update resource
// call with different specifications. Try the request again with a new client
// token.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// You have exceeded a service limit for your account. For more information,
// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
// in the AWS App Mesh User Guide.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/CreateVirtualService
func (c *AppMesh) CreateVirtualService(input *CreateVirtualServiceInput) (*CreateVirtualServiceOutput, error) {
req, out := c.CreateVirtualServiceRequest(input)
return out, req.Send()
}
// CreateVirtualServiceWithContext is the same as CreateVirtualService with the addition of
// the ability to pass a context and additional request options.
//
// See CreateVirtualService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) CreateVirtualServiceWithContext(ctx aws.Context, input *CreateVirtualServiceInput, opts ...request.Option) (*CreateVirtualServiceOutput, error) {
req, out := c.CreateVirtualServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteMesh = "DeleteMesh"
// DeleteMeshRequest generates a "aws/request.Request" representing the
// client's request for the DeleteMesh operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteMesh for more information on using the DeleteMesh
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteMeshRequest method.
// req, resp := client.DeleteMeshRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteMesh
func (c *AppMesh) DeleteMeshRequest(input *DeleteMeshInput) (req *request.Request, output *DeleteMeshOutput) {
op := &request.Operation{
Name: opDeleteMesh,
HTTPMethod: "DELETE",
HTTPPath: "/v20190125/meshes/{meshName}",
}
if input == nil {
input = &DeleteMeshInput{}
}
output = &DeleteMeshOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteMesh API operation for AWS App Mesh.
//
// Deletes an existing service mesh.
//
// You must delete all resources (virtual services, routes, virtual routers,
// and virtual nodes) in the service mesh before you can delete the mesh itself.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation DeleteMesh for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeResourceInUseException "ResourceInUseException"
// You can't delete the specified resource because it's in use or required by
// another resource.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteMesh
func (c *AppMesh) DeleteMesh(input *DeleteMeshInput) (*DeleteMeshOutput, error) {
req, out := c.DeleteMeshRequest(input)
return out, req.Send()
}
// DeleteMeshWithContext is the same as DeleteMesh with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteMesh for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) DeleteMeshWithContext(ctx aws.Context, input *DeleteMeshInput, opts ...request.Option) (*DeleteMeshOutput, error) {
req, out := c.DeleteMeshRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteRoute = "DeleteRoute"
// DeleteRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRoute operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteRoute for more information on using the DeleteRoute
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteRouteRequest method.
// req, resp := client.DeleteRouteRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteRoute
func (c *AppMesh) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) {
op := &request.Operation{
Name: opDeleteRoute,
HTTPMethod: "DELETE",
HTTPPath: "/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}",
}
if input == nil {
input = &DeleteRouteInput{}
}
output = &DeleteRouteOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteRoute API operation for AWS App Mesh.
//
// Deletes an existing route.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation DeleteRoute for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeResourceInUseException "ResourceInUseException"
// You can't delete the specified resource because it's in use or required by
// another resource.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteRoute
func (c *AppMesh) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
req, out := c.DeleteRouteRequest(input)
return out, req.Send()
}
// DeleteRouteWithContext is the same as DeleteRoute with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteRoute for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) {
req, out := c.DeleteRouteRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteVirtualNode = "DeleteVirtualNode"
// DeleteVirtualNodeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVirtualNode operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteVirtualNode for more information on using the DeleteVirtualNode
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteVirtualNodeRequest method.
// req, resp := client.DeleteVirtualNodeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteVirtualNode
func (c *AppMesh) DeleteVirtualNodeRequest(input *DeleteVirtualNodeInput) (req *request.Request, output *DeleteVirtualNodeOutput) {
op := &request.Operation{
Name: opDeleteVirtualNode,
HTTPMethod: "DELETE",
HTTPPath: "/v20190125/meshes/{meshName}/virtualNodes/{virtualNodeName}",
}
if input == nil {
input = &DeleteVirtualNodeInput{}
}
output = &DeleteVirtualNodeOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteVirtualNode API operation for AWS App Mesh.
//
// Deletes an existing virtual node.
//
// You must delete any virtual services that list a virtual node as a service
// provider before you can delete the virtual node itself.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation DeleteVirtualNode for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeResourceInUseException "ResourceInUseException"
// You can't delete the specified resource because it's in use or required by
// another resource.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteVirtualNode
func (c *AppMesh) DeleteVirtualNode(input *DeleteVirtualNodeInput) (*DeleteVirtualNodeOutput, error) {
req, out := c.DeleteVirtualNodeRequest(input)
return out, req.Send()
}
// DeleteVirtualNodeWithContext is the same as DeleteVirtualNode with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteVirtualNode for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AppMesh) DeleteVirtualNodeWithContext(ctx aws.Context, input *DeleteVirtualNodeInput, opts ...request.Option) (*DeleteVirtualNodeOutput, error) {
req, out := c.DeleteVirtualNodeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteVirtualRouter = "DeleteVirtualRouter"
// DeleteVirtualRouterRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVirtualRouter operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteVirtualRouter for more information on using the DeleteVirtualRouter
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteVirtualRouterRequest method.
// req, resp := client.DeleteVirtualRouterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteVirtualRouter
func (c *AppMesh) DeleteVirtualRouterRequest(input *DeleteVirtualRouterInput) (req *request.Request, output *DeleteVirtualRouterOutput) {
op := &request.Operation{
Name: opDeleteVirtualRouter,
HTTPMethod: "DELETE",
HTTPPath: "/v20190125/meshes/{meshName}/virtualRouters/{virtualRouterName}",
}
if input == nil {
input = &DeleteVirtualRouterInput{}
}
output = &DeleteVirtualRouterOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteVirtualRouter API operation for AWS App Mesh.
//
// Deletes an existing virtual router.
//
// You must delete any routes associated with the virtual router before you
// can delete the router itself.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS App Mesh's
// API operation DeleteVirtualRouter for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request syntax was malformed. Check your request syntax and try again.
//
// * ErrCodeForbiddenException "ForbiddenException"
// You don't have permissions to perform this action.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// The request processing has failed because of an unknown error, exception,
// or failure.
//
// * ErrCodeNotFoundException "NotFoundException"
// The specified resource doesn't exist. Check your request syntax and try again.
//
// * ErrCodeResourceInUseException "ResourceInUseException"
// You can't delete the specified resource because it's in use or required by
// another resource.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// The request has failed due to a temporary failure of the service.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The maximum request rate permitted by the App Mesh APIs has been exceeded
// for your account. For best results, use an increasing or variable sleep interval
// between requests.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/DeleteVirtualRouter
func (c *AppMesh) DeleteVirtualRouter(input *DeleteVirtualRouterInput) (*DeleteVirtualRouterOutput, error) {
req, out := c.DeleteVirtualRouterRequest(input)
return out, req.Send()
}
// DeleteVirtualRouterWithContext is the same as DeleteVirtualRouter with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteVirtualRouter for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/