aptible-api 1.6.3 → 1.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8cc528901ec30b1988a8180773652503e06da040e80ba8fe8e504cc49d57bf8
4
- data.tar.gz: e1bf404cddd059e109d0f293ceb7abb74ca63e2933adf1375420dc8e05467483
3
+ metadata.gz: f74e4aec03b8e232c19b3e8eae44aeb9346a3317789607db7c5001adc7652713
4
+ data.tar.gz: dd48f3cb485205148b76df27ff80ce77890b300e0ea42d9a659736250872c31c
5
5
  SHA512:
6
- metadata.gz: f331dbfe536de347378c68b7a471ab6272f8557a56ffdad49963faed14841c5251aa57b9e376b42fbbd49a3f213b70569b5f31a18ded26cc3eca4f2729871017
7
- data.tar.gz: fb6e0fa361a89924535945d4583bb1aa01b07112df824f63931d9955dcf814f8594fbbad5e425e9e1b5e37a3dd84565d18c09f5aed401b2e1f91e303ded32f6e
6
+ metadata.gz: 7d56ce6a4778a5726285ccb71ae38d419e6114386281d13bf47724beeb91ef593abd4e47529c271983458abe976fd52b5b42d8e194c56fb4634392a3e2f52279
7
+ data.tar.gz: 4861e08ab34936daca714e8d2bc0907e326329f563f811b7f79e0db8ef6f4ebfa36d3f114042c0a08dc773bfd8a13a979a93f202127f7ae900b15f2acc7cba20
@@ -17,6 +17,7 @@ module Aptible
17
17
  has_many :metric_drains
18
18
  has_many :vhosts
19
19
  has_many :backup_retention_policies
20
+ has_many :service_sizing_policies
20
21
  embeds_many :log_drains
21
22
 
22
23
  field :id
@@ -35,6 +35,7 @@ require 'aptible/api/operation'
35
35
  require 'aptible/api/permission'
36
36
  require 'aptible/api/release'
37
37
  require 'aptible/api/service'
38
+ require 'aptible/api/service_sizing_policy'
38
39
  require 'aptible/api/source'
39
40
  require 'aptible/api/vhost'
40
41
  require 'aptible/api/ssh_portal_connection'
@@ -9,6 +9,7 @@ module Aptible
9
9
  has_many :operations
10
10
  has_many :releases
11
11
  has_many :disk_attachments
12
+ has_one :service_sizing_policy
12
13
 
13
14
  field :id
14
15
  field :handle
@@ -19,8 +20,25 @@ module Aptible
19
20
  field :container_count
20
21
  field :container_memory_limit_mb
21
22
  field :instance_class
23
+ field :force_zero_downtime
24
+ field :naive_health_check
22
25
  field :created_at, type: Time
23
26
  field :updated_at, type: Time
27
+
28
+ def create_service_sizing_policy!(params)
29
+ params = { token: token }.merge(params)
30
+
31
+ # First create a link object so we know where to go
32
+ link = HyperResource::Link.new(
33
+ self,
34
+ 'href' => "#{href}/service_sizing_policies"
35
+ )
36
+
37
+ # Now create the policy
38
+ link.create(
39
+ self.class.normalize_params(params)
40
+ )
41
+ end
24
42
  end
25
43
  end
26
44
  end
@@ -0,0 +1,33 @@
1
+ module Aptible
2
+ module Api
3
+ class ServiceSizingPolicy < Resource
4
+ belongs_to :account
5
+ has_many :services
6
+
7
+ field :id
8
+ field :created_at, type: Time
9
+ field :updated_at, type: Time
10
+
11
+ field :scaling_enabled
12
+ field :default_policy
13
+ field :metric_lookback_seconds
14
+ field :percentile
15
+ field :post_scale_up_cooldown_seconds
16
+ field :post_scale_down_cooldown_seconds
17
+ field :post_release_cooldown_seconds
18
+ field :mem_cpu_ratio_r_threshold
19
+ field :mem_cpu_ratio_c_threshold
20
+ field :mem_scale_up_threshold
21
+ field :mem_scale_down_threshold
22
+ field :minimum_memory
23
+ field :disable_recommendations
24
+ field :maximum_memory
25
+ field :cpu_consideration_threshold
26
+ field :autoscaling
27
+ field :min_cpu_threshold
28
+ field :max_cpu_threshold
29
+ field :min_containers
30
+ field :max_containers
31
+ end
32
+ end
33
+ end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Api
3
- VERSION = '1.6.3'.freeze
3
+ VERSION = '1.6.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-auth
@@ -233,6 +233,7 @@ files:
233
233
  - lib/aptible/api/resource.rb
234
234
  - lib/aptible/api/service.rb
235
235
  - lib/aptible/api/service_definition.rb
236
+ - lib/aptible/api/service_sizing_policy.rb
236
237
  - lib/aptible/api/source.rb
237
238
  - lib/aptible/api/ssh_portal_connection.rb
238
239
  - lib/aptible/api/stack.rb