Class: Aws::CloudFormation::StackResourceSummary

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

Defined Under Namespace

Classes: Collection

Read-Only Attributes collapse

Associations 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 '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 '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:

  • (NotImplementedError)

    Raises when #data_loaded? is ‘false`.



96
97
98
99
# File '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 'lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 104

def data_loaded?
  !!@data
end

#identifiersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


121
122
123
124
125
126
# File 'lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 121

def identifiers
  {
    stack_name: @stack_name,
    logical_id: @logical_id
  }
end

#last_updated_timestampTime

Time the status was updated.

Returns:

  • (Time)


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

def last_updated_timestamp
  data.last_updated_timestamp
end

#loadObject Also known as: reload

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (NotImplementedError)


87
88
89
90
# File 'lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 87

def load
  msg = "#load is not implemented, data only available via enumeration"
  raise NotImplementedError, msg
end

#logical_idString Also known as: logical_resource_id

Returns:

  • (String)


37
38
39
# File '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 '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 '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 '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 '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.)

[1]: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html

Returns:

  • (String)


56
57
58
# File '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 'lib/aws-sdk-cloudformation/stack_resource_summary.rb', line 32

def stack_name
  @stack_name
end