- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
EstimateTemplateCostCommand
Returns the estimated monthly cost of a template. The return value is an Amazon Web Services Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudFormationClient, EstimateTemplateCostCommand } from "@aws-sdk/client-cloudformation"; // ES Modules import
// const { CloudFormationClient, EstimateTemplateCostCommand } = require("@aws-sdk/client-cloudformation"); // CommonJS import
const client = new CloudFormationClient(config);
const input = { // EstimateTemplateCostInput
TemplateBody: "STRING_VALUE",
TemplateURL: "STRING_VALUE",
Parameters: [ // Parameters
{ // Parameter
ParameterKey: "STRING_VALUE",
ParameterValue: "STRING_VALUE",
UsePreviousValue: true || false,
ResolvedValue: "STRING_VALUE",
},
],
};
const command = new EstimateTemplateCostCommand(input);
const response = await client.send(command);
// { // EstimateTemplateCostOutput
// Url: "STRING_VALUE",
// };
EstimateTemplateCostCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Parameters | Parameter[] | undefined | A list of |
TemplateBody | string | undefined | Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. Conditional: You must pass |
TemplateURL | string | undefined | The URL of a 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. The location for an Amazon S3 bucket must start with Conditional: You must pass |
EstimateTemplateCostCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Url | string | undefined | An Amazon Web Services Simple Monthly Calculator URL with a query string that describes the resources required to run the template. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CloudFormationServiceException | Base exception class for all service exceptions from CloudFormation service. |