forked from aws/aws-sdk-go-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
2573 lines (2121 loc) · 84.8 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 opsworkscm
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opAssociateNode = "AssociateNode"
// AssociateNodeRequest is a API request type for the AssociateNode API operation.
type AssociateNodeRequest struct {
*aws.Request
Input *AssociateNodeInput
Copy func(*AssociateNodeInput) AssociateNodeRequest
}
// Send marshals and sends the AssociateNode API request.
func (r AssociateNodeRequest) Send() (*AssociateNodeOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AssociateNodeOutput), nil
}
// AssociateNodeRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Associates a new node with the server. For more information about how to
// disassociate a node, see DisassociateNode.
//
// On a Chef server: This command is an alternative to knife bootstrap.
//
// Example (Chef): aws opsworks-cm associate-node --server-name MyServer --node-name
// MyManagedNode --engine-attributes "Name=CHEF_ORGANIZATION,Value=default"
// "Name=CHEF_NODE_PUBLIC_KEY,Value=public-key-pem"
//
// On a Puppet server, this command is an alternative to the puppet cert sign
// command that signs a Puppet node CSR.
//
// Example (Chef): aws opsworks-cm associate-node --server-name MyServer --node-name
// MyManagedNode --engine-attributes "Name=PUPPET_NODE_CSR,Value=csr-pem"
//
// A node can can only be associated with servers that are in a HEALTHY state.
// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException
// is thrown when the server does not exist. A ValidationException is raised
// when parameters of the request are not valid. The AssociateNode API call
// can be integrated into Auto Scaling configurations, AWS Cloudformation templates,
// or the user data of a server's instance.
//
// // Example sending a request using the AssociateNodeRequest method.
// req := client.AssociateNodeRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/AssociateNode
func (c *OpsWorksCM) AssociateNodeRequest(input *AssociateNodeInput) AssociateNodeRequest {
op := &aws.Operation{
Name: opAssociateNode,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateNodeInput{}
}
output := &AssociateNodeOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return AssociateNodeRequest{Request: req, Input: input, Copy: c.AssociateNodeRequest}
}
const opCreateBackup = "CreateBackup"
// CreateBackupRequest is a API request type for the CreateBackup API operation.
type CreateBackupRequest struct {
*aws.Request
Input *CreateBackupInput
Copy func(*CreateBackupInput) CreateBackupRequest
}
// Send marshals and sends the CreateBackup API request.
func (r CreateBackupRequest) Send() (*CreateBackupOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateBackupOutput), nil
}
// CreateBackupRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Creates an application-level backup of a server. While the server is in the
// BACKING_UP state, the server cannot be changed, and no additional backup
// can be created.
//
// Backups can be created for servers in RUNNING, HEALTHY, and UNHEALTHY states.
// By default, you can create a maximum of 50 manual backups.
//
// This operation is asynchronous.
//
// A LimitExceededException is thrown when the maximum number of manual backups
// is reached. An InvalidStateException is thrown when the server is not in
// any of the following states: RUNNING, HEALTHY, or UNHEALTHY. A ResourceNotFoundException
// is thrown when the server is not found. A ValidationException is thrown when
// parameters of the request are not valid.
//
// // Example sending a request using the CreateBackupRequest method.
// req := client.CreateBackupRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateBackup
func (c *OpsWorksCM) CreateBackupRequest(input *CreateBackupInput) CreateBackupRequest {
op := &aws.Operation{
Name: opCreateBackup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateBackupInput{}
}
output := &CreateBackupOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateBackupRequest{Request: req, Input: input, Copy: c.CreateBackupRequest}
}
const opCreateServer = "CreateServer"
// CreateServerRequest is a API request type for the CreateServer API operation.
type CreateServerRequest struct {
*aws.Request
Input *CreateServerInput
Copy func(*CreateServerInput) CreateServerRequest
}
// Send marshals and sends the CreateServer API request.
func (r CreateServerRequest) Send() (*CreateServerOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateServerOutput), nil
}
// CreateServerRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Creates and immedately starts a new server. The server is ready to use when
// it is in the HEALTHY state. By default, you can create a maximum of 10 servers.
//
// This operation is asynchronous.
//
// A LimitExceededException is thrown when you have created the maximum number
// of servers (10). A ResourceAlreadyExistsException is thrown when a server
// with the same name already exists in the account. A ResourceNotFoundException
// is thrown when you specify a backup ID that is not valid or is for a backup
// that does not exist. A ValidationException is thrown when parameters of the
// request are not valid.
//
// If you do not specify a security group by adding the SecurityGroupIds parameter,
// AWS OpsWorks creates a new security group.
//
// Chef Automate: The default security group opens the Chef server to the world
// on TCP port 443. If a KeyName is present, AWS OpsWorks enables SSH access.
// SSH is also open to the world on TCP port 22.
//
// Puppet Enterprise: The default security group opens TCP ports 22, 443, 4433,
// 8140, 8142, 8143, and 8170. If a KeyName is present, AWS OpsWorks enables
// SSH access. SSH is also open to the world on TCP port 22.
//
// By default, your server is accessible from any IP address. We recommend that
// you update your security group rules to allow access from known IP addresses
// and address ranges only. To edit security group rules, open Security Groups
// in the navigation pane of the EC2 management console.
//
// // Example sending a request using the CreateServerRequest method.
// req := client.CreateServerRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateServer
func (c *OpsWorksCM) CreateServerRequest(input *CreateServerInput) CreateServerRequest {
op := &aws.Operation{
Name: opCreateServer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateServerInput{}
}
output := &CreateServerOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateServerRequest{Request: req, Input: input, Copy: c.CreateServerRequest}
}
const opDeleteBackup = "DeleteBackup"
// DeleteBackupRequest is a API request type for the DeleteBackup API operation.
type DeleteBackupRequest struct {
*aws.Request
Input *DeleteBackupInput
Copy func(*DeleteBackupInput) DeleteBackupRequest
}
// Send marshals and sends the DeleteBackup API request.
func (r DeleteBackupRequest) Send() (*DeleteBackupOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteBackupOutput), nil
}
// DeleteBackupRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Deletes a backup. You can delete both manual and automated backups. This
// operation is asynchronous.
//
// An InvalidStateException is thrown when a backup deletion is already in progress.
// A ResourceNotFoundException is thrown when the backup does not exist. A ValidationException
// is thrown when parameters of the request are not valid.
//
// // Example sending a request using the DeleteBackupRequest method.
// req := client.DeleteBackupRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteBackup
func (c *OpsWorksCM) DeleteBackupRequest(input *DeleteBackupInput) DeleteBackupRequest {
op := &aws.Operation{
Name: opDeleteBackup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBackupInput{}
}
output := &DeleteBackupOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteBackupRequest{Request: req, Input: input, Copy: c.DeleteBackupRequest}
}
const opDeleteServer = "DeleteServer"
// DeleteServerRequest is a API request type for the DeleteServer API operation.
type DeleteServerRequest struct {
*aws.Request
Input *DeleteServerInput
Copy func(*DeleteServerInput) DeleteServerRequest
}
// Send marshals and sends the DeleteServer API request.
func (r DeleteServerRequest) Send() (*DeleteServerOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteServerOutput), nil
}
// DeleteServerRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Deletes the server and the underlying AWS CloudFormation stacks (including
// the server's EC2 instance). When you run this command, the server state is
// updated to DELETING. After the server is deleted, it is no longer returned
// by DescribeServer requests. If the AWS CloudFormation stack cannot be deleted,
// the server cannot be deleted.
//
// This operation is asynchronous.
//
// An InvalidStateException is thrown when a server deletion is already in progress.
// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException
// is raised when parameters of the request are not valid.
//
// // Example sending a request using the DeleteServerRequest method.
// req := client.DeleteServerRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteServer
func (c *OpsWorksCM) DeleteServerRequest(input *DeleteServerInput) DeleteServerRequest {
op := &aws.Operation{
Name: opDeleteServer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteServerInput{}
}
output := &DeleteServerOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteServerRequest{Request: req, Input: input, Copy: c.DeleteServerRequest}
}
const opDescribeAccountAttributes = "DescribeAccountAttributes"
// DescribeAccountAttributesRequest is a API request type for the DescribeAccountAttributes API operation.
type DescribeAccountAttributesRequest struct {
*aws.Request
Input *DescribeAccountAttributesInput
Copy func(*DescribeAccountAttributesInput) DescribeAccountAttributesRequest
}
// Send marshals and sends the DescribeAccountAttributes API request.
func (r DescribeAccountAttributesRequest) Send() (*DescribeAccountAttributesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeAccountAttributesOutput), nil
}
// DescribeAccountAttributesRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Describes your account attributes, and creates requests to increase limits
// before they are reached or exceeded.
//
// This operation is synchronous.
//
// // Example sending a request using the DescribeAccountAttributesRequest method.
// req := client.DescribeAccountAttributesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeAccountAttributes
func (c *OpsWorksCM) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) DescribeAccountAttributesRequest {
op := &aws.Operation{
Name: opDescribeAccountAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAccountAttributesInput{}
}
output := &DescribeAccountAttributesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeAccountAttributesRequest{Request: req, Input: input, Copy: c.DescribeAccountAttributesRequest}
}
const opDescribeBackups = "DescribeBackups"
// DescribeBackupsRequest is a API request type for the DescribeBackups API operation.
type DescribeBackupsRequest struct {
*aws.Request
Input *DescribeBackupsInput
Copy func(*DescribeBackupsInput) DescribeBackupsRequest
}
// Send marshals and sends the DescribeBackups API request.
func (r DescribeBackupsRequest) Send() (*DescribeBackupsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeBackupsOutput), nil
}
// DescribeBackupsRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Describes backups. The results are ordered by time, with newest backups first.
// If you do not specify a BackupId or ServerName, the command returns all backups.
//
// This operation is synchronous.
//
// A ResourceNotFoundException is thrown when the backup does not exist. A ValidationException
// is raised when parameters of the request are not valid.
//
// // Example sending a request using the DescribeBackupsRequest method.
// req := client.DescribeBackupsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeBackups
func (c *OpsWorksCM) DescribeBackupsRequest(input *DescribeBackupsInput) DescribeBackupsRequest {
op := &aws.Operation{
Name: opDescribeBackups,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeBackupsInput{}
}
output := &DescribeBackupsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeBackupsRequest{Request: req, Input: input, Copy: c.DescribeBackupsRequest}
}
const opDescribeEvents = "DescribeEvents"
// DescribeEventsRequest is a API request type for the DescribeEvents API operation.
type DescribeEventsRequest struct {
*aws.Request
Input *DescribeEventsInput
Copy func(*DescribeEventsInput) DescribeEventsRequest
}
// Send marshals and sends the DescribeEvents API request.
func (r DescribeEventsRequest) Send() (*DescribeEventsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeEventsOutput), nil
}
// DescribeEventsRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Describes events for a specified server. Results are ordered by time, with
// newest events first.
//
// This operation is synchronous.
//
// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException
// is raised when parameters of the request are not valid.
//
// // Example sending a request using the DescribeEventsRequest method.
// req := client.DescribeEventsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeEvents
func (c *OpsWorksCM) DescribeEventsRequest(input *DescribeEventsInput) DescribeEventsRequest {
op := &aws.Operation{
Name: opDescribeEvents,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEventsInput{}
}
output := &DescribeEventsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeEventsRequest{Request: req, Input: input, Copy: c.DescribeEventsRequest}
}
const opDescribeNodeAssociationStatus = "DescribeNodeAssociationStatus"
// DescribeNodeAssociationStatusRequest is a API request type for the DescribeNodeAssociationStatus API operation.
type DescribeNodeAssociationStatusRequest struct {
*aws.Request
Input *DescribeNodeAssociationStatusInput
Copy func(*DescribeNodeAssociationStatusInput) DescribeNodeAssociationStatusRequest
}
// Send marshals and sends the DescribeNodeAssociationStatus API request.
func (r DescribeNodeAssociationStatusRequest) Send() (*DescribeNodeAssociationStatusOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeNodeAssociationStatusOutput), nil
}
// DescribeNodeAssociationStatusRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Returns the current status of an existing association or disassociation request.
//
// A ResourceNotFoundException is thrown when no recent association or disassociation
// request with the specified token is found, or when the server does not exist.
// A ValidationException is raised when parameters of the request are not valid.
//
// // Example sending a request using the DescribeNodeAssociationStatusRequest method.
// req := client.DescribeNodeAssociationStatusRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeNodeAssociationStatus
func (c *OpsWorksCM) DescribeNodeAssociationStatusRequest(input *DescribeNodeAssociationStatusInput) DescribeNodeAssociationStatusRequest {
op := &aws.Operation{
Name: opDescribeNodeAssociationStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeNodeAssociationStatusInput{}
}
output := &DescribeNodeAssociationStatusOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeNodeAssociationStatusRequest{Request: req, Input: input, Copy: c.DescribeNodeAssociationStatusRequest}
}
const opDescribeServers = "DescribeServers"
// DescribeServersRequest is a API request type for the DescribeServers API operation.
type DescribeServersRequest struct {
*aws.Request
Input *DescribeServersInput
Copy func(*DescribeServersInput) DescribeServersRequest
}
// Send marshals and sends the DescribeServers API request.
func (r DescribeServersRequest) Send() (*DescribeServersOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeServersOutput), nil
}
// DescribeServersRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Lists all configuration management servers that are identified with your
// account. Only the stored results from Amazon DynamoDB are returned. AWS OpsWorks
// CM does not query other services.
//
// This operation is synchronous.
//
// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException
// is raised when parameters of the request are not valid.
//
// // Example sending a request using the DescribeServersRequest method.
// req := client.DescribeServersRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeServers
func (c *OpsWorksCM) DescribeServersRequest(input *DescribeServersInput) DescribeServersRequest {
op := &aws.Operation{
Name: opDescribeServers,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeServersInput{}
}
output := &DescribeServersOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeServersRequest{Request: req, Input: input, Copy: c.DescribeServersRequest}
}
const opDisassociateNode = "DisassociateNode"
// DisassociateNodeRequest is a API request type for the DisassociateNode API operation.
type DisassociateNodeRequest struct {
*aws.Request
Input *DisassociateNodeInput
Copy func(*DisassociateNodeInput) DisassociateNodeRequest
}
// Send marshals and sends the DisassociateNode API request.
func (r DisassociateNodeRequest) Send() (*DisassociateNodeOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DisassociateNodeOutput), nil
}
// DisassociateNodeRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Disassociates a node from an AWS OpsWorks CM server, and removes the node
// from the server's managed nodes. After a node is disassociated, the node
// key pair is no longer valid for accessing the configuration manager's API.
// For more information about how to associate a node, see AssociateNode.
//
// A node can can only be disassociated from a server that is in a HEALTHY state.
// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException
// is thrown when the server does not exist. A ValidationException is raised
// when parameters of the request are not valid.
//
// // Example sending a request using the DisassociateNodeRequest method.
// req := client.DisassociateNodeRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DisassociateNode
func (c *OpsWorksCM) DisassociateNodeRequest(input *DisassociateNodeInput) DisassociateNodeRequest {
op := &aws.Operation{
Name: opDisassociateNode,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateNodeInput{}
}
output := &DisassociateNodeOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DisassociateNodeRequest{Request: req, Input: input, Copy: c.DisassociateNodeRequest}
}
const opRestoreServer = "RestoreServer"
// RestoreServerRequest is a API request type for the RestoreServer API operation.
type RestoreServerRequest struct {
*aws.Request
Input *RestoreServerInput
Copy func(*RestoreServerInput) RestoreServerRequest
}
// Send marshals and sends the RestoreServer API request.
func (r RestoreServerRequest) Send() (*RestoreServerOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*RestoreServerOutput), nil
}
// RestoreServerRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Restores a backup to a server that is in a CONNECTION_LOST, HEALTHY, RUNNING,
// UNHEALTHY, or TERMINATED state. When you run RestoreServer, the server's
// EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer
// maintains the existing server endpoint, so configuration management of the
// server's client devices (nodes) should continue to work.
//
// This operation is asynchronous.
//
// An InvalidStateException is thrown when the server is not in a valid state.
// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException
// is raised when parameters of the request are not valid.
//
// // Example sending a request using the RestoreServerRequest method.
// req := client.RestoreServerRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/RestoreServer
func (c *OpsWorksCM) RestoreServerRequest(input *RestoreServerInput) RestoreServerRequest {
op := &aws.Operation{
Name: opRestoreServer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RestoreServerInput{}
}
output := &RestoreServerOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return RestoreServerRequest{Request: req, Input: input, Copy: c.RestoreServerRequest}
}
const opStartMaintenance = "StartMaintenance"
// StartMaintenanceRequest is a API request type for the StartMaintenance API operation.
type StartMaintenanceRequest struct {
*aws.Request
Input *StartMaintenanceInput
Copy func(*StartMaintenanceInput) StartMaintenanceRequest
}
// Send marshals and sends the StartMaintenance API request.
func (r StartMaintenanceRequest) Send() (*StartMaintenanceOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*StartMaintenanceOutput), nil
}
// StartMaintenanceRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Manually starts server maintenance. This command can be useful if an earlier
// maintenance attempt failed, and the underlying cause of maintenance failure
// has been resolved. The server is in an UNDER_MAINTENANCE state while maintenance
// is in progress.
//
// Maintenance can only be started on servers in HEALTHY and UNHEALTHY states.
// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException
// is thrown when the server does not exist. A ValidationException is raised
// when parameters of the request are not valid.
//
// // Example sending a request using the StartMaintenanceRequest method.
// req := client.StartMaintenanceRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/StartMaintenance
func (c *OpsWorksCM) StartMaintenanceRequest(input *StartMaintenanceInput) StartMaintenanceRequest {
op := &aws.Operation{
Name: opStartMaintenance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &StartMaintenanceInput{}
}
output := &StartMaintenanceOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return StartMaintenanceRequest{Request: req, Input: input, Copy: c.StartMaintenanceRequest}
}
const opUpdateServer = "UpdateServer"
// UpdateServerRequest is a API request type for the UpdateServer API operation.
type UpdateServerRequest struct {
*aws.Request
Input *UpdateServerInput
Copy func(*UpdateServerInput) UpdateServerRequest
}
// Send marshals and sends the UpdateServer API request.
func (r UpdateServerRequest) Send() (*UpdateServerOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateServerOutput), nil
}
// UpdateServerRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Updates settings for a server.
//
// This operation is synchronous.
//
// // Example sending a request using the UpdateServerRequest method.
// req := client.UpdateServerRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServer
func (c *OpsWorksCM) UpdateServerRequest(input *UpdateServerInput) UpdateServerRequest {
op := &aws.Operation{
Name: opUpdateServer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateServerInput{}
}
output := &UpdateServerOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateServerRequest{Request: req, Input: input, Copy: c.UpdateServerRequest}
}
const opUpdateServerEngineAttributes = "UpdateServerEngineAttributes"
// UpdateServerEngineAttributesRequest is a API request type for the UpdateServerEngineAttributes API operation.
type UpdateServerEngineAttributesRequest struct {
*aws.Request
Input *UpdateServerEngineAttributesInput
Copy func(*UpdateServerEngineAttributesInput) UpdateServerEngineAttributesRequest
}
// Send marshals and sends the UpdateServerEngineAttributes API request.
func (r UpdateServerEngineAttributesRequest) Send() (*UpdateServerEngineAttributesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateServerEngineAttributesOutput), nil
}
// UpdateServerEngineAttributesRequest returns a request value for making API operation for
// AWS OpsWorks for Chef Automate.
//
// Updates engine-specific attributes on a specified server. The server enters
// the MODIFYING state when this operation is in progress. Only one update can
// occur at a time. You can use this command to reset a Chef server's private
// key (CHEF_PIVOTAL_KEY), a Chef server's admin password (CHEF_DELIVERY_ADMIN_PASSWORD),
// or a Puppet server's admin password (PUPPET_ADMIN_PASSWORD).
//
// This operation is asynchronous.
//
// This operation can only be called for servers in HEALTHY or UNHEALTHY states.
// Otherwise, an InvalidStateException is raised. A ResourceNotFoundException
// is thrown when the server does not exist. A ValidationException is raised
// when parameters of the request are not valid.
//
// // Example sending a request using the UpdateServerEngineAttributesRequest method.
// req := client.UpdateServerEngineAttributesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServerEngineAttributes
func (c *OpsWorksCM) UpdateServerEngineAttributesRequest(input *UpdateServerEngineAttributesInput) UpdateServerEngineAttributesRequest {
op := &aws.Operation{
Name: opUpdateServerEngineAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateServerEngineAttributesInput{}
}
output := &UpdateServerEngineAttributesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateServerEngineAttributesRequest{Request: req, Input: input, Copy: c.UpdateServerEngineAttributesRequest}
}
// Stores account attributes.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/AccountAttribute
type AccountAttribute struct {
_ struct{} `type:"structure"`
// The maximum allowed value.
Maximum *int64 `type:"integer"`
// The attribute name. The following are supported attribute names.
//
// * ServerLimit: The number of current servers/maximum number of servers
// allowed. By default, you can have a maximum of 10 servers.
//
// * ManualBackupLimit: The number of current manual backups/maximum number
// of backups allowed. By default, you can have a maximum of 50 manual backups
// saved.
Name *string `type:"string"`
// The current usage, such as the current number of servers that are associated
// with the account.
Used *int64 `type:"integer"`
}
// String returns the string representation
func (s AccountAttribute) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccountAttribute) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/AssociateNodeRequest
type AssociateNodeInput struct {
_ struct{} `type:"structure"`
// Engine attributes used for associating the node.
//
// Attributes accepted in a AssociateNode request for Chef
//
// * CHEF_ORGANIZATION: The Chef organization with which the node is associated.
// By default only one organization named default can exist.
//
// * CHEF_NODE_PUBLIC_KEY: A PEM-formatted public key. This key is required
// for the chef-client agent to access the Chef API.
//
// Attributes accepted in a AssociateNode request for Puppet
//
// * PUPPET_NODE_CSR: A PEM-formatted certificate-signing request (CSR) that
// is created by the node.
//
// EngineAttributes is a required field
EngineAttributes []EngineAttribute `type:"list" required:"true"`
// The name of the node.
//
// NodeName is a required field
NodeName *string `type:"string" required:"true"`
// The name of the server with which to associate the node.
//
// ServerName is a required field
ServerName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AssociateNodeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateNodeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AssociateNodeInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AssociateNodeInput"}
if s.EngineAttributes == nil {
invalidParams.Add(aws.NewErrParamRequired("EngineAttributes"))
}
if s.NodeName == nil {
invalidParams.Add(aws.NewErrParamRequired("NodeName"))
}
if s.ServerName == nil {
invalidParams.Add(aws.NewErrParamRequired("ServerName"))
}
if s.ServerName != nil && len(*s.ServerName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("ServerName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}