estimate_template_cost ( $opt )

Returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • TemplateBody - string - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.
  • TemplateURL - string - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
  • Parameters - array - Optional - A list of Parameter structures that specify input parameters.
    • x - array - Optional - This represents a simple array index.
      • ParameterKey - string - Optional - The key associated with the parameter.
      • ParameterValue - string - Optional - The value associated with the parameter.
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/cloudformation.class.php | Toggle source view (15 lines) | View on GitHub

public function estimate_template_cost($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional list + map
    if (isset($opt['Parameters']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'Parameters' => $opt['Parameters']
        ), 'member'));
        unset($opt['Parameters']);
    }

    return $this->authenticate('EstimateTemplateCost', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback