/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::EC2::Model; using namespace Aws::Utils; CreateLaunchTemplateRequest::CreateLaunchTemplateRequest() : m_dryRun(false), m_dryRunHasBeenSet(false), m_clientTokenHasBeenSet(false), m_launchTemplateNameHasBeenSet(false), m_versionDescriptionHasBeenSet(false), m_launchTemplateDataHasBeenSet(false), m_tagSpecificationsHasBeenSet(false) { } Aws::String CreateLaunchTemplateRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=CreateLaunchTemplate&"; if(m_dryRunHasBeenSet) { ss << "DryRun=" << std::boolalpha << m_dryRun << "&"; } if(m_clientTokenHasBeenSet) { ss << "ClientToken=" << StringUtils::URLEncode(m_clientToken.c_str()) << "&"; } if(m_launchTemplateNameHasBeenSet) { ss << "LaunchTemplateName=" << StringUtils::URLEncode(m_launchTemplateName.c_str()) << "&"; } if(m_versionDescriptionHasBeenSet) { ss << "VersionDescription=" << StringUtils::URLEncode(m_versionDescription.c_str()) << "&"; } if(m_launchTemplateDataHasBeenSet) { m_launchTemplateData.OutputToStream(ss, "LaunchTemplateData"); } if(m_tagSpecificationsHasBeenSet) { unsigned tagSpecificationsCount = 1; for(auto& item : m_tagSpecifications) { item.OutputToStream(ss, "TagSpecification.", tagSpecificationsCount, ""); tagSpecificationsCount++; } } ss << "Version=2016-11-15"; return ss.str(); } void CreateLaunchTemplateRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const { uri.SetQueryString(SerializePayload()); }