CreateLaunchTemplate, CreateLaunchTemplateVersion, DescribeLaunchTemplateVersions support DeletionProtection.
This commit is contained in:
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user