Support Storage And Network Features For LaunchTemplate.

This commit is contained in:
sdk-team
2022-07-11 12:00:42 +00:00
parent 55ce8a3d14
commit 949c6555a8
24 changed files with 256 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ public:
void setAutoReleaseTime(const std::string &autoReleaseTime);
long getOwnerId() const;
void setOwnerId(long ownerId);
std::string getSchedulerOptionsFenceId() const;
void setSchedulerOptionsFenceId(const std::string &schedulerOptionsFenceId);
std::string getPeriodUnit() const;
void setPeriodUnit(const std::string &periodUnit);
bool getAutoRenew() const;
@@ -107,6 +109,7 @@ private:
std::string ownerAccount_;
std::string autoReleaseTime_;
long ownerId_;
std::string schedulerOptionsFenceId_;
std::string periodUnit_;
bool autoRenew_;
int networkAttributesSlbUdpTimeout_;

View File

@@ -44,6 +44,8 @@ public:
void setTimeout(long timeout);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getContentEncoding() const;
void setContentEncoding(const std::string &contentEncoding);
std::string getResourceOwnerAccount() const;
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getOwnerAccount() const;
@@ -63,6 +65,7 @@ private:
std::string commandContent_;
long timeout_;
std::string regionId_;
std::string contentEncoding_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;

View File

@@ -42,6 +42,8 @@ public:
std::string description;
std::string securityGroupId;
std::string primaryIpAddress;
std::string instanceType;
std::string networkInterfaceTrafficMode;
};
struct DataDisk {
std::string performanceLevel;
@@ -53,6 +55,9 @@ public:
std::string category;
bool deleteWithInstance;
std::string encrypted;
std::string autoSnapshotPolicyId;
long provisionedIops;
bool burstingEnabled;
};
CreateLaunchTemplateRequest();
~CreateLaunchTemplateRequest();
@@ -80,6 +85,8 @@ public:
void setTemplateTag(const std::vector<TemplateTag> &templateTag);
std::vector<Tag> getTag() const;
void setTag(const std::vector<Tag> &tag);
std::string getSystemDiskAutoSnapshotPolicyId() const;
void setSystemDiskAutoSnapshotPolicyId(const std::string &systemDiskAutoSnapshotPolicyId);
int getPeriod() const;
void setPeriod(int period);
int getIpv6AddressCount() const;
@@ -94,6 +101,8 @@ public:
void setSpotStrategy(const std::string &spotStrategy);
std::string getPrivateIpAddress() const;
void setPrivateIpAddress(const std::string &privateIpAddress);
bool getSystemDiskBurstingEnabled() const;
void setSystemDiskBurstingEnabled(bool systemDiskBurstingEnabled);
std::string getInstanceName() const;
void setInstanceName(const std::string &instanceName);
std::string getInternetChargeType() const;
@@ -152,6 +161,8 @@ public:
void setSecurityGroupIds(const std::vector<std::string> &securityGroupIds);
std::vector<DataDisk> getDataDisk() const;
void setDataDisk(const std::vector<DataDisk> &dataDisk);
long getSystemDiskProvisionedIops() const;
void setSystemDiskProvisionedIops(long systemDiskProvisionedIops);
int getSystemDiskSize() const;
void setSystemDiskSize(int systemDiskSize);
std::string getVpcId() const;
@@ -172,6 +183,7 @@ private:
int systemDiskIops_;
std::vector<TemplateTag> templateTag_;
std::vector<Tag> tag_;
std::string systemDiskAutoSnapshotPolicyId_;
int period_;
int ipv6AddressCount_;
std::string templateResourceGroupId_;
@@ -179,6 +191,7 @@ private:
std::string vSwitchId_;
std::string spotStrategy_;
std::string privateIpAddress_;
bool systemDiskBurstingEnabled_;
std::string instanceName_;
std::string internetChargeType_;
std::string zoneId_;
@@ -208,6 +221,7 @@ private:
int spotDuration_;
std::vector<std::string> securityGroupIds_;
std::vector<DataDisk> dataDisk_;
long systemDiskProvisionedIops_;
int systemDiskSize_;
std::string vpcId_;
std::string systemDiskDescription_;

