diff --git a/CHANGELOG b/CHANGELOG index 6a1b3af32..f02bcc890 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-06-17 Version: 1.36.465 +- Supported sync create eni and assign private ip. + 2020-06-17 Version: 1.36.464 - Public beta version. - Add Api Overseas. diff --git a/VERSION b/VERSION index 1e95b740e..c148d6290 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.464 \ No newline at end of file +1.36.465 \ No newline at end of file diff --git a/ecs/CMakeLists.txt b/ecs/CMakeLists.txt index f982d2116..f78d285d2 100644 --- a/ecs/CMakeLists.txt +++ b/ecs/CMakeLists.txt @@ -223,6 +223,8 @@ set(ecs_public_header_model include/alibabacloud/ecs/model/DescribeDedicatedHostsResult.h include/alibabacloud/ecs/model/DescribeDemandsRequest.h include/alibabacloud/ecs/model/DescribeDemandsResult.h + include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.h + include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.h include/alibabacloud/ecs/model/DescribeDeploymentSetsRequest.h include/alibabacloud/ecs/model/DescribeDeploymentSetsResult.h include/alibabacloud/ecs/model/DescribeDiskMonitorDataRequest.h @@ -794,6 +796,8 @@ set(ecs_src src/model/DescribeDedicatedHostsResult.cc src/model/DescribeDemandsRequest.cc src/model/DescribeDemandsResult.cc + src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.cc + src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.cc src/model/DescribeDeploymentSetsRequest.cc src/model/DescribeDeploymentSetsResult.cc src/model/DescribeDiskMonitorDataRequest.cc diff --git a/ecs/include/alibabacloud/ecs/EcsClient.h b/ecs/include/alibabacloud/ecs/EcsClient.h index a5d95fb49..4861a389c 100644 --- a/ecs/include/alibabacloud/ecs/EcsClient.h +++ b/ecs/include/alibabacloud/ecs/EcsClient.h @@ -224,6 +224,8 @@ #include "model/DescribeDedicatedHostsResult.h" #include "model/DescribeDemandsRequest.h" #include "model/DescribeDemandsResult.h" +#include "model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.h" +#include "model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.h" #include "model/DescribeDeploymentSetsRequest.h" #include "model/DescribeDeploymentSetsResult.h" #include "model/DescribeDiskMonitorDataRequest.h" @@ -902,6 +904,9 @@ namespace AlibabaCloud typedef Outcome DescribeDemandsOutcome; typedef std::future DescribeDemandsOutcomeCallable; typedef std::function&)> DescribeDemandsAsyncHandler; + typedef Outcome DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome; + typedef std::future DescribeDeploymentSetSupportedInstanceTypeFamilyOutcomeCallable; + typedef std::function&)> DescribeDeploymentSetSupportedInstanceTypeFamilyAsyncHandler; typedef Outcome DescribeDeploymentSetsOutcome; typedef std::future DescribeDeploymentSetsOutcomeCallable; typedef std::function&)> DescribeDeploymentSetsAsyncHandler; @@ -1759,6 +1764,9 @@ namespace AlibabaCloud DescribeDemandsOutcome describeDemands(const Model::DescribeDemandsRequest &request)const; void describeDemandsAsync(const Model::DescribeDemandsRequest& request, const DescribeDemandsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDemandsOutcomeCallable describeDemandsCallable(const Model::DescribeDemandsRequest& request) const; + DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome describeDeploymentSetSupportedInstanceTypeFamily(const Model::DescribeDeploymentSetSupportedInstanceTypeFamilyRequest &request)const; + void describeDeploymentSetSupportedInstanceTypeFamilyAsync(const Model::DescribeDeploymentSetSupportedInstanceTypeFamilyRequest& request, const DescribeDeploymentSetSupportedInstanceTypeFamilyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDeploymentSetSupportedInstanceTypeFamilyOutcomeCallable describeDeploymentSetSupportedInstanceTypeFamilyCallable(const Model::DescribeDeploymentSetSupportedInstanceTypeFamilyRequest& request) const; DescribeDeploymentSetsOutcome describeDeploymentSets(const Model::DescribeDeploymentSetsRequest &request)const; void describeDeploymentSetsAsync(const Model::DescribeDeploymentSetsRequest& request, const DescribeDeploymentSetsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDeploymentSetsOutcomeCallable describeDeploymentSetsCallable(const Model::DescribeDeploymentSetsRequest& request) const; diff --git a/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesRequest.h b/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesRequest.h index 31e6fa3b5..5aabdbcaf 100644 --- a/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesRequest.h +++ b/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud long getResourceOwnerId()const; void setResourceOwnerId(long resourceOwnerId); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); int getSecondaryPrivateIpAddressCount()const; void setSecondaryPrivateIpAddressCount(int secondaryPrivateIpAddressCount); std::string getRegionId()const; @@ -54,6 +56,7 @@ namespace AlibabaCloud private: long resourceOwnerId_; + std::string clientToken_; int secondaryPrivateIpAddressCount_; std::string regionId_; std::string resourceOwnerAccount_; diff --git a/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesResult.h b/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesResult.h index 4364f6c1f..be60f26e3 100644 --- a/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesResult.h +++ b/ecs/include/alibabacloud/ecs/model/AssignPrivateIpAddressesResult.h @@ -32,15 +32,22 @@ namespace AlibabaCloud class ALIBABACLOUD_ECS_EXPORT AssignPrivateIpAddressesResult : public ServiceResult { public: + struct AssignedPrivateIpAddressesSet + { + std::vector privateIpSet; + std::string networkInterfaceId; + }; AssignPrivateIpAddressesResult(); explicit AssignPrivateIpAddressesResult(const std::string &payload); ~AssignPrivateIpAddressesResult(); + AssignedPrivateIpAddressesSet getAssignedPrivateIpAddressesSet()const; protected: void parse(const std::string &payload); private: + AssignedPrivateIpAddressesSet assignedPrivateIpAddressesSet_; }; } diff --git a/ecs/include/alibabacloud/ecs/model/CreateDeploymentSetRequest.h b/ecs/include/alibabacloud/ecs/model/CreateDeploymentSetRequest.h index 7de58746c..8ded3cf31 100644 --- a/ecs/include/alibabacloud/ecs/model/CreateDeploymentSetRequest.h +++ b/ecs/include/alibabacloud/ecs/model/CreateDeploymentSetRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setDescription(const std::string& description); std::string getRegionId()const; void setRegionId(const std::string& regionId); + long getGroupCount()const; + void setGroupCount(long groupCount); std::string getResourceOwnerAccount()const; void setResourceOwnerAccount(const std::string& resourceOwnerAccount); std::string getOwnerAccount()const; @@ -65,6 +67,7 @@ namespace AlibabaCloud std::string clientToken_; std::string description_; std::string regionId_; + long groupCount_; std::string resourceOwnerAccount_; std::string ownerAccount_; std::string deploymentSetName_; diff --git a/ecs/include/alibabacloud/ecs/model/CreateInstanceRequest.h b/ecs/include/alibabacloud/ecs/model/CreateInstanceRequest.h index 096e09af4..b727e31df 100644 --- a/ecs/include/alibabacloud/ecs/model/CreateInstanceRequest.h +++ b/ecs/include/alibabacloud/ecs/model/CreateInstanceRequest.h @@ -81,6 +81,8 @@ namespace AlibabaCloud void setHostName(const std::string& hostName); std::string getPassword()const; void setPassword(const std::string& password); + int getDeploymentSetGroupNo()const; + void setDeploymentSetGroupNo(int deploymentSetGroupNo); int getStorageSetPartitionNumber()const; void setStorageSetPartitionNumber(int storageSetPartitionNumber); std::vector getTag()const; @@ -201,6 +203,7 @@ namespace AlibabaCloud std::string resourceGroupId_; std::string hostName_; std::string password_; + int deploymentSetGroupNo_; int storageSetPartitionNumber_; std::vector tag_; int autoRenewPeriod_; diff --git a/ecs/include/alibabacloud/ecs/model/CreateNetworkInterfaceResult.h b/ecs/include/alibabacloud/ecs/model/CreateNetworkInterfaceResult.h index 50786b97f..58d60b24b 100644 --- a/ecs/include/alibabacloud/ecs/model/CreateNetworkInterfaceResult.h +++ b/ecs/include/alibabacloud/ecs/model/CreateNetworkInterfaceResult.h @@ -32,17 +32,59 @@ namespace AlibabaCloud class ALIBABACLOUD_ECS_EXPORT CreateNetworkInterfaceResult : public ServiceResult { public: + struct PrivateIpSet + { + std::string privateIpAddress; + bool primary; + }; + struct Tag + { + std::string tagKey; + std::string tagValue; + }; CreateNetworkInterfaceResult(); explicit CreateNetworkInterfaceResult(const std::string &payload); ~CreateNetworkInterfaceResult(); + std::string getStatus()const; + std::string getPrivateIpAddress()const; + std::string getDescription()const; + std::string getZoneId()const; + std::string getResourceGroupId()const; + bool getServiceManaged()const; + std::string getVSwitchId()const; + std::string getNetworkInterfaceName()const; std::string getNetworkInterfaceId()const; + std::string getMacAddress()const; + std::vector getSecurityGroupIds()const; + long getServiceID()const; + std::string getType()const; + std::string getVpcId()const; + std::string getOwnerId()const; + std::vector getTags()const; + std::vector getPrivateIpSets()const; protected: void parse(const std::string &payload); private: + std::string status_; + std::string privateIpAddress_; + std::string description_; + std::string zoneId_; + std::string resourceGroupId_; + bool serviceManaged_; + std::string vSwitchId_; + std::string networkInterfaceName_; std::string networkInterfaceId_; + std::string macAddress_; + std::vector securityGroupIds_; + long serviceID_; + std::string type_; + std::string vpcId_; + std::string ownerId_; + std::vector tags_; + std::vector privateIpSets_; }; } diff --git a/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.h b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.h new file mode 100644 index 000000000..ffabb8ec4 --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYREQUEST_H_ +#define ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT DescribeDeploymentSetSupportedInstanceTypeFamilyRequest : public RpcServiceRequest + { + + public: + DescribeDeploymentSetSupportedInstanceTypeFamilyRequest(); + ~DescribeDeploymentSetSupportedInstanceTypeFamilyRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + + private: + long resourceOwnerId_; + std::string regionId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYREQUEST_H_ \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.h b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.h new file mode 100644 index 000000000..130bbcc01 --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYRESULT_H_ +#define ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT DescribeDeploymentSetSupportedInstanceTypeFamilyResult : public ServiceResult + { + public: + + + DescribeDeploymentSetSupportedInstanceTypeFamilyResult(); + explicit DescribeDeploymentSetSupportedInstanceTypeFamilyResult(const std::string &payload); + ~DescribeDeploymentSetSupportedInstanceTypeFamilyResult(); + std::string getInstanceTypeFamilies()const; + + protected: + void parse(const std::string &payload); + private: + std::string instanceTypeFamilies_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_DESCRIBEDEPLOYMENTSETSUPPORTEDINSTANCETYPEFAMILYRESULT_H_ \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetsResult.h b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetsResult.h index 8716e8e2a..e2cac1345 100644 --- a/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetsResult.h +++ b/ecs/include/alibabacloud/ecs/model/DescribeDeploymentSetsResult.h @@ -37,6 +37,7 @@ namespace AlibabaCloud std::string deploymentSetId; std::string deploymentSetDescription; int instanceAmount; + int groupCount; std::string creationTime; std::string strategy; std::string deploymentSetName; diff --git a/ecs/include/alibabacloud/ecs/model/DescribeDisksResult.h b/ecs/include/alibabacloud/ecs/model/DescribeDisksResult.h index e63b6ce94..e7ca73eb5 100644 --- a/ecs/include/alibabacloud/ecs/model/DescribeDisksResult.h +++ b/ecs/include/alibabacloud/ecs/model/DescribeDisksResult.h @@ -84,6 +84,7 @@ namespace AlibabaCloud bool portable; std::string type; int mountInstanceNum; + std::string serialNumber; std::vector mountInstances; std::string creationTime; std::string regionId; diff --git a/ecs/include/alibabacloud/ecs/model/DescribeInstancesResult.h b/ecs/include/alibabacloud/ecs/model/DescribeInstancesResult.h index 412d20d88..898f03e80 100644 --- a/ecs/include/alibabacloud/ecs/model/DescribeInstancesResult.h +++ b/ecs/include/alibabacloud/ecs/model/DescribeInstancesResult.h @@ -141,6 +141,7 @@ namespace AlibabaCloud std::string zoneId; std::string clusterId; std::string hpcClusterId; + int deploymentSetGroupNo; EcsCapacityReservationAttr ecsCapacityReservationAttr; DedicatedHostAttribute dedicatedHostAttribute; int gPUAmount; diff --git a/ecs/include/alibabacloud/ecs/model/ModifyInstanceDeploymentRequest.h b/ecs/include/alibabacloud/ecs/model/ModifyInstanceDeploymentRequest.h index 45830eb48..9325fbfa2 100644 --- a/ecs/include/alibabacloud/ecs/model/ModifyInstanceDeploymentRequest.h +++ b/ecs/include/alibabacloud/ecs/model/ModifyInstanceDeploymentRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setResourceOwnerId(long resourceOwnerId); std::string getRegionId()const; void setRegionId(const std::string& regionId); + int getDeploymentSetGroupNo()const; + void setDeploymentSetGroupNo(int deploymentSetGroupNo); std::string getInstanceType()const; void setInstanceType(const std::string& instanceType); std::string getDeploymentSetId()const; @@ -65,6 +67,7 @@ namespace AlibabaCloud private: long resourceOwnerId_; std::string regionId_; + int deploymentSetGroupNo_; std::string instanceType_; std::string deploymentSetId_; std::string resourceOwnerAccount_; diff --git a/ecs/include/alibabacloud/ecs/model/RunInstancesRequest.h b/ecs/include/alibabacloud/ecs/model/RunInstancesRequest.h index facfd1834..fdc373ca4 100644 --- a/ecs/include/alibabacloud/ecs/model/RunInstancesRequest.h +++ b/ecs/include/alibabacloud/ecs/model/RunInstancesRequest.h @@ -91,6 +91,8 @@ namespace AlibabaCloud void setHostName(const std::string& hostName); std::string getPassword()const; void setPassword(const std::string& password); + int getDeploymentSetGroupNo()const; + void setDeploymentSetGroupNo(int deploymentSetGroupNo); int getStorageSetPartitionNumber()const; void setStorageSetPartitionNumber(int storageSetPartitionNumber); std::vector getTag()const; @@ -228,6 +230,7 @@ namespace AlibabaCloud std::string resourceGroupId_; std::string hostName_; std::string password_; + int deploymentSetGroupNo_; int storageSetPartitionNumber_; std::vector tag_; std::string systemDiskAutoSnapshotPolicyId_; diff --git a/ecs/src/EcsClient.cc b/ecs/src/EcsClient.cc index b60bfc39e..1f6bf8530 100644 --- a/ecs/src/EcsClient.cc +++ b/ecs/src/EcsClient.cc @@ -3687,6 +3687,42 @@ EcsClient::DescribeDemandsOutcomeCallable EcsClient::describeDemandsCallable(con return task->get_future(); } +EcsClient::DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome EcsClient::describeDeploymentSetSupportedInstanceTypeFamily(const DescribeDeploymentSetSupportedInstanceTypeFamilyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome(DescribeDeploymentSetSupportedInstanceTypeFamilyResult(outcome.result())); + else + return DescribeDeploymentSetSupportedInstanceTypeFamilyOutcome(outcome.error()); +} + +void EcsClient::describeDeploymentSetSupportedInstanceTypeFamilyAsync(const DescribeDeploymentSetSupportedInstanceTypeFamilyRequest& request, const DescribeDeploymentSetSupportedInstanceTypeFamilyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDeploymentSetSupportedInstanceTypeFamily(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EcsClient::DescribeDeploymentSetSupportedInstanceTypeFamilyOutcomeCallable EcsClient::describeDeploymentSetSupportedInstanceTypeFamilyCallable(const DescribeDeploymentSetSupportedInstanceTypeFamilyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDeploymentSetSupportedInstanceTypeFamily(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EcsClient::DescribeDeploymentSetsOutcome EcsClient::describeDeploymentSets(const DescribeDeploymentSetsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ecs/src/model/AssignPrivateIpAddressesRequest.cc b/ecs/src/model/AssignPrivateIpAddressesRequest.cc index c45820373..441f05e51 100644 --- a/ecs/src/model/AssignPrivateIpAddressesRequest.cc +++ b/ecs/src/model/AssignPrivateIpAddressesRequest.cc @@ -38,6 +38,17 @@ void AssignPrivateIpAddressesRequest::setResourceOwnerId(long resourceOwnerId) setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } +std::string AssignPrivateIpAddressesRequest::getClientToken()const +{ + return clientToken_; +} + +void AssignPrivateIpAddressesRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setParameter("ClientToken", clientToken); +} + int AssignPrivateIpAddressesRequest::getSecondaryPrivateIpAddressCount()const { return secondaryPrivateIpAddressCount_; diff --git a/ecs/src/model/AssignPrivateIpAddressesResult.cc b/ecs/src/model/AssignPrivateIpAddressesResult.cc index 0cd480717..177f09efe 100644 --- a/ecs/src/model/AssignPrivateIpAddressesResult.cc +++ b/ecs/src/model/AssignPrivateIpAddressesResult.cc @@ -39,6 +39,17 @@ void AssignPrivateIpAddressesResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + auto assignedPrivateIpAddressesSetNode = value["AssignedPrivateIpAddressesSet"]; + if(!assignedPrivateIpAddressesSetNode["NetworkInterfaceId"].isNull()) + assignedPrivateIpAddressesSet_.networkInterfaceId = assignedPrivateIpAddressesSetNode["NetworkInterfaceId"].asString(); + auto allPrivateIpSet = assignedPrivateIpAddressesSetNode["PrivateIpSet"]["PrivateIpAddress"]; + for (auto value : allPrivateIpSet) + assignedPrivateIpAddressesSet_.privateIpSet.push_back(value.asString()); } +AssignPrivateIpAddressesResult::AssignedPrivateIpAddressesSet AssignPrivateIpAddressesResult::getAssignedPrivateIpAddressesSet()const +{ + return assignedPrivateIpAddressesSet_; +} + diff --git a/ecs/src/model/CreateDeploymentSetRequest.cc b/ecs/src/model/CreateDeploymentSetRequest.cc index aedb5311a..50d645616 100644 --- a/ecs/src/model/CreateDeploymentSetRequest.cc +++ b/ecs/src/model/CreateDeploymentSetRequest.cc @@ -71,6 +71,17 @@ void CreateDeploymentSetRequest::setRegionId(const std::string& regionId) setParameter("RegionId", regionId); } +long CreateDeploymentSetRequest::getGroupCount()const +{ + return groupCount_; +} + +void CreateDeploymentSetRequest::setGroupCount(long groupCount) +{ + groupCount_ = groupCount; + setParameter("GroupCount", std::to_string(groupCount)); +} + std::string CreateDeploymentSetRequest::getResourceOwnerAccount()const { return resourceOwnerAccount_; diff --git a/ecs/src/model/CreateInstanceRequest.cc b/ecs/src/model/CreateInstanceRequest.cc index b26e31ae0..cd5e8bbcd 100644 --- a/ecs/src/model/CreateInstanceRequest.cc +++ b/ecs/src/model/CreateInstanceRequest.cc @@ -137,6 +137,17 @@ void CreateInstanceRequest::setPassword(const std::string& password) setParameter("Password", password); } +int CreateInstanceRequest::getDeploymentSetGroupNo()const +{ + return deploymentSetGroupNo_; +} + +void CreateInstanceRequest::setDeploymentSetGroupNo(int deploymentSetGroupNo) +{ + deploymentSetGroupNo_ = deploymentSetGroupNo; + setParameter("DeploymentSetGroupNo", std::to_string(deploymentSetGroupNo)); +} + int CreateInstanceRequest::getStorageSetPartitionNumber()const { return storageSetPartitionNumber_; diff --git a/ecs/src/model/CreateNetworkInterfaceResult.cc b/ecs/src/model/CreateNetworkInterfaceResult.cc index be416a690..fa1777f7d 100644 --- a/ecs/src/model/CreateNetworkInterfaceResult.cc +++ b/ecs/src/model/CreateNetworkInterfaceResult.cc @@ -39,13 +39,142 @@ void CreateNetworkInterfaceResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + auto allPrivateIpSetsNode = value["PrivateIpSets"]["PrivateIpSet"]; + for (auto valuePrivateIpSetsPrivateIpSet : allPrivateIpSetsNode) + { + PrivateIpSet privateIpSetsObject; + if(!valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].isNull()) + privateIpSetsObject.privateIpAddress = valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].asString(); + if(!valuePrivateIpSetsPrivateIpSet["Primary"].isNull()) + privateIpSetsObject.primary = valuePrivateIpSetsPrivateIpSet["Primary"].asString() == "true"; + privateIpSets_.push_back(privateIpSetsObject); + } + auto allTagsNode = value["Tags"]["Tag"]; + for (auto valueTagsTag : allTagsNode) + { + Tag tagsObject; + if(!valueTagsTag["TagKey"].isNull()) + tagsObject.tagKey = valueTagsTag["TagKey"].asString(); + if(!valueTagsTag["TagValue"].isNull()) + tagsObject.tagValue = valueTagsTag["TagValue"].asString(); + tags_.push_back(tagsObject); + } + auto allSecurityGroupIds = value["SecurityGroupIds"]["SecurityGroupId"]; + for (const auto &item : allSecurityGroupIds) + securityGroupIds_.push_back(item.asString()); if(!value["NetworkInterfaceId"].isNull()) networkInterfaceId_ = value["NetworkInterfaceId"].asString(); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); + if(!value["Type"].isNull()) + type_ = value["Type"].asString(); + if(!value["VpcId"].isNull()) + vpcId_ = value["VpcId"].asString(); + if(!value["VSwitchId"].isNull()) + vSwitchId_ = value["VSwitchId"].asString(); + if(!value["ZoneId"].isNull()) + zoneId_ = value["ZoneId"].asString(); + if(!value["PrivateIpAddress"].isNull()) + privateIpAddress_ = value["PrivateIpAddress"].asString(); + if(!value["MacAddress"].isNull()) + macAddress_ = value["MacAddress"].asString(); + if(!value["NetworkInterfaceName"].isNull()) + networkInterfaceName_ = value["NetworkInterfaceName"].asString(); + if(!value["Description"].isNull()) + description_ = value["Description"].asString(); + if(!value["ResourceGroupId"].isNull()) + resourceGroupId_ = value["ResourceGroupId"].asString(); + if(!value["ServiceID"].isNull()) + serviceID_ = std::stol(value["ServiceID"].asString()); + if(!value["ServiceManaged"].isNull()) + serviceManaged_ = value["ServiceManaged"].asString() == "true"; + if(!value["OwnerId"].isNull()) + ownerId_ = value["OwnerId"].asString(); } +std::string CreateNetworkInterfaceResult::getStatus()const +{ + return status_; +} + +std::string CreateNetworkInterfaceResult::getPrivateIpAddress()const +{ + return privateIpAddress_; +} + +std::string CreateNetworkInterfaceResult::getDescription()const +{ + return description_; +} + +std::string CreateNetworkInterfaceResult::getZoneId()const +{ + return zoneId_; +} + +std::string CreateNetworkInterfaceResult::getResourceGroupId()const +{ + return resourceGroupId_; +} + +bool CreateNetworkInterfaceResult::getServiceManaged()const +{ + return serviceManaged_; +} + +std::string CreateNetworkInterfaceResult::getVSwitchId()const +{ + return vSwitchId_; +} + +std::string CreateNetworkInterfaceResult::getNetworkInterfaceName()const +{ + return networkInterfaceName_; +} + std::string CreateNetworkInterfaceResult::getNetworkInterfaceId()const { return networkInterfaceId_; } +std::string CreateNetworkInterfaceResult::getMacAddress()const +{ + return macAddress_; +} + +std::vector CreateNetworkInterfaceResult::getSecurityGroupIds()const +{ + return securityGroupIds_; +} + +long CreateNetworkInterfaceResult::getServiceID()const +{ + return serviceID_; +} + +std::string CreateNetworkInterfaceResult::getType()const +{ + return type_; +} + +std::string CreateNetworkInterfaceResult::getVpcId()const +{ + return vpcId_; +} + +std::string CreateNetworkInterfaceResult::getOwnerId()const +{ + return ownerId_; +} + +std::vector CreateNetworkInterfaceResult::getTags()const +{ + return tags_; +} + +std::vector CreateNetworkInterfaceResult::getPrivateIpSets()const +{ + return privateIpSets_; +} + diff --git a/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.cc b/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.cc new file mode 100644 index 000000000..1f43ce9f2 --- /dev/null +++ b/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyRequest.cc @@ -0,0 +1,84 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ecs::Model::DescribeDeploymentSetSupportedInstanceTypeFamilyRequest; + +DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::DescribeDeploymentSetSupportedInstanceTypeFamilyRequest() : + RpcServiceRequest("ecs", "2014-05-26", "DescribeDeploymentSetSupportedInstanceTypeFamily") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::~DescribeDeploymentSetSupportedInstanceTypeFamilyRequest() +{} + +long DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::getRegionId()const +{ + return regionId_; +} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::getOwnerId()const +{ + return ownerId_; +} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + diff --git a/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.cc b/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.cc new file mode 100644 index 000000000..8eba9184f --- /dev/null +++ b/ecs/src/model/DescribeDeploymentSetSupportedInstanceTypeFamilyResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ecs; +using namespace AlibabaCloud::Ecs::Model; + +DescribeDeploymentSetSupportedInstanceTypeFamilyResult::DescribeDeploymentSetSupportedInstanceTypeFamilyResult() : + ServiceResult() +{} + +DescribeDeploymentSetSupportedInstanceTypeFamilyResult::DescribeDeploymentSetSupportedInstanceTypeFamilyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDeploymentSetSupportedInstanceTypeFamilyResult::~DescribeDeploymentSetSupportedInstanceTypeFamilyResult() +{} + +void DescribeDeploymentSetSupportedInstanceTypeFamilyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["InstanceTypeFamilies"].isNull()) + instanceTypeFamilies_ = value["InstanceTypeFamilies"].asString(); + +} + +std::string DescribeDeploymentSetSupportedInstanceTypeFamilyResult::getInstanceTypeFamilies()const +{ + return instanceTypeFamilies_; +} + diff --git a/ecs/src/model/DescribeDeploymentSetsResult.cc b/ecs/src/model/DescribeDeploymentSetsResult.cc index 1f6c58222..24476168e 100644 --- a/ecs/src/model/DescribeDeploymentSetsResult.cc +++ b/ecs/src/model/DescribeDeploymentSetsResult.cc @@ -57,6 +57,8 @@ void DescribeDeploymentSetsResult::parse(const std::string &payload) deploymentSetsObject.domain = valueDeploymentSetsDeploymentSet["Domain"].asString(); if(!valueDeploymentSetsDeploymentSet["Granularity"].isNull()) deploymentSetsObject.granularity = valueDeploymentSetsDeploymentSet["Granularity"].asString(); + if(!valueDeploymentSetsDeploymentSet["GroupCount"].isNull()) + deploymentSetsObject.groupCount = std::stoi(valueDeploymentSetsDeploymentSet["GroupCount"].asString()); if(!valueDeploymentSetsDeploymentSet["InstanceAmount"].isNull()) deploymentSetsObject.instanceAmount = std::stoi(valueDeploymentSetsDeploymentSet["InstanceAmount"].asString()); if(!valueDeploymentSetsDeploymentSet["CreationTime"].isNull()) diff --git a/ecs/src/model/DescribeDisksResult.cc b/ecs/src/model/DescribeDisksResult.cc index 47aff7bd4..ede97aa77 100644 --- a/ecs/src/model/DescribeDisksResult.cc +++ b/ecs/src/model/DescribeDisksResult.cc @@ -115,6 +115,8 @@ void DescribeDisksResult::parse(const std::string &payload) disksObject.performanceLevel = valueDisksDisk["PerformanceLevel"].asString(); if(!valueDisksDisk["BdfId"].isNull()) disksObject.bdfId = valueDisksDisk["BdfId"].asString(); + if(!valueDisksDisk["SerialNumber"].isNull()) + disksObject.serialNumber = valueDisksDisk["SerialNumber"].asString(); auto allOperationLocksNode = allDisksNode["OperationLocks"]["OperationLock"]; for (auto allDisksNodeOperationLocksOperationLock : allOperationLocksNode) { diff --git a/ecs/src/model/DescribeInstancesResult.cc b/ecs/src/model/DescribeInstancesResult.cc index 49f459a8e..e5c975c70 100644 --- a/ecs/src/model/DescribeInstancesResult.cc +++ b/ecs/src/model/DescribeInstancesResult.cc @@ -73,6 +73,8 @@ void DescribeInstancesResult::parse(const std::string &payload) instancesObject.hostName = valueInstancesInstance["HostName"].asString(); if(!valueInstancesInstance["DeploymentSetId"].isNull()) instancesObject.deploymentSetId = valueInstancesInstance["DeploymentSetId"].asString(); + if(!valueInstancesInstance["DeploymentSetGroupNo"].isNull()) + instancesObject.deploymentSetGroupNo = std::stoi(valueInstancesInstance["DeploymentSetGroupNo"].asString()); if(!valueInstancesInstance["Status"].isNull()) instancesObject.status = valueInstancesInstance["Status"].asString(); if(!valueInstancesInstance["SerialNumber"].isNull()) diff --git a/ecs/src/model/ModifyInstanceDeploymentRequest.cc b/ecs/src/model/ModifyInstanceDeploymentRequest.cc index 746f49eed..94943e44b 100644 --- a/ecs/src/model/ModifyInstanceDeploymentRequest.cc +++ b/ecs/src/model/ModifyInstanceDeploymentRequest.cc @@ -49,6 +49,17 @@ void ModifyInstanceDeploymentRequest::setRegionId(const std::string& regionId) setParameter("RegionId", regionId); } +int ModifyInstanceDeploymentRequest::getDeploymentSetGroupNo()const +{ + return deploymentSetGroupNo_; +} + +void ModifyInstanceDeploymentRequest::setDeploymentSetGroupNo(int deploymentSetGroupNo) +{ + deploymentSetGroupNo_ = deploymentSetGroupNo; + setParameter("DeploymentSetGroupNo", std::to_string(deploymentSetGroupNo)); +} + std::string ModifyInstanceDeploymentRequest::getInstanceType()const { return instanceType_; diff --git a/ecs/src/model/RunInstancesRequest.cc b/ecs/src/model/RunInstancesRequest.cc index 97b5e0e40..4a34584af 100644 --- a/ecs/src/model/RunInstancesRequest.cc +++ b/ecs/src/model/RunInstancesRequest.cc @@ -170,6 +170,17 @@ void RunInstancesRequest::setPassword(const std::string& password) setParameter("Password", password); } +int RunInstancesRequest::getDeploymentSetGroupNo()const +{ + return deploymentSetGroupNo_; +} + +void RunInstancesRequest::setDeploymentSetGroupNo(int deploymentSetGroupNo) +{ + deploymentSetGroupNo_ = deploymentSetGroupNo; + setParameter("DeploymentSetGroupNo", std::to_string(deploymentSetGroupNo)); +} + int RunInstancesRequest::getStorageSetPartitionNumber()const { return storageSetPartitionNumber_;