Просмотр исходного кода

Support describe and modify NVMe on instance.

sdk-team 1 год назад
Родитель
Сommit
3b852794f3

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.2008
+1.36.2009

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

@@ -71,6 +71,8 @@ public:
 	void setName(const std::string &name);
 	void setName(const std::string &name);
 	bool getEnableParameter() const;
 	bool getEnableParameter() const;
 	void setEnableParameter(bool enableParameter);
 	void setEnableParameter(bool enableParameter);
+	std::string getLauncher() const;
+	void setLauncher(const std::string &launcher);
 
 
 private:
 private:
 	long resourceOwnerId_;
 	long resourceOwnerId_;
@@ -89,6 +91,7 @@ private:
 	long ownerId_;
 	long ownerId_;
 	std::string name_;
 	std::string name_;
 	bool enableParameter_;
 	bool enableParameter_;
+	std::string launcher_;
 };
 };
 } // namespace Model
 } // namespace Model
 } // namespace Ecs
 } // namespace Ecs

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

@@ -61,6 +61,7 @@ namespace AlibabaCloud
 					int version;
 					int version;
 					int invokeTimes;
 					int invokeTimes;
 					std::string creationTime;
 					std::string creationTime;
+					std::string launcher;
 					bool latest;
 					bool latest;
 					bool enableParameter;
 					bool enableParameter;
 					std::string commandId;
 					std::string commandId;

+ 9 - 0
ecs/include/alibabacloud/ecs/model/DescribeElasticityAssurancesResult.h

@@ -36,8 +36,16 @@ namespace AlibabaCloud
 				{
 				{
 					struct AllocatedResource
 					struct AllocatedResource
 					{
 					{
+						struct ElasticityAssuranceUsage
+						{
+							int usedAmount;
+							std::string accountId;
+							std::string serviceName;
+						};
 						int usedAmount;
 						int usedAmount;
 						std::string zoneId;
 						std::string zoneId;
+						std::vector<AllocatedResource::ElasticityAssuranceUsage> elasticityAssuranceUsages;
+						int availableAmount;
 						int totalAmount;
 						int totalAmount;
 						std::string instanceType;
 						std::string instanceType;
 					};
 					};
@@ -54,6 +62,7 @@ namespace AlibabaCloud
 					std::string latestStartTime;
 					std::string latestStartTime;
 					std::string privatePoolOptionsName;
 					std::string privatePoolOptionsName;
 					std::string instanceChargeType;
 					std::string instanceChargeType;
+					std::string elasticityAssuranceOwnerId;
 					std::string startTime;
 					std::string startTime;
 					std::string startTimeType;
 					std::string startTimeType;
 					std::string privatePoolOptionsMatchCriteria;
 					std::string privatePoolOptionsMatchCriteria;

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

@@ -85,6 +85,7 @@ namespace AlibabaCloud
 					struct ImageOptions
 					struct ImageOptions
 					{
 					{
 						bool loginAsNonRoot;
 						bool loginAsNonRoot;
+						bool currentOSNVMeSupported;
 					};
 					};
 					struct PrivateDnsNameOptions
 					struct PrivateDnsNameOptions
 					{
 					{

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

@@ -52,6 +52,8 @@ public:
 	void setOwnerId(long ownerId);
 	void setOwnerId(long ownerId);
 	std::string getName() const;
 	std::string getName() const;
 	void setName(const std::string &name);
 	void setName(const std::string &name);
+	std::string getLauncher() const;
+	void setLauncher(const std::string &launcher);
 
 
 private:
 private:
 	long resourceOwnerId_;
 	long resourceOwnerId_;
@@ -65,6 +67,7 @@ private:
 	std::string ownerAccount_;
 	std::string ownerAccount_;
 	long ownerId_;
 	long ownerId_;
 	std::string name_;
 	std::string name_;
+	std::string launcher_;
 };
 };
 } // namespace Model
 } // namespace Model
 } // namespace Ecs
 } // namespace Ecs

