本文整理汇总了C++中aws::StringStream::str方法的典型用法代码示例。如果您正苦于以下问题:C++ StringStream::str方法的具体用法?C++ StringStream::str怎么用?C++ StringStream::str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aws::StringStream
的用法示例。
在下文中一共展示了StringStream::str方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OutputToStream
void InstanceNetworkInterfaceSpecification::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_networkInterfaceIdHasBeenSet)
{
oStream << location << ".NetworkInterfaceId=" << StringUtils::URLEncode(m_networkInterfaceId.c_str()) << "&";
}
if(m_deviceIndexHasBeenSet)
{
oStream << location << ".DeviceIndex=" << m_deviceIndex << "&";
}
if(m_subnetIdHasBeenSet)
{
oStream << location << ".SubnetId=" << StringUtils::URLEncode(m_subnetId.c_str()) << "&";
}
if(m_descriptionHasBeenSet)
{
oStream << location << ".Description=" << StringUtils::URLEncode(m_description.c_str()) << "&";
}
if(m_privateIpAddressHasBeenSet)
{
oStream << location << ".PrivateIpAddress=" << StringUtils::URLEncode(m_privateIpAddress.c_str()) << "&";
}
if(m_groupsHasBeenSet)
{
unsigned groupsIdx = 1;
for(auto& item : m_groups)
{
oStream << location << ".SecurityGroupId." << groupsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_deleteOnTerminationHasBeenSet)
{
oStream << location << ".DeleteOnTermination=" << std::boolalpha << m_deleteOnTermination << "&";
}
if(m_privateIpAddressesHasBeenSet)
{
unsigned privateIpAddressesIdx = 1;
for(auto& item : m_privateIpAddresses)
{
Aws::StringStream privateIpAddressesSs;
privateIpAddressesSs << location << ".PrivateIpAddresses." << privateIpAddressesIdx++;
item.OutputToStream(oStream, privateIpAddressesSs.str().c_str());
}
}
if(m_secondaryPrivateIpAddressCountHasBeenSet)
{
oStream << location << ".SecondaryPrivateIpAddressCount=" << m_secondaryPrivateIpAddressCount << "&";
}
if(m_associatePublicIpAddressHasBeenSet)
{
oStream << location << ".AssociatePublicIpAddress=" << std::boolalpha << m_associatePublicIpAddress << "&";
}
if(m_ipv6AddressesHasBeenSet)
{
unsigned ipv6AddressesIdx = 1;
for(auto& item : m_ipv6Addresses)
{
Aws::StringStream ipv6AddressesSs;
ipv6AddressesSs << location << ".Ipv6Addresses." << ipv6AddressesIdx++;
item.OutputToStream(oStream, ipv6AddressesSs.str().c_str());
}
}
if(m_ipv6AddressCountHasBeenSet)
{
oStream << location << ".Ipv6AddressCount=" << m_ipv6AddressCount << "&";
}
}
示例2: OutputToStream
void ReservedNode::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_reservedNodeIdHasBeenSet)
{
oStream << location << index << locationValue << ".ReservedNodeId=" << StringUtils::URLEncode(m_reservedNodeId.c_str()) << "&";
}
if(m_reservedNodeOfferingIdHasBeenSet)
{
oStream << location << index << locationValue << ".ReservedNodeOfferingId=" << StringUtils::URLEncode(m_reservedNodeOfferingId.c_str()) << "&";
}
if(m_nodeTypeHasBeenSet)
{
oStream << location << index << locationValue << ".NodeType=" << StringUtils::URLEncode(m_nodeType.c_str()) << "&";
}
if(m_startTimeHasBeenSet)
{
oStream << location << index << locationValue << ".StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_durationHasBeenSet)
{
oStream << location << index << locationValue << ".Duration=" << m_duration << "&";
}
if(m_fixedPriceHasBeenSet)
{
oStream << location << index << locationValue << ".FixedPrice=" << StringUtils::URLEncode(m_fixedPrice) << "&";
}
if(m_usagePriceHasBeenSet)
{
oStream << location << index << locationValue << ".UsagePrice=" << StringUtils::URLEncode(m_usagePrice) << "&";
}
if(m_currencyCodeHasBeenSet)
{
oStream << location << index << locationValue << ".CurrencyCode=" << StringUtils::URLEncode(m_currencyCode.c_str()) << "&";
}
if(m_nodeCountHasBeenSet)
{
oStream << location << index << locationValue << ".NodeCount=" << m_nodeCount << "&";
}
if(m_stateHasBeenSet)
{
oStream << location << index << locationValue << ".State=" << StringUtils::URLEncode(m_state.c_str()) << "&";
}
if(m_offeringTypeHasBeenSet)
{
oStream << location << index << locationValue << ".OfferingType=" << StringUtils::URLEncode(m_offeringType.c_str()) << "&";
}
if(m_recurringChargesHasBeenSet)
{
unsigned recurringChargesIdx = 1;
for(auto& item : m_recurringCharges)
{
Aws::StringStream recurringChargesSs;
recurringChargesSs << location << index << locationValue << ".RecurringCharge." << recurringChargesIdx++;
item.OutputToStream(oStream, recurringChargesSs.str().c_str());
}
}
}
示例3: SerializePayload
Aws::String ModifyDBClusterRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ModifyDBCluster&";
if(m_dBClusterIdentifierHasBeenSet)
{
ss << "DBClusterIdentifier=" << StringUtils::URLEncode(m_dBClusterIdentifier.c_str()) << "&";
}
if(m_newDBClusterIdentifierHasBeenSet)
{
ss << "NewDBClusterIdentifier=" << StringUtils::URLEncode(m_newDBClusterIdentifier.c_str()) << "&";
}
if(m_applyImmediatelyHasBeenSet)
{
ss << "ApplyImmediately=" << m_applyImmediately << "&";
}
if(m_backupRetentionPeriodHasBeenSet)
{
ss << "BackupRetentionPeriod=" << m_backupRetentionPeriod << "&";
}
if(m_dBClusterParameterGroupNameHasBeenSet)
{
ss << "DBClusterParameterGroupName=" << StringUtils::URLEncode(m_dBClusterParameterGroupName.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_portHasBeenSet)
{
ss << "Port=" << m_port << "&";
}
if(m_masterUserPasswordHasBeenSet)
{
ss << "MasterUserPassword=" << StringUtils::URLEncode(m_masterUserPassword.c_str()) << "&";
}
if(m_optionGroupNameHasBeenSet)
{
ss << "OptionGroupName=" << StringUtils::URLEncode(m_optionGroupName.c_str()) << "&";
}
if(m_preferredBackupWindowHasBeenSet)
{
ss << "PreferredBackupWindow=" << StringUtils::URLEncode(m_preferredBackupWindow.c_str()) << "&";
}
if(m_preferredMaintenanceWindowHasBeenSet)
{
ss << "PreferredMaintenanceWindow=" << StringUtils::URLEncode(m_preferredMaintenanceWindow.c_str()) << "&";
}
ss << "Version=2014-10-31";
return ss.str();
}
示例4: SerializePayload
Aws::String UpdateEnvironmentRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=UpdateEnvironment&";
if(m_applicationNameHasBeenSet)
{
ss << "ApplicationName=" << StringUtils::URLEncode(m_applicationName.c_str()) << "&";
}
if(m_environmentIdHasBeenSet)
{
ss << "EnvironmentId=" << StringUtils::URLEncode(m_environmentId.c_str()) << "&";
}
if(m_environmentNameHasBeenSet)
{
ss << "EnvironmentName=" << StringUtils::URLEncode(m_environmentName.c_str()) << "&";
}
if(m_groupNameHasBeenSet)
{
ss << "GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&";
}
if(m_descriptionHasBeenSet)
{
ss << "Description=" << StringUtils::URLEncode(m_description.c_str()) << "&";
}
if(m_tierHasBeenSet)
{
m_tier.OutputToStream(ss, "Tier.");
}
if(m_versionLabelHasBeenSet)
{
ss << "VersionLabel=" << StringUtils::URLEncode(m_versionLabel.c_str()) << "&";
}
if(m_templateNameHasBeenSet)
{
ss << "TemplateName=" << StringUtils::URLEncode(m_templateName.c_str()) << "&";
}
if(m_solutionStackNameHasBeenSet)
{
ss << "SolutionStackName=" << StringUtils::URLEncode(m_solutionStackName.c_str()) << "&";
}
if(m_optionSettingsHasBeenSet)
{
unsigned optionSettingsCount = 1;
for(auto& item : m_optionSettings)
{
item.OutputToStream(ss, "OptionSettings.member.", optionSettingsCount, "");
optionSettingsCount++;
}
}
if(m_optionsToRemoveHasBeenSet)
{
unsigned optionsToRemoveCount = 1;
for(auto& item : m_optionsToRemove)
{
item.OutputToStream(ss, "OptionsToRemove.member.", optionsToRemoveCount, "");
optionsToRemoveCount++;
}
}
ss << "Version=2010-12-01";
return ss.str();
}
示例5: AddToNode
void DistributionConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_callerReferenceHasBeenSet)
{
XmlNode callerReferenceNode = parentNode.CreateChildElement("CallerReference");
callerReferenceNode.SetText(m_callerReference);
}
if(m_aliasesHasBeenSet)
{
XmlNode aliasesNode = parentNode.CreateChildElement("Aliases");
m_aliases.AddToNode(aliasesNode);
}
if(m_defaultRootObjectHasBeenSet)
{
XmlNode defaultRootObjectNode = parentNode.CreateChildElement("DefaultRootObject");
defaultRootObjectNode.SetText(m_defaultRootObject);
}
if(m_originsHasBeenSet)
{
XmlNode originsNode = parentNode.CreateChildElement("Origins");
m_origins.AddToNode(originsNode);
}
if(m_defaultCacheBehaviorHasBeenSet)
{
XmlNode defaultCacheBehaviorNode = parentNode.CreateChildElement("DefaultCacheBehavior");
m_defaultCacheBehavior.AddToNode(defaultCacheBehaviorNode);
}
if(m_cacheBehaviorsHasBeenSet)
{
XmlNode cacheBehaviorsNode = parentNode.CreateChildElement("CacheBehaviors");
m_cacheBehaviors.AddToNode(cacheBehaviorsNode);
}
if(m_customErrorResponsesHasBeenSet)
{
XmlNode customErrorResponsesNode = parentNode.CreateChildElement("CustomErrorResponses");
m_customErrorResponses.AddToNode(customErrorResponsesNode);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_loggingHasBeenSet)
{
XmlNode loggingNode = parentNode.CreateChildElement("Logging");
m_logging.AddToNode(loggingNode);
}
if(m_priceClassHasBeenSet)
{
XmlNode priceClassNode = parentNode.CreateChildElement("PriceClass");
priceClassNode.SetText(PriceClassMapper::GetNameForPriceClass(m_priceClass));
}
if(m_enabledHasBeenSet)
{
XmlNode enabledNode = parentNode.CreateChildElement("Enabled");
ss << m_enabled;
enabledNode.SetText(ss.str());
ss.str("");
}
if(m_viewerCertificateHasBeenSet)
{
XmlNode viewerCertificateNode = parentNode.CreateChildElement("ViewerCertificate");
m_viewerCertificate.AddToNode(viewerCertificateNode);
}
if(m_restrictionsHasBeenSet)
{
XmlNode restrictionsNode = parentNode.CreateChildElement("Restrictions");
m_restrictions.AddToNode(restrictionsNode);
}
}
示例6: canonicalHeadersString
bool AWSAuthV4Signer::PresignRequest(Aws::Http::HttpRequest& request, const char* region, const char* serviceName, long long expirationTimeInSeconds) const
{
AWSCredentials credentials = m_credentialsProvider->GetAWSCredentials();
//don't sign anonymous requests
if (credentials.GetAWSAccessKeyId().empty() || credentials.GetAWSSecretKey().empty())
{
return true;
}
Aws::StringStream intConversionStream;
intConversionStream << expirationTimeInSeconds;
request.AddQueryStringParameter(Http::X_AMZ_EXPIRES_HEADER, intConversionStream.str());
if (!credentials.GetSessionToken().empty())
{
request.AddQueryStringParameter(Http::AWS_SECURITY_TOKEN, credentials.GetSessionToken());
}
//calculate date header to use in internal signature (this also goes into date header).
DateTime now = GetSigningTimestamp();
Aws::String dateQueryValue = now.ToGmtString(LONG_DATE_FORMAT_STR);
request.AddQueryStringParameter(Http::AWS_DATE_HEADER, dateQueryValue);
Aws::StringStream ss;
ss << Http::HOST_HEADER << ":" << request.GetHeaderValue(Http::HOST_HEADER) << NEWLINE;
Aws::String canonicalHeadersString(ss.str());
ss.str("");
AWS_LOGSTREAM_DEBUG(v4LogTag, "Canonical Header String: " << canonicalHeadersString);
//calculate signed headers parameter
Aws::String signedHeadersValue(Http::HOST_HEADER);
request.AddQueryStringParameter(X_AMZ_SIGNED_HEADERS, signedHeadersValue);
AWS_LOGSTREAM_DEBUG(v4LogTag, "Signed Headers value: " << signedHeadersValue);
Aws::String simpleDate = now.ToGmtString(SIMPLE_DATE_FORMAT_STR);
ss << credentials.GetAWSAccessKeyId() << "/" << simpleDate
<< "/" << region << "/" << serviceName << "/" << AWS4_REQUEST;
request.AddQueryStringParameter(X_AMZ_ALGORITHM, AWS_HMAC_SHA256);
request.AddQueryStringParameter(X_AMZ_CREDENTIAL, ss.str());
ss.str("");
//generate generalized canonicalized request string.
Aws::String canonicalRequestString = CanonicalizeRequestSigningString(request, m_urlEscapePath);
//append v4 stuff to the canonical request string.
canonicalRequestString.append(canonicalHeadersString);
canonicalRequestString.append(NEWLINE);
canonicalRequestString.append(signedHeadersValue);
canonicalRequestString.append(NEWLINE);
canonicalRequestString.append(UNSIGNED_PAYLOAD);
AWS_LOGSTREAM_DEBUG(v4LogTag, "Canonical Request String: " << canonicalRequestString);
//now compute sha256 on that request string
auto hashResult = m_hash->Calculate(canonicalRequestString);
if (!hashResult.IsSuccess())
{
AWS_LOGSTREAM_ERROR(v4LogTag, "Failed to hash (sha256) request string \"" << canonicalRequestString << "\"");
return false;
}
auto sha256Digest = hashResult.GetResult();
auto cannonicalRequestHash = HashingUtils::HexEncode(sha256Digest);
auto stringToSign = GenerateStringToSign(dateQueryValue, simpleDate, cannonicalRequestHash);
auto finalSigningHash = GenerateSignature(credentials, stringToSign, simpleDate);
if (finalSigningHash.empty())
{
return false;
}
//add that the signature to the query string
request.AddQueryStringParameter(X_AMZ_SIGNATURE, finalSigningHash);
return true;
}
示例7: AddQueryStringParameters
void ListObjectVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_delimiterHasBeenSet)
{
ss << m_delimiter;
uri.AddQueryStringParameter("delimiter", ss.str());
ss.str("");
}
if(m_encodingTypeHasBeenSet)
{
ss << EncodingTypeMapper::GetNameForEncodingType(m_encodingType);
uri.AddQueryStringParameter("encoding-type", ss.str());
ss.str("");
}
if(m_keyMarkerHasBeenSet)
{
ss << m_keyMarker;
uri.AddQueryStringParameter("key-marker", ss.str());
ss.str("");
}
if(m_maxKeysHasBeenSet)
{
ss << m_maxKeys;
uri.AddQueryStringParameter("max-keys", ss.str());
ss.str("");
}
if(m_prefixHasBeenSet)
{
ss << m_prefix;
uri.AddQueryStringParameter("prefix", ss.str());
ss.str("");
}
if(m_versionIdMarkerHasBeenSet)
{
ss << m_versionIdMarker;
uri.AddQueryStringParameter("version-id-marker", ss.str());
ss.str("");
}
}
示例8: AddToNode
void DistributionSummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_aRNHasBeenSet)
{
XmlNode aRNNode = parentNode.CreateChildElement("ARN");
aRNNode.SetText(m_aRN);
}
if(m_statusHasBeenSet)
{
XmlNode statusNode = parentNode.CreateChildElement("Status");
statusNode.SetText(m_status);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_domainNameHasBeenSet)
{
XmlNode domainNameNode = parentNode.CreateChildElement("DomainName");
domainNameNode.SetText(m_domainName);
}
if(m_aliasesHasBeenSet)
{
XmlNode aliasesNode = parentNode.CreateChildElement("Aliases");
m_aliases.AddToNode(aliasesNode);
}
if(m_originsHasBeenSet)
{
XmlNode originsNode = parentNode.CreateChildElement("Origins");
m_origins.AddToNode(originsNode);
}
if(m_defaultCacheBehaviorHasBeenSet)
{
XmlNode defaultCacheBehaviorNode = parentNode.CreateChildElement("DefaultCacheBehavior");
m_defaultCacheBehavior.AddToNode(defaultCacheBehaviorNode);
}
if(m_cacheBehaviorsHasBeenSet)
{
XmlNode cacheBehaviorsNode = parentNode.CreateChildElement("CacheBehaviors");
m_cacheBehaviors.AddToNode(cacheBehaviorsNode);
}
if(m_customErrorResponsesHasBeenSet)
{
XmlNode customErrorResponsesNode = parentNode.CreateChildElement("CustomErrorResponses");
m_customErrorResponses.AddToNode(customErrorResponsesNode);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_priceClassHasBeenSet)
{
XmlNode priceClassNode = parentNode.CreateChildElement("PriceClass");
priceClassNode.SetText(PriceClassMapper::GetNameForPriceClass(m_priceClass));
}
if(m_enabledHasBeenSet)
{
XmlNode enabledNode = parentNode.CreateChildElement("Enabled");
ss << std::boolalpha << m_enabled;
enabledNode.SetText(ss.str());
ss.str("");
}
if(m_viewerCertificateHasBeenSet)
{
XmlNode viewerCertificateNode = parentNode.CreateChildElement("ViewerCertificate");
m_viewerCertificate.AddToNode(viewerCertificateNode);
}
if(m_restrictionsHasBeenSet)
{
XmlNode restrictionsNode = parentNode.CreateChildElement("Restrictions");
m_restrictions.AddToNode(restrictionsNode);
}
if(m_webACLIdHasBeenSet)
{
XmlNode webACLIdNode = parentNode.CreateChildElement("WebACLId");
webACLIdNode.SetText(m_webACLId);
}
//.........这里部分代码省略.........
示例9: OutputToStream
void EnvironmentResourceDescription::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_environmentNameHasBeenSet)
{
oStream << location << ".EnvironmentName=" << StringUtils::URLEncode(m_environmentName.c_str()) << "&";
}
if(m_autoScalingGroupsHasBeenSet)
{
unsigned autoScalingGroupsIdx = 1;
for(auto& item : m_autoScalingGroups)
{
Aws::StringStream autoScalingGroupsSs;
autoScalingGroupsSs << location << ".AutoScalingGroups.member." << autoScalingGroupsIdx++;
item.OutputToStream(oStream, autoScalingGroupsSs.str().c_str());
}
}
if(m_instancesHasBeenSet)
{
unsigned instancesIdx = 1;
for(auto& item : m_instances)
{
Aws::StringStream instancesSs;
instancesSs << location << ".Instances.member." << instancesIdx++;
item.OutputToStream(oStream, instancesSs.str().c_str());
}
}
if(m_launchConfigurationsHasBeenSet)
{
unsigned launchConfigurationsIdx = 1;
for(auto& item : m_launchConfigurations)
{
Aws::StringStream launchConfigurationsSs;
launchConfigurationsSs << location << ".LaunchConfigurations.member." << launchConfigurationsIdx++;
item.OutputToStream(oStream, launchConfigurationsSs.str().c_str());
}
}
if(m_loadBalancersHasBeenSet)
{
unsigned loadBalancersIdx = 1;
for(auto& item : m_loadBalancers)
{
Aws::StringStream loadBalancersSs;
loadBalancersSs << location << ".LoadBalancers.member." << loadBalancersIdx++;
item.OutputToStream(oStream, loadBalancersSs.str().c_str());
}
}
if(m_triggersHasBeenSet)
{
unsigned triggersIdx = 1;
for(auto& item : m_triggers)
{
Aws::StringStream triggersSs;
triggersSs << location << ".Triggers.member." << triggersIdx++;
item.OutputToStream(oStream, triggersSs.str().c_str());
}
}
if(m_queuesHasBeenSet)
{
unsigned queuesIdx = 1;
for(auto& item : m_queues)
{
Aws::StringStream queuesSs;
queuesSs << location << ".Queues.member." << queuesIdx++;
item.OutputToStream(oStream, queuesSs.str().c_str());
}
}
}
示例10: OutputToStream
void Cluster::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_clusterIdentifierHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterIdentifier=" << StringUtils::URLEncode(m_clusterIdentifier.c_str()) << "&";
}
if(m_nodeTypeHasBeenSet)
{
oStream << location << index << locationValue << ".NodeType=" << StringUtils::URLEncode(m_nodeType.c_str()) << "&";
}
if(m_clusterStatusHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterStatus=" << StringUtils::URLEncode(m_clusterStatus.c_str()) << "&";
}
if(m_modifyStatusHasBeenSet)
{
oStream << location << index << locationValue << ".ModifyStatus=" << StringUtils::URLEncode(m_modifyStatus.c_str()) << "&";
}
if(m_masterUsernameHasBeenSet)
{
oStream << location << index << locationValue << ".MasterUsername=" << StringUtils::URLEncode(m_masterUsername.c_str()) << "&";
}
if(m_dBNameHasBeenSet)
{
oStream << location << index << locationValue << ".DBName=" << StringUtils::URLEncode(m_dBName.c_str()) << "&";
}
if(m_endpointHasBeenSet)
{
Aws::StringStream endpointLocationAndMemberSs;
endpointLocationAndMemberSs << location << index << locationValue << ".Endpoint";
m_endpoint.OutputToStream(oStream, endpointLocationAndMemberSs.str().c_str());
}
if(m_clusterCreateTimeHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterCreateTime=" << m_clusterCreateTime << "&";
}
if(m_automatedSnapshotRetentionPeriodHasBeenSet)
{
oStream << location << index << locationValue << ".AutomatedSnapshotRetentionPeriod=" << m_automatedSnapshotRetentionPeriod << "&";
}
if(m_clusterSecurityGroupsHasBeenSet)
{
for(auto& item : m_clusterSecurityGroups)
{
Aws::StringStream clusterSecurityGroupsSs;
clusterSecurityGroupsSs << location << index << locationValue << ".ClusterSecurityGroup";
item.OutputToStream(oStream, clusterSecurityGroupsSs.str().c_str());
}
}
if(m_vpcSecurityGroupsHasBeenSet)
{
for(auto& item : m_vpcSecurityGroups)
{
Aws::StringStream vpcSecurityGroupsSs;
vpcSecurityGroupsSs << location << index << locationValue << ".VpcSecurityGroup";
item.OutputToStream(oStream, vpcSecurityGroupsSs.str().c_str());
}
}
if(m_clusterParameterGroupsHasBeenSet)
{
for(auto& item : m_clusterParameterGroups)
{
Aws::StringStream clusterParameterGroupsSs;
clusterParameterGroupsSs << location << index << locationValue << ".ClusterParameterGroup";
item.OutputToStream(oStream, clusterParameterGroupsSs.str().c_str());
}
}
if(m_clusterSubnetGroupNameHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterSubnetGroupName=" << StringUtils::URLEncode(m_clusterSubnetGroupName.c_str()) << "&";
}
if(m_vpcIdHasBeenSet)
{
oStream << location << index << locationValue << ".VpcId=" << StringUtils::URLEncode(m_vpcId.c_str()) << "&";
}
if(m_availabilityZoneHasBeenSet)
{
oStream << location << index << locationValue << ".AvailabilityZone=" << StringUtils::URLEncode(m_availabilityZone.c_str()) << "&";
}
if(m_preferredMaintenanceWindowHasBeenSet)
{
oStream << location << index << locationValue << ".PreferredMaintenanceWindow=" << StringUtils::URLEncode(m_preferredMaintenanceWindow.c_str()) << "&";
}
if(m_pendingModifiedValuesHasBeenSet)
{
Aws::StringStream pendingModifiedValuesLocationAndMemberSs;
pendingModifiedValuesLocationAndMemberSs << location << index << locationValue << ".PendingModifiedValues";
m_pendingModifiedValues.OutputToStream(oStream, pendingModifiedValuesLocationAndMemberSs.str().c_str());
}
if(m_clusterVersionHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterVersion=" << StringUtils::URLEncode(m_clusterVersion.c_str()) << "&";
}
if(m_allowVersionUpgradeHasBeenSet)
{
oStream << location << index << locationValue << ".AllowVersionUpgrade=" << m_allowVersionUpgrade << "&";
}
if(m_numberOfNodesHasBeenSet)
{
oStream << location << index << locationValue << ".NumberOfNodes=" << m_numberOfNodes << "&";
//.........这里部分代码省略.........
示例11: SerializePayload
Aws::String RequestSpotInstancesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=SpotInstances&";
if(m_dryRunHasBeenSet)
{
ss << "DryRun=" << m_dryRun << "&";
}
if(m_spotPriceHasBeenSet)
{
ss << "SpotPrice=" << StringUtils::URLEncode(m_spotPrice.c_str()) << "&";
}
if(m_clientTokenHasBeenSet)
{
ss << "ClientToken=" << StringUtils::URLEncode(m_clientToken.c_str()) << "&";
}
if(m_instanceCountHasBeenSet)
{
ss << "InstanceCount=" << m_instanceCount << "&";
}
if(m_typeHasBeenSet)
{
ss << "Type=" << SpotInstanceTypeMapper::GetNameForSpotInstanceType(m_type) << "&";
}
if(m_validFromHasBeenSet)
{
ss << "ValidFrom=" << StringUtils::URLEncode(m_validFrom.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_validUntilHasBeenSet)
{
ss << "ValidUntil=" << StringUtils::URLEncode(m_validUntil.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_launchGroupHasBeenSet)
{
ss << "LaunchGroup=" << StringUtils::URLEncode(m_launchGroup.c_str()) << "&";
}
if(m_availabilityZoneGroupHasBeenSet)
{
ss << "AvailabilityZoneGroup=" << StringUtils::URLEncode(m_availabilityZoneGroup.c_str()) << "&";
}
if(m_blockDurationMinutesHasBeenSet)
{
ss << "BlockDurationMinutes=" << m_blockDurationMinutes << "&";
}
if(m_launchSpecificationHasBeenSet)
{
m_launchSpecification.OutputToStream(ss, "LaunchSpecification");
}
ss << "Version=2015-10-01";
return ss.str();
}
示例12: SerializePayload
Aws::String SendEmailRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=SendEmail&";
if(m_sourceHasBeenSet)
{
ss << "Source=" << StringUtils::URLEncode(m_source.c_str()) << "&";
}
if(m_destinationHasBeenSet)
{
m_destination.OutputToStream(ss, "Destination");
}
if(m_messageHasBeenSet)
{
m_message.OutputToStream(ss, "Message");
}
if(m_replyToAddressesHasBeenSet)
{
unsigned replyToAddressesCount = 1;
for(auto& item : m_replyToAddresses)
{
ss << "ReplyToAddresses.member." << replyToAddressesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
replyToAddressesCount++;
}
}
if(m_returnPathHasBeenSet)
{
ss << "ReturnPath=" << StringUtils::URLEncode(m_returnPath.c_str()) << "&";
}
if(m_sourceArnHasBeenSet)
{
ss << "SourceArn=" << StringUtils::URLEncode(m_sourceArn.c_str()) << "&";
}
if(m_returnPathArnHasBeenSet)
{
ss << "ReturnPathArn=" << StringUtils::URLEncode(m_returnPathArn.c_str()) << "&";
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
if(m_configurationSetNameHasBeenSet)
{
ss << "ConfigurationSetName=" << StringUtils::URLEncode(m_configurationSetName.c_str()) << "&";
}
ss << "Version=2010-12-01";
return ss.str();
}
示例13: OutputToStream
void ScalingPolicy::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_autoScalingGroupNameHasBeenSet)
{
oStream << location << ".AutoScalingGroupName=" << StringUtils::URLEncode(m_autoScalingGroupName.c_str()) << "&";
}
if(m_policyNameHasBeenSet)
{
oStream << location << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&";
}
if(m_policyARNHasBeenSet)
{
oStream << location << ".PolicyARN=" << StringUtils::URLEncode(m_policyARN.c_str()) << "&";
}
if(m_policyTypeHasBeenSet)
{
oStream << location << ".PolicyType=" << StringUtils::URLEncode(m_policyType.c_str()) << "&";
}
if(m_adjustmentTypeHasBeenSet)
{
oStream << location << ".AdjustmentType=" << StringUtils::URLEncode(m_adjustmentType.c_str()) << "&";
}
if(m_minAdjustmentStepHasBeenSet)
{
oStream << location << ".MinAdjustmentStep=" << m_minAdjustmentStep << "&";
}
if(m_minAdjustmentMagnitudeHasBeenSet)
{
oStream << location << ".MinAdjustmentMagnitude=" << m_minAdjustmentMagnitude << "&";
}
if(m_scalingAdjustmentHasBeenSet)
{
oStream << location << ".ScalingAdjustment=" << m_scalingAdjustment << "&";
}
if(m_cooldownHasBeenSet)
{
oStream << location << ".Cooldown=" << m_cooldown << "&";
}
if(m_stepAdjustmentsHasBeenSet)
{
unsigned stepAdjustmentsIdx = 1;
for(auto& item : m_stepAdjustments)
{
Aws::StringStream stepAdjustmentsSs;
stepAdjustmentsSs << location << ".StepAdjustments.member." << stepAdjustmentsIdx++;
item.OutputToStream(oStream, stepAdjustmentsSs.str().c_str());
}
}
if(m_metricAggregationTypeHasBeenSet)
{
oStream << location << ".MetricAggregationType=" << StringUtils::URLEncode(m_metricAggregationType.c_str()) << "&";
}
if(m_estimatedInstanceWarmupHasBeenSet)
{
oStream << location << ".EstimatedInstanceWarmup=" << m_estimatedInstanceWarmup << "&";
}
if(m_alarmsHasBeenSet)
{
unsigned alarmsIdx = 1;
for(auto& item : m_alarms)
{
Aws::StringStream alarmsSs;
alarmsSs << location << ".Alarms.member." << alarmsIdx++;
item.OutputToStream(oStream, alarmsSs.str().c_str());
}
}
}
示例14: SerializePayload
Aws::String RegisterImageRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=RegisterImage&";
if(m_dryRunHasBeenSet)
{
ss << "DryRun=" << m_dryRun << "&";
}
if(m_imageLocationHasBeenSet)
{
ss << "ImageLocation=" << StringUtils::URLEncode(m_imageLocation.c_str()) << "&";
}
if(m_nameHasBeenSet)
{
ss << "Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_descriptionHasBeenSet)
{
ss << "Description=" << StringUtils::URLEncode(m_description.c_str()) << "&";
}
if(m_architectureHasBeenSet)
{
ss << "Architecture=" << ArchitectureValuesMapper::GetNameForArchitectureValues(m_architecture) << "&";
}
if(m_kernelIdHasBeenSet)
{
ss << "KernelId=" << StringUtils::URLEncode(m_kernelId.c_str()) << "&";
}
if(m_ramdiskIdHasBeenSet)
{
ss << "RamdiskId=" << StringUtils::URLEncode(m_ramdiskId.c_str()) << "&";
}
if(m_rootDeviceNameHasBeenSet)
{
ss << "RootDeviceName=" << StringUtils::URLEncode(m_rootDeviceName.c_str()) << "&";
}
if(m_blockDeviceMappingsHasBeenSet)
{
unsigned blockDeviceMappingsCount = 1;
for(auto& item : m_blockDeviceMappings)
{
item.OutputToStream(ss, "BlockDeviceMapping.", blockDeviceMappingsCount, "");
blockDeviceMappingsCount++;
}
}
if(m_virtualizationTypeHasBeenSet)
{
ss << "VirtualizationType=" << StringUtils::URLEncode(m_virtualizationType.c_str()) << "&";
}
if(m_sriovNetSupportHasBeenSet)
{
ss << "SriovNetSupport=" << StringUtils::URLEncode(m_sriovNetSupport.c_str()) << "&";
}
ss << "Version=2015-10-01";
return ss.str();
}
示例15: SerializePayload
Aws::String RestoreDBClusterToPointInTimeRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=RestoreDBClusterToPointInTime&";
if(m_dBClusterIdentifierHasBeenSet)
{
ss << "DBClusterIdentifier=" << StringUtils::URLEncode(m_dBClusterIdentifier.c_str()) << "&";
}
if(m_sourceDBClusterIdentifierHasBeenSet)
{
ss << "SourceDBClusterIdentifier=" << StringUtils::URLEncode(m_sourceDBClusterIdentifier.c_str()) << "&";
}
if(m_restoreToTimeHasBeenSet)
{
ss << "RestoreToTime=" << StringUtils::URLEncode(m_restoreToTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_useLatestRestorableTimeHasBeenSet)
{
ss << "UseLatestRestorableTime=" << std::boolalpha << m_useLatestRestorableTime << "&";
}
if(m_portHasBeenSet)
{
ss << "Port=" << m_port << "&";
}
if(m_dBSubnetGroupNameHasBeenSet)
{
ss << "DBSubnetGroupName=" << StringUtils::URLEncode(m_dBSubnetGroupName.c_str()) << "&";
}
if(m_optionGroupNameHasBeenSet)
{
ss << "OptionGroupName=" << StringUtils::URLEncode(m_optionGroupName.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_enableIAMDatabaseAuthenticationHasBeenSet)
{
ss << "EnableIAMDatabaseAuthentication=" << std::boolalpha << m_enableIAMDatabaseAuthentication << "&";
}
ss << "Version=2014-10-31";
return ss.str();
}