Class: DrawCloud::WaitHandle

Inherits:
Base
  • Object
show all
Defined in:
lib/draw_cloud/wait_handle.rb

Defined Under Namespace

Classes: WaitCondition

Instance Attribute Summary collapse

Attributes inherited from Base

#as_groups, #as_launch_configurations, #deletion_policy, #depends_on, #ec2_instances, #elastic_ips, #gateways, #iam_access_keys, #iam_policies, #iam_users, #mappings, #metadata, #network_acls, #network_interfaces, #outputs, #parameters, #parent, #rdses, #resources, #route_tables, #security_groups, #sns_topics, #subnets, #vpcs, #wait_handles

Instance Method Summary collapse

Methods inherited from Base

#accessor, #add_standard_properties, #create_as_group, #create_as_launch_configuration, #create_ec2_instance, #create_ec2_instance_template, #create_elastic_ip, #create_iam_access_key, #create_iam_policy, #create_iam_user, #create_mapping, #create_network_acl, #create_network_interface, #create_output, #create_parameter, #create_rds, #create_route_table, #create_security_group, #create_service, #create_sns_topic, #create_subnet, #create_vpc, #create_wait_handle, #ref

Methods included from Locations

#arn_s3

Methods included from Utilities

#desplice, #fnbase64, #fngetatt, #fnjoin, #hash_to_tag_array, #region, #resource_style, #splice, #stack_name

Constructor Details

#initialize(name, timeout = nil, options, &block) ⇒ WaitHandle

Returns a new instance of WaitHandle.



49
50
51
52
53
# File 'lib/draw_cloud/wait_handle.rb', line 49

def initialize(name, timeout=nil, options, &block)
  @name = name
  @timeout = timeout
  super(options, &block)
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



48
49
50
# File 'lib/draw_cloud/wait_handle.rb', line 48

def count
  @count
end

#nameObject

Returns the value of attribute name.



48
49
50
# File 'lib/draw_cloud/wait_handle.rb', line 48

def name
  @name
end

#timeoutObject

Returns the value of attribute timeout.



48
49
50
# File 'lib/draw_cloud/wait_handle.rb', line 48

def timeout
  @timeout
end

Instance Method Details

#[](attribute) ⇒ Object



55
56
57
# File 'lib/draw_cloud/wait_handle.rb', line 55

def [](attribute)
  fngetatt(condition, attribute)
end

#conditionObject



63
64
65
# File 'lib/draw_cloud/wait_handle.rb', line 63

def condition
  WaitCondition.new(self, timeout, count, depends_on)
end

#load_into_config(config) ⇒ Object



67
68
69
70
71
# File 'lib/draw_cloud/wait_handle.rb', line 67

def load_into_config(config)
  config.cf_add_resource resource_name, self
  config.cf_add_resource condition.resource_name, condition
  super(config)
end

#resource_nameObject



59
60
61
# File 'lib/draw_cloud/wait_handle.rb', line 59

def resource_name
  resource_style(name) + "WaitHandle"
end

#to_hObject



73
74
75
76
# File 'lib/draw_cloud/wait_handle.rb', line 73

def to_h
  # this class is a bit special - standard properties are added manually
  {"Type" => "AWS::CloudFormation::WaitConditionHandle"}
end