+ 6 - 0
ecs/include/alibabacloud/ecs/model/ModifyInstanceAttributeRequest.h

@@ -35,6 +35,9 @@ public:
 		bool enableIpDnsARecord;
 		bool enableIpDnsARecord;
 		bool enableIpDnsPtrRecord;
 		bool enableIpDnsPtrRecord;
 	};
 	};
+	struct ImageOptions {
+		bool currentOSNVMeSupported;
+	};
 	struct AdditionalInfo {
 	struct AdditionalInfo {
 		std::string pvdConfig;
 		std::string pvdConfig;
 		bool enableHighDensityMode;
 		bool enableHighDensityMode;
@@ -65,6 +68,8 @@ public:
 	void setPrivateDnsNameOptions(const PrivateDnsNameOptions &privateDnsNameOptions);
 	void setPrivateDnsNameOptions(const PrivateDnsNameOptions &privateDnsNameOptions);
 	std::string getCpuOptionsTopologyType() const;
 	std::string getCpuOptionsTopologyType() const;
 	void setCpuOptionsTopologyType(const std::string &cpuOptionsTopologyType);
 	void setCpuOptionsTopologyType(const std::string &cpuOptionsTopologyType);
+	ImageOptions getImageOptions() const;
+	void setImageOptions(const ImageOptions &imageOptions);
 	std::string getOSNameEn() const;
 	std::string getOSNameEn() const;
 	void setOSNameEn(const std::string &oSNameEn);
 	void setOSNameEn(const std::string &oSNameEn);
 	bool getEnableJumboFrame() const;
 	bool getEnableJumboFrame() const;
@@ -99,6 +104,7 @@ private:
 	std::string hostName_;
 	std::string hostName_;
 	PrivateDnsNameOptions privateDnsNameOptions_;
 	PrivateDnsNameOptions privateDnsNameOptions_;
 	std::string cpuOptionsTopologyType_;
 	std::string cpuOptionsTopologyType_;
+	ImageOptions imageOptions_;
 	std::string oSNameEn_;
 	std::string oSNameEn_;
 	bool enableJumboFrame_;
 	bool enableJumboFrame_;
 	std::string resourceOwnerAccount_;
 	std::string resourceOwnerAccount_;

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

@@ -180,3 +180,12 @@ void CreateCommandRequest::setEnableParameter(bool enableParameter) {
   setParameter(std::string("EnableParameter"), enableParameter ? "true" : "false");
   setParameter(std::string("EnableParameter"), enableParameter ? "true" : "false");
 }
 }
 
 
+std::string CreateCommandRequest::getLauncher() const {
+  return launcher_;
+}
+
+void CreateCommandRequest::setLauncher(const std::string &launcher) {
+  launcher_ = launcher;
+  setParameter(std::string("Launcher"), launcher);
+}
+

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

@@ -73,6 +73,8 @@ void DescribeCommandsResult::parse(const std::string &payload)
 			commandsObject.enableParameter = valueCommandsCommand["EnableParameter"].asString() == "true";
 			commandsObject.enableParameter = valueCommandsCommand["EnableParameter"].asString() == "true";
 		if(!valueCommandsCommand["ResourceGroupId"].isNull())
 		if(!valueCommandsCommand["ResourceGroupId"].isNull())
 			commandsObject.resourceGroupId = valueCommandsCommand["ResourceGroupId"].asString();
 			commandsObject.resourceGroupId = valueCommandsCommand["ResourceGroupId"].asString();
+		if(!valueCommandsCommand["Launcher"].isNull())
+			commandsObject.launcher = valueCommandsCommand["Launcher"].asString();
 		auto allParameterDefinitionsNode = valueCommandsCommand["ParameterDefinitions"]["ParameterDefinition"];
 		auto allParameterDefinitionsNode = valueCommandsCommand["ParameterDefinitions"]["ParameterDefinition"];
 		for (auto valueCommandsCommandParameterDefinitionsParameterDefinition : allParameterDefinitionsNode)
 		for (auto valueCommandsCommandParameterDefinitionsParameterDefinition : allParameterDefinitionsNode)
 		{
 		{

+ 16 - 0
ecs/src/model/DescribeElasticityAssurancesResult.cc

@@ -71,6 +71,8 @@ void DescribeElasticityAssurancesResult::parse(const std::string &payload)
 			elasticityAssuranceSetObject.instanceChargeType = valueElasticityAssuranceSetElasticityAssuranceItem["InstanceChargeType"].asString();
 			elasticityAssuranceSetObject.instanceChargeType = valueElasticityAssuranceSetElasticityAssuranceItem["InstanceChargeType"].asString();
 		if(!valueElasticityAssuranceSetElasticityAssuranceItem["StartTimeType"].isNull())
 		if(!valueElasticityAssuranceSetElasticityAssuranceItem["StartTimeType"].isNull())
 			elasticityAssuranceSetObject.startTimeType = valueElasticityAssuranceSetElasticityAssuranceItem["StartTimeType"].asString();
 			elasticityAssuranceSetObject.startTimeType = valueElasticityAssuranceSetElasticityAssuranceItem["StartTimeType"].asString();
+		if(!valueElasticityAssuranceSetElasticityAssuranceItem["ElasticityAssuranceOwnerId"].isNull())
+			elasticityAssuranceSetObject.elasticityAssuranceOwnerId = valueElasticityAssuranceSetElasticityAssuranceItem["ElasticityAssuranceOwnerId"].asString();
 		auto allAllocatedResourcesNode = valueElasticityAssuranceSetElasticityAssuranceItem["AllocatedResources"]["AllocatedResource"];
 		auto allAllocatedResourcesNode = valueElasticityAssuranceSetElasticityAssuranceItem["AllocatedResources"]["AllocatedResource"];
 		for (auto valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
 		for (auto valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource : allAllocatedResourcesNode)
 		{
 		{
@@ -79,10 +81,24 @@ void DescribeElasticityAssurancesResult::parse(const std::string &payload)
 				allocatedResourcesObject.usedAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["UsedAmount"].asString());
 				allocatedResourcesObject.usedAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["UsedAmount"].asString());
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].isNull())
 				allocatedResourcesObject.totalAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].asString());
 				allocatedResourcesObject.totalAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["TotalAmount"].asString());
