Class: Aws::ECS::Client
- Inherits:
-
Object
- Object
- Aws::ECS::Client
- Defined in:
- lib/core_ext/aws_ecs_client.rb
Overview
rubocop:disable Style/ClassAndModuleChildren
Instance Method Summary collapse
Instance Method Details
#upsert_service(options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/core_ext/aws_ecs_client.rb', line 4 def upsert_service() active_services = describe_services( cluster: [:cluster], services: [[:service]] ).services.any? { |svc| svc.status == 'ACTIVE' } if active_services send(:update_service, .tap { |o| o.delete(:load_balancers) }) else [:service_name] = .delete(:service) send(:create_service, ) end end |