View File

@@ -38,6 +38,8 @@ public:
std::string description;
std::string securityGroupId;
std::string primaryIpAddress;
std::string instanceType;
std::string networkInterfaceTrafficMode;
};
struct DataDisk {
std::string performanceLevel;
@@ -49,6 +51,9 @@ public:
std::string category;
bool deleteWithInstance;
std::string encrypted;
long provisionedIops;
bool burstingEnabled;
std::string autoSnapshotPolicyId;
};
CreateLaunchTemplateVersionRequest();
~CreateLaunchTemplateVersionRequest();
@@ -74,6 +79,8 @@ public:
void setSystemDiskIops(int systemDiskIops);
std::vector<Tag> getTag() const;
void setTag(const std::vector<Tag> &tag);
std::string getSystemDiskAutoSnapshotPolicyId() const;
void setSystemDiskAutoSnapshotPolicyId(const std::string &systemDiskAutoSnapshotPolicyId);
int getPeriod() const;
void setPeriod(int period);
std::string getLaunchTemplateId() const;
@@ -88,6 +95,8 @@ public:
void setSpotStrategy(const std::string &spotStrategy);
std::string getPrivateIpAddress() const;
void setPrivateIpAddress(const std::string &privateIpAddress);
bool getSystemDiskBurstingEnabled() const;
void setSystemDiskBurstingEnabled(bool systemDiskBurstingEnabled);
std::string getInstanceName() const;
void setInstanceName(const std::string &instanceName);
std::string getInternetChargeType() const;
@@ -146,6 +155,8 @@ public:
void setSecurityGroupIds(const std::vector<std::string> &securityGroupIds);
std::vector<DataDisk> getDataDisk() const;
void setDataDisk(const std::vector<DataDisk> &dataDisk);
long getSystemDiskProvisionedIops() const;
void setSystemDiskProvisionedIops(long systemDiskProvisionedIops);
int getSystemDiskSize() const;
void setSystemDiskSize(int systemDiskSize);
std::string getVpcId() const;
@@ -165,6 +176,7 @@ private:
std::string hostName_;
int systemDiskIops_;
std::vector<Tag> tag_;
std::string systemDiskAutoSnapshotPolicyId_;
int period_;
std::string launchTemplateId_;
int ipv6AddressCount_;
@@ -172,6 +184,7 @@ private:
std::string vSwitchId_;
std::string spotStrategy_;
std::string privateIpAddress_;
bool systemDiskBurstingEnabled_;
std::string instanceName_;
std::string internetChargeType_;
std::string zoneId_;
@@ -201,6 +214,7 @@ private:
int spotDuration_;
std::vector<std::string> securityGroupIds_;
std::vector<DataDisk> dataDisk_;
long systemDiskProvisionedIops_;
int systemDiskSize_;
std::string vpcId_;
std::string systemDiskDescription_;

View File

@@ -48,6 +48,8 @@ public:
void setContentEncoding(const std::string &contentEncoding);
long getPageSize() const;
void setPageSize(long pageSize);
bool getLatest() const;
void setLatest(bool latest);
std::string getResourceOwnerAccount() const;
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getOwnerAccount() const;
@@ -67,6 +69,7 @@ private:
std::string provider_;
std::string contentEncoding_;
long pageSize_;
bool latest_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;

View File

