CreateLaunchTemplate, CreateLaunchTemplateVersion, DescribeLaunchTemplateVersions support DeletionProtection.

This commit is contained in:
sdk-team
2023-08-01 07:48:37 +00:00
parent bce94a0fa4
commit f0a60662c9
11 changed files with 43 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1701
1.36.1702

View File

@@ -75,6 +75,8 @@ public:
void setSpotPriceLimit(float spotPriceLimit);
std::string getImageOwnerAlias() const;
void setImageOwnerAlias(const std::string &imageOwnerAlias);
bool getDeletionProtection() const;
void setDeletionProtection(bool deletionProtection);
std::string getResourceGroupId() const;
void setResourceGroupId(const std::string &resourceGroupId);
std::string getHostName() const;
@@ -180,6 +182,7 @@ private:
std::string keyPairName_;
float spotPriceLimit_;
std::string imageOwnerAlias_;
bool deletionProtection_;
std::string resourceGroupId_;
std::string hostName_;
int systemDiskIops_;

View File

@@ -71,6 +71,8 @@ public:
void setSpotPriceLimit(float spotPriceLimit);
std::string getImageOwnerAlias() const;
void setImageOwnerAlias(const std::string &imageOwnerAlias);
bool getDeletionProtection() const;
void setDeletionProtection(bool deletionProtection);
std::string getResourceGroupId() const;
void setResourceGroupId(const std::string &resourceGroupId);
std::string getHostName() const;
@@ -174,6 +176,7 @@ private:
std::string keyPairName_;
float spotPriceLimit_;
std::string imageOwnerAlias_;
bool deletionProtection_;
std::string resourceGroupId_;
std::string hostName_;
int systemDiskIops_;

View File

@@ -64,6 +64,7 @@ namespace AlibabaCloud
std::string rack;
std::string punishUrl;
std::string hostType;
std::string responseResult;
std::string diskId;
std::string onlineRepairPolicy;
std::vector<std::string> migrationOptions;

View File

@@ -99,6 +99,7 @@ namespace AlibabaCloud
std::string securityGroupId;
std::string vSwitchId;
int period;
bool deletionProtection;
std::vector<std::string> securityGroupIds;
std::string systemDiskCategory;
std::string internetChargeType;

View File

@@ -244,6 +244,8 @@ public:
void setNetworkInterface(const std::vector<NetworkInterface> &networkInterface);
int getAmount() const;
void setAmount(int amount);
bool getAutoPay() const;
void setAutoPay(bool autoPay);
std::string getOwnerAccount() const;
void setOwnerAccount(const std::string &ownerAccount);
std::string getTenancy() const;
@@ -346,6 +348,7 @@ private:
std::string deploymentSetId_;
std::vector<NetworkInterface> networkInterface_;
int amount_;
bool autoPay_;
std::string ownerAccount_;
std::string tenancy_;
std::string ramRoleName_;

View File

@@ -88,6 +88,15 @@ void CreateLaunchTemplateRequest::setImageOwnerAlias(const std::string &imageOwn
setParameter(std::string("ImageOwnerAlias"), imageOwnerAlias);
}
bool CreateLaunchTemplateRequest::getDeletionProtection() const {
return deletionProtection_;
}
void CreateLaunchTemplateRequest::setDeletionProtection(bool deletionProtection) {
deletionProtection_ = deletionProtection;
setParameter(std::string("DeletionProtection"), deletionProtection ? "true" : "false");
}
std::string CreateLaunchTemplateRequest::getResourceGroupId() const {
return resourceGroupId_;
}

View File

@@ -88,6 +88,15 @@ void CreateLaunchTemplateVersionRequest::setImageOwnerAlias(const std::string &i
setParameter(std::string("ImageOwnerAlias"), imageOwnerAlias);
}
bool CreateLaunchTemplateVersionRequest::getDeletionProtection() const {
return deletionProtection_;
}
void CreateLaunchTemplateVersionRequest::setDeletionProtection(bool deletionProtection) {
deletionProtection_ = deletionProtection;
setParameter(std::string("DeletionProtection"), deletionProtection ? "true" : "false");
}
std::string CreateLaunchTemplateVersionRequest::getResourceGroupId() const {
return resourceGroupId_;
}

View File

@@ -92,6 +92,8 @@ void DescribeInstanceHistoryEventsResult::parse(const std::string &payload)
instanceSystemEventSetObject.extendedAttribute.code = extendedAttributeNode["Code"].asString();
if(!extendedAttributeNode["CanAccept"].isNull())
instanceSystemEventSetObject.extendedAttribute.canAccept = extendedAttributeNode["CanAccept"].asString();
if(!extendedAttributeNode["ResponseResult"].isNull())
instanceSystemEventSetObject.extendedAttribute.responseResult = extendedAttributeNode["ResponseResult"].asString();
auto allInactiveDisksNode = extendedAttributeNode["InactiveDisks"]["InactiveDisk"];
for (auto extendedAttributeNodeInactiveDisksInactiveDisk : allInactiveDisksNode)
{

View File

@@ -144,6 +144,8 @@ void DescribeLaunchTemplateVersionsResult::parse(const std::string &payload)
launchTemplateVersionSetsObject.launchTemplateData.systemDiskBurstingEnabled = launchTemplateDataNode["SystemDisk.BurstingEnabled"].asString() == "true";
if(!launchTemplateDataNode["SystemDisk.Encrypted"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.systemDiskEncrypted = launchTemplateDataNode["SystemDisk.Encrypted"].asString();
if(!launchTemplateDataNode["DeletionProtection"].isNull())
launchTemplateVersionSetsObject.launchTemplateData.deletionProtection = launchTemplateDataNode["DeletionProtection"].asString() == "true";
auto allDataDisksNode = launchTemplateDataNode["DataDisks"]["DataDisk"];
for (auto launchTemplateDataNodeDataDisksDataDisk : allDataDisksNode)
{

View File

@@ -760,6 +760,15 @@ void RunInstancesRequest::setAmount(int amount) {
setParameter(std::string("Amount"), std::to_string(amount));
}
bool RunInstancesRequest::getAutoPay() const {
return autoPay_;
}
void RunInstancesRequest::setAutoPay(bool autoPay) {
autoPay_ = autoPay;
setParameter(std::string("AutoPay"), autoPay ? "true" : "false");
}
std::string RunInstancesRequest::getOwnerAccount() const {
return ownerAccount_;
}