Bläddra i källkod

Update EBS default encrypted APIs from private to public.

sdk-team 2 år sedan
förälder
incheckning
ed4f7ee25b

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1985
+1.36.1986

+ 14 - 12
ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfaceAttributeResult.h

@@ -32,18 +32,6 @@ namespace AlibabaCloud
 			class ALIBABACLOUD_ECS_EXPORT DescribeNetworkInterfaceAttributeResult : public ServiceResult
 			{
 			public:
-				struct ConnectionTrackingConfiguration
-				{
-					int tcpClosedAndTimeWaitTimeout;
-					int udpTimeout;
-					int tcpEstablishedTimeout;
-				};
-				struct NetworkInterfaceTrafficConfig
-				{
-					std::string networkInterfaceTrafficMode;
-					int queueNumber;
-					int queuePairNumber;
-				};
 				struct AssociatedPublicIp
 				{
 					std::string publicIpAddress;
@@ -74,6 +62,18 @@ namespace AlibabaCloud
 					std::string workState;
 					std::string slaveNetworkInterfaceId;
 				};
+				struct NetworkInterfaceTrafficConfig
+				{
+					std::string networkInterfaceTrafficMode;
+					int queueNumber;
+					int queuePairNumber;
+				};
+				struct ConnectionTrackingConfiguration
+				{
+					int tcpClosedAndTimeWaitTimeout;
+					int udpTimeout;
+					int tcpEstablishedTimeout;
+				};
 				struct EnhancedNetwork
 				{
 					bool enableSriov;
@@ -134,6 +134,7 @@ namespace AlibabaCloud
 				std::vector<std::string> getSecurityGroupIds()const;
 				long getServiceID()const;
 				std::string getTcpOptionAddressEnabled()const;
+				bool getSourceDestCheck()const;
 				std::string getType()const;
 				int getQueuePairNumber()const;
 				int getQueueNumber()const;
@@ -172,6 +173,7 @@ namespace AlibabaCloud
 				std::vector<std::string> securityGroupIds_;
 				long serviceID_;
 				std::string tcpOptionAddressEnabled_;
+				bool sourceDestCheck_;
 				std::string type_;
 				int queuePairNumber_;
 				int queueNumber_;

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

@@ -95,6 +95,7 @@ namespace AlibabaCloud
 					std::string macAddress;
 					std::vector<std::string> securityGroupIds;
 					long serviceID;
+					bool sourceDestCheck;
 					std::string type;
 					int queuePairNumber;
 					int queueNumber;

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

@@ -57,6 +57,8 @@ public:
 	void setNetworkInterfaceTrafficConfig(const NetworkInterfaceTrafficConfig &networkInterfaceTrafficConfig);
 	EnhancedNetwork getEnhancedNetwork() const;
 	void setEnhancedNetwork(const EnhancedNetwork &enhancedNetwork);
+	bool getSourceDestCheck() const;
+	void setSourceDestCheck(bool sourceDestCheck);
 	std::string getRegionId() const;
 	void setRegionId(const std::string &regionId);
 	std::string getNetworkInterfaceName() const;
@@ -85,6 +87,7 @@ private:
 	std::string description_;
 	NetworkInterfaceTrafficConfig networkInterfaceTrafficConfig_;
 	EnhancedNetwork enhancedNetwork_;
+	bool sourceDestCheck_;
 	std::string regionId_;
 	std::string networkInterfaceName_;
 	int txQueueSize_;

+ 21 - 14
ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc

@@ -88,20 +88,6 @@ void DescribeNetworkInterfaceAttributeResult::parse(const std::string &payload)
 			tagsObject.tagKey = valueTagsTag["TagKey"].asString();
 		tags_.push_back(tagsObject);
 	}
-	auto connectionTrackingConfigurationNode = value["ConnectionTrackingConfiguration"];
-	if(!connectionTrackingConfigurationNode["TcpClosedAndTimeWaitTimeout"].isNull())
-		connectionTrackingConfiguration_.tcpClosedAndTimeWaitTimeout = std::stoi(connectionTrackingConfigurationNode["TcpClosedAndTimeWaitTimeout"].asString());
-	if(!connectionTrackingConfigurationNode["TcpEstablishedTimeout"].isNull())
-		connectionTrackingConfiguration_.tcpEstablishedTimeout = std::stoi(connectionTrackingConfigurationNode["TcpEstablishedTimeout"].asString());
-	if(!connectionTrackingConfigurationNode["UdpTimeout"].isNull())
-		connectionTrackingConfiguration_.udpTimeout = std::stoi(connectionTrackingConfigurationNode["UdpTimeout"].asString());
-	auto networkInterfaceTrafficConfigNode = value["NetworkInterfaceTrafficConfig"];
-	if(!networkInterfaceTrafficConfigNode["NetworkInterfaceTrafficMode"].isNull())
-		networkInterfaceTrafficConfig_.networkInterfaceTrafficMode = networkInterfaceTrafficConfigNode["NetworkInterfaceTrafficMode"].asString();
-	if(!networkInterfaceTrafficConfigNode["QueueNumber"].isNull())
-		networkInterfaceTrafficConfig_.queueNumber = std::stoi(networkInterfaceTrafficConfigNode["QueueNumber"].asString());
-	if(!networkInterfaceTrafficConfigNode["QueuePairNumber"].isNull())
-		networkInterfaceTrafficConfig_.queuePairNumber = std::stoi(networkInterfaceTrafficConfigNode["QueuePairNumber"].asString());
 	auto associatedPublicIpNode = value["AssociatedPublicIp"];
 	if(!associatedPublicIpNode["PublicIpAddress"].isNull())
 		associatedPublicIp_.publicIpAddress = associatedPublicIpNode["PublicIpAddress"].asString();
@@ -141,6 +127,20 @@ void DescribeNetworkInterfaceAttributeResult::parse(const std::string &payload)
 		slaveInterfaceSpecification_.workState = slaveInterfaceSpecificationNode["WorkState"].asString();
 	if(!slaveInterfaceSpecificationNode["BondNetworkInterfaceId"].isNull())
 		slaveInterfaceSpecification_.bondNetworkInterfaceId = slaveInterfaceSpecificationNode["BondNetworkInterfaceId"].asString();
+	auto networkInterfaceTrafficConfigNode = value["NetworkInterfaceTrafficConfig"];
+	if(!networkInterfaceTrafficConfigNode["NetworkInterfaceTrafficMode"].isNull())
+		networkInterfaceTrafficConfig_.networkInterfaceTrafficMode = networkInterfaceTrafficConfigNode["NetworkInterfaceTrafficMode"].asString();
+	if(!networkInterfaceTrafficConfigNode["QueueNumber"].isNull())
+		networkInterfaceTrafficConfig_.queueNumber = std::stoi(networkInterfaceTrafficConfigNode["QueueNumber"].asString());
+	if(!networkInterfaceTrafficConfigNode["QueuePairNumber"].isNull())
+		networkInterfaceTrafficConfig_.queuePairNumber = std::stoi(networkInterfaceTrafficConfigNode["QueuePairNumber"].asString());
+	auto connectionTrackingConfigurationNode = value["ConnectionTrackingConfiguration"];
+	if(!connectionTrackingConfigurationNode["TcpEstablishedTimeout"].isNull())
+		connectionTrackingConfiguration_.tcpEstablishedTimeout = std::stoi(connectionTrackingConfigurationNode["TcpEstablishedTimeout"].asString());
+	if(!connectionTrackingConfigurationNode["TcpClosedAndTimeWaitTimeout"].isNull())
+		connectionTrackingConfiguration_.tcpClosedAndTimeWaitTimeout = std::stoi(connectionTrackingConfigurationNode["TcpClosedAndTimeWaitTimeout"].asString());
+	if(!connectionTrackingConfigurationNode["UdpTimeout"].isNull())
+		connectionTrackingConfiguration_.udpTimeout = std::stoi(connectionTrackingConfigurationNode["UdpTimeout"].asString());
 	auto enhancedNetworkNode = value["EnhancedNetwork"];
 	if(!enhancedNetworkNode["EnableSriov"].isNull())
 		enhancedNetwork_.enableSriov = enhancedNetworkNode["EnableSriov"].asString() == "true";
@@ -189,6 +189,8 @@ void DescribeNetworkInterfaceAttributeResult::parse(const std::string &payload)
 		deleteOnRelease_ = value["DeleteOnRelease"].asString() == "true";
 	if(!value["TcpOptionAddressEnabled"].isNull())
 		tcpOptionAddressEnabled_ = value["TcpOptionAddressEnabled"].asString();
+	if(!value["SourceDestCheck"].isNull())
+		sourceDestCheck_ = value["SourceDestCheck"].asString() == "true";
 
 }
 
