This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-docdb/source/model/RestoreDBClusterFromSnapshotRequest.cpp

127 lines
3.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/docdb/model/RestoreDBClusterFromSnapshotRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::DocDB::Model;
using namespace Aws::Utils;
RestoreDBClusterFromSnapshotRequest::RestoreDBClusterFromSnapshotRequest() :
m_availabilityZonesHasBeenSet(false),
m_dBClusterIdentifierHasBeenSet(false),
m_snapshotIdentifierHasBeenSet(false),
m_engineHasBeenSet(false),
m_engineVersionHasBeenSet(false),
m_port(0),
m_portHasBeenSet(false),
m_dBSubnetGroupNameHasBeenSet(false),
m_vpcSecurityGroupIdsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_kmsKeyIdHasBeenSet(false),
m_enableCloudwatchLogsExportsHasBeenSet(false),
m_deletionProtection(false),
m_deletionProtectionHasBeenSet(false)
{
}
Aws::String RestoreDBClusterFromSnapshotRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=RestoreDBClusterFromSnapshot&";
if(m_availabilityZonesHasBeenSet)
{
unsigned availabilityZonesCount = 1;
for(auto& item : m_availabilityZones)
{
ss << "AvailabilityZones.member." << availabilityZonesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
availabilityZonesCount++;
}
}
if(m_dBClusterIdentifierHasBeenSet)
{
ss << "DBClusterIdentifier=" << StringUtils::URLEncode(m_dBClusterIdentifier.c_str()) << "&";
}
if(m_snapshotIdentifierHasBeenSet)
{
ss << "SnapshotIdentifier=" << StringUtils::URLEncode(m_snapshotIdentifier.c_str()) << "&";
}
if(m_engineHasBeenSet)
{
ss << "Engine=" << StringUtils::URLEncode(m_engine.c_str()) << "&";
}
if(m_engineVersionHasBeenSet)
{
ss << "EngineVersion=" << StringUtils::URLEncode(m_engineVersion.c_str()) << "&";
}
if(m_portHasBeenSet)
{
ss << "Port=" << m_port << "&";
}
if(m_dBSubnetGroupNameHasBeenSet)
{
ss << "DBSubnetGroupName=" << StringUtils::URLEncode(m_dBSubnetGroupName.c_str()) << "&";
}
if(m_vpcSecurityGroupIdsHasBeenSet)
{
unsigned vpcSecurityGroupIdsCount = 1;
for(auto& item : m_vpcSecurityGroupIds)
{
ss << "VpcSecurityGroupIds.member." << vpcSecurityGroupIdsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
vpcSecurityGroupIdsCount++;
}
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
if(m_kmsKeyIdHasBeenSet)
{
ss << "KmsKeyId=" << StringUtils::URLEncode(m_kmsKeyId.c_str()) << "&";
}
if(m_enableCloudwatchLogsExportsHasBeenSet)
{
unsigned enableCloudwatchLogsExportsCount = 1;
for(auto& item : m_enableCloudwatchLogsExports)
{
ss << "EnableCloudwatchLogsExports.member." << enableCloudwatchLogsExportsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
enableCloudwatchLogsExportsCount++;
}
}
if(m_deletionProtectionHasBeenSet)
{
ss << "DeletionProtection=" << std::boolalpha << m_deletionProtection << "&";
}
ss << "Version=2014-10-31";
return ss.str();
}
void RestoreDBClusterFromSnapshotRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}