/** * <p> * 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 <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template Anatomy</a> * in the AWS CloudFormation User Guide. * </p> * <p> * Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only * <code>TemplateBody</code> is used. * </p> * * @param 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 <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template * Anatomy</a> in the AWS CloudFormation User Guide.</p> * <p> * Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only * <code>TemplateBody</code> is used. * @return Returns a reference to this object so that method calls can be chained together. */ public ValidateTemplateRequest withTemplateBody(String templateBody) { setTemplateBody(templateBody); return this; }
/** * <p> * 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 <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template Anatomy</a> * in the AWS CloudFormation User Guide. * </p> * <p> * Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only * <code>TemplateBody</code> is used. * </p> * * @param 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 <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html">Template * Anatomy</a> in the AWS CloudFormation User Guide.</p> * <p> * Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only * <code>TemplateBody</code> is used. * @return Returns a reference to this object so that method calls can be chained together. */ public ValidateTemplateRequest withTemplateBody(String templateBody) { setTemplateBody(templateBody); return this; }
request.setTemplateBody(contents); if (validate) { ValidateTemplateResult result=client.validateTemplate(request);