AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ValidateTemplate operation. Validates a specified template. AWS CloudFormation first checks if the template is valid JSON. If it isn't, AWS CloudFormation checks if the template is valid YAML. If both these checks fail, AWS CloudFormation returns a template validation error.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CloudFormation.AmazonCloudFormationRequest
      Amazon.CloudFormation.Model.ValidateTemplateRequest

Namespace: Amazon.CloudFormation.Model
Assembly: AWSSDK.CloudFormation.dll
Version: 3.x.y.z

Syntax

C#
public class ValidateTemplateRequest : AmazonCloudFormationRequest
         IAmazonWebServiceRequest

The ValidateTemplateRequest type exposes the following members

Constructors

NameDescription
Public Method ValidateTemplateRequest()

Properties

NameTypeDescription
Public Property TemplateBody System.String

Gets and sets the property 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 TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

Public Property TemplateURL System.String

Gets and sets the property TemplateURL.

Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.

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

Examples

This example validates the specified template.

To validate an AWS CloudFormation template


var response = client.ValidateTemplate(new ValidateTemplateRequest 
{
    TemplateBody = "MyTemplate.json"
});

List capabilities = response.Capabilities;
string capabilitiesReason = response.CapabilitiesReason;
string description = response.Description;
List parameters = response.Parameters;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms