forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.go
9398 lines (8147 loc) · 356 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 ecs
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opCreateCluster = "CreateCluster"
// CreateClusterRequest generates a "aws/request.Request" representing the
// client's request for the CreateCluster operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateCluster for more information on using the CreateCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateClusterRequest method.
// req, resp := client.CreateClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster
func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
op := &request.Operation{
Name: opCreateCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterInput{}
}
output = &CreateClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateCluster API operation for Amazon EC2 Container Service.
//
// Creates a new Amazon ECS cluster. By default, your account receives 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation CreateCluster for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster
func (c *ECS) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
req, out := c.CreateClusterRequest(input)
return out, req.Send()
}
// CreateClusterWithContext is the same as CreateCluster with the addition of
// the ability to pass a context and additional request options.
//
// See CreateCluster for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) {
req, out := c.CreateClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateService = "CreateService"
// CreateServiceRequest generates a "aws/request.Request" representing the
// client's request for the CreateService operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateService for more information on using the CreateService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateServiceRequest method.
// req, resp := client.CreateServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService
func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) {
op := &request.Operation{
Name: opCreateService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateServiceInput{}
}
output = &CreateServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateService API operation for Amazon EC2 Container Service.
//
// Runs and maintains a desired number of tasks from a specified task definition.
// If the number of tasks running in a service drops below desiredCount, Amazon
// ECS spawns another copy of the task in the specified cluster. To update an
// existing service, see UpdateService.
//
// In addition to maintaining the desired count of tasks in your service, you
// can optionally run your service behind a load balancer. The load balancer
// distributes traffic across the tasks that are associated with the service.
// For more information, see Service Load Balancing (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html)
// in the Amazon EC2 Container Service Developer Guide.
//
// You can optionally specify a deployment configuration for your service. During
// a deployment (which is triggered by changing the task definition or the desired
// count of a service with an UpdateService operation), the service scheduler
// uses the minimumHealthyPercent and maximumPercent parameters to determine
// the deployment strategy.
//
// The minimumHealthyPercent represents a lower limit on the number of your
// service's tasks that must remain in the RUNNING state during a deployment,
// as a percentage of the desiredCount (rounded up to the nearest integer).
// This parameter enables you to deploy without using additional cluster capacity.
// For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent
// of 50%, the scheduler can stop two existing tasks to free up cluster capacity
// before starting two new tasks. Tasks for services that do not use a load
// balancer are considered healthy if they are in the RUNNING state. Tasks for
// services that do use a load balancer are considered healthy if they are in
// the RUNNING state and the container instance they are hosted on is reported
// as healthy by the load balancer. The default value for minimumHealthyPercent
// is 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.
//
// The maximumPercent parameter represents an upper limit on the number of your
// service's tasks that are allowed in the RUNNING or PENDING state during a
// deployment, as a percentage of the desiredCount (rounded down to the nearest
// integer). This parameter enables you to define the deployment batch size.
// For example, if your service has a desiredCount of four tasks and a maximumPercent
// value of 200%, the scheduler can start four new tasks before stopping the
// four older tasks (provided that the cluster resources required to do this
// are available). The default value for maximumPercent is 200%.
//
// When the service scheduler launches new tasks, it determines task placement
// in your cluster using the following logic:
//
// * Determine which of the container instances in your cluster can support
// your service's task definition (for example, they have the required CPU,
// memory, ports, and container instance attributes).
//
// * By default, the service scheduler attempts to balance tasks across Availability
// Zones in this manner (although you can choose a different placement strategy)
// with the placementStrategy parameter):
//
// Sort the valid container instances by the fewest number of running tasks
// for this service in the same Availability Zone as the instance. For example,
// if zone A has one running service task and zones B and C each have zero,
// valid container instances in either zone B or C are considered optimal
// for placement.
//
// Place the new service task on a valid container instance in an optimal Availability
// Zone (based on the previous steps), favoring container instances with
// the fewest number of running tasks for this service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation CreateService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService
func (c *ECS) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
return out, req.Send()
}
// CreateServiceWithContext is the same as CreateService with the addition of
// the ability to pass a context and additional request options.
//
// See CreateService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAttributes = "DeleteAttributes"
// DeleteAttributesRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAttributes operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAttributes for more information on using the DeleteAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAttributesRequest method.
// req, resp := client.DeleteAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes
func (c *ECS) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) {
op := &request.Operation{
Name: opDeleteAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAttributesInput{}
}
output = &DeleteAttributesOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteAttributes API operation for Amazon EC2 Container Service.
//
// Deletes one or more custom attributes from an Amazon ECS resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DeleteAttributes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// * ErrCodeTargetNotFoundException "TargetNotFoundException"
// The specified target could not be found. You can view your available container
// instances with ListContainerInstances. Amazon ECS container instances are
// cluster-specific and region-specific.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes
func (c *ECS) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) {
req, out := c.DeleteAttributesRequest(input)
return out, req.Send()
}
// DeleteAttributesWithContext is the same as DeleteAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAttributes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DeleteAttributesWithContext(ctx aws.Context, input *DeleteAttributesInput, opts ...request.Option) (*DeleteAttributesOutput, error) {
req, out := c.DeleteAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteCluster = "DeleteCluster"
// DeleteClusterRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCluster operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteCluster for more information on using the DeleteCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteClusterRequest method.
// req, resp := client.DeleteClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster
func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) {
op := &request.Operation{
Name: opDeleteCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteClusterInput{}
}
output = &DeleteClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteCluster API operation for Amazon EC2 Container Service.
//
// 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DeleteCluster for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// * ErrCodeClusterContainsContainerInstancesException "ClusterContainsContainerInstancesException"
// You cannot delete a cluster that has registered container instances. You
// must first deregister the container instances before you can delete the cluster.
// For more information, see DeregisterContainerInstance.
//
// * ErrCodeClusterContainsServicesException "ClusterContainsServicesException"
// You cannot delete a cluster that contains services. You must first update
// the service to reduce its desired task count to 0 and then delete the service.
// For more information, see UpdateService and DeleteService.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster
func (c *ECS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) {
req, out := c.DeleteClusterRequest(input)
return out, req.Send()
}
// DeleteClusterWithContext is the same as DeleteCluster with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteCluster for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) {
req, out := c.DeleteClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteService = "DeleteService"
// DeleteServiceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteService operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteService for more information on using the DeleteService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteServiceRequest method.
// req, resp := client.DeleteServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService
func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) {
op := &request.Operation{
Name: opDeleteService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteServiceInput{}
}
output = &DeleteServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteService API operation for Amazon EC2 Container Service.
//
// Deletes a specified service within a cluster. You can delete a service if
// you have no running tasks in it and the desired task count is zero. If the
// service is actively maintaining tasks, you cannot delete it, and you must
// update the service to a desired task count of zero. For more information,
// see UpdateService.
//
// When you delete a service, if there are still running tasks that require
// cleanup, the service status moves from ACTIVE to DRAINING, and the service
// is no longer visible in the console or in ListServices API operations. After
// the tasks have stopped, then the service status moves from DRAINING to INACTIVE.
// Services in the DRAINING or INACTIVE status can still be viewed with DescribeServices
// API operations; however, in the future, INACTIVE services may be cleaned
// up and purged from Amazon ECS record keeping, and DescribeServices API operations
// on those services will return a ServiceNotFoundException error.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DeleteService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// * ErrCodeServiceNotFoundException "ServiceNotFoundException"
// The specified service could not be found. You can view your available services
// with ListServices. Amazon ECS services are cluster-specific and region-specific.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService
func (c *ECS) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
return out, req.Send()
}
// DeleteServiceWithContext is the same as DeleteService with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeregisterContainerInstance = "DeregisterContainerInstance"
// DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterContainerInstance operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeregisterContainerInstance for more information on using the DeregisterContainerInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeregisterContainerInstanceRequest method.
// req, resp := client.DeregisterContainerInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance
func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInstanceInput) (req *request.Request, output *DeregisterContainerInstanceOutput) {
op := &request.Operation{
Name: opDeregisterContainerInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterContainerInstanceInput{}
}
output = &DeregisterContainerInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeregisterContainerInstance API operation for Amazon EC2 Container Service.
//
// Deregisters an Amazon ECS container instance from the specified cluster.
// This instance is no longer available to run tasks.
//
// If you intend to use the container instance for some other purpose after
// deregistration, you should stop all of the tasks running on the container
// instance before deregistration to avoid any orphaned tasks from consuming
// resources.
//
// Deregistering a container instance removes the instance from a cluster, but
// it does not terminate the EC2 instance; if you are finished using the instance,
// be sure to terminate it in the Amazon EC2 console to stop billing.
//
// If you terminate a running container instance, Amazon ECS automatically deregisters
// the instance from your cluster (stopped container instances or instances
// with disconnected agents are not automatically deregistered when terminated).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DeregisterContainerInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance
func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (*DeregisterContainerInstanceOutput, error) {
req, out := c.DeregisterContainerInstanceRequest(input)
return out, req.Send()
}
// DeregisterContainerInstanceWithContext is the same as DeregisterContainerInstance with the addition of
// the ability to pass a context and additional request options.
//
// See DeregisterContainerInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DeregisterContainerInstanceWithContext(ctx aws.Context, input *DeregisterContainerInstanceInput, opts ...request.Option) (*DeregisterContainerInstanceOutput, error) {
req, out := c.DeregisterContainerInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeregisterTaskDefinition = "DeregisterTaskDefinition"
// DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterTaskDefinition operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeregisterTaskDefinition for more information on using the DeregisterTaskDefinition
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeregisterTaskDefinitionRequest method.
// req, resp := client.DeregisterTaskDefinitionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition
func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInput) (req *request.Request, output *DeregisterTaskDefinitionOutput) {
op := &request.Operation{
Name: opDeregisterTaskDefinition,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterTaskDefinitionInput{}
}
output = &DeregisterTaskDefinitionOutput{}
req = c.newRequest(op, input, output)
return
}
// DeregisterTaskDefinition API operation for Amazon EC2 Container Service.
//
// Deregisters the specified task definition by family and revision. Upon deregistration,
// the task definition is marked as INACTIVE. Existing tasks and services that
// reference an INACTIVE task definition continue to run without disruption.
// Existing services that reference an INACTIVE task definition can still scale
// up or down by modifying the service's desired count.
//
// You cannot use an INACTIVE task definition to run new tasks or create new
// services, and you cannot update an existing service to reference an INACTIVE
// task definition (although there may be up to a 10 minute window following
// deregistration where these restrictions have not yet taken effect).
//
// At this time, INACTIVE task definitions remain discoverable in your account
// indefinitely; however, this behavior is subject to change in the future,
// so you should not rely on INACTIVE task definitions persisting beyond the
// life cycle of any associated tasks and services.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DeregisterTaskDefinition for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition
func (c *ECS) DeregisterTaskDefinition(input *DeregisterTaskDefinitionInput) (*DeregisterTaskDefinitionOutput, error) {
req, out := c.DeregisterTaskDefinitionRequest(input)
return out, req.Send()
}
// DeregisterTaskDefinitionWithContext is the same as DeregisterTaskDefinition with the addition of
// the ability to pass a context and additional request options.
//
// See DeregisterTaskDefinition for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DeregisterTaskDefinitionWithContext(ctx aws.Context, input *DeregisterTaskDefinitionInput, opts ...request.Option) (*DeregisterTaskDefinitionOutput, error) {
req, out := c.DeregisterTaskDefinitionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeClusters = "DescribeClusters"
// DescribeClustersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeClusters operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeClusters for more information on using the DescribeClusters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeClustersRequest method.
// req, resp := client.DescribeClustersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters
func (c *ECS) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) {
op := &request.Operation{
Name: opDescribeClusters,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeClustersInput{}
}
output = &DescribeClustersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeClusters API operation for Amazon EC2 Container Service.
//
// Describes one or more of your clusters.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DescribeClusters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters
func (c *ECS) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) {
req, out := c.DescribeClustersRequest(input)
return out, req.Send()
}
// DescribeClustersWithContext is the same as DescribeClusters with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeClusters for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) {
req, out := c.DescribeClustersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeContainerInstances = "DescribeContainerInstances"
// DescribeContainerInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeContainerInstances operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeContainerInstances for more information on using the DescribeContainerInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeContainerInstancesRequest method.
// req, resp := client.DescribeContainerInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances
func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstancesInput) (req *request.Request, output *DescribeContainerInstancesOutput) {
op := &request.Operation{
Name: opDescribeContainerInstances,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeContainerInstancesInput{}
}
output = &DescribeContainerInstancesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeContainerInstances API operation for Amazon EC2 Container Service.
//
// Describes Amazon EC2 Container Service container instances. Returns metadata
// about registered and remaining resources on each container instance requested.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DescribeContainerInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.
//
// * ErrCodeClientException "ClientException"
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeClusterNotFoundException "ClusterNotFoundException"
// The specified cluster could not be found. You can view your available clusters
// with ListClusters. Amazon ECS clusters are region-specific.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances
func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (*DescribeContainerInstancesOutput, error) {
req, out := c.DescribeContainerInstancesRequest(input)
return out, req.Send()
}
// DescribeContainerInstancesWithContext is the same as DescribeContainerInstances with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeContainerInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECS) DescribeContainerInstancesWithContext(ctx aws.Context, input *DescribeContainerInstancesInput, opts ...request.Option) (*DescribeContainerInstancesOutput, error) {
req, out := c.DescribeContainerInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeServices = "DescribeServices"
// DescribeServicesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeServices operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeServices for more information on using the DescribeServices
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeServicesRequest method.
// req, resp := client.DescribeServicesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices
func (c *ECS) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) {
op := &request.Operation{
Name: opDescribeServices,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeServicesInput{}
}
output = &DescribeServicesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeServices API operation for Amazon EC2 Container Service.
//
// Describes the specified services running in your cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Service's
// API operation DescribeServices for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server issue.