forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
3694 lines (3253 loc) · 134 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 migrationhub
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"
)
const opAssociateCreatedArtifact = "AssociateCreatedArtifact"
// AssociateCreatedArtifactRequest generates a "aws/request.Request" representing the
// client's request for the AssociateCreatedArtifact operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 AssociateCreatedArtifact for more information on using the AssociateCreatedArtifact
// 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 AssociateCreatedArtifactRequest method.
// req, resp := client.AssociateCreatedArtifactRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifact
func (c *MigrationHub) AssociateCreatedArtifactRequest(input *AssociateCreatedArtifactInput) (req *request.Request, output *AssociateCreatedArtifactOutput) {
op := &request.Operation{
Name: opAssociateCreatedArtifact,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateCreatedArtifactInput{}
}
output = &AssociateCreatedArtifactOutput{}
req = c.newRequest(op, input, output)
return
}
// AssociateCreatedArtifact API operation for AWS Migration Hub.
//
// Associates a created artifact of an AWS cloud resource, the target receiving
// the migration, with the migration task performed by a migration tool. This
// API has the following traits:
//
// * Migration tools can call the AssociateCreatedArtifact operation to indicate
// which AWS artifact is associated with a migration task.
//
// * The created artifact name must be provided in ARN (Amazon Resource Name)
// format which will contain information about type and region; for example:
// arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b.
//
// * Examples of the AWS resource behind the created artifact are, AMI's,
// EC2 instance, or DMS endpoint, etc.
//
// 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 Migration Hub's
// API operation AssociateCreatedArtifact for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifact
func (c *MigrationHub) AssociateCreatedArtifact(input *AssociateCreatedArtifactInput) (*AssociateCreatedArtifactOutput, error) {
req, out := c.AssociateCreatedArtifactRequest(input)
return out, req.Send()
}
// AssociateCreatedArtifactWithContext is the same as AssociateCreatedArtifact with the addition of
// the ability to pass a context and additional request options.
//
// See AssociateCreatedArtifact 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 *MigrationHub) AssociateCreatedArtifactWithContext(ctx aws.Context, input *AssociateCreatedArtifactInput, opts ...request.Option) (*AssociateCreatedArtifactOutput, error) {
req, out := c.AssociateCreatedArtifactRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAssociateDiscoveredResource = "AssociateDiscoveredResource"
// AssociateDiscoveredResourceRequest generates a "aws/request.Request" representing the
// client's request for the AssociateDiscoveredResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 AssociateDiscoveredResource for more information on using the AssociateDiscoveredResource
// 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 AssociateDiscoveredResourceRequest method.
// req, resp := client.AssociateDiscoveredResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateDiscoveredResource
func (c *MigrationHub) AssociateDiscoveredResourceRequest(input *AssociateDiscoveredResourceInput) (req *request.Request, output *AssociateDiscoveredResourceOutput) {
op := &request.Operation{
Name: opAssociateDiscoveredResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateDiscoveredResourceInput{}
}
output = &AssociateDiscoveredResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// AssociateDiscoveredResource API operation for AWS Migration Hub.
//
// Associates a discovered resource ID from Application Discovery Service (ADS)
// with a migration task.
//
// 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 Migration Hub's
// API operation AssociateDiscoveredResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodePolicyErrorException "PolicyErrorException"
// Exception raised when there are problems accessing ADS (Application Discovery
// Service); most likely due to a misconfigured policy or the migrationhub-discovery
// role is missing or not configured correctly.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateDiscoveredResource
func (c *MigrationHub) AssociateDiscoveredResource(input *AssociateDiscoveredResourceInput) (*AssociateDiscoveredResourceOutput, error) {
req, out := c.AssociateDiscoveredResourceRequest(input)
return out, req.Send()
}
// AssociateDiscoveredResourceWithContext is the same as AssociateDiscoveredResource with the addition of
// the ability to pass a context and additional request options.
//
// See AssociateDiscoveredResource 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 *MigrationHub) AssociateDiscoveredResourceWithContext(ctx aws.Context, input *AssociateDiscoveredResourceInput, opts ...request.Option) (*AssociateDiscoveredResourceOutput, error) {
req, out := c.AssociateDiscoveredResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateProgressUpdateStream = "CreateProgressUpdateStream"
// CreateProgressUpdateStreamRequest generates a "aws/request.Request" representing the
// client's request for the CreateProgressUpdateStream operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateProgressUpdateStream for more information on using the CreateProgressUpdateStream
// 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 CreateProgressUpdateStreamRequest method.
// req, resp := client.CreateProgressUpdateStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/CreateProgressUpdateStream
func (c *MigrationHub) CreateProgressUpdateStreamRequest(input *CreateProgressUpdateStreamInput) (req *request.Request, output *CreateProgressUpdateStreamOutput) {
op := &request.Operation{
Name: opCreateProgressUpdateStream,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateProgressUpdateStreamInput{}
}
output = &CreateProgressUpdateStreamOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateProgressUpdateStream API operation for AWS Migration Hub.
//
// Creates a progress update stream which is an AWS resource used for access
// control as well as a namespace for migration task names that is implicitly
// linked to your AWS account. It must uniquely identify the migration tool
// as it is used for all updates made by the tool; however, it does not need
// to be unique for each AWS account because it is scoped to the AWS account.
//
// 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 Migration Hub's
// API operation CreateProgressUpdateStream for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/CreateProgressUpdateStream
func (c *MigrationHub) CreateProgressUpdateStream(input *CreateProgressUpdateStreamInput) (*CreateProgressUpdateStreamOutput, error) {
req, out := c.CreateProgressUpdateStreamRequest(input)
return out, req.Send()
}
// CreateProgressUpdateStreamWithContext is the same as CreateProgressUpdateStream with the addition of
// the ability to pass a context and additional request options.
//
// See CreateProgressUpdateStream 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 *MigrationHub) CreateProgressUpdateStreamWithContext(ctx aws.Context, input *CreateProgressUpdateStreamInput, opts ...request.Option) (*CreateProgressUpdateStreamOutput, error) {
req, out := c.CreateProgressUpdateStreamRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteProgressUpdateStream = "DeleteProgressUpdateStream"
// DeleteProgressUpdateStreamRequest generates a "aws/request.Request" representing the
// client's request for the DeleteProgressUpdateStream operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DeleteProgressUpdateStream for more information on using the DeleteProgressUpdateStream
// 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 DeleteProgressUpdateStreamRequest method.
// req, resp := client.DeleteProgressUpdateStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DeleteProgressUpdateStream
func (c *MigrationHub) DeleteProgressUpdateStreamRequest(input *DeleteProgressUpdateStreamInput) (req *request.Request, output *DeleteProgressUpdateStreamOutput) {
op := &request.Operation{
Name: opDeleteProgressUpdateStream,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteProgressUpdateStreamInput{}
}
output = &DeleteProgressUpdateStreamOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteProgressUpdateStream API operation for AWS Migration Hub.
//
// Deletes a progress update stream, including all of its tasks, which was previously
// created as an AWS resource used for access control. This API has the following
// traits:
//
// * The only parameter needed for DeleteProgressUpdateStream is the stream
// name (same as a CreateProgressUpdateStream call).
//
// * The call will return, and a background process will asynchronously delete
// the stream and all of its resources (tasks, associated resources, resource
// attributes, created artifacts).
//
// * If the stream takes time to be deleted, it might still show up on a
// ListProgressUpdateStreams call.
//
// * CreateProgressUpdateStream, ImportMigrationTask, NotifyMigrationTaskState,
// and all Associate[*] APIs realted to the tasks belonging to the stream
// will throw "InvalidInputException" if the stream of the same name is in
// the process of being deleted.
//
// * Once the stream and all of its resources are deleted, CreateProgressUpdateStream
// for a stream of the same name will succeed, and that stream will be an
// entirely new logical resource (without any resources associated with the
// old stream).
//
// 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 Migration Hub's
// API operation DeleteProgressUpdateStream for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DeleteProgressUpdateStream
func (c *MigrationHub) DeleteProgressUpdateStream(input *DeleteProgressUpdateStreamInput) (*DeleteProgressUpdateStreamOutput, error) {
req, out := c.DeleteProgressUpdateStreamRequest(input)
return out, req.Send()
}
// DeleteProgressUpdateStreamWithContext is the same as DeleteProgressUpdateStream with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteProgressUpdateStream 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 *MigrationHub) DeleteProgressUpdateStreamWithContext(ctx aws.Context, input *DeleteProgressUpdateStreamInput, opts ...request.Option) (*DeleteProgressUpdateStreamOutput, error) {
req, out := c.DeleteProgressUpdateStreamRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeApplicationState = "DescribeApplicationState"
// DescribeApplicationStateRequest generates a "aws/request.Request" representing the
// client's request for the DescribeApplicationState operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DescribeApplicationState for more information on using the DescribeApplicationState
// 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 DescribeApplicationStateRequest method.
// req, resp := client.DescribeApplicationStateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeApplicationState
func (c *MigrationHub) DescribeApplicationStateRequest(input *DescribeApplicationStateInput) (req *request.Request, output *DescribeApplicationStateOutput) {
op := &request.Operation{
Name: opDescribeApplicationState,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeApplicationStateInput{}
}
output = &DescribeApplicationStateOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeApplicationState API operation for AWS Migration Hub.
//
// Gets the migration status of an application.
//
// 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 Migration Hub's
// API operation DescribeApplicationState for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodePolicyErrorException "PolicyErrorException"
// Exception raised when there are problems accessing ADS (Application Discovery
// Service); most likely due to a misconfigured policy or the migrationhub-discovery
// role is missing or not configured correctly.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeApplicationState
func (c *MigrationHub) DescribeApplicationState(input *DescribeApplicationStateInput) (*DescribeApplicationStateOutput, error) {
req, out := c.DescribeApplicationStateRequest(input)
return out, req.Send()
}
// DescribeApplicationStateWithContext is the same as DescribeApplicationState with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeApplicationState 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 *MigrationHub) DescribeApplicationStateWithContext(ctx aws.Context, input *DescribeApplicationStateInput, opts ...request.Option) (*DescribeApplicationStateOutput, error) {
req, out := c.DescribeApplicationStateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeMigrationTask = "DescribeMigrationTask"
// DescribeMigrationTaskRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMigrationTask operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DescribeMigrationTask for more information on using the DescribeMigrationTask
// 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 DescribeMigrationTaskRequest method.
// req, resp := client.DescribeMigrationTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeMigrationTask
func (c *MigrationHub) DescribeMigrationTaskRequest(input *DescribeMigrationTaskInput) (req *request.Request, output *DescribeMigrationTaskOutput) {
op := &request.Operation{
Name: opDescribeMigrationTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeMigrationTaskInput{}
}
output = &DescribeMigrationTaskOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeMigrationTask API operation for AWS Migration Hub.
//
// Retrieves a list of all attributes associated with a specific migration task.
//
// 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 Migration Hub's
// API operation DescribeMigrationTask for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeMigrationTask
func (c *MigrationHub) DescribeMigrationTask(input *DescribeMigrationTaskInput) (*DescribeMigrationTaskOutput, error) {
req, out := c.DescribeMigrationTaskRequest(input)
return out, req.Send()
}
// DescribeMigrationTaskWithContext is the same as DescribeMigrationTask with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeMigrationTask 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 *MigrationHub) DescribeMigrationTaskWithContext(ctx aws.Context, input *DescribeMigrationTaskInput, opts ...request.Option) (*DescribeMigrationTaskOutput, error) {
req, out := c.DescribeMigrationTaskRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateCreatedArtifact = "DisassociateCreatedArtifact"
// DisassociateCreatedArtifactRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateCreatedArtifact operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DisassociateCreatedArtifact for more information on using the DisassociateCreatedArtifact
// 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 DisassociateCreatedArtifactRequest method.
// req, resp := client.DisassociateCreatedArtifactRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateCreatedArtifact
func (c *MigrationHub) DisassociateCreatedArtifactRequest(input *DisassociateCreatedArtifactInput) (req *request.Request, output *DisassociateCreatedArtifactOutput) {
op := &request.Operation{
Name: opDisassociateCreatedArtifact,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateCreatedArtifactInput{}
}
output = &DisassociateCreatedArtifactOutput{}
req = c.newRequest(op, input, output)
return
}
// DisassociateCreatedArtifact API operation for AWS Migration Hub.
//
// Disassociates a created artifact of an AWS resource with a migration task
// performed by a migration tool that was previously associated. This API has
// the following traits:
//
// * A migration user can call the DisassociateCreatedArtifacts operation
// to disassociate a created AWS Artifact from a migration task.
//
// * The created artifact name must be provided in ARN (Amazon Resource Name)
// format which will contain information about type and region; for example:
// arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b.
//
// * Examples of the AWS resource behind the created artifact are, AMI's,
// EC2 instance, or RDS instance, etc.
//
// 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 Migration Hub's
// API operation DisassociateCreatedArtifact for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateCreatedArtifact
func (c *MigrationHub) DisassociateCreatedArtifact(input *DisassociateCreatedArtifactInput) (*DisassociateCreatedArtifactOutput, error) {
req, out := c.DisassociateCreatedArtifactRequest(input)
return out, req.Send()
}
// DisassociateCreatedArtifactWithContext is the same as DisassociateCreatedArtifact with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateCreatedArtifact 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 *MigrationHub) DisassociateCreatedArtifactWithContext(ctx aws.Context, input *DisassociateCreatedArtifactInput, opts ...request.Option) (*DisassociateCreatedArtifactOutput, error) {
req, out := c.DisassociateCreatedArtifactRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateDiscoveredResource = "DisassociateDiscoveredResource"
// DisassociateDiscoveredResourceRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateDiscoveredResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DisassociateDiscoveredResource for more information on using the DisassociateDiscoveredResource
// 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 DisassociateDiscoveredResourceRequest method.
// req, resp := client.DisassociateDiscoveredResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateDiscoveredResource
func (c *MigrationHub) DisassociateDiscoveredResourceRequest(input *DisassociateDiscoveredResourceInput) (req *request.Request, output *DisassociateDiscoveredResourceOutput) {
op := &request.Operation{
Name: opDisassociateDiscoveredResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateDiscoveredResourceInput{}
}
output = &DisassociateDiscoveredResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// DisassociateDiscoveredResource API operation for AWS Migration Hub.
//
// Disassociate an Application Discovery Service (ADS) discovered resource from
// a migration task.
//
// 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 Migration Hub's
// API operation DisassociateDiscoveredResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateDiscoveredResource
func (c *MigrationHub) DisassociateDiscoveredResource(input *DisassociateDiscoveredResourceInput) (*DisassociateDiscoveredResourceOutput, error) {
req, out := c.DisassociateDiscoveredResourceRequest(input)
return out, req.Send()
}
// DisassociateDiscoveredResourceWithContext is the same as DisassociateDiscoveredResource with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateDiscoveredResource 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 *MigrationHub) DisassociateDiscoveredResourceWithContext(ctx aws.Context, input *DisassociateDiscoveredResourceInput, opts ...request.Option) (*DisassociateDiscoveredResourceOutput, error) {
req, out := c.DisassociateDiscoveredResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opImportMigrationTask = "ImportMigrationTask"
// ImportMigrationTaskRequest generates a "aws/request.Request" representing the
// client's request for the ImportMigrationTask operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 ImportMigrationTask for more information on using the ImportMigrationTask
// 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 ImportMigrationTaskRequest method.
// req, resp := client.ImportMigrationTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ImportMigrationTask
func (c *MigrationHub) ImportMigrationTaskRequest(input *ImportMigrationTaskInput) (req *request.Request, output *ImportMigrationTaskOutput) {
op := &request.Operation{
Name: opImportMigrationTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ImportMigrationTaskInput{}
}
output = &ImportMigrationTaskOutput{}
req = c.newRequest(op, input, output)
return
}
// ImportMigrationTask API operation for AWS Migration Hub.
//
// Registers a new migration task which represents a server, database, etc.,
// being migrated to AWS by a migration tool.
//
// This API is a prerequisite to calling the NotifyMigrationTaskState API as
// the migration tool must first register the migration task with Migration
// Hub.
//
// 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 Migration Hub's
// API operation ImportMigrationTask for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessDeniedException "AccessDeniedException"
// You do not have sufficient access to perform this action.
//
// * ErrCodeInternalServerError "InternalServerError"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// Exception raised when there is an internal, configuration, or dependency
// error encountered.
//
// * ErrCodeDryRunOperation "DryRunOperation"
// Exception raised to indicate a successfully authorized action when the DryRun
// flag is set to "true".
//
// * ErrCodeUnauthorizedOperation "UnauthorizedOperation"
// Exception raised to indicate a request was not authorized when the DryRun
// flag is set to "true".
//
// * ErrCodeInvalidInputException "InvalidInputException"
// Exception raised when the provided input violates a policy constraint or
// is entered in the wrong format or data type.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception raised when the request references a resource (ADS configuration,
// update stream, migration task, etc.) that does not exist in ADS (Application
// Discovery Service) or in Migration Hub's repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ImportMigrationTask
func (c *MigrationHub) ImportMigrationTask(input *ImportMigrationTaskInput) (*ImportMigrationTaskOutput, error) {
req, out := c.ImportMigrationTaskRequest(input)
return out, req.Send()
}
// ImportMigrationTaskWithContext is the same as ImportMigrationTask with the addition of
// the ability to pass a context and additional request options.
//
// See ImportMigrationTask 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 *MigrationHub) ImportMigrationTaskWithContext(ctx aws.Context, input *ImportMigrationTaskInput, opts ...request.Option) (*ImportMigrationTaskOutput, error) {
req, out := c.ImportMigrationTaskRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListCreatedArtifacts = "ListCreatedArtifacts"
// ListCreatedArtifactsRequest generates a "aws/request.Request" representing the
// client's request for the ListCreatedArtifacts operation. The "output" return
// value will be populated with the request's response once the request completes