forked from aws/aws-sdk-go-v2
/
api.go
1833 lines (1477 loc) · 55.2 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 sms
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opCreateReplicationJob = "CreateReplicationJob"
// CreateReplicationJobRequest is a API request type for the CreateReplicationJob API operation.
type CreateReplicationJobRequest struct {
*aws.Request
Input *CreateReplicationJobInput
Copy func(*CreateReplicationJobInput) CreateReplicationJobRequest
}
// Send marshals and sends the CreateReplicationJob API request.
func (r CreateReplicationJobRequest) Send() (*CreateReplicationJobOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateReplicationJobOutput), nil
}
// CreateReplicationJobRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The CreateReplicationJob API is used to create a ReplicationJob to replicate
// a server on AWS. Call this API to first create a ReplicationJob, which will
// then schedule periodic ReplicationRuns to replicate your server to AWS. Each
// ReplicationRun will result in the creation of an AWS AMI.
//
// // Example sending a request using the CreateReplicationJobRequest method.
// req := client.CreateReplicationJobRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/CreateReplicationJob
func (c *SMS) CreateReplicationJobRequest(input *CreateReplicationJobInput) CreateReplicationJobRequest {
op := &aws.Operation{
Name: opCreateReplicationJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateReplicationJobInput{}
}
output := &CreateReplicationJobOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateReplicationJobRequest{Request: req, Input: input, Copy: c.CreateReplicationJobRequest}
}
const opDeleteReplicationJob = "DeleteReplicationJob"
// DeleteReplicationJobRequest is a API request type for the DeleteReplicationJob API operation.
type DeleteReplicationJobRequest struct {
*aws.Request
Input *DeleteReplicationJobInput
Copy func(*DeleteReplicationJobInput) DeleteReplicationJobRequest
}
// Send marshals and sends the DeleteReplicationJob API request.
func (r DeleteReplicationJobRequest) Send() (*DeleteReplicationJobOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteReplicationJobOutput), nil
}
// DeleteReplicationJobRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The DeleteReplicationJob API is used to delete a ReplicationJob, resulting
// in no further ReplicationRuns. This will delete the contents of the S3 bucket
// used to store SMS artifacts, but will not delete any AMIs created by the
// SMS service.
//
// // Example sending a request using the DeleteReplicationJobRequest method.
// req := client.DeleteReplicationJobRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteReplicationJob
func (c *SMS) DeleteReplicationJobRequest(input *DeleteReplicationJobInput) DeleteReplicationJobRequest {
op := &aws.Operation{
Name: opDeleteReplicationJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteReplicationJobInput{}
}
output := &DeleteReplicationJobOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteReplicationJobRequest{Request: req, Input: input, Copy: c.DeleteReplicationJobRequest}
}
const opDeleteServerCatalog = "DeleteServerCatalog"
// DeleteServerCatalogRequest is a API request type for the DeleteServerCatalog API operation.
type DeleteServerCatalogRequest struct {
*aws.Request
Input *DeleteServerCatalogInput
Copy func(*DeleteServerCatalogInput) DeleteServerCatalogRequest
}
// Send marshals and sends the DeleteServerCatalog API request.
func (r DeleteServerCatalogRequest) Send() (*DeleteServerCatalogOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteServerCatalogOutput), nil
}
// DeleteServerCatalogRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The DeleteServerCatalog API clears all servers from your server catalog.
// This means that these servers will no longer be accessible to the Server
// Migration Service.
//
// // Example sending a request using the DeleteServerCatalogRequest method.
// req := client.DeleteServerCatalogRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteServerCatalog
func (c *SMS) DeleteServerCatalogRequest(input *DeleteServerCatalogInput) DeleteServerCatalogRequest {
op := &aws.Operation{
Name: opDeleteServerCatalog,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteServerCatalogInput{}
}
output := &DeleteServerCatalogOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteServerCatalogRequest{Request: req, Input: input, Copy: c.DeleteServerCatalogRequest}
}
const opDisassociateConnector = "DisassociateConnector"
// DisassociateConnectorRequest is a API request type for the DisassociateConnector API operation.
type DisassociateConnectorRequest struct {
*aws.Request
Input *DisassociateConnectorInput
Copy func(*DisassociateConnectorInput) DisassociateConnectorRequest
}
// Send marshals and sends the DisassociateConnector API request.
func (r DisassociateConnectorRequest) Send() (*DisassociateConnectorOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DisassociateConnectorOutput), nil
}
// DisassociateConnectorRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The DisassociateConnector API will disassociate a connector from the Server
// Migration Service, rendering it unavailable to support replication jobs.
//
// // Example sending a request using the DisassociateConnectorRequest method.
// req := client.DisassociateConnectorRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DisassociateConnector
func (c *SMS) DisassociateConnectorRequest(input *DisassociateConnectorInput) DisassociateConnectorRequest {
op := &aws.Operation{
Name: opDisassociateConnector,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateConnectorInput{}
}
output := &DisassociateConnectorOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DisassociateConnectorRequest{Request: req, Input: input, Copy: c.DisassociateConnectorRequest}
}
const opGetConnectors = "GetConnectors"
// GetConnectorsRequest is a API request type for the GetConnectors API operation.
type GetConnectorsRequest struct {
*aws.Request
Input *GetConnectorsInput
Copy func(*GetConnectorsInput) GetConnectorsRequest
}
// Send marshals and sends the GetConnectors API request.
func (r GetConnectorsRequest) Send() (*GetConnectorsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetConnectorsOutput), nil
}
// GetConnectorsRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The GetConnectors API returns a list of connectors that are registered with
// the Server Migration Service.
//
// // Example sending a request using the GetConnectorsRequest method.
// req := client.GetConnectorsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetConnectors
func (c *SMS) GetConnectorsRequest(input *GetConnectorsInput) GetConnectorsRequest {
op := &aws.Operation{
Name: opGetConnectors,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetConnectorsInput{}
}
output := &GetConnectorsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetConnectorsRequest{Request: req, Input: input, Copy: c.GetConnectorsRequest}
}
// Paginate pages iterates over the pages of a GetConnectorsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetConnectors operation.
// req := client.GetConnectorsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *GetConnectorsRequest) Paginate(opts ...aws.Option) GetConnectorsPager {
return GetConnectorsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *GetConnectorsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// GetConnectorsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type GetConnectorsPager struct {
aws.Pager
}
func (p *GetConnectorsPager) CurrentPage() *GetConnectorsOutput {
return p.Pager.CurrentPage().(*GetConnectorsOutput)
}
const opGetReplicationJobs = "GetReplicationJobs"
// GetReplicationJobsRequest is a API request type for the GetReplicationJobs API operation.
type GetReplicationJobsRequest struct {
*aws.Request
Input *GetReplicationJobsInput
Copy func(*GetReplicationJobsInput) GetReplicationJobsRequest
}
// Send marshals and sends the GetReplicationJobs API request.
func (r GetReplicationJobsRequest) Send() (*GetReplicationJobsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetReplicationJobsOutput), nil
}
// GetReplicationJobsRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The GetReplicationJobs API will return all of your ReplicationJobs and their
// details. This API returns a paginated list, that may be consecutively called
// with nextToken to retrieve all ReplicationJobs.
//
// // Example sending a request using the GetReplicationJobsRequest method.
// req := client.GetReplicationJobsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetReplicationJobs
func (c *SMS) GetReplicationJobsRequest(input *GetReplicationJobsInput) GetReplicationJobsRequest {
op := &aws.Operation{
Name: opGetReplicationJobs,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetReplicationJobsInput{}
}
output := &GetReplicationJobsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetReplicationJobsRequest{Request: req, Input: input, Copy: c.GetReplicationJobsRequest}
}
// Paginate pages iterates over the pages of a GetReplicationJobsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetReplicationJobs operation.
// req := client.GetReplicationJobsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *GetReplicationJobsRequest) Paginate(opts ...aws.Option) GetReplicationJobsPager {
return GetReplicationJobsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *GetReplicationJobsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// GetReplicationJobsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type GetReplicationJobsPager struct {
aws.Pager
}
func (p *GetReplicationJobsPager) CurrentPage() *GetReplicationJobsOutput {
return p.Pager.CurrentPage().(*GetReplicationJobsOutput)
}
const opGetReplicationRuns = "GetReplicationRuns"
// GetReplicationRunsRequest is a API request type for the GetReplicationRuns API operation.
type GetReplicationRunsRequest struct {
*aws.Request
Input *GetReplicationRunsInput
Copy func(*GetReplicationRunsInput) GetReplicationRunsRequest
}
// Send marshals and sends the GetReplicationRuns API request.
func (r GetReplicationRunsRequest) Send() (*GetReplicationRunsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetReplicationRunsOutput), nil
}
// GetReplicationRunsRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob.
// This API returns a paginated list, that may be consecutively called with
// nextToken to retrieve all ReplicationRuns for a ReplicationJob.
//
// // Example sending a request using the GetReplicationRunsRequest method.
// req := client.GetReplicationRunsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetReplicationRuns
func (c *SMS) GetReplicationRunsRequest(input *GetReplicationRunsInput) GetReplicationRunsRequest {
op := &aws.Operation{
Name: opGetReplicationRuns,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetReplicationRunsInput{}
}
output := &GetReplicationRunsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetReplicationRunsRequest{Request: req, Input: input, Copy: c.GetReplicationRunsRequest}
}
// Paginate pages iterates over the pages of a GetReplicationRunsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetReplicationRuns operation.
// req := client.GetReplicationRunsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *GetReplicationRunsRequest) Paginate(opts ...aws.Option) GetReplicationRunsPager {
return GetReplicationRunsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *GetReplicationRunsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// GetReplicationRunsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type GetReplicationRunsPager struct {
aws.Pager
}
func (p *GetReplicationRunsPager) CurrentPage() *GetReplicationRunsOutput {
return p.Pager.CurrentPage().(*GetReplicationRunsOutput)
}
const opGetServers = "GetServers"
// GetServersRequest is a API request type for the GetServers API operation.
type GetServersRequest struct {
*aws.Request
Input *GetServersInput
Copy func(*GetServersInput) GetServersRequest
}
// Send marshals and sends the GetServers API request.
func (r GetServersRequest) Send() (*GetServersOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetServersOutput), nil
}
// GetServersRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The GetServers API returns a list of all servers in your server catalog.
// For this call to succeed, you must previously have called ImportServerCatalog.
//
// // Example sending a request using the GetServersRequest method.
// req := client.GetServersRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/GetServers
func (c *SMS) GetServersRequest(input *GetServersInput) GetServersRequest {
op := &aws.Operation{
Name: opGetServers,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetServersInput{}
}
output := &GetServersOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetServersRequest{Request: req, Input: input, Copy: c.GetServersRequest}
}
// Paginate pages iterates over the pages of a GetServersRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetServers operation.
// req := client.GetServersRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *GetServersRequest) Paginate(opts ...aws.Option) GetServersPager {
return GetServersPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *GetServersInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// GetServersPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type GetServersPager struct {
aws.Pager
}
func (p *GetServersPager) CurrentPage() *GetServersOutput {
return p.Pager.CurrentPage().(*GetServersOutput)
}
const opImportServerCatalog = "ImportServerCatalog"
// ImportServerCatalogRequest is a API request type for the ImportServerCatalog API operation.
type ImportServerCatalogRequest struct {
*aws.Request
Input *ImportServerCatalogInput
Copy func(*ImportServerCatalogInput) ImportServerCatalogRequest
}
// Send marshals and sends the ImportServerCatalog API request.
func (r ImportServerCatalogRequest) Send() (*ImportServerCatalogOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ImportServerCatalogOutput), nil
}
// ImportServerCatalogRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The ImportServerCatalog API is used to gather the complete list of on-premises
// servers on your premises. This API call requires connectors to be installed
// and monitoring all servers you would like imported. This API call returns
// immediately, but may take some time to retrieve all of the servers.
//
// // Example sending a request using the ImportServerCatalogRequest method.
// req := client.ImportServerCatalogRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/ImportServerCatalog
func (c *SMS) ImportServerCatalogRequest(input *ImportServerCatalogInput) ImportServerCatalogRequest {
op := &aws.Operation{
Name: opImportServerCatalog,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ImportServerCatalogInput{}
}
output := &ImportServerCatalogOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ImportServerCatalogRequest{Request: req, Input: input, Copy: c.ImportServerCatalogRequest}
}
const opStartOnDemandReplicationRun = "StartOnDemandReplicationRun"
// StartOnDemandReplicationRunRequest is a API request type for the StartOnDemandReplicationRun API operation.
type StartOnDemandReplicationRunRequest struct {
*aws.Request
Input *StartOnDemandReplicationRunInput
Copy func(*StartOnDemandReplicationRunInput) StartOnDemandReplicationRunRequest
}
// Send marshals and sends the StartOnDemandReplicationRun API request.
func (r StartOnDemandReplicationRunRequest) Send() (*StartOnDemandReplicationRunOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*StartOnDemandReplicationRunOutput), nil
}
// StartOnDemandReplicationRunRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The StartOnDemandReplicationRun API is used to start a ReplicationRun on
// demand (in addition to those that are scheduled based on your frequency).
// This ReplicationRun will start immediately. StartOnDemandReplicationRun is
// subject to limits on how many on demand ReplicationRuns you may call per
// 24-hour period.
//
// // Example sending a request using the StartOnDemandReplicationRunRequest method.
// req := client.StartOnDemandReplicationRunRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/StartOnDemandReplicationRun
func (c *SMS) StartOnDemandReplicationRunRequest(input *StartOnDemandReplicationRunInput) StartOnDemandReplicationRunRequest {
op := &aws.Operation{
Name: opStartOnDemandReplicationRun,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &StartOnDemandReplicationRunInput{}
}
output := &StartOnDemandReplicationRunOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return StartOnDemandReplicationRunRequest{Request: req, Input: input, Copy: c.StartOnDemandReplicationRunRequest}
}
const opUpdateReplicationJob = "UpdateReplicationJob"
// UpdateReplicationJobRequest is a API request type for the UpdateReplicationJob API operation.
type UpdateReplicationJobRequest struct {
*aws.Request
Input *UpdateReplicationJobInput
Copy func(*UpdateReplicationJobInput) UpdateReplicationJobRequest
}
// Send marshals and sends the UpdateReplicationJob API request.
func (r UpdateReplicationJobRequest) Send() (*UpdateReplicationJobOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateReplicationJobOutput), nil
}
// UpdateReplicationJobRequest returns a request value for making API operation for
// AWS Server Migration Service.
//
// The UpdateReplicationJob API is used to change the settings of your existing
// ReplicationJob created using CreateReplicationJob. Calling this API will
// affect the next scheduled ReplicationRun.
//
// // Example sending a request using the UpdateReplicationJobRequest method.
// req := client.UpdateReplicationJobRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/UpdateReplicationJob
func (c *SMS) UpdateReplicationJobRequest(input *UpdateReplicationJobInput) UpdateReplicationJobRequest {
op := &aws.Operation{
Name: opUpdateReplicationJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateReplicationJobInput{}
}
output := &UpdateReplicationJobOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateReplicationJobRequest{Request: req, Input: input, Copy: c.UpdateReplicationJobRequest}
}
// Object representing a Connector
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/Connector
type Connector struct {
_ struct{} `type:"structure"`
// Timestamp of an operation
AssociatedOn *time.Time `locationName:"associatedOn" type:"timestamp" timestampFormat:"unix"`
// List of Connector Capabilities
CapabilityList []ConnectorCapability `locationName:"capabilityList" locationNameList:"item" type:"list"`
// Unique Identifier for Connector
ConnectorId *string `locationName:"connectorId" type:"string"`
// Internet Protocol (IP) Address
IpAddress *string `locationName:"ipAddress" type:"string"`
// Hardware (MAC) address
MacAddress *string `locationName:"macAddress" type:"string"`
// Status of on-premises Connector
Status ConnectorStatus `locationName:"status" type:"string" enum:"true"`
// Connector version string
Version *string `locationName:"version" type:"string"`
// Unique Identifier for VM Manager
VmManagerId *string `locationName:"vmManagerId" type:"string"`
// VM Manager Name
VmManagerName *string `locationName:"vmManagerName" type:"string"`
// VM Management Product
VmManagerType VmManagerType `locationName:"vmManagerType" type:"string" enum:"true"`
}
// String returns the string representation
func (s Connector) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Connector) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/CreateReplicationJobRequest
type CreateReplicationJobInput struct {
_ struct{} `type:"structure"`
// The description for a Replication Job/Run.
Description *string `locationName:"description" type:"string"`
// Interval between Replication Runs. This value is specified in hours, and
// represents the time between consecutive Replication Runs.
//
// Frequency is a required field
Frequency *int64 `locationName:"frequency" type:"integer" required:"true"`
// The license type to be used for the Amazon Machine Image (AMI) created after
// a successful ReplicationRun.
LicenseType LicenseType `locationName:"licenseType" type:"string" enum:"true"`
// Name of service role in customer's account to be used by SMS service.
RoleName *string `locationName:"roleName" type:"string"`
// Timestamp of an operation
//
// SeedReplicationTime is a required field
SeedReplicationTime *time.Time `locationName:"seedReplicationTime" type:"timestamp" timestampFormat:"unix" required:"true"`
// Unique Identifier for a server
//
// ServerId is a required field
ServerId *string `locationName:"serverId" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateReplicationJobInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateReplicationJobInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateReplicationJobInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateReplicationJobInput"}
if s.Frequency == nil {
invalidParams.Add(aws.NewErrParamRequired("Frequency"))
}
if s.SeedReplicationTime == nil {
invalidParams.Add(aws.NewErrParamRequired("SeedReplicationTime"))
}
if s.ServerId == nil {
invalidParams.Add(aws.NewErrParamRequired("ServerId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/CreateReplicationJobResponse
type CreateReplicationJobOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The unique identifier for a Replication Job.
ReplicationJobId *string `locationName:"replicationJobId" type:"string"`
}
// String returns the string representation
func (s CreateReplicationJobOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateReplicationJobOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s CreateReplicationJobOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteReplicationJobRequest
type DeleteReplicationJobInput struct {
_ struct{} `type:"structure"`
// The unique identifier for a Replication Job.
//
// ReplicationJobId is a required field
ReplicationJobId *string `locationName:"replicationJobId" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteReplicationJobInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteReplicationJobInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteReplicationJobInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DeleteReplicationJobInput"}
if s.ReplicationJobId == nil {
invalidParams.Add(aws.NewErrParamRequired("ReplicationJobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteReplicationJobResponse
type DeleteReplicationJobOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeleteReplicationJobOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteReplicationJobOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteReplicationJobOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteServerCatalogRequest
type DeleteServerCatalogInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteServerCatalogInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteServerCatalogInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sms-2016-10-24/DeleteServerCatalogResponse
type DeleteServerCatalogOutput struct {