Module: Tapjoy::TassLib::AWS::Autoscaling
- Defined in:
- lib/tapjoy/tass-lib/autoscaling.rb,
lib/tapjoy/tass-lib/Autoscaling/group.rb,
lib/tapjoy/tass-lib/Autoscaling/launch_config.rb
Overview
This class contains AWS methods for ELB
Defined Under Namespace
Modules: Group, LaunchConfig
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
7
8
9
|
# File 'lib/tapjoy/tass-lib/autoscaling.rb', line 7
def client
@client ||= Aws::AutoScaling::Client.new
end
|
.delete_policy(policy:) ⇒ Object
36
37
38
39
40
|
# File 'lib/tapjoy/tass-lib/autoscaling.rb', line 36
def delete_policy(policy:)
self.client.delete_policy(
auto_scaling_group_name: Tapjoy::TassLib.scaler_name,
policy_name: policy)
end
|
.describe_policies(policy:) ⇒ Object
30
31
32
33
34
|
# File 'lib/tapjoy/tass-lib/autoscaling.rb', line 30
def describe_policies(policy:)
self.client.describe_policies(
auto_scaling_group_name: Tapjoy::TassLib.scaler_name,
policy_names: [policy])
end
|
.put_notification_configuration(sns_base_arn:, **unused_values) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/tapjoy/tass-lib/autoscaling.rb', line 11
def put_notification_configuration(sns_base_arn:, **unused_values)
self.client.put_notification_configuration(
auto_scaling_group_name: Tapjoy::TassLib.scaler_name,
topic_arn: "#{sns_base_arn}:InstanceTerminated",
notification_types: ['autoscaling:EC2_INSTANCE_TERMINATE']
)
end
|
.put_scaling_policy(policy_name: policy, scaling_adjustment:, cooldown:, **unused_values) ⇒ Object
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/tapjoy/tass-lib/autoscaling.rb', line 19
def put_scaling_policy(policy_name: policy, scaling_adjustment:,
cooldown:, **unused_values)
self.client.put_scaling_policy(policy_name: policy_name,
auto_scaling_group_name: Tapjoy::TassLib.scaler_name,
scaling_adjustment: scaling_adjustment,
cooldown: cooldown,
adjustment_type: 'ChangeInCapacity'
)[0]
end
|