+			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["AvailableAmount"].isNull())
+				allocatedResourcesObject.availableAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["AvailableAmount"].asString());
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].isNull())
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].isNull())
 				allocatedResourcesObject.zoneId = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].asString();
 				allocatedResourcesObject.zoneId = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["zoneId"].asString();
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].isNull())
 			if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].isNull())
 				allocatedResourcesObject.instanceType = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].asString();
 				allocatedResourcesObject.instanceType = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["InstanceType"].asString();
+			auto allElasticityAssuranceUsagesNode = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResource["ElasticityAssuranceUsages"]["ElasticityAssuranceUsage"];
+			for (auto valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage : allElasticityAssuranceUsagesNode)
+			{
+				ElasticityAssuranceItem::AllocatedResource::ElasticityAssuranceUsage elasticityAssuranceUsagesObject;
+				if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["AccountId"].isNull())
+					elasticityAssuranceUsagesObject.accountId = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["AccountId"].asString();
+				if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["ServiceName"].isNull())
+					elasticityAssuranceUsagesObject.serviceName = valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["ServiceName"].asString();
+				if(!valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["UsedAmount"].isNull())
+					elasticityAssuranceUsagesObject.usedAmount = std::stoi(valueElasticityAssuranceSetElasticityAssuranceItemAllocatedResourcesAllocatedResourceElasticityAssuranceUsagesElasticityAssuranceUsage["UsedAmount"].asString());
+				allocatedResourcesObject.elasticityAssuranceUsages.push_back(elasticityAssuranceUsagesObject);
+			}
 			elasticityAssuranceSetObject.allocatedResources.push_back(allocatedResourcesObject);
 			elasticityAssuranceSetObject.allocatedResources.push_back(allocatedResourcesObject);
 		}
 		}
 		auto allTagsNode = valueElasticityAssuranceSetElasticityAssuranceItem["Tags"]["Tag"];
 		auto allTagsNode = valueElasticityAssuranceSetElasticityAssuranceItem["Tags"]["Tag"];

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