@@ -34,6 +34,15 @@ namespace AlibabaCloud
public:
struct Command
{
struct ParameterDefinition
{
std::string defaultValue;
std::string description;
bool required;
std::string parameterName;
std::vector<std::string> possibleValues;
};
std::vector<Command::ParameterDefinition> parameterDefinitions;
std::string description;
std::string category;
std::vector<std::string> parameterNames;

View File

@@ -34,6 +34,22 @@ namespace AlibabaCloud
public:
struct Image
{
struct DetectionOptions
{
struct Item
{
std::string riskCode;
std::string value;
std::string riskLevel;
std::string name;
};
std::string status;
std::vector<Item> items;
};
struct Features
{
std::string nvmeSupport;
};
struct DiskDeviceMapping
{
std::string snapshotId;
@@ -61,6 +77,8 @@ namespace AlibabaCloud
std::string oSName;
bool isPublic;
std::string imageId;
DetectionOptions detectionOptions;
Features features;
std::vector<Image::Tag> tags;
std::string oSNameEn;
bool loginAsNonRootSupported;

View File

@@ -55,8 +55,11 @@ namespace AlibabaCloud
std::string invocationStatus;
std::string parameters;
bool timed;
std::string commandDescription;
long timeout;
std::vector<Invocation::InvokeInstance> invokeInstances;
std::string commandContent;
std::string workingDir;
std::string repeatMode;
std::string invokeStatus;
std::string commandType;

View File

@@ -39,6 +39,7 @@ namespace AlibabaCloud
struct DataDisk
{
std::string snapshotId;
bool burstingEnabled;
std::string description;
std::string category;
std::string performanceLevel;
@@ -46,16 +47,20 @@ namespace AlibabaCloud
int size;
std::string encrypted;
bool deleteWithInstance;
std::string autoSnapshotPolicyId;
std::string diskName;
long provisionedIops;
};
struct NetworkInterface
{
std::string networkInterfaceTrafficMode;
std::string description;
std::vector<std::string> securityGroupIds1;
std::string vSwitchId;
std::string securityGroupId;
std::string networkInterfaceName;
std::string primaryIpAddress;
std::string instanceType;
};
struct InstanceTag
{
@@ -71,7 +76,9 @@ namespace AlibabaCloud
int systemDiskSize;
std::string systemDiskDescription;
std::string instanceChargeType;
long systemDiskProvisionedIops;
int spotDuration;
std::string systemDiskAutoSnapshotPolicyId;
std::string ramRoleName;
std::string systemDiskPerformanceLevel;
std::string networkType;
@@ -96,6 +103,7 @@ namespace AlibabaCloud
std::string internetChargeType;
std::string deploymentSetId;
std::string instanceName;
bool systemDiskBurstingEnabled;
bool systemDiskDeleteWithInstance;
bool enableVmOsConfig;
int internetMaxBandwidthOut;

View File

@@ -64,6 +64,8 @@ public:
void setArchitecture(const std::string &architecture);
std::string getLicenseType() const;
void setLicenseType(const std::string &licenseType);
std::string getDetectionStrategy() const;
void setDetectionStrategy(const std::string &detectionStrategy);
std::string getResourceOwnerAccount() const;
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getRoleName() const;
@@ -85,6 +87,7 @@ private:
std::vector<Tag> tag_;
std::string architecture_;
std::string licenseType_;
std::string detectionStrategy_;
std::string resourceOwnerAccount_;
std::string roleName_;
std::string oSType_;

View File

@@ -28,6 +28,9 @@ namespace Ecs {
namespace Model {
class ALIBABACLOUD_ECS_EXPORT ModifyImageAttributeRequest : public RpcServiceRequest {
public:
struct Features {
std::string nvmeSupport;
};
ModifyImageAttributeRequest();
~ModifyImageAttributeRequest();
long getResourceOwnerId() const;
@@ -36,6 +39,8 @@ public:
void setImageId(const std::string &imageId);
std::string getDescription() const;
void setDescription(const std::string &description);
Features getFeatures() const;
void setFeatures(const Features &features);
std::string getBootMode() const;
void setBootMode(const std::string &bootMode);
std::string getRegionId() const;
@@ -59,6 +64,7 @@ private:
long resourceOwnerId_;
std::string imageId_;
std::string description_;
Features features_;
std::string bootMode_;
std::string regionId_;
std::string imageName_;

View File

@@ -201,6 +201,15 @@ void AllocateDedicatedHostsRequest::setOwnerId(long ownerId) {
setParameter(std::string("OwnerId"), std::to_string(ownerId));
}
std::string AllocateDedicatedHostsRequest::getSchedulerOptionsFenceId() const {
return schedulerOptionsFenceId_;
}
void AllocateDedicatedHostsRequest::setSchedulerOptionsFenceId(const std::string &schedulerOptionsFenceId) {
schedulerOptionsFenceId_ = schedulerOptionsFenceId;
setParameter(std::string("SchedulerOptions.FenceId"), schedulerOptionsFenceId);
}
std::string AllocateDedicatedHostsRequest::getPeriodUnit() const {
return periodUnit_;
}

View File

@@ -88,6 +88,15 @@ void CreateCommandRequest::setRegionId(const std::string &regionId) {
setParameter(std::string("RegionId"), regionId);
}
std::string CreateCommandRequest::getContentEncoding() const {
return contentEncoding_;
}
void CreateCommandRequest::setContentEncoding(const std::string &contentEncoding) {
contentEncoding_ = contentEncoding;
setParameter(std::string("ContentEncoding"), contentEncoding);
}
std::string CreateCommandRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -143,6 +143,15 @@ void CreateLaunchTemplateRequest::setTag(const std::vector<CreateLaunchTemplateR
}
}
std::string CreateLaunchTemplateRequest::getSystemDiskAutoSnapshotPolicyId() const {
return systemDiskAutoSnapshotPolicyId_;
}
void CreateLaunchTemplateRequest::setSystemDiskAutoSnapshotPolicyId(const std::string &systemDiskAutoSnapshotPolicyId) {
systemDiskAutoSnapshotPolicyId_ = systemDiskAutoSnapshotPolicyId;
setParameter(std::string("SystemDisk.AutoSnapshotPolicyId"), systemDiskAutoSnapshotPolicyId);
}
int CreateLaunchTemplateRequest::getPeriod() const {
return period_;
}
@@ -206,6 +215,15 @@ void CreateLaunchTemplateRequest::setPrivateIpAddress(const std::string &private
setParameter(std::string("PrivateIpAddress"), privateIpAddress);
}
bool CreateLaunchTemplateRequest::getSystemDiskBurstingEnabled() const {
return systemDiskBurstingEnabled_;
}
void CreateLaunchTemplateRequest::setSystemDiskBurstingEnabled(bool systemDiskBurstingEnabled) {
systemDiskBurstingEnabled_ = systemDiskBurstingEnabled;
setParameter(std::string("SystemDisk.BurstingEnabled"), systemDiskBurstingEnabled ? "true" : "false");
}
std::string CreateLaunchTemplateRequest::getInstanceName() const {
return instanceName_;
}
@@ -400,6 +418,8 @@ void CreateLaunchTemplateRequest::setNetworkInterface(const std::vector<CreateLa
setParameter(networkInterfaceObjStr + ".Description", networkInterfaceObj.description);
setParameter(networkInterfaceObjStr + ".SecurityGroupId", networkInterfaceObj.securityGroupId);
setParameter(networkInterfaceObjStr + ".PrimaryIpAddress", networkInterfaceObj.primaryIpAddress);
setParameter(networkInterfaceObjStr + ".InstanceType", networkInterfaceObj.instanceType);
setParameter(networkInterfaceObjStr + ".NetworkInterfaceTrafficMode", networkInterfaceObj.networkInterfaceTrafficMode);
}
}
@@ -483,9 +503,21 @@ void CreateLaunchTemplateRequest::setDataDisk(const std::vector<CreateLaunchTemp
setParameter(dataDiskObjStr + ".Category", dataDiskObj.category);
setParameter(dataDiskObjStr + ".DeleteWithInstance", dataDiskObj.deleteWithInstance ? "true" : "false");
setParameter(dataDiskObjStr + ".Encrypted", dataDiskObj.encrypted);
setParameter(dataDiskObjStr + ".AutoSnapshotPolicyId", dataDiskObj.autoSnapshotPolicyId);
setParameter(dataDiskObjStr + ".ProvisionedIops", std::to_string(dataDiskObj.provisionedIops));
setParameter(dataDiskObjStr + ".BurstingEnabled", dataDiskObj.burstingEnabled ? "true" : "false");
}
}
long CreateLaunchTemplateRequest::getSystemDiskProvisionedIops() const {
return systemDiskProvisionedIops_;
}
void CreateLaunchTemplateRequest::setSystemDiskProvisionedIops(long systemDiskProvisionedIops) {
systemDiskProvisionedIops_ = systemDiskProvisionedIops;
setParameter(std::string("SystemDisk.ProvisionedIops"), std::to_string(systemDiskProvisionedIops));
}
int CreateLaunchTemplateRequest::getSystemDiskSize() const {
return systemDiskSize_;
}

View File

@@ -129,6 +129,15 @@ void CreateLaunchTemplateVersionRequest::setTag(const std::vector<CreateLaunchTe
}
}
std::string CreateLaunchTemplateVersionRequest::getSystemDiskAutoSnapshotPolicyId() const {
return systemDiskAutoSnapshotPolicyId_;
}
void CreateLaunchTemplateVersionRequest::setSystemDiskAutoSnapshotPolicyId(const std::string &systemDiskAutoSnapshotPolicyId) {
systemDiskAutoSnapshotPolicyId_ = systemDiskAutoSnapshotPolicyId;
setParameter(std::string("SystemDisk.AutoSnapshotPolicyId"), systemDiskAutoSnapshotPolicyId);
}
int CreateLaunchTemplateVersionRequest::getPeriod() const {
return period_;
}
@@ -192,6 +201,15 @@ void CreateLaunchTemplateVersionRequest::setPrivateIpAddress(const std::string &
setParameter(std::string("PrivateIpAddress"), privateIpAddress);
}
bool CreateLaunchTemplateVersionRequest::getSystemDiskBurstingEnabled() const {
return systemDiskBurstingEnabled_;
}
void CreateLaunchTemplateVersionRequest::setSystemDiskBurstingEnabled(bool systemDiskBurstingEnabled) {
systemDiskBurstingEnabled_ = systemDiskBurstingEnabled;
setParameter(std::string("SystemDisk.BurstingEnabled"), systemDiskBurstingEnabled ? "true" : "false");
}
std::string CreateLaunchTemplateVersionRequest::getInstanceName() const {
return instanceName_;
}
@@ -386,6 +404,8 @@ void CreateLaunchTemplateVersionRequest::setNetworkInterface(const std::vector<C
setParameter(networkInterfaceObjStr + ".Description", networkInterfaceObj.description);
setParameter(networkInterfaceObjStr + ".SecurityGroupId", networkInterfaceObj.securityGroupId);
setParameter(networkInterfaceObjStr + ".PrimaryIpAddress", networkInterfaceObj.primaryIpAddress);
setParameter(networkInterfaceObjStr + ".InstanceType", networkInterfaceObj.instanceType);
setParameter(networkInterfaceObjStr + ".NetworkInterfaceTrafficMode", networkInterfaceObj.networkInterfaceTrafficMode);
}
}
@@ -469,9 +489,21 @@ void CreateLaunchTemplateVersionRequest::setDataDisk(const std::vector<CreateLau
setParameter(dataDiskObjStr + ".Category", dataDiskObj.category);
setParameter(dataDiskObjStr + ".DeleteWithInstance", dataDiskObj.deleteWithInstance ? "true" : "false");
setParameter(dataDiskObjStr + ".Encrypted", dataDiskObj.encrypted);
setParameter(dataDiskObjStr + ".ProvisionedIops", std::to_string(dataDiskObj.provisionedIops));
setParameter(dataDiskObjStr + ".BurstingEnabled", dataDiskObj.burstingEnabled ? "true" : "false");
setParameter(dataDiskObjStr + ".AutoSnapshotPolicyId", dataDiskObj.autoSnapshotPolicyId);
}
}
long CreateLaunchTemplateVersionRequest::getSystemDiskProvisionedIops() const {
return systemDiskProvisionedIops_;
}
void CreateLaunchTemplateVersionRequest::setSystemDiskProvisionedIops(long systemDiskProvisionedIops) {
systemDiskProvisionedIops_ = systemDiskProvisionedIops;
setParameter(std::string("SystemDisk.ProvisionedIops"), std::to_string(systemDiskProvisionedIops));
}
int CreateLaunchTemplateVersionRequest::getSystemDiskSize() const {
return systemDiskSize_;
}

View File

@@ -106,6 +106,15 @@ void DescribeCommandsRequest::setPageSize(long pageSize) {
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
bool DescribeCommandsRequest::getLatest() const {
return latest_;
}
void DescribeCommandsRequest::setLatest(bool latest) {
latest_ = latest;
setParameter(std::string("Latest"), latest ? "true" : "false");
}
std::string DescribeCommandsRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -71,6 +71,23 @@ void DescribeCommandsResult::parse(const std::string &payload)
commandsObject.name = valueCommandsCommand["Name"].asString();
if(!valueCommandsCommand["EnableParameter"].isNull())
commandsObject.enableParameter = valueCommandsCommand["EnableParameter"].asString() == "true";
auto allParameterDefinitionsNode = valueCommandsCommand["ParameterDefinitions"]["ParameterDefinition"];
for (auto valueCommandsCommandParameterDefinitionsParameterDefinition : allParameterDefinitionsNode)
{
Command::ParameterDefinition parameterDefinitionsObject;
if(!valueCommandsCommandParameterDefinitionsParameterDefinition["Required"].isNull())
parameterDefinitionsObject.required = valueCommandsCommandParameterDefinitionsParameterDefinition["Required"].asString() == "true";
if(!valueCommandsCommandParameterDefinitionsParameterDefinition["Description"].isNull())
parameterDefinitionsObject.description = valueCommandsCommandParameterDefinitionsParameterDefinition["Description"].asString();
if(!valueCommandsCommandParameterDefinitionsParameterDefinition["DefaultValue"].isNull())
parameterDefinitionsObject.defaultValue = valueCommandsCommandParameterDefinitionsParameterDefinition["DefaultValue"].asString();
if(!valueCommandsCommandParameterDefinitionsParameterDefinition["ParameterName"].isNull())
parameterDefinitionsObject.parameterName = valueCommandsCommandParameterDefinitionsParameterDefinition["ParameterName"].asString();
auto allPossibleValues = value["PossibleValues"]["PossibleValue"];
for (auto value : allPossibleValues)
parameterDefinitionsObject.possibleValues.push_back(value.asString());
commandsObject.parameterDefinitions.push_back(parameterDefinitionsObject);
}
auto allParameterNames = value["ParameterNames"]["ParameterName"];
for (auto value : allParameterNames)
commandsObject.parameterNames.push_back(value.asString());

View File

@@ -131,6 +131,26 @@ void DescribeImagesResult::parse(const std::string &payload)
tagsObject.tagKey = valueImagesImageTagsTag["TagKey"].asString();
imagesObject.tags.push_back(tagsObject);
}
auto detectionOptionsNode = value["DetectionOptions"];
if(!detectionOptionsNode["Status"].isNull())
imagesObject.detectionOptions.status = detectionOptionsNode["Status"].asString();
auto allItemsNode = detectionOptionsNode["Items"]["Item"];
for (auto detectionOptionsNodeItemsItem : allItemsNode)
{
Image::DetectionOptions::Item itemObject;
if(!detectionOptionsNodeItemsItem["Name"].isNull())
itemObject.name = detectionOptionsNodeItemsItem["Name"].asString();
if(!detectionOptionsNodeItemsItem["Value"].isNull())
itemObject.value = detectionOptionsNodeItemsItem["Value"].asString();
if(!detectionOptionsNodeItemsItem["RiskLevel"].isNull())
itemObject.riskLevel = detectionOptionsNodeItemsItem["RiskLevel"].asString();
if(!detectionOptionsNodeItemsItem["RiskCode"].isNull())
itemObject.riskCode = detectionOptionsNodeItemsItem["RiskCode"].asString();
imagesObject.detectionOptions.items.push_back(itemObject);
}
auto featuresNode = value["Features"];
if(!featuresNode["NvmeSupport"].isNull())
imagesObject.features.nvmeSupport = featuresNode["NvmeSupport"].asString();
images_.push_back(imagesObject);
}
if(!value["PageSize"].isNull())

