Преглед изворни кода

CreateLaunchTemplate, CreateLaunchTemplateVersion, DescribeLaunchTemplateVersions support DeletionProtection.

sdk-team пре 3 година
родитељ
комит
f0a60662c9

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1701
+1.36.1702

+ 3 - 0
ecs/include/alibabacloud/ecs/model/CreateLaunchTemplateRequest.h

@@ -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_;

+ 3 - 0
ecs/include/alibabacloud/ecs/model/CreateLaunchTemplateVersionRequest.h

@@ -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_;

+ 1 - 0
ecs/include/alibabacloud/ecs/model/DescribeInstanceHistoryEventsResult.h

@@ -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;

+ 1 - 0
ecs/include/alibabacloud/ecs/model/DescribeLaunchTemplateVersionsResult.h

@@ -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;

+ 3 - 0
ecs/include/alibabacloud/ecs/model/RunInstancesRequest.h

@@ -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_;

+ 9 - 0
ecs/src/model/CreateLaunchTemplateRequest.cc

@@ -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_;
 }

+ 9 - 0
ecs/src/model/CreateLaunchTemplateVersionRequest.cc

@@ -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_;
 }

+ 2 - 0
ecs/src/model/DescribeInstanceHistoryEventsResult.cc

@@ -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)
 		{

+ 2 - 0
ecs/src/model/DescribeLaunchTemplateVersionsResult.cc

@@ -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)
 		{

+ 9 - 0
ecs/src/model/RunInstancesRequest.cc

@@ -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_;
 }