Support input parameter ClientToken for CreateAutoProvisioningGroup.
This commit is contained in:
@@ -279,6 +279,17 @@ void CreateAutoProvisioningGroupRequest::setLaunchConfigurationPasswordInherit(b
|
||||
setParameter("LaunchConfigurationPasswordInherit", launchConfigurationPasswordInherit ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateAutoProvisioningGroupRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateAutoProvisioningGroupRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string CreateAutoProvisioningGroupRequest::getLaunchConfigurationSecurityGroupId()const
|
||||
{
|
||||
return launchConfigurationSecurityGroupId_;
|
||||
|
||||
@@ -39,6 +39,25 @@ void CreateAutoProvisioningGroupResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLaunchResultsNode = value["LaunchResults"]["LaunchResult"];
|
||||
for (auto valueLaunchResultsLaunchResult : allLaunchResultsNode)
|
||||
{
|
||||
LaunchResult launchResultsObject;
|
||||
if(!valueLaunchResultsLaunchResult["SpotStrategy"].isNull())
|
||||
launchResultsObject.spotStrategy = valueLaunchResultsLaunchResult["SpotStrategy"].asString();
|
||||
if(!valueLaunchResultsLaunchResult["InstanceType"].isNull())
|
||||
launchResultsObject.instanceType = valueLaunchResultsLaunchResult["InstanceType"].asString();
|
||||
if(!valueLaunchResultsLaunchResult["ZoneId"].isNull())
|
||||
launchResultsObject.zoneId = valueLaunchResultsLaunchResult["ZoneId"].asString();
|
||||
if(!valueLaunchResultsLaunchResult["ErrorCode"].isNull())
|
||||
launchResultsObject.errorCode = valueLaunchResultsLaunchResult["ErrorCode"].asString();
|
||||
if(!valueLaunchResultsLaunchResult["ErrorMsg"].isNull())
|
||||
launchResultsObject.errorMsg = valueLaunchResultsLaunchResult["ErrorMsg"].asString();
|
||||
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
|
||||
for (auto value : allInstanceIds)
|
||||
launchResultsObject.instanceIds.push_back(value.asString());
|
||||
launchResults_.push_back(launchResultsObject);
|
||||
}
|
||||
if(!value["AutoProvisioningGroupId"].isNull())
|
||||
autoProvisioningGroupId_ = value["AutoProvisioningGroupId"].asString();
|
||||
|
||||
@@ -49,3 +68,8 @@ std::string CreateAutoProvisioningGroupResult::getAutoProvisioningGroupId()const
|
||||
return autoProvisioningGroupId_;
|
||||
}
|
||||
|
||||
std::vector<CreateAutoProvisioningGroupResult::LaunchResult> CreateAutoProvisioningGroupResult::getLaunchResults()const
|
||||
{
|
||||
return launchResults_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user