forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
1254 lines (1050 loc) · 48.2 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package applicationautoscaling provides a client for Application Auto Scaling.
package applicationautoscaling
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opDeleteScalingPolicy = "DeleteScalingPolicy"
// DeleteScalingPolicyRequest generates a request for the DeleteScalingPolicy operation.
func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) (req *request.Request, output *DeleteScalingPolicyOutput) {
op := &request.Operation{
Name: opDeleteScalingPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteScalingPolicyInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteScalingPolicyOutput{}
req.Data = output
return
}
// Deletes an Application Auto Scaling scaling policy that was previously created.
// If you are no longer using a scaling policy, you can delete it with this
// operation.
//
// Deleting a policy deletes the underlying alarm action, but does not delete
// the CloudWatch alarm, even if it no longer has an associated action.
//
// To create a new scaling policy or update an existing one, see PutScalingPolicy.
func (c *ApplicationAutoScaling) DeleteScalingPolicy(input *DeleteScalingPolicyInput) (*DeleteScalingPolicyOutput, error) {
req, out := c.DeleteScalingPolicyRequest(input)
err := req.Send()
return out, err
}
const opDeregisterScalableTarget = "DeregisterScalableTarget"
// DeregisterScalableTargetRequest generates a request for the DeregisterScalableTarget operation.
func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *DeregisterScalableTargetInput) (req *request.Request, output *DeregisterScalableTargetOutput) {
op := &request.Operation{
Name: opDeregisterScalableTarget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterScalableTargetInput{}
}
req = c.newRequest(op, input, output)
output = &DeregisterScalableTargetOutput{}
req.Data = output
return
}
// Deregisters a scalable target that was previously registered. If you are
// no longer using a scalable target, you can delete it with this operation.
// When you deregister a scalable target, all of the scaling policies that are
// associated with that scalable target are deleted.
//
// To create a new scalable target or update an existing one, see RegisterScalableTarget.
func (c *ApplicationAutoScaling) DeregisterScalableTarget(input *DeregisterScalableTargetInput) (*DeregisterScalableTargetOutput, error) {
req, out := c.DeregisterScalableTargetRequest(input)
err := req.Send()
return out, err
}
const opDescribeScalableTargets = "DescribeScalableTargets"
// DescribeScalableTargetsRequest generates a request for the DescribeScalableTargets operation.
func (c *ApplicationAutoScaling) DescribeScalableTargetsRequest(input *DescribeScalableTargetsInput) (req *request.Request, output *DescribeScalableTargetsOutput) {
op := &request.Operation{
Name: opDescribeScalableTargets,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeScalableTargetsInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeScalableTargetsOutput{}
req.Data = output
return
}
// Provides descriptive information for scalable targets with a specified service
// namespace.
//
// You can filter the results in a service namespace with the ResourceIds and
// ScalableDimension parameters.
//
// To create a new scalable target or update an existing one, see RegisterScalableTarget.
// If you are no longer using a scalable target, you can deregister it with
// DeregisterScalableTarget.
func (c *ApplicationAutoScaling) DescribeScalableTargets(input *DescribeScalableTargetsInput) (*DescribeScalableTargetsOutput, error) {
req, out := c.DescribeScalableTargetsRequest(input)
err := req.Send()
return out, err
}
func (c *ApplicationAutoScaling) DescribeScalableTargetsPages(input *DescribeScalableTargetsInput, fn func(p *DescribeScalableTargetsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeScalableTargetsRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeScalableTargetsOutput), lastPage)
})
}
const opDescribeScalingActivities = "DescribeScalingActivities"
// DescribeScalingActivitiesRequest generates a request for the DescribeScalingActivities operation.
func (c *ApplicationAutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
op := &request.Operation{
Name: opDescribeScalingActivities,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeScalingActivitiesInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeScalingActivitiesOutput{}
req.Data = output
return
}
// Provides descriptive information for scaling activities with a specified
// service namespace.
//
// You can filter the results in a service namespace with the ResourceId and
// ScalableDimension parameters.
//
// Scaling activities are triggered by CloudWatch alarms that are associated
// with scaling policies. To view the existing scaling policies for a service
// namespace, see DescribeScalingPolicies. To create a new scaling policy or
// update an existing one, see PutScalingPolicy.
func (c *ApplicationAutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
req, out := c.DescribeScalingActivitiesRequest(input)
err := req.Send()
return out, err
}
func (c *ApplicationAutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(p *DescribeScalingActivitiesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeScalingActivitiesRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeScalingActivitiesOutput), lastPage)
})
}
const opDescribeScalingPolicies = "DescribeScalingPolicies"
// DescribeScalingPoliciesRequest generates a request for the DescribeScalingPolicies operation.
func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeScalingPoliciesInput) (req *request.Request, output *DescribeScalingPoliciesOutput) {
op := &request.Operation{
Name: opDescribeScalingPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeScalingPoliciesInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeScalingPoliciesOutput{}
req.Data = output
return
}
// Provides descriptive information for scaling policies with a specified service
// namespace.
//
// You can filter the results in a service namespace with the ResourceId, ScalableDimension,
// and PolicyNames parameters.
//
// To create a new scaling policy or update an existing one, see PutScalingPolicy.
// If you are no longer using a scaling policy, you can delete it with DeleteScalingPolicy.
func (c *ApplicationAutoScaling) DescribeScalingPolicies(input *DescribeScalingPoliciesInput) (*DescribeScalingPoliciesOutput, error) {
req, out := c.DescribeScalingPoliciesRequest(input)
err := req.Send()
return out, err
}
func (c *ApplicationAutoScaling) DescribeScalingPoliciesPages(input *DescribeScalingPoliciesInput, fn func(p *DescribeScalingPoliciesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeScalingPoliciesRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeScalingPoliciesOutput), lastPage)
})
}
const opPutScalingPolicy = "PutScalingPolicy"
// PutScalingPolicyRequest generates a request for the PutScalingPolicy operation.
func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) {
op := &request.Operation{
Name: opPutScalingPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutScalingPolicyInput{}
}
req = c.newRequest(op, input, output)
output = &PutScalingPolicyOutput{}
req.Data = output
return
}
// Creates or updates a policy for an existing Application Auto Scaling scalable
// target. Each scalable target is identified by service namespace, a resource
// ID, and a scalable dimension, and a scaling policy applies to a scalable
// target that is identified by those three attributes. You cannot create a
// scaling policy without first registering a scalable target with RegisterScalableTarget.
//
// To update an existing policy, use the existing policy name and set the parameters
// you want to change. Any existing parameter not changed in an update to an
// existing policy is not changed in this update request.
//
// You can view the existing scaling policies for a service namespace with
// DescribeScalingPolicies. If you are no longer using a scaling policy, you
// can delete it with DeleteScalingPolicy.
func (c *ApplicationAutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) {
req, out := c.PutScalingPolicyRequest(input)
err := req.Send()
return out, err
}
const opRegisterScalableTarget = "RegisterScalableTarget"
// RegisterScalableTargetRequest generates a request for the RegisterScalableTarget operation.
func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterScalableTargetInput) (req *request.Request, output *RegisterScalableTargetOutput) {
op := &request.Operation{
Name: opRegisterScalableTarget,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterScalableTargetInput{}
}
req = c.newRequest(op, input, output)
output = &RegisterScalableTargetOutput{}
req.Data = output
return
}
// Registers or updates a scalable target. A scalable target is a resource that
// can be scaled up or down with Application Auto Scaling. After you have registered
// a scalable target, you can use this command to update the minimum and maximum
// values for your scalable dimension.
//
// At this time, Application Auto Scaling only supports scaling Amazon ECS
// services.
//
// After you register a scalable target with Application Auto Scaling, you
// can create and apply scaling policies to it with PutScalingPolicy. You can
// view the existing scaling policies for a service namespace with DescribeScalableTargets.
// If you are no longer using a scalable target, you can deregister it with
// DeregisterScalableTarget.
func (c *ApplicationAutoScaling) RegisterScalableTarget(input *RegisterScalableTargetInput) (*RegisterScalableTargetOutput, error) {
req, out := c.RegisterScalableTargetRequest(input)
err := req.Send()
return out, err
}
// An object representing a CloudWatch alarm associated with a scaling policy.
type Alarm struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the alarm.
AlarmARN *string `type:"string" required:"true"`
// The name of the alarm.
AlarmName *string `type:"string" required:"true"`
}
// String returns the string representation
func (s Alarm) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Alarm) GoString() string {
return s.String()
}
type DeleteScalingPolicyInput struct {
_ struct{} `type:"structure"`
// The name of the scaling policy to delete.
PolicyName *string `min:"1" type:"string" required:"true"`
// The unique identifier string for the resource associated with the scaling
// policy. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The scalable dimension associated with the scaling policy. The scalable dimension
// contains the service namespace, resource type, and scaling property, such
// as ecs:service:DesiredCount for the desired task count of an Amazon ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The namespace for the AWS service that the scaling policy is associated with.
// For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s DeleteScalingPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteScalingPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteScalingPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteScalingPolicyInput"}
if s.PolicyName == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyName"))
}
if s.PolicyName != nil && len(*s.PolicyName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.ScalableDimension == nil {
invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DeleteScalingPolicyOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteScalingPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteScalingPolicyOutput) GoString() string {
return s.String()
}
type DeregisterScalableTargetInput struct {
_ struct{} `type:"structure"`
// The unique identifier string for the resource associated with the scalable
// target. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The scalable dimension associated with the scalable target. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The namespace for the AWS service that the scalable target is associated
// with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s DeregisterScalableTargetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterScalableTargetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeregisterScalableTargetInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeregisterScalableTargetInput"}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.ScalableDimension == nil {
invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DeregisterScalableTargetOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeregisterScalableTargetOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterScalableTargetOutput) GoString() string {
return s.String()
}
type DescribeScalableTargetsInput struct {
_ struct{} `type:"structure"`
// The maximum number of scalable target results returned by DescribeScalableTargets
// in paginated output. When this parameter is used, DescribeScalableTargets
// returns up to MaxResults results in a single page along with a NextToken
// response element. The remaining results of the initial request can be seen
// by sending another DescribeScalableTargets request with the returned NextToken
// value. This value can be between 1 and 50. If this parameter is not used,
// then DescribeScalableTargets returns up to 50 results and a NextToken value,
// if applicable.
MaxResults *int64 `type:"integer"`
// The NextToken value returned from a previous paginated DescribeScalableTargets
// request. Pagination continues from the end of the previous results that returned
// the NextToken value. This value is null when there are no more results to
// return.
NextToken *string `type:"string"`
// The unique identifier string for the resource associated with the scalable
// target. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
// If you specify a scalable dimension, you must also specify a resource ID.
ResourceIds []*string `type:"list"`
// The scalable dimension associated with the scalable target. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service. If you specify a scalable dimension, you must also specify a
// resource ID.
ScalableDimension *string `type:"string" enum:"ScalableDimension"`
// The namespace for the AWS service that the scalable target is associated
// with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s DescribeScalableTargetsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalableTargetsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeScalableTargetsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeScalableTargetsInput"}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DescribeScalableTargetsOutput struct {
_ struct{} `type:"structure"`
// The NextToken value to include in a future DescribeScalableTargets request.
// When the results of a DescribeScalableTargets request exceed MaxResults,
// this value can be used to retrieve the next page of results. This value is
// null when there are no more results to return.
NextToken *string `type:"string"`
// The list of scalable targets that matches the request parameters.
ScalableTargets []*ScalableTarget `type:"list"`
}
// String returns the string representation
func (s DescribeScalableTargetsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalableTargetsOutput) GoString() string {
return s.String()
}
type DescribeScalingActivitiesInput struct {
_ struct{} `type:"structure"`
// The maximum number of scaling activity results returned by DescribeScalingActivities
// in paginated output. When this parameter is used, DescribeScalingActivities
// returns up to MaxResults results in a single page along with a NextToken
// response element. The remaining results of the initial request can be seen
// by sending another DescribeScalingActivities request with the returned NextToken
// value. This value can be between 1 and 50. If this parameter is not used,
// then DescribeScalingActivities returns up to 50 results and a NextToken value,
// if applicable.
MaxResults *int64 `type:"integer"`
// The NextToken value returned from a previous paginated DescribeScalingActivities
// request. Pagination continues from the end of the previous results that returned
// the NextToken value. This value is null when there are no more results to
// return.
NextToken *string `type:"string"`
// The unique identifier string for the resource associated with the scaling
// activity. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
// If you specify a scalable dimension, you must also specify a resource ID.
ResourceId *string `min:"1" type:"string"`
// The scalable dimension associated with the scaling activity. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service. If you specify a scalable dimension, you must also specify a
// resource ID.
ScalableDimension *string `type:"string" enum:"ScalableDimension"`
// The namespace for the AWS service that the scaling activity is associated
// with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s DescribeScalingActivitiesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingActivitiesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeScalingActivitiesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DescribeScalingActivitiesOutput struct {
_ struct{} `type:"structure"`
// The NextToken value to include in a future DescribeScalingActivities request.
// When the results of a DescribeScalingActivities request exceed MaxResults,
// this value can be used to retrieve the next page of results. This value is
// null when there are no more results to return.
NextToken *string `type:"string"`
// A list of scaling activity objects.
ScalingActivities []*ScalingActivity `type:"list"`
}
// String returns the string representation
func (s DescribeScalingActivitiesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingActivitiesOutput) GoString() string {
return s.String()
}
type DescribeScalingPoliciesInput struct {
_ struct{} `type:"structure"`
// The maximum number of scaling policy results returned by DescribeScalingPolicies
// in paginated output. When this parameter is used, DescribeScalingPolicies
// returns up to MaxResults results in a single page along with a NextToken
// response element. The remaining results of the initial request can be seen
// by sending another DescribeScalingPolicies request with the returned NextToken
// value. This value can be between 1 and 50. If this parameter is not used,
// then DescribeScalingPolicies returns up to 50 results and a NextToken value,
// if applicable.
MaxResults *int64 `type:"integer"`
// The NextToken value returned from a previous paginated DescribeScalingPolicies
// request. Pagination continues from the end of the previous results that returned
// the NextToken value. This value is null when there are no more results to
// return.
NextToken *string `type:"string"`
// The names of the scaling policies to describe.
PolicyNames []*string `type:"list"`
// The unique resource identifier string of the scalable target that the scaling
// policy is associated with. For Amazon ECS services, this value is the resource
// type, followed by the cluster name and service name, such as service/default/sample-webapp.
// If you specify a scalable dimension, you must also specify a resource ID.
ResourceId *string `min:"1" type:"string"`
// The scalable dimension of the scalable target that the scaling policy is
// associated with. The scalable dimension contains the service namespace, resource
// type, and scaling property, such as ecs:service:DesiredCount for the desired
// task count of an Amazon ECS service. If you specify a scalable dimension,
// you must also specify a resource ID.
ScalableDimension *string `type:"string" enum:"ScalableDimension"`
// The AWS service namespace of the scalable target that the scaling policy
// is associated with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s DescribeScalingPoliciesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingPoliciesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeScalingPoliciesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPoliciesInput"}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DescribeScalingPoliciesOutput struct {
_ struct{} `type:"structure"`
// The NextToken value to include in a future DescribeScalingPolicies request.
// When the results of a DescribeScalingPolicies request exceed MaxResults,
// this value can be used to retrieve the next page of results. This value is
// null when there are no more results to return.
NextToken *string `type:"string"`
// A list of scaling policy objects.
ScalingPolicies []*ScalingPolicy `type:"list"`
}
// String returns the string representation
func (s DescribeScalingPoliciesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingPoliciesOutput) GoString() string {
return s.String()
}
type PutScalingPolicyInput struct {
_ struct{} `type:"structure"`
// The name of the scaling policy.
PolicyName *string `min:"1" type:"string" required:"true"`
// The policy type. This parameter is required if you are creating a new policy.
PolicyType *string `type:"string" enum:"PolicyType"`
// The unique resource identifier string for the scalable target that this scaling
// policy applies to. For Amazon ECS services, this value is the resource type,
// followed by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The scalable dimension of the scalable target that this scaling policy applies
// to. The scalable dimension contains the service namespace, resource type,
// and scaling property, such as ecs:service:DesiredCount for the desired task
// count of an Amazon ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The AWS service namespace of the scalable target that this scaling policy
// applies to. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
// The configuration for the step scaling policy. This parameter is required
// if you are creating a new policy. For more information, see StepScalingPolicyConfiguration
// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_StepScalingPolicyConfiguration.html)
// and StepAdjustment (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_StepAdjustment.html)
// in the Application Auto Scaling API Reference.
StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"`
}
// String returns the string representation
func (s PutScalingPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutScalingPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *PutScalingPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"}
if s.PolicyName == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyName"))
}
if s.PolicyName != nil && len(*s.PolicyName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.ScalableDimension == nil {
invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if s.StepScalingPolicyConfiguration != nil {
if err := s.StepScalingPolicyConfiguration.Validate(); err != nil {
invalidParams.AddNested("StepScalingPolicyConfiguration", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type PutScalingPolicyOutput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the resulting scaling policy.
PolicyARN *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s PutScalingPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutScalingPolicyOutput) GoString() string {
return s.String()
}
type RegisterScalableTargetInput struct {
_ struct{} `type:"structure"`
// The maximum value for this scalable target to scale out to in response to
// scaling activities. This parameter is required if you are registering a new
// scalable target, and it is optional if you are updating an existing one.
MaxCapacity *int64 `type:"integer"`
// The minimum value for this scalable target to scale in to in response to
// scaling activities. This parameter is required if you are registering a new
// scalable target, and it is optional if you are updating an existing one.
MinCapacity *int64 `type:"integer"`
// The unique identifier string for the resource to associate with the scalable
// target. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The ARN of the IAM role that allows Application Auto Scaling to modify your
// scalable target on your behalf. This parameter is required if you are registering
// a new scalable target, and it is optional if you are updating an existing
// one.
RoleARN *string `min:"1" type:"string"`
// The scalable dimension associated with the scalable target. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The namespace for the AWS service that the scalable target is associated
// with. For Amazon ECS services, the namespace value is ecs. For more information,
// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s RegisterScalableTargetInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RegisterScalableTargetInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RegisterScalableTargetInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RegisterScalableTargetInput"}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.ResourceId != nil && len(*s.ResourceId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
}
if s.RoleARN != nil && len(*s.RoleARN) < 1 {
invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
}
if s.ScalableDimension == nil {
invalidParams.Add(request.NewErrParamRequired("ScalableDimension"))
}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type RegisterScalableTargetOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s RegisterScalableTargetOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RegisterScalableTargetOutput) GoString() string {
return s.String()
}
// An object representing a scalable target.
type ScalableTarget struct {
_ struct{} `type:"structure"`
// The Unix timestamp for when the scalable target was created.
CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
// The maximum value for this scalable target to scale out to in response to
// scaling activities.
MaxCapacity *int64 `type:"integer" required:"true"`
// The minimum value for this scalable target to scale in to in response to
// scaling activities.
MinCapacity *int64 `type:"integer" required:"true"`
// The unique identifier string for the resource associated with the scalable
// target. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The ARN of the IAM role that allows Application Auto Scaling to modify your
// scalable target on your behalf.
RoleARN *string `min:"1" type:"string" required:"true"`
// The scalable dimension associated with the scalable target. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The namespace for the AWS service that the scalable target is associated
// with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
}
// String returns the string representation
func (s ScalableTarget) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ScalableTarget) GoString() string {
return s.String()
}
// An object representing a scaling activity.
type ScalingActivity struct {
_ struct{} `type:"structure"`
// The unique identifier string for the scaling activity.
ActivityId *string `type:"string" required:"true"`
// A simple description of what caused the scaling activity to happen.
Cause *string `type:"string" required:"true"`
// A simple description of what action the scaling activity intends to accomplish.
Description *string `type:"string" required:"true"`
// The details about the scaling activity.
Details *string `type:"string"`
// The Unix timestamp for when the scaling activity ended.
EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The unique identifier string for the resource associated with the scaling
// activity. For Amazon ECS services, this value is the resource type, followed
// by the cluster name and service name, such as service/default/sample-webapp.
ResourceId *string `min:"1" type:"string" required:"true"`
// The scalable dimension associated with the scaling activity. The scalable
// dimension contains the service namespace, resource type, and scaling property,
// such as ecs:service:DesiredCount for the desired task count of an Amazon
// ECS service.
ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"`
// The namespace for the AWS service that the scaling activity is associated
// with. For more information, see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
// in the Amazon Web Services General Reference.
ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"`
// The Unix timestamp for when the scaling activity began.
StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
// Indicates the status of the scaling activity.
StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"`
// A simple message about the current status of the scaling activity.
StatusMessage *string `type:"string"`
}
// String returns the string representation
func (s ScalingActivity) String() string {
return awsutil.Prettify(s)
}