forked from aws/aws-sdk-go-v2
/
api.go
2545 lines (2094 loc) · 83.4 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-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opAssociateCreatedArtifact = "AssociateCreatedArtifact"
// AssociateCreatedArtifactRequest is a API request type for the AssociateCreatedArtifact API operation.
type AssociateCreatedArtifactRequest struct {
*aws.Request
Input *AssociateCreatedArtifactInput
Copy func(*AssociateCreatedArtifactInput) AssociateCreatedArtifactRequest
}
// Send marshals and sends the AssociateCreatedArtifact API request.
func (r AssociateCreatedArtifactRequest) Send() (*AssociateCreatedArtifactOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AssociateCreatedArtifactOutput), nil
}
// AssociateCreatedArtifactRequest returns a request value for making 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.
//
// // Example sending a request using the AssociateCreatedArtifactRequest method.
// req := client.AssociateCreatedArtifactRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifact
func (c *MigrationHub) AssociateCreatedArtifactRequest(input *AssociateCreatedArtifactInput) AssociateCreatedArtifactRequest {
op := &aws.Operation{
Name: opAssociateCreatedArtifact,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateCreatedArtifactInput{}
}
output := &AssociateCreatedArtifactOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return AssociateCreatedArtifactRequest{Request: req, Input: input, Copy: c.AssociateCreatedArtifactRequest}
}
const opAssociateDiscoveredResource = "AssociateDiscoveredResource"
// AssociateDiscoveredResourceRequest is a API request type for the AssociateDiscoveredResource API operation.
type AssociateDiscoveredResourceRequest struct {
*aws.Request
Input *AssociateDiscoveredResourceInput
Copy func(*AssociateDiscoveredResourceInput) AssociateDiscoveredResourceRequest
}
// Send marshals and sends the AssociateDiscoveredResource API request.
func (r AssociateDiscoveredResourceRequest) Send() (*AssociateDiscoveredResourceOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AssociateDiscoveredResourceOutput), nil
}
// AssociateDiscoveredResourceRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Associates a discovered resource ID from Application Discovery Service (ADS)
// with a migration task.
//
// // Example sending a request using the AssociateDiscoveredResourceRequest method.
// req := client.AssociateDiscoveredResourceRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateDiscoveredResource
func (c *MigrationHub) AssociateDiscoveredResourceRequest(input *AssociateDiscoveredResourceInput) AssociateDiscoveredResourceRequest {
op := &aws.Operation{
Name: opAssociateDiscoveredResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateDiscoveredResourceInput{}
}
output := &AssociateDiscoveredResourceOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return AssociateDiscoveredResourceRequest{Request: req, Input: input, Copy: c.AssociateDiscoveredResourceRequest}
}
const opCreateProgressUpdateStream = "CreateProgressUpdateStream"
// CreateProgressUpdateStreamRequest is a API request type for the CreateProgressUpdateStream API operation.
type CreateProgressUpdateStreamRequest struct {
*aws.Request
Input *CreateProgressUpdateStreamInput
Copy func(*CreateProgressUpdateStreamInput) CreateProgressUpdateStreamRequest
}
// Send marshals and sends the CreateProgressUpdateStream API request.
func (r CreateProgressUpdateStreamRequest) Send() (*CreateProgressUpdateStreamOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateProgressUpdateStreamOutput), nil
}
// CreateProgressUpdateStreamRequest returns a request value for making 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.
//
// // Example sending a request using the CreateProgressUpdateStreamRequest method.
// req := client.CreateProgressUpdateStreamRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/CreateProgressUpdateStream
func (c *MigrationHub) CreateProgressUpdateStreamRequest(input *CreateProgressUpdateStreamInput) CreateProgressUpdateStreamRequest {
op := &aws.Operation{
Name: opCreateProgressUpdateStream,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateProgressUpdateStreamInput{}
}
output := &CreateProgressUpdateStreamOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateProgressUpdateStreamRequest{Request: req, Input: input, Copy: c.CreateProgressUpdateStreamRequest}
}
const opDeleteProgressUpdateStream = "DeleteProgressUpdateStream"
// DeleteProgressUpdateStreamRequest is a API request type for the DeleteProgressUpdateStream API operation.
type DeleteProgressUpdateStreamRequest struct {
*aws.Request
Input *DeleteProgressUpdateStreamInput
Copy func(*DeleteProgressUpdateStreamInput) DeleteProgressUpdateStreamRequest
}
// Send marshals and sends the DeleteProgressUpdateStream API request.
func (r DeleteProgressUpdateStreamRequest) Send() (*DeleteProgressUpdateStreamOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteProgressUpdateStreamOutput), nil
}
// DeleteProgressUpdateStreamRequest returns a request value for making 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).
//
// // Example sending a request using the DeleteProgressUpdateStreamRequest method.
// req := client.DeleteProgressUpdateStreamRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DeleteProgressUpdateStream
func (c *MigrationHub) DeleteProgressUpdateStreamRequest(input *DeleteProgressUpdateStreamInput) DeleteProgressUpdateStreamRequest {
op := &aws.Operation{
Name: opDeleteProgressUpdateStream,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteProgressUpdateStreamInput{}
}
output := &DeleteProgressUpdateStreamOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteProgressUpdateStreamRequest{Request: req, Input: input, Copy: c.DeleteProgressUpdateStreamRequest}
}
const opDescribeApplicationState = "DescribeApplicationState"
// DescribeApplicationStateRequest is a API request type for the DescribeApplicationState API operation.
type DescribeApplicationStateRequest struct {
*aws.Request
Input *DescribeApplicationStateInput
Copy func(*DescribeApplicationStateInput) DescribeApplicationStateRequest
}
// Send marshals and sends the DescribeApplicationState API request.
func (r DescribeApplicationStateRequest) Send() (*DescribeApplicationStateOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeApplicationStateOutput), nil
}
// DescribeApplicationStateRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Gets the migration status of an application.
//
// // Example sending a request using the DescribeApplicationStateRequest method.
// req := client.DescribeApplicationStateRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeApplicationState
func (c *MigrationHub) DescribeApplicationStateRequest(input *DescribeApplicationStateInput) DescribeApplicationStateRequest {
op := &aws.Operation{
Name: opDescribeApplicationState,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeApplicationStateInput{}
}
output := &DescribeApplicationStateOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeApplicationStateRequest{Request: req, Input: input, Copy: c.DescribeApplicationStateRequest}
}
const opDescribeMigrationTask = "DescribeMigrationTask"
// DescribeMigrationTaskRequest is a API request type for the DescribeMigrationTask API operation.
type DescribeMigrationTaskRequest struct {
*aws.Request
Input *DescribeMigrationTaskInput
Copy func(*DescribeMigrationTaskInput) DescribeMigrationTaskRequest
}
// Send marshals and sends the DescribeMigrationTask API request.
func (r DescribeMigrationTaskRequest) Send() (*DescribeMigrationTaskOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeMigrationTaskOutput), nil
}
// DescribeMigrationTaskRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Retrieves a list of all attributes associated with a specific migration task.
//
// // Example sending a request using the DescribeMigrationTaskRequest method.
// req := client.DescribeMigrationTaskRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DescribeMigrationTask
func (c *MigrationHub) DescribeMigrationTaskRequest(input *DescribeMigrationTaskInput) DescribeMigrationTaskRequest {
op := &aws.Operation{
Name: opDescribeMigrationTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeMigrationTaskInput{}
}
output := &DescribeMigrationTaskOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeMigrationTaskRequest{Request: req, Input: input, Copy: c.DescribeMigrationTaskRequest}
}
const opDisassociateCreatedArtifact = "DisassociateCreatedArtifact"
// DisassociateCreatedArtifactRequest is a API request type for the DisassociateCreatedArtifact API operation.
type DisassociateCreatedArtifactRequest struct {
*aws.Request
Input *DisassociateCreatedArtifactInput
Copy func(*DisassociateCreatedArtifactInput) DisassociateCreatedArtifactRequest
}
// Send marshals and sends the DisassociateCreatedArtifact API request.
func (r DisassociateCreatedArtifactRequest) Send() (*DisassociateCreatedArtifactOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DisassociateCreatedArtifactOutput), nil
}
// DisassociateCreatedArtifactRequest returns a request value for making 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.
//
// // Example sending a request using the DisassociateCreatedArtifactRequest method.
// req := client.DisassociateCreatedArtifactRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateCreatedArtifact
func (c *MigrationHub) DisassociateCreatedArtifactRequest(input *DisassociateCreatedArtifactInput) DisassociateCreatedArtifactRequest {
op := &aws.Operation{
Name: opDisassociateCreatedArtifact,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateCreatedArtifactInput{}
}
output := &DisassociateCreatedArtifactOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DisassociateCreatedArtifactRequest{Request: req, Input: input, Copy: c.DisassociateCreatedArtifactRequest}
}
const opDisassociateDiscoveredResource = "DisassociateDiscoveredResource"
// DisassociateDiscoveredResourceRequest is a API request type for the DisassociateDiscoveredResource API operation.
type DisassociateDiscoveredResourceRequest struct {
*aws.Request
Input *DisassociateDiscoveredResourceInput
Copy func(*DisassociateDiscoveredResourceInput) DisassociateDiscoveredResourceRequest
}
// Send marshals and sends the DisassociateDiscoveredResource API request.
func (r DisassociateDiscoveredResourceRequest) Send() (*DisassociateDiscoveredResourceOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DisassociateDiscoveredResourceOutput), nil
}
// DisassociateDiscoveredResourceRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Disassociate an Application Discovery Service (ADS) discovered resource from
// a migration task.
//
// // Example sending a request using the DisassociateDiscoveredResourceRequest method.
// req := client.DisassociateDiscoveredResourceRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/DisassociateDiscoveredResource
func (c *MigrationHub) DisassociateDiscoveredResourceRequest(input *DisassociateDiscoveredResourceInput) DisassociateDiscoveredResourceRequest {
op := &aws.Operation{
Name: opDisassociateDiscoveredResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateDiscoveredResourceInput{}
}
output := &DisassociateDiscoveredResourceOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DisassociateDiscoveredResourceRequest{Request: req, Input: input, Copy: c.DisassociateDiscoveredResourceRequest}
}
const opImportMigrationTask = "ImportMigrationTask"
// ImportMigrationTaskRequest is a API request type for the ImportMigrationTask API operation.
type ImportMigrationTaskRequest struct {
*aws.Request
Input *ImportMigrationTaskInput
Copy func(*ImportMigrationTaskInput) ImportMigrationTaskRequest
}
// Send marshals and sends the ImportMigrationTask API request.
func (r ImportMigrationTaskRequest) Send() (*ImportMigrationTaskOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ImportMigrationTaskOutput), nil
}
// ImportMigrationTaskRequest returns a request value for making 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.
//
// // Example sending a request using the ImportMigrationTaskRequest method.
// req := client.ImportMigrationTaskRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ImportMigrationTask
func (c *MigrationHub) ImportMigrationTaskRequest(input *ImportMigrationTaskInput) ImportMigrationTaskRequest {
op := &aws.Operation{
Name: opImportMigrationTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ImportMigrationTaskInput{}
}
output := &ImportMigrationTaskOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ImportMigrationTaskRequest{Request: req, Input: input, Copy: c.ImportMigrationTaskRequest}
}
const opListCreatedArtifacts = "ListCreatedArtifacts"
// ListCreatedArtifactsRequest is a API request type for the ListCreatedArtifacts API operation.
type ListCreatedArtifactsRequest struct {
*aws.Request
Input *ListCreatedArtifactsInput
Copy func(*ListCreatedArtifactsInput) ListCreatedArtifactsRequest
}
// Send marshals and sends the ListCreatedArtifacts API request.
func (r ListCreatedArtifactsRequest) Send() (*ListCreatedArtifactsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListCreatedArtifactsOutput), nil
}
// ListCreatedArtifactsRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Lists the created artifacts attached to a given migration task in an update
// stream. This API has the following traits:
//
// * Gets the list of the created artifacts while migration is taking place.
//
// * Shows the artifacts created by the migration tool that was associated
// by the AssociateCreatedArtifact API.
//
// * Lists created artifacts in a paginated interface.
//
// // Example sending a request using the ListCreatedArtifactsRequest method.
// req := client.ListCreatedArtifactsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ListCreatedArtifacts
func (c *MigrationHub) ListCreatedArtifactsRequest(input *ListCreatedArtifactsInput) ListCreatedArtifactsRequest {
op := &aws.Operation{
Name: opListCreatedArtifacts,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListCreatedArtifactsInput{}
}
output := &ListCreatedArtifactsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListCreatedArtifactsRequest{Request: req, Input: input, Copy: c.ListCreatedArtifactsRequest}
}
const opListDiscoveredResources = "ListDiscoveredResources"
// ListDiscoveredResourcesRequest is a API request type for the ListDiscoveredResources API operation.
type ListDiscoveredResourcesRequest struct {
*aws.Request
Input *ListDiscoveredResourcesInput
Copy func(*ListDiscoveredResourcesInput) ListDiscoveredResourcesRequest
}
// Send marshals and sends the ListDiscoveredResources API request.
func (r ListDiscoveredResourcesRequest) Send() (*ListDiscoveredResourcesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListDiscoveredResourcesOutput), nil
}
// ListDiscoveredResourcesRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Lists discovered resources associated with the given MigrationTask.
//
// // Example sending a request using the ListDiscoveredResourcesRequest method.
// req := client.ListDiscoveredResourcesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ListDiscoveredResources
func (c *MigrationHub) ListDiscoveredResourcesRequest(input *ListDiscoveredResourcesInput) ListDiscoveredResourcesRequest {
op := &aws.Operation{
Name: opListDiscoveredResources,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListDiscoveredResourcesInput{}
}
output := &ListDiscoveredResourcesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListDiscoveredResourcesRequest{Request: req, Input: input, Copy: c.ListDiscoveredResourcesRequest}
}
const opListMigrationTasks = "ListMigrationTasks"
// ListMigrationTasksRequest is a API request type for the ListMigrationTasks API operation.
type ListMigrationTasksRequest struct {
*aws.Request
Input *ListMigrationTasksInput
Copy func(*ListMigrationTasksInput) ListMigrationTasksRequest
}
// Send marshals and sends the ListMigrationTasks API request.
func (r ListMigrationTasksRequest) Send() (*ListMigrationTasksOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListMigrationTasksOutput), nil
}
// ListMigrationTasksRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Lists all, or filtered by resource name, migration tasks associated with
// the user account making this call. This API has the following traits:
//
// * Can show a summary list of the most recent migration tasks.
//
// * Can show a summary list of migration tasks associated with a given discovered
// resource.
//
// * Lists migration tasks in a paginated interface.
//
// // Example sending a request using the ListMigrationTasksRequest method.
// req := client.ListMigrationTasksRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ListMigrationTasks
func (c *MigrationHub) ListMigrationTasksRequest(input *ListMigrationTasksInput) ListMigrationTasksRequest {
op := &aws.Operation{
Name: opListMigrationTasks,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListMigrationTasksInput{}
}
output := &ListMigrationTasksOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListMigrationTasksRequest{Request: req, Input: input, Copy: c.ListMigrationTasksRequest}
}
const opListProgressUpdateStreams = "ListProgressUpdateStreams"
// ListProgressUpdateStreamsRequest is a API request type for the ListProgressUpdateStreams API operation.
type ListProgressUpdateStreamsRequest struct {
*aws.Request
Input *ListProgressUpdateStreamsInput
Copy func(*ListProgressUpdateStreamsInput) ListProgressUpdateStreamsRequest
}
// Send marshals and sends the ListProgressUpdateStreams API request.
func (r ListProgressUpdateStreamsRequest) Send() (*ListProgressUpdateStreamsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListProgressUpdateStreamsOutput), nil
}
// ListProgressUpdateStreamsRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Lists progress update streams associated with the user account making this
// call.
//
// // Example sending a request using the ListProgressUpdateStreamsRequest method.
// req := client.ListProgressUpdateStreamsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/ListProgressUpdateStreams
func (c *MigrationHub) ListProgressUpdateStreamsRequest(input *ListProgressUpdateStreamsInput) ListProgressUpdateStreamsRequest {
op := &aws.Operation{
Name: opListProgressUpdateStreams,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListProgressUpdateStreamsInput{}
}
output := &ListProgressUpdateStreamsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListProgressUpdateStreamsRequest{Request: req, Input: input, Copy: c.ListProgressUpdateStreamsRequest}
}
const opNotifyApplicationState = "NotifyApplicationState"
// NotifyApplicationStateRequest is a API request type for the NotifyApplicationState API operation.
type NotifyApplicationStateRequest struct {
*aws.Request
Input *NotifyApplicationStateInput
Copy func(*NotifyApplicationStateInput) NotifyApplicationStateRequest
}
// Send marshals and sends the NotifyApplicationState API request.
func (r NotifyApplicationStateRequest) Send() (*NotifyApplicationStateOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*NotifyApplicationStateOutput), nil
}
// NotifyApplicationStateRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Sets the migration state of an application. For a given application identified
// by the value passed to ApplicationId, its status is set or updated by passing
// one of three values to Status: NOT_STARTED | IN_PROGRESS | COMPLETED.
//
// // Example sending a request using the NotifyApplicationStateRequest method.
// req := client.NotifyApplicationStateRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/NotifyApplicationState
func (c *MigrationHub) NotifyApplicationStateRequest(input *NotifyApplicationStateInput) NotifyApplicationStateRequest {
op := &aws.Operation{
Name: opNotifyApplicationState,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &NotifyApplicationStateInput{}
}
output := &NotifyApplicationStateOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return NotifyApplicationStateRequest{Request: req, Input: input, Copy: c.NotifyApplicationStateRequest}
}
const opNotifyMigrationTaskState = "NotifyMigrationTaskState"
// NotifyMigrationTaskStateRequest is a API request type for the NotifyMigrationTaskState API operation.
type NotifyMigrationTaskStateRequest struct {
*aws.Request
Input *NotifyMigrationTaskStateInput
Copy func(*NotifyMigrationTaskStateInput) NotifyMigrationTaskStateRequest
}
// Send marshals and sends the NotifyMigrationTaskState API request.
func (r NotifyMigrationTaskStateRequest) Send() (*NotifyMigrationTaskStateOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*NotifyMigrationTaskStateOutput), nil
}
// NotifyMigrationTaskStateRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Notifies Migration Hub of the current status, progress, or other detail regarding
// a migration task. This API has the following traits:
//
// * Migration tools will call the NotifyMigrationTaskState API to share
// the latest progress and status.
//
// * MigrationTaskName is used for addressing updates to the correct target.
//
// * ProgressUpdateStream is used for access control and to provide a namespace
// for each migration tool.
//
// // Example sending a request using the NotifyMigrationTaskStateRequest method.
// req := client.NotifyMigrationTaskStateRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/NotifyMigrationTaskState
func (c *MigrationHub) NotifyMigrationTaskStateRequest(input *NotifyMigrationTaskStateInput) NotifyMigrationTaskStateRequest {
op := &aws.Operation{
Name: opNotifyMigrationTaskState,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &NotifyMigrationTaskStateInput{}
}
output := &NotifyMigrationTaskStateOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return NotifyMigrationTaskStateRequest{Request: req, Input: input, Copy: c.NotifyMigrationTaskStateRequest}
}
const opPutResourceAttributes = "PutResourceAttributes"
// PutResourceAttributesRequest is a API request type for the PutResourceAttributes API operation.
type PutResourceAttributesRequest struct {
*aws.Request
Input *PutResourceAttributesInput
Copy func(*PutResourceAttributesInput) PutResourceAttributesRequest
}
// Send marshals and sends the PutResourceAttributes API request.
func (r PutResourceAttributesRequest) Send() (*PutResourceAttributesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*PutResourceAttributesOutput), nil
}
// PutResourceAttributesRequest returns a request value for making API operation for
// AWS Migration Hub.
//
// Provides identifying details of the resource being migrated so that it can
// be associated in the Application Discovery Service (ADS)'s repository. This
// association occurs asynchronously after PutResourceAttributes returns.
//
// Keep in mind that subsequent calls to PutResourceAttributes will override
// previously stored attributes. For example, if it is first called with a MAC
// address, but later, it is desired to add an IP address, it will then be required
// to call it with both the IP and MAC addresses to prevent overiding the MAC
// address.
//
// Note the instructions regarding the special use case of the ResourceAttributeList
// parameter when specifying any "VM" related value.
//
// Because this is an asynchronous call, it will always return 200, whether
// an association occurs or not. To confirm if an association was found based
// on the provided details, call ListDiscoveredResources.
//
// // Example sending a request using the PutResourceAttributesRequest method.
// req := client.PutResourceAttributesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/PutResourceAttributes
func (c *MigrationHub) PutResourceAttributesRequest(input *PutResourceAttributesInput) PutResourceAttributesRequest {
op := &aws.Operation{
Name: opPutResourceAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutResourceAttributesInput{}
}
output := &PutResourceAttributesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return PutResourceAttributesRequest{Request: req, Input: input, Copy: c.PutResourceAttributesRequest}
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifactRequest
type AssociateCreatedArtifactInput struct {
_ struct{} `type:"structure"`
// An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance,
// RDS instance, etc.)
//
// CreatedArtifact is a required field
CreatedArtifact *CreatedArtifact `type:"structure" required:"true"`
// Optional boolean flag to indicate whether any effect should take place. Used
// to test if the caller has permission to make the call.
DryRun *bool `type:"boolean"`
// Unique identifier that references the migration task.
//
// MigrationTaskName is a required field
MigrationTaskName *string `min:"1" type:"string" required:"true"`
// The name of the ProgressUpdateStream.
//
// ProgressUpdateStream is a required field
ProgressUpdateStream *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AssociateCreatedArtifactInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateCreatedArtifactInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AssociateCreatedArtifactInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AssociateCreatedArtifactInput"}
if s.CreatedArtifact == nil {
invalidParams.Add(aws.NewErrParamRequired("CreatedArtifact"))
}
if s.MigrationTaskName == nil {
invalidParams.Add(aws.NewErrParamRequired("MigrationTaskName"))
}
if s.MigrationTaskName != nil && len(*s.MigrationTaskName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("MigrationTaskName", 1))
}
if s.ProgressUpdateStream == nil {
invalidParams.Add(aws.NewErrParamRequired("ProgressUpdateStream"))
}
if s.ProgressUpdateStream != nil && len(*s.ProgressUpdateStream) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("ProgressUpdateStream", 1))
}
if s.CreatedArtifact != nil {
if err := s.CreatedArtifact.Validate(); err != nil {
invalidParams.AddNested("CreatedArtifact", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/AWSMigrationHub-2017-05-31/AssociateCreatedArtifactResult
type AssociateCreatedArtifactOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s AssociateCreatedArtifactOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateCreatedArtifactOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s AssociateCreatedArtifactOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata