From ed4f7ee25b4f1e37133a3e67b34797330f93a86b Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sat, 14 Sep 2024 01:52:14 +0000 Subject: [PATCH] Update EBS default encrypted APIs from private to public. --- VERSION | 2 +- .../DescribeNetworkInterfaceAttributeResult.h | 26 +++++++------- .../model/DescribeNetworkInterfacesResult.h | 1 + .../ModifyNetworkInterfaceAttributeRequest.h | 3 ++ ...DescribeNetworkInterfaceAttributeResult.cc | 35 +++++++++++-------- .../model/DescribeNetworkInterfacesResult.cc | 2 ++ .../ModifyNetworkInterfaceAttributeRequest.cc | 9 +++++ 7 files changed, 51 insertions(+), 27 deletions(-) diff --git a/VERSION b/VERSION index 10755e1c3..00bb14976 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1985 \ No newline at end of file +1.36.1986 \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfaceAttributeResult.h b/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfaceAttributeResult.h index 0cc235b10..710854d5a 100644 --- a/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfaceAttributeResult.h +++ b/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 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 securityGroupIds_; long serviceID_; std::string tcpOptionAddressEnabled_; + bool sourceDestCheck_; std::string type_; int queuePairNumber_; int queueNumber_; diff --git a/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfacesResult.h b/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfacesResult.h index 5654fce7f..6bab17150 100644 --- a/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfacesResult.h +++ b/ecs/include/alibabacloud/ecs/model/DescribeNetworkInterfacesResult.h @@ -95,6 +95,7 @@ namespace AlibabaCloud std::string macAddress; std::vector securityGroupIds; long serviceID; + bool sourceDestCheck; std::string type; int queuePairNumber; int queueNumber; diff --git a/ecs/include/alibabacloud/ecs/model/ModifyNetworkInterfaceAttributeRequest.h b/ecs/include/alibabacloud/ecs/model/ModifyNetworkInterfaceAttributeRequest.h index 898021d21..98d847297 100644 --- a/ecs/include/alibabacloud/ecs/model/ModifyNetworkInterfaceAttributeRequest.h +++ b/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 ®ionId); 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_; diff --git a/ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc b/ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc index 8f0cbc557..c824be844 100644 --- a/ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc +++ b/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_; diff --git a/ecs/src/model/DescribeNetworkInterfacesResult.cc b/ecs/src/model/DescribeNetworkInterfacesResult.cc index e65b46548..51bb51de5 100644 --- a/ecs/src/model/DescribeNetworkInterfacesResult.cc +++ b/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) { diff --git a/ecs/src/model/ModifyNetworkInterfaceAttributeRequest.cc b/ecs/src/model/ModifyNetworkInterfaceAttributeRequest.cc index 974fc5d24..d7fafdfae 100644 --- a/ecs/src/model/ModifyNetworkInterfaceAttributeRequest.cc +++ b/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_; }