'LogicalResourceId': resource_name,
}
result = c.describe_stack_resource(**parameters)
- print c.format_stack_resource(result)
+ print c.format_stack_resource_detail(result)
@utils.catch_error('resource-list')
logger = logging.getLogger(__name__)
from boto.cloudformation import CloudFormationConnection
+import json
class BotoClient(CloudFormationConnection):
ret.append("--")
return '\n'.join(ret)
+ def format_stack_resource_detail(self, res):
+ '''
+ Print response from describe_stack_resource call
+
+ Note pending upstream patch will make this response a
+ boto.cloudformation.stack.StackResourceDetail object
+ which aligns better with all the existing calls
+ see https://github.com/boto/boto/pull/857
+
+ For now, we format the dict response as a workaround
+ '''
+ resource_detail = res['DescribeStackResourceResponse'][
+ 'DescribeStackResourceResult']['StackResourceDetail']
+ ret = []
+ for key in resource_detail:
+ ret.append("%s : %s" % (key, resource_detail[key]))
+ return '\n'.join(ret)
+
def format_stack_summary(self, summaries):
'''
Return string formatted representation of
def format_stack_summary(self, summary):
return str(summary)
+ def format_stack_resource_detail(self, res):
+ return str(res)
+
def format_template(self, template):
return str(template)