EstimateTemplateCost - AWS CloudFormation

EstimateTemplateCost

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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Parameters.member.N

A list of Parameter structures that specify input parameters.

Type: Array of Parameter objects

Required: No

TemplateBody

Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)

Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.

Type: String

Length Constraints: Minimum length of 1.

Required: No

TemplateURL

Location of file containing the template body. The URL must point to a template that's located in an Amazon S3 bucket or a Systems Manager document. For more information, go to Template Anatomy in the AWS CloudFormation User Guide. The location for an Amazon S3 bucket must start with https://.

Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

Response Elements

The following element is returned by the service.

Url

An AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

Examples

EstimateTemplateCost

This example illustrates one usage of EstimateTemplateCost.

Sample Request

https://cloudformation.us-east-1.amazonaws.com/ ?Action=EstimateTemplateCost &TemplateURL= https://s3.amazonaws.com/cloudformation-samples-us-east-1/Drupal_Simple.template &Version=2010-05-15 &SignatureVersion=2 &Timestamp=2011-12-04T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID] &Signature=[Signature]

Sample Response

<Response xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/"> <EstimateTemplateCostResult> <Url>http://calculator.s3.amazonaws.com/calc5.html?key=cf-2e351785-e821-450c-9d58-625e1e1ebfb6</Url> </EstimateTemplateCostResult> <ResponseMetadata> <RequestId>b9b4b068-3a41-11e5-94eb-example</RequestId> </ResponseMetadata> </Response>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: