class Awspec::Type::EcsCluster

Constants

STATES

Public Class Methods

new(name) click to toggle source
Calls superclass method
# File lib/awspec/type/ecs_cluster.rb, line 5
def initialize(name)
  super
  @display_name = name
end

Public Instance Methods

container_instance_arns() click to toggle source

deprecated method

# File lib/awspec/type/ecs_cluster.rb, line 32
def container_instance_arns
  puts ''
  warn Color.on_red(Color.white("!!! `#{__method__}` is deprecated. awspec don't provide complex result !!!"))
  @container_instance_arns ||= select_ecs_container_instance_arn_by_cluster_name(id)
end
container_instances() click to toggle source

deprecated method

# File lib/awspec/type/ecs_cluster.rb, line 39
def container_instances
  puts ''
  warn Color.on_red(Color.white("!!! `#{__method__}` is deprecated. awspec don't provide complex result !!!"))
  return @container_instances if @container_instances

  arns = container_instance_arns
  @container_instances ||=
    arns.empty? ? [] : find_ecs_container_instances(id, arns).map! { |ci| EcsContainerInstance.new(id, ci) }
end
has_container_instance?(arn_or_uuid) click to toggle source
# File lib/awspec/type/ecs_cluster.rb, line 26
def has_container_instance?(arn_or_uuid)
  uuid = arn_or_uuid.split('/').last
  find_ecs_container_instance(id, uuid)
end
id() click to toggle source
# File lib/awspec/type/ecs_cluster.rb, line 14
def id
  @id ||= resource_via_client.cluster_name if resource_via_client
end
resource_via_client() click to toggle source
# File lib/awspec/type/ecs_cluster.rb, line 10
def resource_via_client
  @resource_via_client ||= find_ecs_cluster(@display_name)
end