Sha256: 0e46c6bd553dc4195befbc78ef2257390e57174529a197808ca7e7e7c82808c7
Contents?: true
Size: 710 Bytes
Versions: 12
Compression:
Stored size: 710 Bytes
Contents
module Awspec::Type class EcsContainerInstance < Base aws_resource Aws::ECS::Types::ContainerInstance attr_accessor :cluster_name def initialize(container_instance) super @display_name = container_instance.split('/').last end def resource_via_client @resource_via_client ||= find_ecs_container_instances(@cluster_name, [@display_name]).first end def id @id ||= resource_via_client.container_instance_arn if resource_via_client end def cluster_name @cluster_name || 'default' end def active? resource_via_client.status == 'ACTIVE' end def inactive? resource_via_client.status == 'INACTIVE' end end end
Version data entries
12 entries across 12 versions & 1 rubygems