forked from aws/amazon-ecs-agent
/
api.go
1806 lines (1423 loc) · 63 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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package ecs provides a client for Amazon EC2 Container Service.
package ecs
import (
"sync"
"github.com/awslabs/aws-sdk-go/aws"
)
var oprw sync.Mutex
// CreateClusterRequest generates a request for the CreateCluster operation.
func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *aws.Request, output *CreateClusterOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateCluster == nil {
opCreateCluster = &aws.Operation{
Name: "CreateCluster",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opCreateCluster, input, output)
output = &CreateClusterOutput{}
req.Data = output
return
}
// Creates a new Amazon ECS cluster. By default, your account will receive a
// default cluster when you launch your first container instance. However, you
// can create your own cluster with a unique name with the CreateCluster action.
//
// During the preview, each account is limited to two clusters.
func (c *ECS) CreateCluster(input *CreateClusterInput) (output *CreateClusterOutput, err error) {
req, out := c.CreateClusterRequest(input)
output = out
err = req.Send()
return
}
var opCreateCluster *aws.Operation
// DeleteClusterRequest generates a request for the DeleteCluster operation.
func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *aws.Request, output *DeleteClusterOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteCluster == nil {
opDeleteCluster = &aws.Operation{
Name: "DeleteCluster",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDeleteCluster, input, output)
output = &DeleteClusterOutput{}
req.Data = output
return
}
// Deletes the specified cluster. You must deregister all container instances
// from this cluster before you may delete it. You can list the container instances
// in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
func (c *ECS) DeleteCluster(input *DeleteClusterInput) (output *DeleteClusterOutput, err error) {
req, out := c.DeleteClusterRequest(input)
output = out
err = req.Send()
return
}
var opDeleteCluster *aws.Operation
// DeregisterContainerInstanceRequest generates a request for the DeregisterContainerInstance operation.
func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInstanceInput) (req *aws.Request, output *DeregisterContainerInstanceOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeregisterContainerInstance == nil {
opDeregisterContainerInstance = &aws.Operation{
Name: "DeregisterContainerInstance",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDeregisterContainerInstance, input, output)
output = &DeregisterContainerInstanceOutput{}
req.Data = output
return
}
// Deregisters an Amazon ECS container instance from the specified cluster.
// This instance will no longer be available to run tasks.
func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (output *DeregisterContainerInstanceOutput, err error) {
req, out := c.DeregisterContainerInstanceRequest(input)
output = out
err = req.Send()
return
}
var opDeregisterContainerInstance *aws.Operation
// DeregisterTaskDefinitionRequest generates a request for the DeregisterTaskDefinition operation.
func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInput) (req *aws.Request, output *DeregisterTaskDefinitionOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeregisterTaskDefinition == nil {
opDeregisterTaskDefinition = &aws.Operation{
Name: "DeregisterTaskDefinition",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDeregisterTaskDefinition, input, output)
output = &DeregisterTaskDefinitionOutput{}
req.Data = output
return
}
// NOT YET IMPLEMENTED.
//
// Deregisters the specified task definition. You will no longer be able to
// run tasks from this definition after deregistration.
func (c *ECS) DeregisterTaskDefinition(input *DeregisterTaskDefinitionInput) (output *DeregisterTaskDefinitionOutput, err error) {
req, out := c.DeregisterTaskDefinitionRequest(input)
output = out
err = req.Send()
return
}
var opDeregisterTaskDefinition *aws.Operation
// DescribeClustersRequest generates a request for the DescribeClusters operation.
func (c *ECS) DescribeClustersRequest(input *DescribeClustersInput) (req *aws.Request, output *DescribeClustersOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeClusters == nil {
opDescribeClusters = &aws.Operation{
Name: "DescribeClusters",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDescribeClusters, input, output)
output = &DescribeClustersOutput{}
req.Data = output
return
}
// Describes one or more of your clusters.
func (c *ECS) DescribeClusters(input *DescribeClustersInput) (output *DescribeClustersOutput, err error) {
req, out := c.DescribeClustersRequest(input)
output = out
err = req.Send()
return
}
var opDescribeClusters *aws.Operation
// DescribeContainerInstancesRequest generates a request for the DescribeContainerInstances operation.
func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstancesInput) (req *aws.Request, output *DescribeContainerInstancesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeContainerInstances == nil {
opDescribeContainerInstances = &aws.Operation{
Name: "DescribeContainerInstances",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDescribeContainerInstances, input, output)
output = &DescribeContainerInstancesOutput{}
req.Data = output
return
}
// Describes Amazon EC2 Container Service container instances. Returns metadata
// about registered and remaining resources on each container instance requested.
func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (output *DescribeContainerInstancesOutput, err error) {
req, out := c.DescribeContainerInstancesRequest(input)
output = out
err = req.Send()
return
}
var opDescribeContainerInstances *aws.Operation
// DescribeTaskDefinitionRequest generates a request for the DescribeTaskDefinition operation.
func (c *ECS) DescribeTaskDefinitionRequest(input *DescribeTaskDefinitionInput) (req *aws.Request, output *DescribeTaskDefinitionOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeTaskDefinition == nil {
opDescribeTaskDefinition = &aws.Operation{
Name: "DescribeTaskDefinition",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDescribeTaskDefinition, input, output)
output = &DescribeTaskDefinitionOutput{}
req.Data = output
return
}
// Describes a task definition. You can specify a family and revision to find
// information on a specific task definition, or you can simply specify the
// family to find the latest revision in that family.
func (c *ECS) DescribeTaskDefinition(input *DescribeTaskDefinitionInput) (output *DescribeTaskDefinitionOutput, err error) {
req, out := c.DescribeTaskDefinitionRequest(input)
output = out
err = req.Send()
return
}
var opDescribeTaskDefinition *aws.Operation
// DescribeTasksRequest generates a request for the DescribeTasks operation.
func (c *ECS) DescribeTasksRequest(input *DescribeTasksInput) (req *aws.Request, output *DescribeTasksOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeTasks == nil {
opDescribeTasks = &aws.Operation{
Name: "DescribeTasks",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDescribeTasks, input, output)
output = &DescribeTasksOutput{}
req.Data = output
return
}
// Describes a specified task or tasks.
func (c *ECS) DescribeTasks(input *DescribeTasksInput) (output *DescribeTasksOutput, err error) {
req, out := c.DescribeTasksRequest(input)
output = out
err = req.Send()
return
}
var opDescribeTasks *aws.Operation
// DiscoverPollEndpointRequest generates a request for the DiscoverPollEndpoint operation.
func (c *ECS) DiscoverPollEndpointRequest(input *DiscoverPollEndpointInput) (req *aws.Request, output *DiscoverPollEndpointOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDiscoverPollEndpoint == nil {
opDiscoverPollEndpoint = &aws.Operation{
Name: "DiscoverPollEndpoint",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opDiscoverPollEndpoint, input, output)
output = &DiscoverPollEndpointOutput{}
req.Data = output
return
}
// This action is only used by the Amazon EC2 Container Service agent, and it
// is not intended for use outside of the agent.
//
// Returns an endpoint for the Amazon EC2 Container Service agent to poll for
// updates.
func (c *ECS) DiscoverPollEndpoint(input *DiscoverPollEndpointInput) (output *DiscoverPollEndpointOutput, err error) {
req, out := c.DiscoverPollEndpointRequest(input)
output = out
err = req.Send()
return
}
var opDiscoverPollEndpoint *aws.Operation
// ListClustersRequest generates a request for the ListClusters operation.
func (c *ECS) ListClustersRequest(input *ListClustersInput) (req *aws.Request, output *ListClustersOutput) {
oprw.Lock()
defer oprw.Unlock()
if opListClusters == nil {
opListClusters = &aws.Operation{
Name: "ListClusters",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opListClusters, input, output)
output = &ListClustersOutput{}
req.Data = output
return
}
// Returns a list of existing clusters.
func (c *ECS) ListClusters(input *ListClustersInput) (output *ListClustersOutput, err error) {
req, out := c.ListClustersRequest(input)
output = out
err = req.Send()
return
}
var opListClusters *aws.Operation
// ListContainerInstancesRequest generates a request for the ListContainerInstances operation.
func (c *ECS) ListContainerInstancesRequest(input *ListContainerInstancesInput) (req *aws.Request, output *ListContainerInstancesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opListContainerInstances == nil {
opListContainerInstances = &aws.Operation{
Name: "ListContainerInstances",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opListContainerInstances, input, output)
output = &ListContainerInstancesOutput{}
req.Data = output
return
}
// Returns a list of container instances in a specified cluster.
func (c *ECS) ListContainerInstances(input *ListContainerInstancesInput) (output *ListContainerInstancesOutput, err error) {
req, out := c.ListContainerInstancesRequest(input)
output = out
err = req.Send()
return
}
var opListContainerInstances *aws.Operation
// ListTaskDefinitionFamiliesRequest generates a request for the ListTaskDefinitionFamilies operation.
func (c *ECS) ListTaskDefinitionFamiliesRequest(input *ListTaskDefinitionFamiliesInput) (req *aws.Request, output *ListTaskDefinitionFamiliesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opListTaskDefinitionFamilies == nil {
opListTaskDefinitionFamilies = &aws.Operation{
Name: "ListTaskDefinitionFamilies",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opListTaskDefinitionFamilies, input, output)
output = &ListTaskDefinitionFamiliesOutput{}
req.Data = output
return
}
// Returns a list of task definition families that are registered to your account.
// You can filter the results with the familyPrefix parameter.
func (c *ECS) ListTaskDefinitionFamilies(input *ListTaskDefinitionFamiliesInput) (output *ListTaskDefinitionFamiliesOutput, err error) {
req, out := c.ListTaskDefinitionFamiliesRequest(input)
output = out
err = req.Send()
return
}
var opListTaskDefinitionFamilies *aws.Operation
// ListTaskDefinitionsRequest generates a request for the ListTaskDefinitions operation.
func (c *ECS) ListTaskDefinitionsRequest(input *ListTaskDefinitionsInput) (req *aws.Request, output *ListTaskDefinitionsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opListTaskDefinitions == nil {
opListTaskDefinitions = &aws.Operation{
Name: "ListTaskDefinitions",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opListTaskDefinitions, input, output)
output = &ListTaskDefinitionsOutput{}
req.Data = output
return
}
// Returns a list of task definitions that are registered to your account. You
// can filter the results by family name with the familyPrefix parameter.
func (c *ECS) ListTaskDefinitions(input *ListTaskDefinitionsInput) (output *ListTaskDefinitionsOutput, err error) {
req, out := c.ListTaskDefinitionsRequest(input)
output = out
err = req.Send()
return
}
var opListTaskDefinitions *aws.Operation
// ListTasksRequest generates a request for the ListTasks operation.
func (c *ECS) ListTasksRequest(input *ListTasksInput) (req *aws.Request, output *ListTasksOutput) {
oprw.Lock()
defer oprw.Unlock()
if opListTasks == nil {
opListTasks = &aws.Operation{
Name: "ListTasks",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opListTasks, input, output)
output = &ListTasksOutput{}
req.Data = output
return
}
// Returns a list of tasks for a specified cluster. You can filter the results
// by family name or by a particular container instance with the family and
// containerInstance parameters.
func (c *ECS) ListTasks(input *ListTasksInput) (output *ListTasksOutput, err error) {
req, out := c.ListTasksRequest(input)
output = out
err = req.Send()
return
}
var opListTasks *aws.Operation
// RegisterContainerInstanceRequest generates a request for the RegisterContainerInstance operation.
func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *aws.Request, output *RegisterContainerInstanceOutput) {
oprw.Lock()
defer oprw.Unlock()
if opRegisterContainerInstance == nil {
opRegisterContainerInstance = &aws.Operation{
Name: "RegisterContainerInstance",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opRegisterContainerInstance, input, output)
output = &RegisterContainerInstanceOutput{}
req.Data = output
return
}
// This action is only used by the Amazon EC2 Container Service agent, and it
// is not intended for use outside of the agent.
//
// Registers an Amazon EC2 instance into the specified cluster. This instance
// will become available to place containers on.
func (c *ECS) RegisterContainerInstance(input *RegisterContainerInstanceInput) (output *RegisterContainerInstanceOutput, err error) {
req, out := c.RegisterContainerInstanceRequest(input)
output = out
err = req.Send()
return
}
var opRegisterContainerInstance *aws.Operation
// RegisterTaskDefinitionRequest generates a request for the RegisterTaskDefinition operation.
func (c *ECS) RegisterTaskDefinitionRequest(input *RegisterTaskDefinitionInput) (req *aws.Request, output *RegisterTaskDefinitionOutput) {
oprw.Lock()
defer oprw.Unlock()
if opRegisterTaskDefinition == nil {
opRegisterTaskDefinition = &aws.Operation{
Name: "RegisterTaskDefinition",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opRegisterTaskDefinition, input, output)
output = &RegisterTaskDefinitionOutput{}
req.Data = output
return
}
// Registers a new task definition from the supplied family and containerDefinitions.
// Optionally, you can add data volumes to your containers with the volumes
// parameter. For more information on task definition parameters and defaults,
// see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
// in the Amazon EC2 Container Service Developer Guide.
func (c *ECS) RegisterTaskDefinition(input *RegisterTaskDefinitionInput) (output *RegisterTaskDefinitionOutput, err error) {
req, out := c.RegisterTaskDefinitionRequest(input)
output = out
err = req.Send()
return
}
var opRegisterTaskDefinition *aws.Operation
// RunTaskRequest generates a request for the RunTask operation.
func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *aws.Request, output *RunTaskOutput) {
oprw.Lock()
defer oprw.Unlock()
if opRunTask == nil {
opRunTask = &aws.Operation{
Name: "RunTask",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opRunTask, input, output)
output = &RunTaskOutput{}
req.Data = output
return
}
// Start a task using random placement and the default Amazon ECS scheduler.
// If you want to use your own scheduler or place a task on a specific container
// instance, use StartTask instead.
func (c *ECS) RunTask(input *RunTaskInput) (output *RunTaskOutput, err error) {
req, out := c.RunTaskRequest(input)
output = out
err = req.Send()
return
}
var opRunTask *aws.Operation
// StartTaskRequest generates a request for the StartTask operation.
func (c *ECS) StartTaskRequest(input *StartTaskInput) (req *aws.Request, output *StartTaskOutput) {
oprw.Lock()
defer oprw.Unlock()
if opStartTask == nil {
opStartTask = &aws.Operation{
Name: "StartTask",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opStartTask, input, output)
output = &StartTaskOutput{}
req.Data = output
return
}
// Starts a new task from the specified task definition on the specified container
// instance or instances. If you want to use the default Amazon ECS scheduler
// to place your task, use RunTask instead.
func (c *ECS) StartTask(input *StartTaskInput) (output *StartTaskOutput, err error) {
req, out := c.StartTaskRequest(input)
output = out
err = req.Send()
return
}
var opStartTask *aws.Operation
// StopTaskRequest generates a request for the StopTask operation.
func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *aws.Request, output *StopTaskOutput) {
oprw.Lock()
defer oprw.Unlock()
if opStopTask == nil {
opStopTask = &aws.Operation{
Name: "StopTask",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opStopTask, input, output)
output = &StopTaskOutput{}
req.Data = output
return
}
// Stops a running task.
func (c *ECS) StopTask(input *StopTaskInput) (output *StopTaskOutput, err error) {
req, out := c.StopTaskRequest(input)
output = out
err = req.Send()
return
}
var opStopTask *aws.Operation
// SubmitContainerStateChangeRequest generates a request for the SubmitContainerStateChange operation.
func (c *ECS) SubmitContainerStateChangeRequest(input *SubmitContainerStateChangeInput) (req *aws.Request, output *SubmitContainerStateChangeOutput) {
oprw.Lock()
defer oprw.Unlock()
if opSubmitContainerStateChange == nil {
opSubmitContainerStateChange = &aws.Operation{
Name: "SubmitContainerStateChange",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opSubmitContainerStateChange, input, output)
output = &SubmitContainerStateChangeOutput{}
req.Data = output
return
}
// This action is only used by the Amazon EC2 Container Service agent, and it
// is not intended for use outside of the agent.
//
// Sent to acknowledge that a container changed states.
func (c *ECS) SubmitContainerStateChange(input *SubmitContainerStateChangeInput) (output *SubmitContainerStateChangeOutput, err error) {
req, out := c.SubmitContainerStateChangeRequest(input)
output = out
err = req.Send()
return
}
var opSubmitContainerStateChange *aws.Operation
// SubmitTaskStateChangeRequest generates a request for the SubmitTaskStateChange operation.
func (c *ECS) SubmitTaskStateChangeRequest(input *SubmitTaskStateChangeInput) (req *aws.Request, output *SubmitTaskStateChangeOutput) {
oprw.Lock()
defer oprw.Unlock()
if opSubmitTaskStateChange == nil {
opSubmitTaskStateChange = &aws.Operation{
Name: "SubmitTaskStateChange",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
req = c.newRequest(opSubmitTaskStateChange, input, output)
output = &SubmitTaskStateChangeOutput{}
req.Data = output
return
}
// This action is only used by the Amazon EC2 Container Service agent, and it
// is not intended for use outside of the agent.
//
// Sent to acknowledge that a task changed states.
func (c *ECS) SubmitTaskStateChange(input *SubmitTaskStateChangeInput) (output *SubmitTaskStateChangeOutput, err error) {
req, out := c.SubmitTaskStateChangeRequest(input)
output = out
err = req.Send()
return
}
var opSubmitTaskStateChange *aws.Operation
// A regional grouping of one or more container instances on which you can run
// task requests. Each account receives a default cluster the first time you
// use the Amazon ECS service, but you may also create other clusters. Clusters
// may contain more than one instance type simultaneously.
//
// During the preview, each account is limited to two clusters.
type Cluster struct {
// The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains
// the arn:aws:ecs namespace, followed by the region of the cluster, the AWS
// account ID of the cluster owner, the cluster namespace, and then the cluster
// name. For example, arn:aws:ecs:region:012345678910:cluster/test.
ClusterARN *string `locationName:"clusterArn" type:"string"`
// A user-generated string that you can use to identify your cluster.
ClusterName *string `locationName:"clusterName" type:"string"`
// The status of the cluster. The valid values are ACTIVE or INACTIVE. ACTIVE
// indicates that you can register container instances with the cluster and
// the associated instances can accept tasks.
Status *string `locationName:"status" type:"string"`
metadataCluster `json:"-", xml:"-"`
}
type metadataCluster struct {
SDKShapeTraits bool `type:"structure"`
}
type Container struct {
// The Amazon Resource Name (ARN) of the container.
ContainerARN *string `locationName:"containerArn" type:"string"`
// The exit code returned from the container.
ExitCode *int64 `locationName:"exitCode" type:"integer"`
// The last known status of the container.
LastStatus *string `locationName:"lastStatus" type:"string"`
// The name of the container.
Name *string `locationName:"name" type:"string"`
NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
// A short (255 max characters) human-readable string to provide additional
// detail about a running or stopped container.
Reason *string `locationName:"reason" type:"string"`
// The Amazon Resource Name (ARN) of the task.
TaskARN *string `locationName:"taskArn" type:"string"`
metadataContainer `json:"-", xml:"-"`
}
type metadataContainer struct {
SDKShapeTraits bool `type:"structure"`
}
// Container definitions are used in task definitions to describe the different
// containers that are launched as part of a task.
type ContainerDefinition struct {
// The number of cpu units reserved for the container. A container instance
// has 1,024 cpu units for every CPU core.
CPU *int64 `locationName:"cpu" type:"integer"`
// The CMD that is passed to the container. For more information on the Docker
// CMD parameter, see https://docs.docker.com/reference/builder/#cmd (https://docs.docker.com/reference/builder/#cmd).
Command []*string `locationName:"command" type:"list"`
// Early versions of the Amazon ECS container agent do not properly handle entryPoint
// parameters. If you have problems using entryPoint, update your container
// agent or enter your commands and arguments as command array items instead.
//
// The ENTRYPOINT that is passed to the container. For more information on
// the Docker ENTRYPOINT parameter, see https://docs.docker.com/reference/builder/#entrypoint
// (https://docs.docker.com/reference/builder/#entrypoint).
EntryPoint []*string `locationName:"entryPoint" type:"list"`
// The environment variables to pass to a container.
Environment []*KeyValuePair `locationName:"environment" type:"list"`
// If the essential parameter of a container is marked as true, the failure
// of that container will stop the task. If the essential parameter of a container
// is marked as false, then its failure will not affect the rest of the containers
// in a task.
Essential *bool `locationName:"essential" type:"boolean"`
// The image used to start a container. This string is passed directly to the
// Docker daemon. Images in the Docker Hub registry are available by default.
// Other repositories are specified with repository-url/image:tag.
Image *string `locationName:"image" type:"string"`
// The link parameter allows containers to communicate with each other without
// the need for port mappings, using the name parameter. For more information
// on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/
// (https://docs.docker.com/userguide/dockerlinks/).
Links []*string `locationName:"links" type:"list"`
// The number of MiB of memory reserved for the container. Docker will allocate
// a minimum of 4 MiB of memory to a container.
Memory *int64 `locationName:"memory" type:"integer"`
// The mount points for data volumes in your container.
MountPoints []*MountPoint `locationName:"mountPoints" type:"list"`
// The name of a container. If you are linking multiple containers together
// in a task definition, the name of one container can be entered in the links
// of another container to connect the containers.
Name *string `locationName:"name" type:"string"`
// The list of port mappings for the container.
PortMappings []*PortMapping `locationName:"portMappings" type:"list"`
// Data volumes to mount from another container.
VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"`
metadataContainerDefinition `json:"-", xml:"-"`
}
type metadataContainerDefinition struct {
SDKShapeTraits bool `type:"structure"`
}
// An Amazon EC2 instance that is running the Amazon ECS agent and has been
// registered with a cluster.
type ContainerInstance struct {
// This parameter returns true if the agent is actually connected to Amazon
// ECS. Registered instances with an agent that may be unhealthy or stopped
// will return false, and instances without a connected agent cannot accept
// placement request.
AgentConnected *bool `locationName:"agentConnected" type:"boolean"`
// The Amazon Resource Name (ARN) of the container instance. The ARN contains
// the arn:aws:ecs namespace, followed by the region of the container instance,
// the AWS account ID of the container instance owner, the container-instance
// namespace, and then the container instance UUID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_UUID.
ContainerInstanceARN *string `locationName:"containerInstanceArn" type:"string"`
// The Amazon EC2 instance ID of the container instance.
EC2InstanceID *string `locationName:"ec2InstanceId" type:"string"`
// The registered resources on the container instance that are in use by current
// tasks.
RegisteredResources []*Resource `locationName:"registeredResources" type:"list"`
// The remaining resources of the container instance that are available for
// new tasks.
RemainingResources []*Resource `locationName:"remainingResources" type:"list"`
// The status of the container instance. The valid values are ACTIVE or INACTIVE.
// ACTIVE indicates that the container instance can accept tasks.
Status *string `locationName:"status" type:"string"`
metadataContainerInstance `json:"-", xml:"-"`
}
type metadataContainerInstance struct {
SDKShapeTraits bool `type:"structure"`
}
type ContainerOverride struct {
// The command to send to the container that receives the override.
Command []*string `locationName:"command" type:"list"`
// The name of the container that receives the override.
Name *string `locationName:"name" type:"string"`
metadataContainerOverride `json:"-", xml:"-"`
}
type metadataContainerOverride struct {
SDKShapeTraits bool `type:"structure"`
}
type CreateClusterInput struct {
// The name of your cluster. If you do not specify a name for your cluster,
// you will create a cluster named default.
ClusterName *string `locationName:"clusterName" type:"string"`
metadataCreateClusterInput `json:"-", xml:"-"`
}
type metadataCreateClusterInput struct {
SDKShapeTraits bool `type:"structure"`
}
type CreateClusterOutput struct {
// The full description of your new cluster.
Cluster *Cluster `locationName:"cluster" type:"structure"`
metadataCreateClusterOutput `json:"-", xml:"-"`
}
type metadataCreateClusterOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeleteClusterInput struct {
// The short name or full Amazon Resource Name (ARN) of the cluster that you
// want to delete.
Cluster *string `locationName:"cluster" type:"string" required:"true"`
metadataDeleteClusterInput `json:"-", xml:"-"`
}
type metadataDeleteClusterInput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeleteClusterOutput struct {
// The full description of the deleted cluster.
Cluster *Cluster `locationName:"cluster" type:"structure"`
metadataDeleteClusterOutput `json:"-", xml:"-"`
}
type metadataDeleteClusterOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeregisterContainerInstanceInput struct {
// The short name or full Amazon Resource Name (ARN) of the cluster that hosts
// the container instance you want to deregister. If you do not specify a cluster,
// the default cluster is assumed.
Cluster *string `locationName:"cluster" type:"string"`
// The container instance UUID or full Amazon Resource Name (ARN) of the container
// instance you want to deregister. The ARN contains the arn:aws:ecs namespace,
// followed by the region of the container instance, the AWS account ID of the
// container instance owner, the container-instance namespace, and then the
// container instance UUID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_UUID.
ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"`
// Force the deregistration of the container instance. You can use the force
// parameter if you have several tasks running on a container instance and you
// don't want to run StopTask for each task before deregistering the container
// instance.
Force *bool `locationName:"force" type:"boolean"`
metadataDeregisterContainerInstanceInput `json:"-", xml:"-"`
}
type metadataDeregisterContainerInstanceInput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeregisterContainerInstanceOutput struct {
// An Amazon EC2 instance that is running the Amazon ECS agent and has been
// registered with a cluster.
ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
metadataDeregisterContainerInstanceOutput `json:"-", xml:"-"`
}
type metadataDeregisterContainerInstanceOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeregisterTaskDefinitionInput struct {
// The family and revision (family:revision) or full Amazon Resource Name (ARN)
// of the task definition that you want to deregister.
TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
metadataDeregisterTaskDefinitionInput `json:"-", xml:"-"`
}
type metadataDeregisterTaskDefinitionInput struct {
SDKShapeTraits bool `type:"structure"`
}
type DeregisterTaskDefinitionOutput struct {
// The full description of the deregistered task.
TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
metadataDeregisterTaskDefinitionOutput `json:"-", xml:"-"`
}
type metadataDeregisterTaskDefinitionOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DescribeClustersInput struct {
// A space-separated list of cluster names or full cluster Amazon Resource Name
// (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
Clusters []*string `locationName:"clusters" type:"list"`
metadataDescribeClustersInput `json:"-", xml:"-"`
}
type metadataDescribeClustersInput struct {
SDKShapeTraits bool `type:"structure"`
}
type DescribeClustersOutput struct {
// The list of clusters.
Clusters []*Cluster `locationName:"clusters" type:"list"`
Failures []*Failure `locationName:"failures" type:"list"`
metadataDescribeClustersOutput `json:"-", xml:"-"`
}
type metadataDescribeClustersOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DescribeContainerInstancesInput struct {
// The short name or full Amazon Resource Name (ARN) of the cluster that hosts
// the container instances you want to describe. If you do not specify a cluster,
// the default cluster is assumed.
Cluster *string `locationName:"cluster" type:"string"`
// A space-separated list of container instance UUIDs or full Amazon Resource
// Name (ARN) entries.
ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
metadataDescribeContainerInstancesInput `json:"-", xml:"-"`
}
type metadataDescribeContainerInstancesInput struct {
SDKShapeTraits bool `type:"structure"`
}
type DescribeContainerInstancesOutput struct {
// The list of container instances.
ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"`
Failures []*Failure `locationName:"failures" type:"list"`
metadataDescribeContainerInstancesOutput `json:"-", xml:"-"`
}
type metadataDescribeContainerInstancesOutput struct {
SDKShapeTraits bool `type:"structure"`
}
type DescribeTaskDefinitionInput struct {
// The family for the latest revision, family and revision (family:revision)
// for a specific revision in the family, or full Amazon Resource Name (ARN)
// of the task definition that you want to describe.