@@ -269,6 +269,8 @@ void DescribeInstancesResult::parse(const std::string &payload)
 		auto imageOptionsNode = value["ImageOptions"];
 		auto imageOptionsNode = value["ImageOptions"];
 		if(!imageOptionsNode["LoginAsNonRoot"].isNull())
 		if(!imageOptionsNode["LoginAsNonRoot"].isNull())
 			instancesObject.imageOptions.loginAsNonRoot = imageOptionsNode["LoginAsNonRoot"].asString() == "true";
 			instancesObject.imageOptions.loginAsNonRoot = imageOptionsNode["LoginAsNonRoot"].asString() == "true";
+		if(!imageOptionsNode["CurrentOSNVMeSupported"].isNull())
+			instancesObject.imageOptions.currentOSNVMeSupported = imageOptionsNode["CurrentOSNVMeSupported"].asString() == "true";
 		auto privateDnsNameOptionsNode = value["PrivateDnsNameOptions"];
 		auto privateDnsNameOptionsNode = value["PrivateDnsNameOptions"];
 		if(!privateDnsNameOptionsNode["EnableInstanceIdDnsARecord"].isNull())
 		if(!privateDnsNameOptionsNode["EnableInstanceIdDnsARecord"].isNull())
 			instancesObject.privateDnsNameOptions.enableInstanceIdDnsARecord = privateDnsNameOptionsNode["EnableInstanceIdDnsARecord"].asString() == "true";
 			instancesObject.privateDnsNameOptions.enableInstanceIdDnsARecord = privateDnsNameOptionsNode["EnableInstanceIdDnsARecord"].asString() == "true";

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

@@ -124,3 +124,12 @@ void ModifyCommandRequest::setName(const std::string &name) {
   setParameter(std::string("Name"), name);
   setParameter(std::string("Name"), name);
 }
 }
 
 
+std::string ModifyCommandRequest::getLauncher() const {
+  return launcher_;
+}
+
+void ModifyCommandRequest::setLauncher(const std::string &launcher) {
+  launcher_ = launcher;
+  setParameter(std::string("Launcher"), launcher);
+}
+

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

@@ -119,6 +119,15 @@ void ModifyInstanceAttributeRequest::setCpuOptionsTopologyType(const std::string
   setParameter(std::string("CpuOptions.TopologyType"), cpuOptionsTopologyType);
   setParameter(std::string("CpuOptions.TopologyType"), cpuOptionsTopologyType);
 }
 }
 
 
+ModifyInstanceAttributeRequest::ImageOptions ModifyInstanceAttributeRequest::getImageOptions() const {
+  return imageOptions_;
+}
+
+void ModifyInstanceAttributeRequest::setImageOptions(const ModifyInstanceAttributeRequest::ImageOptions &imageOptions) {
+  imageOptions_ = imageOptions;
+  setParameter(std::string("ImageOptions") + ".CurrentOSNVMeSupported", imageOptions.currentOSNVMeSupported ? "true" : "false");
+}
+
 std::string ModifyInstanceAttributeRequest::getOSNameEn() const {
 std::string ModifyInstanceAttributeRequest::getOSNameEn() const {
   return oSNameEn_;
   return oSNameEn_;
 }
 }