View File

@@ -65,10 +65,16 @@ void DescribeInvocationsResult::parse(const std::string &payload)
invocationsObject.commandContent = valueInvocationsInvocation["CommandContent"].asString();
if(!valueInvocationsInvocation["CommandName"].isNull())
invocationsObject.commandName = valueInvocationsInvocation["CommandName"].asString();
if(!valueInvocationsInvocation["CommandDescription"].isNull())
invocationsObject.commandDescription = valueInvocationsInvocation["CommandDescription"].asString();
if(!valueInvocationsInvocation["InvokeId"].isNull())
invocationsObject.invokeId = valueInvocationsInvocation["InvokeId"].asString();
if(!valueInvocationsInvocation["Username"].isNull())
invocationsObject.username = valueInvocationsInvocation["Username"].asString();
if(!valueInvocationsInvocation["WorkingDir"].isNull())
invocationsObject.workingDir = valueInvocationsInvocation["WorkingDir"].asString();
if(!valueInvocationsInvocation["Timeout"].isNull())
invocationsObject.timeout = std::stol(valueInvocationsInvocation["Timeout"].asString());
auto allInvokeInstancesNode = valueInvocationsInvocation["InvokeInstances"]["InvokeInstance"];
for (auto valueInvocationsInvocationInvokeInstancesInvokeInstance : allInvokeInstancesNode)
{

View File

@@ -112,6 +112,8 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
launchTemplateVersionSetsObject.launchTemplateData.hostName = launchTemplateDataNode["HostName"].asString();
if(!launchTemplateDataNode["SystemDisk.Iops"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.systemDiskIops = std::stoi(launchTemplateDataNode["SystemDisk.Iops"].asString());
if(!launchTemplateDataNode["SystemDisk.AutoSnapshotPolicyId"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.systemDiskAutoSnapshotPolicyId = launchTemplateDataNode["SystemDisk.AutoSnapshotPolicyId"].asString();
if(!launchTemplateDataNode["InternetMaxBandwidthOut"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.internetMaxBandwidthOut = std::stoi(launchTemplateDataNode["InternetMaxBandwidthOut"].asString());
if(!launchTemplateDataNode["InternetMaxBandwidthIn"].isNull())
@@ -136,6 +138,10 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
launchTemplateVersionSetsObject.launchTemplateData.zoneId = launchTemplateDataNode["ZoneId"].asString();
if(!launchTemplateDataNode["Ipv6AddressCount"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.ipv6AddressCount = std::stoi(launchTemplateDataNode["Ipv6AddressCount"].asString());
if(!launchTemplateDataNode["SystemDisk.ProvisionedIops"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.systemDiskProvisionedIops = std::stol(launchTemplateDataNode["SystemDisk.ProvisionedIops"].asString());
if(!launchTemplateDataNode["SystemDisk.BurstingEnabled"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.systemDiskBurstingEnabled = launchTemplateDataNode["SystemDisk.BurstingEnabled"].asString() == "true";
auto allDataDisksNode = launchTemplateDataNode["DataDisks"]["DataDisk"];
for (auto launchTemplateDataNodeDataDisksDataDisk : allDataDisksNode)
{
@@ -158,6 +164,12 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
dataDiskObject.deleteWithInstance = launchTemplateDataNodeDataDisksDataDisk["DeleteWithInstance"].asString() == "true";
if(!launchTemplateDataNodeDataDisksDataDisk["Encrypted"].isNull())
dataDiskObject.encrypted = launchTemplateDataNodeDataDisksDataDisk["Encrypted"].asString();
if(!launchTemplateDataNodeDataDisksDataDisk["ProvisionedIops"].isNull())
dataDiskObject.provisionedIops = std::stol(launchTemplateDataNodeDataDisksDataDisk["ProvisionedIops"].asString());
if(!launchTemplateDataNodeDataDisksDataDisk["BurstingEnabled"].isNull())
dataDiskObject.burstingEnabled = launchTemplateDataNodeDataDisksDataDisk["BurstingEnabled"].asString() == "true";
if(!launchTemplateDataNodeDataDisksDataDisk["AutoSnapshotPolicyId"].isNull())
dataDiskObject.autoSnapshotPolicyId = launchTemplateDataNodeDataDisksDataDisk["AutoSnapshotPolicyId"].asString();
launchTemplateVersionSetsObject.launchTemplateData.dataDisks.push_back(dataDiskObject);
}
auto allNetworkInterfacesNode = launchTemplateDataNode["NetworkInterfaces"]["NetworkInterface"];
@@ -174,6 +186,10 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
networkInterfaceObject.primaryIpAddress = launchTemplateDataNodeNetworkInterfacesNetworkInterface["PrimaryIpAddress"].asString();
if(!launchTemplateDataNodeNetworkInterfacesNetworkInterface["SecurityGroupId"].isNull())
networkInterfaceObject.securityGroupId = launchTemplateDataNodeNetworkInterfacesNetworkInterface["SecurityGroupId"].asString();
if(!launchTemplateDataNodeNetworkInterfacesNetworkInterface["InstanceType"].isNull())
networkInterfaceObject.instanceType = launchTemplateDataNodeNetworkInterfacesNetworkInterface["InstanceType"].asString();
if(!launchTemplateDataNodeNetworkInterfacesNetworkInterface["NetworkInterfaceTrafficMode"].isNull())
networkInterfaceObject.networkInterfaceTrafficMode = launchTemplateDataNodeNetworkInterfacesNetworkInterface["NetworkInterfaceTrafficMode"].asString();
auto allSecurityGroupIds1 = value["SecurityGroupIds"]["SecurityGroupId"];
for (auto value : allSecurityGroupIds1)
networkInterfaceObject.securityGroupIds1.push_back(value.asString());

View File

@@ -138,6 +138,15 @@ void ImportImageRequest::setLicenseType(const std::string &licenseType) {
setParameter(std::string("LicenseType"), licenseType);
}
std::string ImportImageRequest::getDetectionStrategy() const {
return detectionStrategy_;
}
void ImportImageRequest::setDetectionStrategy(const std::string &detectionStrategy) {
detectionStrategy_ = detectionStrategy;
setParameter(std::string("DetectionStrategy"), detectionStrategy);
}
std::string ImportImageRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -52,6 +52,15 @@ void ModifyImageAttributeRequest::setDescription(const std::string &description)
setParameter(std::string("Description"), description);
}
ModifyImageAttributeRequest::Features ModifyImageAttributeRequest::getFeatures() const {
return features_;
}
void ModifyImageAttributeRequest::setFeatures(const ModifyImageAttributeRequest::Features &features) {
features_ = features;
setParameter(std::string("Features") + ".NvmeSupport", features.nvmeSupport);
}
std::string ModifyImageAttributeRequest::getBootMode() const {
return bootMode_;
}