@@ -307,6 +309,11 @@ std::string DescribeNetworkInterfaceAttributeResult::getTcpOptionAddressEnabled(
 	return tcpOptionAddressEnabled_;
 }
 
+bool DescribeNetworkInterfaceAttributeResult::getSourceDestCheck()const
+{
+	return sourceDestCheck_;
+}
+
 std::string DescribeNetworkInterfaceAttributeResult::getType()const
 {
 	return type_;

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

@@ -83,6 +83,8 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
 			networkInterfaceSetsObject.queueNumber = std::stoi(valueNetworkInterfaceSetsNetworkInterfaceSet["QueueNumber"].asString());
 		if(!valueNetworkInterfaceSetsNetworkInterfaceSet["DeleteOnRelease"].isNull())
 			networkInterfaceSetsObject.deleteOnRelease = valueNetworkInterfaceSetsNetworkInterfaceSet["DeleteOnRelease"].asString() == "true";
+		if(!valueNetworkInterfaceSetsNetworkInterfaceSet["SourceDestCheck"].isNull())
+			networkInterfaceSetsObject.sourceDestCheck = valueNetworkInterfaceSetsNetworkInterfaceSet["SourceDestCheck"].asString() == "true";
 		auto allPrivateIpSetsNode = valueNetworkInterfaceSetsNetworkInterfaceSet["PrivateIpSets"]["PrivateIpSet"];
 		for (auto valueNetworkInterfaceSetsNetworkInterfaceSetPrivateIpSetsPrivateIpSet : allPrivateIpSetsNode)
 		{

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

@@ -82,6 +82,15 @@ void ModifyNetworkInterfaceAttributeRequest::setEnhancedNetwork(const ModifyNetw
   setParameter(std::string("EnhancedNetwork") + ".EnableSriov", enhancedNetwork.enableSriov ? "true" : "false");
 }
 
+bool ModifyNetworkInterfaceAttributeRequest::getSourceDestCheck() const {
+  return sourceDestCheck_;
+}
+
+void ModifyNetworkInterfaceAttributeRequest::setSourceDestCheck(bool sourceDestCheck) {
+  sourceDestCheck_ = sourceDestCheck;
+  setParameter(std::string("SourceDestCheck"), sourceDestCheck ? "true" : "false");
+}
+
 std::string ModifyNetworkInterfaceAttributeRequest::getRegionId() const {
   return regionId_;
 }