You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudFormation::StackResourceSummary

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb

Defined Under Namespace

Classes: Collection

Associations collapse

Read-Only Attributes collapse

Instance Method Summary collapse

Constructor Details

#initialize(stack_name, logical_id, options = {}) ⇒ StackResourceSummary #initialize(options = {}) ⇒ StackResourceSummary

Returns a new instance of StackResourceSummary

Overloads:

  • #initialize(stack_name, logical_id, options = {}) ⇒ StackResourceSummary

    Parameters:

    • stack_name (String)
    • logical_id (String)

    Options Hash (options):

  • #initialize(options = {}) ⇒ StackResourceSummary

    Options Hash (options):

    • :stack_name (required, String)
    • :logical_id (required, String)
    • :client (Client)


21
22
23
24
25
26
27
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 21

def initialize(*args)
  options = Hash === args.last ? args.pop.dup : {}
  @stack_name = extract_stack_name(args, options)
  @logical_id = extract_logical_id(args, options)
  @data = options.delete(:data)
  @client = options.delete(:client) || Client.new(options)
end

Instance Method Details

#clientClient

Returns:



81
82
83
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 81

def client
  @client
end

#dataTypes::StackResourceSummary

Returns the data for this Aws::CloudFormation::StackResourceSummary.

Returns:

Raises:



96
97
98
99
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 96

def data
  load unless @data
  @data
end

#data_loaded?Boolean

Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.

Returns:

  • (Boolean)

    Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.



104
105
106
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 104

def data_loaded?
  !!@data
end

#last_updated_timestampTime

Time the status was updated.

Returns:

  • (Time)


62
63
64
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 62

def last_updated_timestamp
  data.last_updated_timestamp
end

#logical_idString Also known as: logical_resource_id

Returns:

  • (String)


37
38
39
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 37

def logical_id
  @logical_id
end

#physical_resource_idString

The name or unique identifier that corresponds to a physical instance ID of the resource.

Returns:

  • (String)


45
46
47
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 45

def physical_resource_id
  data.physical_resource_id
end

#resourceStackResource

Returns:



111
112
113
114
115
116
117
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 111

def resource
  StackResource.new(
    logical_id: @logical_id,
    stack_name: @stack_name,
    client: @client
  )
end

#resource_statusString

Current status of the resource.

Returns:

  • (String)


68
69
70
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 68

def resource_status
  data.resource_status
end

#resource_status_reasonString

Success/failure message associated with the resource.

Returns:

  • (String)


74
75
76
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 74

def resource_status_reason
  data.resource_status_reason
end

#resource_typeString

Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)

Returns:

  • (String)


56
57
58
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 56

def resource_type
  data.resource_type
end

#stack_nameString

Returns:

  • (String)


32
33
34
# File 'gems/aws-sdk-cloudformation/lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 32

def stack_name
  @stack_name
end