/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ElastiCache::Model; using namespace Aws::Utils; CreateSnapshotRequest::CreateSnapshotRequest() : m_replicationGroupIdHasBeenSet(false), m_cacheClusterIdHasBeenSet(false), m_snapshotNameHasBeenSet(false), m_kmsKeyIdHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateSnapshotRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=CreateSnapshot&"; if(m_replicationGroupIdHasBeenSet) { ss << "ReplicationGroupId=" << StringUtils::URLEncode(m_replicationGroupId.c_str()) << "&"; } if(m_cacheClusterIdHasBeenSet) { ss << "CacheClusterId=" << StringUtils::URLEncode(m_cacheClusterId.c_str()) << "&"; } if(m_snapshotNameHasBeenSet) { ss << "SnapshotName=" << StringUtils::URLEncode(m_snapshotName.c_str()) << "&"; } if(m_kmsKeyIdHasBeenSet) { ss << "KmsKeyId=" << StringUtils::URLEncode(m_kmsKeyId.c_str()) << "&"; } if(m_tagsHasBeenSet) { unsigned tagsCount = 1; for(auto& item : m_tags) { item.OutputToStream(ss, "Tags.member.", tagsCount, ""); tagsCount++; } } ss << "Version=2015-02-02"; return ss.str(); } void CreateSnapshotRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const { uri.SetQueryString(SerializePayload()); }