54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/elasticache/model/CreateSnapshotRequest.h>
|
|||
|
|
#include <aws/core/utils/StringUtils.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSStringStream.h>
|
|||
|
|
|
|||
|
|
using namespace Aws::ElastiCache::Model;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
CreateSnapshotRequest::CreateSnapshotRequest() :
|
|||
|
|
m_replicationGroupIdHasBeenSet(false),
|
|||
|
|
m_cacheClusterIdHasBeenSet(false),
|
|||
|
|
m_snapshotNameHasBeenSet(false),
|
|||
|
|
m_kmsKeyIdHasBeenSet(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()) << "&";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ss << "Version=2015-02-02";
|
|||
|
|
return ss.str();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CreateSnapshotRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
|
|||
|
|
{
|
|||
|
|
uri.SetQueryString(SerializePayload());
|
|||
|
|
}
|