diff --git a/VERSION b/VERSION index 765462f12..dfb11d244 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1418 \ No newline at end of file +1.36.1419 \ No newline at end of file diff --git a/eais/CMakeLists.txt b/eais/CMakeLists.txt index 533ab5063..74208cbd7 100644 --- a/eais/CMakeLists.txt +++ b/eais/CMakeLists.txt @@ -23,10 +23,16 @@ set(eais_public_header set(eais_public_header_model include/alibabacloud/eais/model/AttachEaiRequest.h include/alibabacloud/eais/model/AttachEaiResult.h + include/alibabacloud/eais/model/ChangeResourceGroupRequest.h + include/alibabacloud/eais/model/ChangeResourceGroupResult.h include/alibabacloud/eais/model/CreateEaiRequest.h include/alibabacloud/eais/model/CreateEaiResult.h include/alibabacloud/eais/model/CreateEaiAllRequest.h include/alibabacloud/eais/model/CreateEaiAllResult.h + include/alibabacloud/eais/model/CreateEaiEciRequest.h + include/alibabacloud/eais/model/CreateEaiEciResult.h + include/alibabacloud/eais/model/CreateEaiEcsRequest.h + include/alibabacloud/eais/model/CreateEaiEcsResult.h include/alibabacloud/eais/model/CreateEaiJupyterRequest.h include/alibabacloud/eais/model/CreateEaiJupyterResult.h include/alibabacloud/eais/model/DeleteEaiRequest.h @@ -38,16 +44,24 @@ set(eais_public_header_model include/alibabacloud/eais/model/DescribeRegionsRequest.h include/alibabacloud/eais/model/DescribeRegionsResult.h include/alibabacloud/eais/model/DetachEaiRequest.h - include/alibabacloud/eais/model/DetachEaiResult.h ) + include/alibabacloud/eais/model/DetachEaiResult.h + include/alibabacloud/eais/model/GetInstanceMetricsRequest.h + include/alibabacloud/eais/model/GetInstanceMetricsResult.h ) set(eais_src src/EaisClient.cc src/model/AttachEaiRequest.cc src/model/AttachEaiResult.cc + src/model/ChangeResourceGroupRequest.cc + src/model/ChangeResourceGroupResult.cc src/model/CreateEaiRequest.cc src/model/CreateEaiResult.cc src/model/CreateEaiAllRequest.cc src/model/CreateEaiAllResult.cc + src/model/CreateEaiEciRequest.cc + src/model/CreateEaiEciResult.cc + src/model/CreateEaiEcsRequest.cc + src/model/CreateEaiEcsResult.cc src/model/CreateEaiJupyterRequest.cc src/model/CreateEaiJupyterResult.cc src/model/DeleteEaiRequest.cc @@ -59,7 +73,9 @@ set(eais_src src/model/DescribeRegionsRequest.cc src/model/DescribeRegionsResult.cc src/model/DetachEaiRequest.cc - src/model/DetachEaiResult.cc ) + src/model/DetachEaiResult.cc + src/model/GetInstanceMetricsRequest.cc + src/model/GetInstanceMetricsResult.cc ) add_library(eais ${LIB_TYPE} ${eais_public_header} diff --git a/eais/include/alibabacloud/eais/EaisClient.h b/eais/include/alibabacloud/eais/EaisClient.h index f9a1b9cbd..43a070bf5 100644 --- a/eais/include/alibabacloud/eais/EaisClient.h +++ b/eais/include/alibabacloud/eais/EaisClient.h @@ -24,10 +24,16 @@ #include "EaisExport.h" #include "model/AttachEaiRequest.h" #include "model/AttachEaiResult.h" +#include "model/ChangeResourceGroupRequest.h" +#include "model/ChangeResourceGroupResult.h" #include "model/CreateEaiRequest.h" #include "model/CreateEaiResult.h" #include "model/CreateEaiAllRequest.h" #include "model/CreateEaiAllResult.h" +#include "model/CreateEaiEciRequest.h" +#include "model/CreateEaiEciResult.h" +#include "model/CreateEaiEcsRequest.h" +#include "model/CreateEaiEcsResult.h" #include "model/CreateEaiJupyterRequest.h" #include "model/CreateEaiJupyterResult.h" #include "model/DeleteEaiRequest.h" @@ -40,6 +46,8 @@ #include "model/DescribeRegionsResult.h" #include "model/DetachEaiRequest.h" #include "model/DetachEaiResult.h" +#include "model/GetInstanceMetricsRequest.h" +#include "model/GetInstanceMetricsResult.h" namespace AlibabaCloud @@ -52,12 +60,21 @@ namespace AlibabaCloud typedef Outcome AttachEaiOutcome; typedef std::future AttachEaiOutcomeCallable; typedef std::function&)> AttachEaiAsyncHandler; + typedef Outcome ChangeResourceGroupOutcome; + typedef std::future ChangeResourceGroupOutcomeCallable; + typedef std::function&)> ChangeResourceGroupAsyncHandler; typedef Outcome CreateEaiOutcome; typedef std::future CreateEaiOutcomeCallable; typedef std::function&)> CreateEaiAsyncHandler; typedef Outcome CreateEaiAllOutcome; typedef std::future CreateEaiAllOutcomeCallable; typedef std::function&)> CreateEaiAllAsyncHandler; + typedef Outcome CreateEaiEciOutcome; + typedef std::future CreateEaiEciOutcomeCallable; + typedef std::function&)> CreateEaiEciAsyncHandler; + typedef Outcome CreateEaiEcsOutcome; + typedef std::future CreateEaiEcsOutcomeCallable; + typedef std::function&)> CreateEaiEcsAsyncHandler; typedef Outcome CreateEaiJupyterOutcome; typedef std::future CreateEaiJupyterOutcomeCallable; typedef std::function&)> CreateEaiJupyterAsyncHandler; @@ -76,6 +93,9 @@ namespace AlibabaCloud typedef Outcome DetachEaiOutcome; typedef std::future DetachEaiOutcomeCallable; typedef std::function&)> DetachEaiAsyncHandler; + typedef Outcome GetInstanceMetricsOutcome; + typedef std::future GetInstanceMetricsOutcomeCallable; + typedef std::function&)> GetInstanceMetricsAsyncHandler; EaisClient(const Credentials &credentials, const ClientConfiguration &configuration); EaisClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); @@ -84,12 +104,21 @@ namespace AlibabaCloud AttachEaiOutcome attachEai(const Model::AttachEaiRequest &request)const; void attachEaiAsync(const Model::AttachEaiRequest& request, const AttachEaiAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; AttachEaiOutcomeCallable attachEaiCallable(const Model::AttachEaiRequest& request) const; + ChangeResourceGroupOutcome changeResourceGroup(const Model::ChangeResourceGroupRequest &request)const; + void changeResourceGroupAsync(const Model::ChangeResourceGroupRequest& request, const ChangeResourceGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ChangeResourceGroupOutcomeCallable changeResourceGroupCallable(const Model::ChangeResourceGroupRequest& request) const; CreateEaiOutcome createEai(const Model::CreateEaiRequest &request)const; void createEaiAsync(const Model::CreateEaiRequest& request, const CreateEaiAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateEaiOutcomeCallable createEaiCallable(const Model::CreateEaiRequest& request) const; CreateEaiAllOutcome createEaiAll(const Model::CreateEaiAllRequest &request)const; void createEaiAllAsync(const Model::CreateEaiAllRequest& request, const CreateEaiAllAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateEaiAllOutcomeCallable createEaiAllCallable(const Model::CreateEaiAllRequest& request) const; + CreateEaiEciOutcome createEaiEci(const Model::CreateEaiEciRequest &request)const; + void createEaiEciAsync(const Model::CreateEaiEciRequest& request, const CreateEaiEciAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateEaiEciOutcomeCallable createEaiEciCallable(const Model::CreateEaiEciRequest& request) const; + CreateEaiEcsOutcome createEaiEcs(const Model::CreateEaiEcsRequest &request)const; + void createEaiEcsAsync(const Model::CreateEaiEcsRequest& request, const CreateEaiEcsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateEaiEcsOutcomeCallable createEaiEcsCallable(const Model::CreateEaiEcsRequest& request) const; CreateEaiJupyterOutcome createEaiJupyter(const Model::CreateEaiJupyterRequest &request)const; void createEaiJupyterAsync(const Model::CreateEaiJupyterRequest& request, const CreateEaiJupyterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateEaiJupyterOutcomeCallable createEaiJupyterCallable(const Model::CreateEaiJupyterRequest& request) const; @@ -108,6 +137,9 @@ namespace AlibabaCloud DetachEaiOutcome detachEai(const Model::DetachEaiRequest &request)const; void detachEaiAsync(const Model::DetachEaiRequest& request, const DetachEaiAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetachEaiOutcomeCallable detachEaiCallable(const Model::DetachEaiRequest& request) const; + GetInstanceMetricsOutcome getInstanceMetrics(const Model::GetInstanceMetricsRequest &request)const; + void getInstanceMetricsAsync(const Model::GetInstanceMetricsRequest& request, const GetInstanceMetricsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetInstanceMetricsOutcomeCallable getInstanceMetricsCallable(const Model::GetInstanceMetricsRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/eais/include/alibabacloud/eais/model/ChangeResourceGroupRequest.h b/eais/include/alibabacloud/eais/model/ChangeResourceGroupRequest.h new file mode 100644 index 000000000..2be0831b7 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/ChangeResourceGroupRequest.h @@ -0,0 +1,54 @@ +/* + * 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_EAIS_MODEL_CHANGERESOURCEGROUPREQUEST_H_ +#define ALIBABACLOUD_EAIS_MODEL_CHANGERESOURCEGROUPREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eais { +namespace Model { +class ALIBABACLOUD_EAIS_EXPORT ChangeResourceGroupRequest : public RpcServiceRequest { +public: + ChangeResourceGroupRequest(); + ~ChangeResourceGroupRequest(); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getResourceRegionId() const; + void setResourceRegionId(const std::string &resourceRegionId); + std::string getResourceId() const; + void setResourceId(const std::string &resourceId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getService() const; + void setService(const std::string &service); + +private: + std::string resourceGroupId_; + std::string resourceRegionId_; + std::string resourceId_; + std::string resourceType_; + std::string service_; +}; +} // namespace Model +} // namespace Eais +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EAIS_MODEL_CHANGERESOURCEGROUPREQUEST_H_ diff --git a/eais/include/alibabacloud/eais/model/ChangeResourceGroupResult.h b/eais/include/alibabacloud/eais/model/ChangeResourceGroupResult.h new file mode 100644 index 000000000..14c644ea3 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/ChangeResourceGroupResult.h @@ -0,0 +1,49 @@ +/* + * 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_EAIS_MODEL_CHANGERESOURCEGROUPRESULT_H_ +#define ALIBABACLOUD_EAIS_MODEL_CHANGERESOURCEGROUPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eais + { + namespace Model + { + class ALIBABACLOUD_EAIS_EXPORT ChangeResourceGroupResult : public ServiceResult + { + public: + + + ChangeResourceGroupResult(); + explicit ChangeResourceGroupResult(const std::string &payload); + ~ChangeResourceGroupResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EAIS_MODEL_CHANGERESOURCEGROUPRESULT_H_ \ No newline at end of file diff --git a/eais/include/alibabacloud/eais/model/CreateEaiAllRequest.h b/eais/include/alibabacloud/eais/model/CreateEaiAllRequest.h index ea3dd8d80..f7b9fcb81 100644 --- a/eais/include/alibabacloud/eais/model/CreateEaiAllRequest.h +++ b/eais/include/alibabacloud/eais/model/CreateEaiAllRequest.h @@ -38,6 +38,8 @@ public: void setClientInternetMaxBandwidthOut(int clientInternetMaxBandwidthOut); std::string getClientToken() const; void setClientToken(const std::string &clientToken); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getClientInstanceName() const; void setClientInstanceName(const std::string &clientInstanceName); int getClientInternetMaxBandwidthIn() const; @@ -66,6 +68,7 @@ private: std::string clientSystemDiskCategory_; int clientInternetMaxBandwidthOut_; std::string clientToken_; + std::string resourceGroupId_; std::string clientInstanceName_; int clientInternetMaxBandwidthIn_; std::string regionId_; diff --git a/eais/include/alibabacloud/eais/model/CreateEaiEciRequest.h b/eais/include/alibabacloud/eais/model/CreateEaiEciRequest.h new file mode 100644 index 000000000..382be4d7a --- /dev/null +++ b/eais/include/alibabacloud/eais/model/CreateEaiEciRequest.h @@ -0,0 +1,77 @@ +/* + * 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_EAIS_MODEL_CREATEEAIECIREQUEST_H_ +#define ALIBABACLOUD_EAIS_MODEL_CREATEEAIECIREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eais { +namespace Model { +class ALIBABACLOUD_EAIS_EXPORT CreateEaiEciRequest : public RpcServiceRequest { +public: + struct Eci { + struct Container { + std::string image; + std::string arg; + std::string name; + std::string volumes; + std::string command; + }; + Container container; + std::string volume; + std::string eipId; + std::string name; + std::string type; + }; + CreateEaiEciRequest(); + ~CreateEaiEciRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getSecurityGroupId() const; + void setSecurityGroupId(const std::string &securityGroupId); + Eci getEci() const; + void setEci(const Eci &eci); + std::string getEaisType() const; + void setEaisType(const std::string &eaisType); + std::string getVSwitchId() const; + void setVSwitchId(const std::string &vSwitchId); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getEaisName() const; + void setEaisName(const std::string &eaisName); + +private: + std::string clientToken_; + std::string securityGroupId_; + Eci eci_; + std::string eaisType_; + std::string vSwitchId_; + std::string resourceGroupId_; + std::string regionId_; + std::string eaisName_; +}; +} // namespace Model +} // namespace Eais +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EAIS_MODEL_CREATEEAIECIREQUEST_H_ diff --git a/eais/include/alibabacloud/eais/model/CreateEaiEciResult.h b/eais/include/alibabacloud/eais/model/CreateEaiEciResult.h new file mode 100644 index 000000000..4eac65080 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/CreateEaiEciResult.h @@ -0,0 +1,53 @@ +/* + * 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_EAIS_MODEL_CREATEEAIECIRESULT_H_ +#define ALIBABACLOUD_EAIS_MODEL_CREATEEAIECIRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eais + { + namespace Model + { + class ALIBABACLOUD_EAIS_EXPORT CreateEaiEciResult : public ServiceResult + { + public: + + + CreateEaiEciResult(); + explicit CreateEaiEciResult(const std::string &payload); + ~CreateEaiEciResult(); + std::string getClientInstanceId()const; + std::string getElasticAcceleratedInstanceId()const; + + protected: + void parse(const std::string &payload); + private: + std::string clientInstanceId_; + std::string elasticAcceleratedInstanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EAIS_MODEL_CREATEEAIECIRESULT_H_ \ No newline at end of file diff --git a/eais/include/alibabacloud/eais/model/CreateEaiEcsRequest.h b/eais/include/alibabacloud/eais/model/CreateEaiEcsRequest.h new file mode 100644 index 000000000..b3b437953 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/CreateEaiEcsRequest.h @@ -0,0 +1,74 @@ +/* + * 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_EAIS_MODEL_CREATEEAIECSREQUEST_H_ +#define ALIBABACLOUD_EAIS_MODEL_CREATEEAIECSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eais { +namespace Model { +class ALIBABACLOUD_EAIS_EXPORT CreateEaiEcsRequest : public RpcServiceRequest { +public: + struct Ecs { + std::string password; + std::string imageId; + std::string systemDiskCategory; + std::string internetMaxBandwidthOut; + std::string name; + long systemDiskSize; + std::string zoneId; + std::string type; + std::string internetMaxBandwidthIn; + }; + CreateEaiEcsRequest(); + ~CreateEaiEcsRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getSecurityGroupId() const; + void setSecurityGroupId(const std::string &securityGroupId); + std::string getEaisType() const; + void setEaisType(const std::string &eaisType); + std::string getVSwitchId() const; + void setVSwitchId(const std::string &vSwitchId); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + Ecs getEcs() const; + void setEcs(const Ecs &ecs); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getEaisName() const; + void setEaisName(const std::string &eaisName); + +private: + std::string clientToken_; + std::string securityGroupId_; + std::string eaisType_; + std::string vSwitchId_; + std::string resourceGroupId_; + Ecs ecs_; + std::string regionId_; + std::string eaisName_; +}; +} // namespace Model +} // namespace Eais +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EAIS_MODEL_CREATEEAIECSREQUEST_H_ diff --git a/eais/include/alibabacloud/eais/model/CreateEaiEcsResult.h b/eais/include/alibabacloud/eais/model/CreateEaiEcsResult.h new file mode 100644 index 000000000..abb9fff52 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/CreateEaiEcsResult.h @@ -0,0 +1,53 @@ +/* + * 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_EAIS_MODEL_CREATEEAIECSRESULT_H_ +#define ALIBABACLOUD_EAIS_MODEL_CREATEEAIECSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eais + { + namespace Model + { + class ALIBABACLOUD_EAIS_EXPORT CreateEaiEcsResult : public ServiceResult + { + public: + + + CreateEaiEcsResult(); + explicit CreateEaiEcsResult(const std::string &payload); + ~CreateEaiEcsResult(); + std::string getClientInstanceId()const; + std::string getElasticAcceleratedInstanceId()const; + + protected: + void parse(const std::string &payload); + private: + std::string clientInstanceId_; + std::string elasticAcceleratedInstanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EAIS_MODEL_CREATEEAIECSRESULT_H_ \ No newline at end of file diff --git a/eais/include/alibabacloud/eais/model/CreateEaiJupyterRequest.h b/eais/include/alibabacloud/eais/model/CreateEaiJupyterRequest.h index 2e1c020f8..6bd405cc7 100644 --- a/eais/include/alibabacloud/eais/model/CreateEaiJupyterRequest.h +++ b/eais/include/alibabacloud/eais/model/CreateEaiJupyterRequest.h @@ -42,6 +42,8 @@ public: void setEaisType(const std::string &eaisType); std::string getVSwitchId() const; void setVSwitchId(const std::string &vSwitchId); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); std::vector getEnvironmentVar() const; @@ -52,6 +54,7 @@ private: std::string securityGroupId_; std::string eaisType_; std::string vSwitchId_; + std::string resourceGroupId_; std::string regionId_; std::vector environmentVar_; }; diff --git a/eais/include/alibabacloud/eais/model/CreateEaiRequest.h b/eais/include/alibabacloud/eais/model/CreateEaiRequest.h index 32c281b9b..98227053b 100644 --- a/eais/include/alibabacloud/eais/model/CreateEaiRequest.h +++ b/eais/include/alibabacloud/eais/model/CreateEaiRequest.h @@ -36,6 +36,8 @@ public: void setSecurityGroupId(const std::string &securityGroupId); std::string getVSwitchId() const; void setVSwitchId(const std::string &vSwitchId); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getInstanceName() const; void setInstanceName(const std::string &instanceName); std::string getRegionId() const; @@ -47,6 +49,7 @@ private: std::string clientToken_; std::string securityGroupId_; std::string vSwitchId_; + std::string resourceGroupId_; std::string instanceName_; std::string regionId_; std::string instanceType_; diff --git a/eais/include/alibabacloud/eais/model/DescribeEaisRequest.h b/eais/include/alibabacloud/eais/model/DescribeEaisRequest.h index bd7af0c0e..e384a8719 100644 --- a/eais/include/alibabacloud/eais/model/DescribeEaisRequest.h +++ b/eais/include/alibabacloud/eais/model/DescribeEaisRequest.h @@ -34,6 +34,8 @@ public: void setElasticAcceleratedInstanceIds(const std::string &elasticAcceleratedInstanceIds); int getPageNumber() const; void setPageNumber(int pageNumber); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getInstanceName() const; void setInstanceName(const std::string &instanceName); std::string getRegionId() const; @@ -48,6 +50,7 @@ public: private: std::string elasticAcceleratedInstanceIds_; int pageNumber_; + std::string resourceGroupId_; std::string instanceName_; std::string regionId_; int pageSize_; diff --git a/eais/include/alibabacloud/eais/model/DescribeEaisResult.h b/eais/include/alibabacloud/eais/model/DescribeEaisResult.h index 29ce7d369..980bf01d5 100644 --- a/eais/include/alibabacloud/eais/model/DescribeEaisResult.h +++ b/eais/include/alibabacloud/eais/model/DescribeEaisResult.h @@ -44,6 +44,7 @@ namespace AlibabaCloud std::string description; std::string category; std::string zoneId; + std::string resourceGroupId; std::string vSwitchId; std::string securityGroupId; std::string startTime; diff --git a/eais/include/alibabacloud/eais/model/GetInstanceMetricsRequest.h b/eais/include/alibabacloud/eais/model/GetInstanceMetricsRequest.h new file mode 100644 index 000000000..e8c686553 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/GetInstanceMetricsRequest.h @@ -0,0 +1,54 @@ +/* + * 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_EAIS_MODEL_GETINSTANCEMETRICSREQUEST_H_ +#define ALIBABACLOUD_EAIS_MODEL_GETINSTANCEMETRICSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Eais { +namespace Model { +class ALIBABACLOUD_EAIS_EXPORT GetInstanceMetricsRequest : public RpcServiceRequest { +public: + GetInstanceMetricsRequest(); + ~GetInstanceMetricsRequest(); + std::string getMetricType() const; + void setMetricType(const std::string &metricType); + std::string getTimeStep() const; + void setTimeStep(const std::string &timeStep); + std::string getEndTime() const; + void setEndTime(const std::string &endTime); + std::string getStartTime() const; + void setStartTime(const std::string &startTime); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + +private: + std::string metricType_; + std::string timeStep_; + std::string endTime_; + std::string startTime_; + std::string instanceId_; +}; +} // namespace Model +} // namespace Eais +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_EAIS_MODEL_GETINSTANCEMETRICSREQUEST_H_ diff --git a/eais/include/alibabacloud/eais/model/GetInstanceMetricsResult.h b/eais/include/alibabacloud/eais/model/GetInstanceMetricsResult.h new file mode 100644 index 000000000..31ce47244 --- /dev/null +++ b/eais/include/alibabacloud/eais/model/GetInstanceMetricsResult.h @@ -0,0 +1,63 @@ +/* + * 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_EAIS_MODEL_GETINSTANCEMETRICSRESULT_H_ +#define ALIBABACLOUD_EAIS_MODEL_GETINSTANCEMETRICSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Eais + { + namespace Model + { + class ALIBABACLOUD_EAIS_EXPORT GetInstanceMetricsResult : public ServiceResult + { + public: + struct PodMetric + { + struct Metric + { + std::string value; + std::string time; + }; + std::vector metrics; + std::string podId; + }; + + + GetInstanceMetricsResult(); + explicit GetInstanceMetricsResult(const std::string &payload); + ~GetInstanceMetricsResult(); + std::string getInstanceId()const; + std::vector getPodMetrics()const; + + protected: + void parse(const std::string &payload); + private: + std::string instanceId_; + std::vector podMetrics_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EAIS_MODEL_GETINSTANCEMETRICSRESULT_H_ \ No newline at end of file diff --git a/eais/src/EaisClient.cc b/eais/src/EaisClient.cc index 69311ae30..d5c2b8663 100644 --- a/eais/src/EaisClient.cc +++ b/eais/src/EaisClient.cc @@ -87,6 +87,42 @@ EaisClient::AttachEaiOutcomeCallable EaisClient::attachEaiCallable(const AttachE return task->get_future(); } +EaisClient::ChangeResourceGroupOutcome EaisClient::changeResourceGroup(const ChangeResourceGroupRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ChangeResourceGroupOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ChangeResourceGroupOutcome(ChangeResourceGroupResult(outcome.result())); + else + return ChangeResourceGroupOutcome(outcome.error()); +} + +void EaisClient::changeResourceGroupAsync(const ChangeResourceGroupRequest& request, const ChangeResourceGroupAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, changeResourceGroup(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EaisClient::ChangeResourceGroupOutcomeCallable EaisClient::changeResourceGroupCallable(const ChangeResourceGroupRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->changeResourceGroup(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EaisClient::CreateEaiOutcome EaisClient::createEai(const CreateEaiRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -159,6 +195,78 @@ EaisClient::CreateEaiAllOutcomeCallable EaisClient::createEaiAllCallable(const C return task->get_future(); } +EaisClient::CreateEaiEciOutcome EaisClient::createEaiEci(const CreateEaiEciRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateEaiEciOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateEaiEciOutcome(CreateEaiEciResult(outcome.result())); + else + return CreateEaiEciOutcome(outcome.error()); +} + +void EaisClient::createEaiEciAsync(const CreateEaiEciRequest& request, const CreateEaiEciAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createEaiEci(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EaisClient::CreateEaiEciOutcomeCallable EaisClient::createEaiEciCallable(const CreateEaiEciRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createEaiEci(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +EaisClient::CreateEaiEcsOutcome EaisClient::createEaiEcs(const CreateEaiEcsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateEaiEcsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateEaiEcsOutcome(CreateEaiEcsResult(outcome.result())); + else + return CreateEaiEcsOutcome(outcome.error()); +} + +void EaisClient::createEaiEcsAsync(const CreateEaiEcsRequest& request, const CreateEaiEcsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createEaiEcs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EaisClient::CreateEaiEcsOutcomeCallable EaisClient::createEaiEcsCallable(const CreateEaiEcsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createEaiEcs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EaisClient::CreateEaiJupyterOutcome EaisClient::createEaiJupyter(const CreateEaiJupyterRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -375,3 +483,39 @@ EaisClient::DetachEaiOutcomeCallable EaisClient::detachEaiCallable(const DetachE return task->get_future(); } +EaisClient::GetInstanceMetricsOutcome EaisClient::getInstanceMetrics(const GetInstanceMetricsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetInstanceMetricsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetInstanceMetricsOutcome(GetInstanceMetricsResult(outcome.result())); + else + return GetInstanceMetricsOutcome(outcome.error()); +} + +void EaisClient::getInstanceMetricsAsync(const GetInstanceMetricsRequest& request, const GetInstanceMetricsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getInstanceMetrics(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EaisClient::GetInstanceMetricsOutcomeCallable EaisClient::getInstanceMetricsCallable(const GetInstanceMetricsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getInstanceMetrics(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/eais/src/model/ChangeResourceGroupRequest.cc b/eais/src/model/ChangeResourceGroupRequest.cc new file mode 100644 index 000000000..40c7cc6d5 --- /dev/null +++ b/eais/src/model/ChangeResourceGroupRequest.cc @@ -0,0 +1,72 @@ +/* + * 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::Eais::Model::ChangeResourceGroupRequest; + +ChangeResourceGroupRequest::ChangeResourceGroupRequest() + : RpcServiceRequest("eais", "2019-06-24", "ChangeResourceGroup") { + setMethod(HttpRequest::Method::Post); +} + +ChangeResourceGroupRequest::~ChangeResourceGroupRequest() {} + +std::string ChangeResourceGroupRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ChangeResourceGroupRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string ChangeResourceGroupRequest::getResourceRegionId() const { + return resourceRegionId_; +} + +void ChangeResourceGroupRequest::setResourceRegionId(const std::string &resourceRegionId) { + resourceRegionId_ = resourceRegionId; + setParameter(std::string("ResourceRegionId"), resourceRegionId); +} + +std::string ChangeResourceGroupRequest::getResourceId() const { + return resourceId_; +} + +void ChangeResourceGroupRequest::setResourceId(const std::string &resourceId) { + resourceId_ = resourceId; + setParameter(std::string("ResourceId"), resourceId); +} + +std::string ChangeResourceGroupRequest::getResourceType() const { + return resourceType_; +} + +void ChangeResourceGroupRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ChangeResourceGroupRequest::getService() const { + return service_; +} + +void ChangeResourceGroupRequest::setService(const std::string &service) { + service_ = service; + setParameter(std::string("Service"), service); +} + diff --git a/eais/src/model/ChangeResourceGroupResult.cc b/eais/src/model/ChangeResourceGroupResult.cc new file mode 100644 index 000000000..c26b6c933 --- /dev/null +++ b/eais/src/model/ChangeResourceGroupResult.cc @@ -0,0 +1,44 @@ +/* + * 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::Eais; +using namespace AlibabaCloud::Eais::Model; + +ChangeResourceGroupResult::ChangeResourceGroupResult() : + ServiceResult() +{} + +ChangeResourceGroupResult::ChangeResourceGroupResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ChangeResourceGroupResult::~ChangeResourceGroupResult() +{} + +void ChangeResourceGroupResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/eais/src/model/CreateEaiAllRequest.cc b/eais/src/model/CreateEaiAllRequest.cc index 98f6b5c4f..d4ebad0ec 100644 --- a/eais/src/model/CreateEaiAllRequest.cc +++ b/eais/src/model/CreateEaiAllRequest.cc @@ -61,6 +61,15 @@ void CreateEaiAllRequest::setClientToken(const std::string &clientToken) { setParameter(std::string("ClientToken"), clientToken); } +std::string CreateEaiAllRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateEaiAllRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string CreateEaiAllRequest::getClientInstanceName() const { return clientInstanceName_; } diff --git a/eais/src/model/CreateEaiEciRequest.cc b/eais/src/model/CreateEaiEciRequest.cc new file mode 100644 index 000000000..51ecf7fac --- /dev/null +++ b/eais/src/model/CreateEaiEciRequest.cc @@ -0,0 +1,107 @@ +/* + * 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::Eais::Model::CreateEaiEciRequest; + +CreateEaiEciRequest::CreateEaiEciRequest() + : RpcServiceRequest("eais", "2019-06-24", "CreateEaiEci") { + setMethod(HttpRequest::Method::Post); +} + +CreateEaiEciRequest::~CreateEaiEciRequest() {} + +std::string CreateEaiEciRequest::getClientToken() const { + return clientToken_; +} + +void CreateEaiEciRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string CreateEaiEciRequest::getSecurityGroupId() const { + return securityGroupId_; +} + +void CreateEaiEciRequest::setSecurityGroupId(const std::string &securityGroupId) { + securityGroupId_ = securityGroupId; + setParameter(std::string("SecurityGroupId"), securityGroupId); +} + +CreateEaiEciRequest::Eci CreateEaiEciRequest::getEci() const { + return eci_; +} + +void CreateEaiEciRequest::setEci(const CreateEaiEciRequest::Eci &eci) { + eci_ = eci; + setParameter(std::string("Eci") + ".Container.Image", eci.container.image); + setParameter(std::string("Eci") + ".Container.Arg", eci.container.arg); + setParameter(std::string("Eci") + ".Container.Name", eci.container.name); + setParameter(std::string("Eci") + ".Container.Volumes", eci.container.volumes); + setParameter(std::string("Eci") + ".Container.Command", eci.container.command); + setParameter(std::string("Eci") + ".Volume", eci.volume); + setParameter(std::string("Eci") + ".EipId", eci.eipId); + setParameter(std::string("Eci") + ".Name", eci.name); + setParameter(std::string("Eci") + ".Type", eci.type); +} + +std::string CreateEaiEciRequest::getEaisType() const { + return eaisType_; +} + +void CreateEaiEciRequest::setEaisType(const std::string &eaisType) { + eaisType_ = eaisType; + setParameter(std::string("EaisType"), eaisType); +} + +std::string CreateEaiEciRequest::getVSwitchId() const { + return vSwitchId_; +} + +void CreateEaiEciRequest::setVSwitchId(const std::string &vSwitchId) { + vSwitchId_ = vSwitchId; + setParameter(std::string("VSwitchId"), vSwitchId); +} + +std::string CreateEaiEciRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateEaiEciRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string CreateEaiEciRequest::getRegionId() const { + return regionId_; +} + +void CreateEaiEciRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string CreateEaiEciRequest::getEaisName() const { + return eaisName_; +} + +void CreateEaiEciRequest::setEaisName(const std::string &eaisName) { + eaisName_ = eaisName; + setParameter(std::string("EaisName"), eaisName); +} + diff --git a/eais/src/model/CreateEaiEciResult.cc b/eais/src/model/CreateEaiEciResult.cc new file mode 100644 index 000000000..f203219cf --- /dev/null +++ b/eais/src/model/CreateEaiEciResult.cc @@ -0,0 +1,58 @@ +/* + * 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::Eais; +using namespace AlibabaCloud::Eais::Model; + +CreateEaiEciResult::CreateEaiEciResult() : + ServiceResult() +{} + +CreateEaiEciResult::CreateEaiEciResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateEaiEciResult::~CreateEaiEciResult() +{} + +void CreateEaiEciResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ElasticAcceleratedInstanceId"].isNull()) + elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString(); + if(!value["ClientInstanceId"].isNull()) + clientInstanceId_ = value["ClientInstanceId"].asString(); + +} + +std::string CreateEaiEciResult::getClientInstanceId()const +{ + return clientInstanceId_; +} + +std::string CreateEaiEciResult::getElasticAcceleratedInstanceId()const +{ + return elasticAcceleratedInstanceId_; +} + diff --git a/eais/src/model/CreateEaiEcsRequest.cc b/eais/src/model/CreateEaiEcsRequest.cc new file mode 100644 index 000000000..ea636ae3f --- /dev/null +++ b/eais/src/model/CreateEaiEcsRequest.cc @@ -0,0 +1,107 @@ +/* + * 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::Eais::Model::CreateEaiEcsRequest; + +CreateEaiEcsRequest::CreateEaiEcsRequest() + : RpcServiceRequest("eais", "2019-06-24", "CreateEaiEcs") { + setMethod(HttpRequest::Method::Post); +} + +CreateEaiEcsRequest::~CreateEaiEcsRequest() {} + +std::string CreateEaiEcsRequest::getClientToken() const { + return clientToken_; +} + +void CreateEaiEcsRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string CreateEaiEcsRequest::getSecurityGroupId() const { + return securityGroupId_; +} + +void CreateEaiEcsRequest::setSecurityGroupId(const std::string &securityGroupId) { + securityGroupId_ = securityGroupId; + setParameter(std::string("SecurityGroupId"), securityGroupId); +} + +std::string CreateEaiEcsRequest::getEaisType() const { + return eaisType_; +} + +void CreateEaiEcsRequest::setEaisType(const std::string &eaisType) { + eaisType_ = eaisType; + setParameter(std::string("EaisType"), eaisType); +} + +std::string CreateEaiEcsRequest::getVSwitchId() const { + return vSwitchId_; +} + +void CreateEaiEcsRequest::setVSwitchId(const std::string &vSwitchId) { + vSwitchId_ = vSwitchId; + setParameter(std::string("VSwitchId"), vSwitchId); +} + +std::string CreateEaiEcsRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateEaiEcsRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +CreateEaiEcsRequest::Ecs CreateEaiEcsRequest::getEcs() const { + return ecs_; +} + +void CreateEaiEcsRequest::setEcs(const CreateEaiEcsRequest::Ecs &ecs) { + ecs_ = ecs; + setParameter(std::string("Ecs") + ".Password", ecs.password); + setParameter(std::string("Ecs") + ".ImageId", ecs.imageId); + setParameter(std::string("Ecs") + ".SystemDiskCategory", ecs.systemDiskCategory); + setParameter(std::string("Ecs") + ".InternetMaxBandwidthOut", ecs.internetMaxBandwidthOut); + setParameter(std::string("Ecs") + ".Name", ecs.name); + setParameter(std::string("Ecs") + ".SystemDiskSize", std::to_string(ecs.systemDiskSize)); + setParameter(std::string("Ecs") + ".ZoneId", ecs.zoneId); + setParameter(std::string("Ecs") + ".Type", ecs.type); + setParameter(std::string("Ecs") + ".InternetMaxBandwidthIn", ecs.internetMaxBandwidthIn); +} + +std::string CreateEaiEcsRequest::getRegionId() const { + return regionId_; +} + +void CreateEaiEcsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string CreateEaiEcsRequest::getEaisName() const { + return eaisName_; +} + +void CreateEaiEcsRequest::setEaisName(const std::string &eaisName) { + eaisName_ = eaisName; + setParameter(std::string("EaisName"), eaisName); +} + diff --git a/eais/src/model/CreateEaiEcsResult.cc b/eais/src/model/CreateEaiEcsResult.cc new file mode 100644 index 000000000..cba9e9b92 --- /dev/null +++ b/eais/src/model/CreateEaiEcsResult.cc @@ -0,0 +1,58 @@ +/* + * 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::Eais; +using namespace AlibabaCloud::Eais::Model; + +CreateEaiEcsResult::CreateEaiEcsResult() : + ServiceResult() +{} + +CreateEaiEcsResult::CreateEaiEcsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateEaiEcsResult::~CreateEaiEcsResult() +{} + +void CreateEaiEcsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["ElasticAcceleratedInstanceId"].isNull()) + elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString(); + if(!value["ClientInstanceId"].isNull()) + clientInstanceId_ = value["ClientInstanceId"].asString(); + +} + +std::string CreateEaiEcsResult::getClientInstanceId()const +{ + return clientInstanceId_; +} + +std::string CreateEaiEcsResult::getElasticAcceleratedInstanceId()const +{ + return elasticAcceleratedInstanceId_; +} + diff --git a/eais/src/model/CreateEaiJupyterRequest.cc b/eais/src/model/CreateEaiJupyterRequest.cc index e9d87b2df..b36d98460 100644 --- a/eais/src/model/CreateEaiJupyterRequest.cc +++ b/eais/src/model/CreateEaiJupyterRequest.cc @@ -61,6 +61,15 @@ void CreateEaiJupyterRequest::setVSwitchId(const std::string &vSwitchId) { setParameter(std::string("VSwitchId"), vSwitchId); } +std::string CreateEaiJupyterRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateEaiJupyterRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string CreateEaiJupyterRequest::getRegionId() const { return regionId_; } diff --git a/eais/src/model/CreateEaiRequest.cc b/eais/src/model/CreateEaiRequest.cc index dc6ed43b6..56322d5c0 100644 --- a/eais/src/model/CreateEaiRequest.cc +++ b/eais/src/model/CreateEaiRequest.cc @@ -52,6 +52,15 @@ void CreateEaiRequest::setVSwitchId(const std::string &vSwitchId) { setParameter(std::string("VSwitchId"), vSwitchId); } +std::string CreateEaiRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateEaiRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string CreateEaiRequest::getInstanceName() const { return instanceName_; } diff --git a/eais/src/model/DescribeEaisRequest.cc b/eais/src/model/DescribeEaisRequest.cc index 406d3290c..697f8e7e0 100644 --- a/eais/src/model/DescribeEaisRequest.cc +++ b/eais/src/model/DescribeEaisRequest.cc @@ -43,6 +43,15 @@ void DescribeEaisRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } +std::string DescribeEaisRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void DescribeEaisRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string DescribeEaisRequest::getInstanceName() const { return instanceName_; } diff --git a/eais/src/model/DescribeEaisResult.cc b/eais/src/model/DescribeEaisResult.cc index 6da287985..fe9cad313 100644 --- a/eais/src/model/DescribeEaisResult.cc +++ b/eais/src/model/DescribeEaisResult.cc @@ -75,6 +75,8 @@ void DescribeEaisResult::parse(const std::string &payload) instancesObject.securityGroupId = valueInstancesInstance["SecurityGroupId"].asString(); if(!valueInstancesInstance["StartTime"].isNull()) instancesObject.startTime = valueInstancesInstance["StartTime"].asString(); + if(!valueInstancesInstance["ResourceGroupId"].isNull()) + instancesObject.resourceGroupId = valueInstancesInstance["ResourceGroupId"].asString(); auto allTagsNode = valueInstancesInstance["Tags"]["Tag"]; for (auto valueInstancesInstanceTagsTag : allTagsNode) { diff --git a/eais/src/model/GetInstanceMetricsRequest.cc b/eais/src/model/GetInstanceMetricsRequest.cc new file mode 100644 index 000000000..989ff6d3c --- /dev/null +++ b/eais/src/model/GetInstanceMetricsRequest.cc @@ -0,0 +1,72 @@ +/* + * 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::Eais::Model::GetInstanceMetricsRequest; + +GetInstanceMetricsRequest::GetInstanceMetricsRequest() + : RpcServiceRequest("eais", "2019-06-24", "GetInstanceMetrics") { + setMethod(HttpRequest::Method::Post); +} + +GetInstanceMetricsRequest::~GetInstanceMetricsRequest() {} + +std::string GetInstanceMetricsRequest::getMetricType() const { + return metricType_; +} + +void GetInstanceMetricsRequest::setMetricType(const std::string &metricType) { + metricType_ = metricType; + setParameter(std::string("MetricType"), metricType); +} + +std::string GetInstanceMetricsRequest::getTimeStep() const { + return timeStep_; +} + +void GetInstanceMetricsRequest::setTimeStep(const std::string &timeStep) { + timeStep_ = timeStep; + setParameter(std::string("TimeStep"), timeStep); +} + +std::string GetInstanceMetricsRequest::getEndTime() const { + return endTime_; +} + +void GetInstanceMetricsRequest::setEndTime(const std::string &endTime) { + endTime_ = endTime; + setParameter(std::string("EndTime"), endTime); +} + +std::string GetInstanceMetricsRequest::getStartTime() const { + return startTime_; +} + +void GetInstanceMetricsRequest::setStartTime(const std::string &startTime) { + startTime_ = startTime; + setParameter(std::string("StartTime"), startTime); +} + +std::string GetInstanceMetricsRequest::getInstanceId() const { + return instanceId_; +} + +void GetInstanceMetricsRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + diff --git a/eais/src/model/GetInstanceMetricsResult.cc b/eais/src/model/GetInstanceMetricsResult.cc new file mode 100644 index 000000000..cfda05854 --- /dev/null +++ b/eais/src/model/GetInstanceMetricsResult.cc @@ -0,0 +1,74 @@ +/* + * 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::Eais; +using namespace AlibabaCloud::Eais::Model; + +GetInstanceMetricsResult::GetInstanceMetricsResult() : + ServiceResult() +{} + +GetInstanceMetricsResult::GetInstanceMetricsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetInstanceMetricsResult::~GetInstanceMetricsResult() +{} + +void GetInstanceMetricsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPodMetricsNode = value["PodMetrics"]["PodMetric"]; + for (auto valuePodMetricsPodMetric : allPodMetricsNode) + { + PodMetric podMetricsObject; + if(!valuePodMetricsPodMetric["PodId"].isNull()) + podMetricsObject.podId = valuePodMetricsPodMetric["PodId"].asString(); + auto allMetricsNode = valuePodMetricsPodMetric["Metrics"]["Metric"]; + for (auto valuePodMetricsPodMetricMetricsMetric : allMetricsNode) + { + PodMetric::Metric metricsObject; + if(!valuePodMetricsPodMetricMetricsMetric["Time"].isNull()) + metricsObject.time = valuePodMetricsPodMetricMetricsMetric["Time"].asString(); + if(!valuePodMetricsPodMetricMetricsMetric["Value"].isNull()) + metricsObject.value = valuePodMetricsPodMetricMetricsMetric["Value"].asString(); + podMetricsObject.metrics.push_back(metricsObject); + } + podMetrics_.push_back(podMetricsObject); + } + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + +} + +std::string GetInstanceMetricsResult::getInstanceId()const +{ + return instanceId_; +} + +std::vector GetInstanceMetricsResult::getPodMetrics()const +{ + return podMetrics_; +} +