CloudFormation / Client / estimate_template_cost

estimate_template_cost#

CloudFormation.Client.estimate_template_cost(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.estimate_template_cost(
    TemplateBody='string',
    TemplateURL='string',
    Parameters=[
        {
            'ParameterKey': 'string',
            'ParameterValue': 'string',
            'UsePreviousValue': True|False,
            'ResolvedValue': 'string'
        },
    ]
)
Parameters:
  • TemplateBody (string) –

    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 CloudFormation User Guide.)

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

  • TemplateURL (string) –

    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 CloudFormation User Guide.

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

  • Parameters (list) –

    A list of Parameter structures that specify input parameters.

    • (dict) –

      The Parameter data type.

      • ParameterKey (string) –

        The key associated with the parameter. If you don’t specify a key and value for a particular parameter, CloudFormation uses the default value that’s specified in your template.

      • ParameterValue (string) –

        The input value associated with the parameter.

      • UsePreviousValue (boolean) –

        During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true, do not specify a parameter value.

      • ResolvedValue (string) –

        Read-only. The value that corresponds to a SSM parameter key. This field is returned only for SSM parameter types in the template.

Return type:

dict

Returns:

Response Syntax

{
    'Url': 'string'
}

Response Structure

  • (dict) –

    The output for a EstimateTemplateCost action.

    • Url (string) –

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