aws-sdk-autoscaling 1.84.0 → 1.86.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,108 +9,49 @@
9
9
 
10
10
  module Aws::AutoScaling
11
11
  class EndpointProvider
12
- def initialize(rule_set = nil)
13
- @@rule_set ||= begin
14
- endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
15
- Aws::Endpoints::RuleSet.new(
16
- version: endpoint_rules['version'],
17
- service_id: endpoint_rules['serviceId'],
18
- parameters: endpoint_rules['parameters'],
19
- rules: endpoint_rules['rules']
20
- )
12
+ def resolve_endpoint(parameters)
13
+ region = parameters.region
14
+ use_dual_stack = parameters.use_dual_stack
15
+ use_fips = parameters.use_fips
16
+ endpoint = parameters.endpoint
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
18
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
+ end
21
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
21
25
  end
22
- @provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
23
- end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://autoscaling-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://autoscaling.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://autoscaling-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
+ end
43
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
44
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
+ return Aws::Endpoints::Endpoint.new(url: "https://autoscaling.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
+ end
49
+ return Aws::Endpoints::Endpoint.new(url: "https://autoscaling.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
+ end
51
+ end
52
+ raise ArgumentError, "Invalid Configuration: Missing Region"
53
+ raise ArgumentError, 'No endpoint could be resolved'
24
54
 
25
- def resolve_endpoint(parameters)
26
- @provider.resolve_endpoint(parameters)
27
55
  end
28
-
29
- # @api private
30
- RULES = <<-JSON
31
- eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
32
- bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOnRydWUsImRvY3VtZW50
33
- YXRpb24iOiJUaGUgQVdTIHJlZ2lvbiB1c2VkIHRvIGRpc3BhdGNoIHRoZSBy
34
- ZXF1ZXN0LiIsInR5cGUiOiJTdHJpbmcifSwiVXNlR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Jm
101
- biI6ImdldEF0dHIiLCJhcmd2IjpbeyJyZWYiOiJQYXJ0aXRpb25SZXN1bHQi
102
- fSwic3VwcG9ydHNEdWFsU3RhY2siXX1dfV0sInR5cGUiOiJ0cmVlIiwicnVs
103
- ZXMiOlt7ImNvbmRpdGlvbnMiOltdLCJlbmRwb2ludCI6eyJ1cmwiOiJodHRw
104
- czovL2F1dG9zY2FsaW5nLntSZWdpb259LntQYXJ0aXRpb25SZXN1bHQjZHVh
105
- bFN0YWNrRG5zU3VmZml4fSIsInByb3BlcnRpZXMiOnt9LCJoZWFkZXJzIjp7
106
- fX0sInR5cGUiOiJlbmRwb2ludCJ9XX0seyJjb25kaXRpb25zIjpbXSwiZXJy
107
- b3IiOiJEdWFsU3RhY2sgaXMgZW5hYmxlZCBidXQgdGhpcyBwYXJ0aXRpb24g
108
- ZG9lcyBub3Qgc3VwcG9ydCBEdWFsU3RhY2siLCJ0eXBlIjoiZXJyb3IifV19
109
- LHsiY29uZGl0aW9ucyI6W10sImVuZHBvaW50Ijp7InVybCI6Imh0dHBzOi8v
110
- YXV0b3NjYWxpbmcue1JlZ2lvbn0ue1BhcnRpdGlvblJlc3VsdCNkbnNTdWZm
111
- aXh9IiwicHJvcGVydGllcyI6e30sImhlYWRlcnMiOnt9fSwidHlwZSI6ImVu
112
- ZHBvaW50In1dfV19
113
-
114
- JSON
115
56
  end
116
57
  end
@@ -809,6 +809,20 @@ module Aws::AutoScaling
809
809
  end
810
810
  end
811
811
 
812
+ class RollbackInstanceRefresh
813
+ def self.build(context)
814
+ unless context.config.regional_endpoint
815
+ endpoint = context.config.endpoint.to_s
816
+ end
817
+ Aws::AutoScaling::EndpointParameters.new(
818
+ region: context.config.region,
819
+ use_dual_stack: context.config.use_dualstack_endpoint,
820
+ use_fips: context.config.use_fips_endpoint,
821
+ endpoint: endpoint,
822
+ )
823
+ end
824
+ end
825
+
812
826
  class SetDesiredCapacity
813
827
  def self.build(context)
814
828
  unless context.config.regional_endpoint
@@ -31,6 +31,7 @@ module Aws::AutoScaling
31
31
  # * {AlreadyExistsFault}
32
32
  # * {InstanceRefreshInProgressFault}
33
33
  # * {InvalidNextToken}
34
+ # * {IrreversibleInstanceRefreshFault}
34
35
  # * {LimitExceededFault}
35
36
  # * {ResourceContentionFault}
36
37
  # * {ResourceInUseFault}
@@ -103,6 +104,21 @@ module Aws::AutoScaling
103
104
  end
104
105
  end
105
106
 
107
+ class IrreversibleInstanceRefreshFault < ServiceError
108
+
109
+ # @param [Seahorse::Client::RequestContext] context
110
+ # @param [String] message
111
+ # @param [Aws::AutoScaling::Types::IrreversibleInstanceRefreshFault] data
112
+ def initialize(context, message, data = Aws::EmptyStructure.new)
113
+ super(context, message, data)
114
+ end
115
+
116
+ # @return [String]
117
+ def message
118
+ @message || @data[:message]
119
+ end
120
+ end
121
+
106
122
  class LimitExceededFault < ServiceError
107
123
 
108
124
  # @param [Seahorse::Client::RequestContext] context
@@ -170,6 +170,8 @@ module Aws::AutoScaling
170
170
  Aws::AutoScaling::Endpoints::RecordLifecycleActionHeartbeat.build(context)
171
171
  when :resume_processes
172
172
  Aws::AutoScaling::Endpoints::ResumeProcesses.build(context)
173
+ when :rollback_instance_refresh
174
+ Aws::AutoScaling::Endpoints::RollbackInstanceRefresh.build(context)
173
175
  when :set_desired_capacity
174
176
  Aws::AutoScaling::Endpoints::SetDesiredCapacity.build(context)
175
177
  when :set_instance_health
@@ -421,24 +421,25 @@ module Aws::AutoScaling
421
421
  #
422
422
  # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html
423
423
  # @option options [Integer] :default_instance_warmup
424
- # The amount of time, in seconds, until a newly launched instance can
425
- # contribute to the Amazon CloudWatch metrics. This delay lets an
426
- # instance finish initializing before Amazon EC2 Auto Scaling aggregates
427
- # instance metrics, resulting in more reliable usage data. Set this
428
- # value equal to the amount of time that it takes for resource
429
- # consumption to become stable after an instance reaches the `InService`
430
- # state. For more information, see [Set the default instance warmup for
431
- # an Auto Scaling group][1] in the *Amazon EC2 Auto Scaling User Guide*.
432
- #
433
- # To manage your warm-up settings at the group level, we recommend that
434
- # you set the default instance warmup, *even if its value is set to 0
435
- # seconds*. This also optimizes the performance of scaling policies that
436
- # scale continuously, such as target tracking and step scaling policies.
437
- #
438
- # If you need to remove a value that you previously set, include the
424
+ # The amount of time, in seconds, until a new instance is considered to
425
+ # have finished initializing and resource consumption to become stable
426
+ # after it enters the `InService` state.
427
+ #
428
+ # During an instance refresh, Amazon EC2 Auto Scaling waits for the
429
+ # warm-up period after it replaces an instance before it moves on to
430
+ # replacing the next instance. Amazon EC2 Auto Scaling also waits for
431
+ # the warm-up period before aggregating the metrics for new instances
432
+ # with existing instances in the Amazon CloudWatch metrics that are used
433
+ # for scaling, resulting in more reliable usage data. For more
434
+ # information, see [Set the default instance warmup for an Auto Scaling
435
+ # group][1] in the *Amazon EC2 Auto Scaling User Guide*.
436
+ #
437
+ # To manage various warm-up settings at the group level, we recommend
438
+ # that you set the default instance warmup, *even if it is set to 0
439
+ # seconds*. To remove a value that you previously set, include the
439
440
  # property but specify `-1` for the value. However, we strongly
440
441
  # recommend keeping the default instance warmup enabled by specifying a
441
- # minimum value of `0`.
442
+ # value of `0` or other nominal value.
442
443
  #
443
444
  # Default: None
444
445
  #