1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
module Fog
module AWS
class CloudFormation
class Real
require 'fog/aws/parsers/cloud_formation/get_template_summary'
# Returns information about a new or existing template.
#
# * options [Hash]:
# * stack_name [String] Name of the stack or the stack ID.
# or
# * TemplateBody [String] Structure containing the template body.
# or
# * TemplateURL [String] URL of file containing the template body.
#
# @return [Excon::Response]:
# * body [Hash:
# * Capabilities [Array] List of capabilties in the template.
# * CapabilitiesReason [String] The list of resources that generated the values in the Capabilities response element.
# * Description [String] Template Description.
# * Metadata [String] Template Metadata.
# * Parameters [Array] A list of parameter declarations that describe various properties for each parameter.
# * ResourceTypes [Array] all the template resource types that are defined in the template
#
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_GetTemplateSummary.html
def get_template_summary(options = {})
params = {}
if options['StackName']
params['StackName'] = options['StackName']
elsif options['TemplateBody']
params['TemplateBody'] = options['TemplateBody']
elsif options['TemplateURL']
params['TemplateURL'] = options['TemplateURL']
end
request({
'Action' => 'GetTemplateSummary',
:parser => Fog::Parsers::AWS::CloudFormation::GetTemplateSummary.new
}.merge!(params))
end
end
end
end
end
|