diff --git a/VERSION b/VERSION index 33059ed26..c967e61de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1846 \ No newline at end of file +1.36.1847 \ No newline at end of file diff --git a/hitsdb/CMakeLists.txt b/hitsdb/CMakeLists.txt index 83efa64bd..b83973d30 100644 --- a/hitsdb/CMakeLists.txt +++ b/hitsdb/CMakeLists.txt @@ -35,6 +35,8 @@ set(hitsdb_public_header_model include/alibabacloud/hitsdb/model/GetEngineDefaultAuthResult.h include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListRequest.h include/alibabacloud/hitsdb/model/GetInstanceIpWhiteListResult.h + include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsRequest.h + include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsResult.h include/alibabacloud/hitsdb/model/GetLdpsComputeGroupRequest.h include/alibabacloud/hitsdb/model/GetLdpsComputeGroupResult.h include/alibabacloud/hitsdb/model/GetLdpsNamespacedQuotaRequest.h @@ -67,6 +69,8 @@ set(hitsdb_public_header_model include/alibabacloud/hitsdb/model/UntagResourcesResult.h include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListResult.h + include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsRequest.h + include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsResult.h include/alibabacloud/hitsdb/model/UpdateLdpsComputeGroupRequest.h include/alibabacloud/hitsdb/model/UpdateLdpsComputeGroupResult.h include/alibabacloud/hitsdb/model/UpgradeLindormInstanceRequest.h @@ -88,6 +92,8 @@ set(hitsdb_src src/model/GetEngineDefaultAuthResult.cc src/model/GetInstanceIpWhiteListRequest.cc src/model/GetInstanceIpWhiteListResult.cc + src/model/GetInstanceSecurityGroupsRequest.cc + src/model/GetInstanceSecurityGroupsResult.cc src/model/GetLdpsComputeGroupRequest.cc src/model/GetLdpsComputeGroupResult.cc src/model/GetLdpsNamespacedQuotaRequest.cc @@ -120,6 +126,8 @@ set(hitsdb_src src/model/UntagResourcesResult.cc src/model/UpdateInstanceIpWhiteListRequest.cc src/model/UpdateInstanceIpWhiteListResult.cc + src/model/UpdateInstanceSecurityGroupsRequest.cc + src/model/UpdateInstanceSecurityGroupsResult.cc src/model/UpdateLdpsComputeGroupRequest.cc src/model/UpdateLdpsComputeGroupResult.cc src/model/UpgradeLindormInstanceRequest.cc diff --git a/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h index 0bb380576..69f21e261 100644 --- a/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h +++ b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h @@ -36,6 +36,8 @@ #include "model/GetEngineDefaultAuthResult.h" #include "model/GetInstanceIpWhiteListRequest.h" #include "model/GetInstanceIpWhiteListResult.h" +#include "model/GetInstanceSecurityGroupsRequest.h" +#include "model/GetInstanceSecurityGroupsResult.h" #include "model/GetLdpsComputeGroupRequest.h" #include "model/GetLdpsComputeGroupResult.h" #include "model/GetLdpsNamespacedQuotaRequest.h" @@ -68,6 +70,8 @@ #include "model/UntagResourcesResult.h" #include "model/UpdateInstanceIpWhiteListRequest.h" #include "model/UpdateInstanceIpWhiteListResult.h" +#include "model/UpdateInstanceSecurityGroupsRequest.h" +#include "model/UpdateInstanceSecurityGroupsResult.h" #include "model/UpdateLdpsComputeGroupRequest.h" #include "model/UpdateLdpsComputeGroupResult.h" #include "model/UpgradeLindormInstanceRequest.h" @@ -102,6 +106,9 @@ namespace AlibabaCloud typedef Outcome GetInstanceIpWhiteListOutcome; typedef std::future GetInstanceIpWhiteListOutcomeCallable; typedef std::function&)> GetInstanceIpWhiteListAsyncHandler; + typedef Outcome GetInstanceSecurityGroupsOutcome; + typedef std::future GetInstanceSecurityGroupsOutcomeCallable; + typedef std::function&)> GetInstanceSecurityGroupsAsyncHandler; typedef Outcome GetLdpsComputeGroupOutcome; typedef std::future GetLdpsComputeGroupOutcomeCallable; typedef std::function&)> GetLdpsComputeGroupAsyncHandler; @@ -150,6 +157,9 @@ namespace AlibabaCloud typedef Outcome UpdateInstanceIpWhiteListOutcome; typedef std::future UpdateInstanceIpWhiteListOutcomeCallable; typedef std::function&)> UpdateInstanceIpWhiteListAsyncHandler; + typedef Outcome UpdateInstanceSecurityGroupsOutcome; + typedef std::future UpdateInstanceSecurityGroupsOutcomeCallable; + typedef std::function&)> UpdateInstanceSecurityGroupsAsyncHandler; typedef Outcome UpdateLdpsComputeGroupOutcome; typedef std::future UpdateLdpsComputeGroupOutcomeCallable; typedef std::function&)> UpdateLdpsComputeGroupAsyncHandler; @@ -182,6 +192,9 @@ namespace AlibabaCloud GetInstanceIpWhiteListOutcome getInstanceIpWhiteList(const Model::GetInstanceIpWhiteListRequest &request)const; void getInstanceIpWhiteListAsync(const Model::GetInstanceIpWhiteListRequest& request, const GetInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetInstanceIpWhiteListOutcomeCallable getInstanceIpWhiteListCallable(const Model::GetInstanceIpWhiteListRequest& request) const; + GetInstanceSecurityGroupsOutcome getInstanceSecurityGroups(const Model::GetInstanceSecurityGroupsRequest &request)const; + void getInstanceSecurityGroupsAsync(const Model::GetInstanceSecurityGroupsRequest& request, const GetInstanceSecurityGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetInstanceSecurityGroupsOutcomeCallable getInstanceSecurityGroupsCallable(const Model::GetInstanceSecurityGroupsRequest& request) const; GetLdpsComputeGroupOutcome getLdpsComputeGroup(const Model::GetLdpsComputeGroupRequest &request)const; void getLdpsComputeGroupAsync(const Model::GetLdpsComputeGroupRequest& request, const GetLdpsComputeGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetLdpsComputeGroupOutcomeCallable getLdpsComputeGroupCallable(const Model::GetLdpsComputeGroupRequest& request) const; @@ -230,6 +243,9 @@ namespace AlibabaCloud UpdateInstanceIpWhiteListOutcome updateInstanceIpWhiteList(const Model::UpdateInstanceIpWhiteListRequest &request)const; void updateInstanceIpWhiteListAsync(const Model::UpdateInstanceIpWhiteListRequest& request, const UpdateInstanceIpWhiteListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateInstanceIpWhiteListOutcomeCallable updateInstanceIpWhiteListCallable(const Model::UpdateInstanceIpWhiteListRequest& request) const; + UpdateInstanceSecurityGroupsOutcome updateInstanceSecurityGroups(const Model::UpdateInstanceSecurityGroupsRequest &request)const; + void updateInstanceSecurityGroupsAsync(const Model::UpdateInstanceSecurityGroupsRequest& request, const UpdateInstanceSecurityGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateInstanceSecurityGroupsOutcomeCallable updateInstanceSecurityGroupsCallable(const Model::UpdateInstanceSecurityGroupsRequest& request) const; UpdateLdpsComputeGroupOutcome updateLdpsComputeGroup(const Model::UpdateLdpsComputeGroupRequest &request)const; void updateLdpsComputeGroupAsync(const Model::UpdateLdpsComputeGroupRequest& request, const UpdateLdpsComputeGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateLdpsComputeGroupOutcomeCallable updateLdpsComputeGroupCallable(const Model::UpdateLdpsComputeGroupRequest& request) const; diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsRequest.h new file mode 100644 index 000000000..162705497 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsRequest.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_HITSDB_MODEL_GETINSTANCESECURITYGROUPSREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETINSTANCESECURITYGROUPSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Hitsdb { +namespace Model { +class ALIBABACLOUD_HITSDB_EXPORT GetInstanceSecurityGroupsRequest : public RpcServiceRequest { +public: + GetInstanceSecurityGroupsRequest(); + ~GetInstanceSecurityGroupsRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + std::string getSecurityToken() const; + void setSecurityToken(const std::string &securityToken); + 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); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + +private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string instanceId_; +}; +} // namespace Model +} // namespace Hitsdb +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETINSTANCESECURITYGROUPSREQUEST_H_ diff --git a/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsResult.h b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsResult.h new file mode 100644 index 000000000..71ec581a0 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/GetInstanceSecurityGroupsResult.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_HITSDB_MODEL_GETINSTANCESECURITYGROUPSRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_GETINSTANCESECURITYGROUPSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT GetInstanceSecurityGroupsResult : public ServiceResult + { + public: + + + GetInstanceSecurityGroupsResult(); + explicit GetInstanceSecurityGroupsResult(const std::string &payload); + ~GetInstanceSecurityGroupsResult(); + std::vector getSecurityGroups()const; + std::string getInstanceId()const; + + protected: + void parse(const std::string &payload); + private: + std::vector securityGroups_; + std::string instanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_GETINSTANCESECURITYGROUPSRESULT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsRequest.h new file mode 100644 index 000000000..ad16d035d --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsRequest.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_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Hitsdb { +namespace Model { +class ALIBABACLOUD_HITSDB_EXPORT UpdateInstanceSecurityGroupsRequest : public RpcServiceRequest { +public: + UpdateInstanceSecurityGroupsRequest(); + ~UpdateInstanceSecurityGroupsRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + std::string getSecurityToken() const; + void setSecurityToken(const std::string &securityToken); + 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); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getSecurityGroups() const; + void setSecurityGroups(const std::string &securityGroups); + +private: + long resourceOwnerId_; + std::string accessKeyId_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string instanceId_; + std::string securityGroups_; +}; +} // namespace Model +} // namespace Hitsdb +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSREQUEST_H_ diff --git a/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsResult.h b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsResult.h new file mode 100644 index 000000000..014d2626d --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/UpdateInstanceSecurityGroupsResult.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_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSRESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT UpdateInstanceSecurityGroupsResult : public ServiceResult + { + public: + + + UpdateInstanceSecurityGroupsResult(); + explicit UpdateInstanceSecurityGroupsResult(const std::string &payload); + ~UpdateInstanceSecurityGroupsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_UPDATEINSTANCESECURITYGROUPSRESULT_H_ \ No newline at end of file diff --git a/hitsdb/src/HitsdbClient.cc b/hitsdb/src/HitsdbClient.cc index c25ec337d..6a4aae917 100644 --- a/hitsdb/src/HitsdbClient.cc +++ b/hitsdb/src/HitsdbClient.cc @@ -303,6 +303,42 @@ HitsdbClient::GetInstanceIpWhiteListOutcomeCallable HitsdbClient::getInstanceIpW return task->get_future(); } +HitsdbClient::GetInstanceSecurityGroupsOutcome HitsdbClient::getInstanceSecurityGroups(const GetInstanceSecurityGroupsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetInstanceSecurityGroupsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetInstanceSecurityGroupsOutcome(GetInstanceSecurityGroupsResult(outcome.result())); + else + return GetInstanceSecurityGroupsOutcome(outcome.error()); +} + +void HitsdbClient::getInstanceSecurityGroupsAsync(const GetInstanceSecurityGroupsRequest& request, const GetInstanceSecurityGroupsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getInstanceSecurityGroups(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::GetInstanceSecurityGroupsOutcomeCallable HitsdbClient::getInstanceSecurityGroupsCallable(const GetInstanceSecurityGroupsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getInstanceSecurityGroups(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + HitsdbClient::GetLdpsComputeGroupOutcome HitsdbClient::getLdpsComputeGroup(const GetLdpsComputeGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -879,6 +915,42 @@ HitsdbClient::UpdateInstanceIpWhiteListOutcomeCallable HitsdbClient::updateInsta return task->get_future(); } +HitsdbClient::UpdateInstanceSecurityGroupsOutcome HitsdbClient::updateInstanceSecurityGroups(const UpdateInstanceSecurityGroupsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateInstanceSecurityGroupsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateInstanceSecurityGroupsOutcome(UpdateInstanceSecurityGroupsResult(outcome.result())); + else + return UpdateInstanceSecurityGroupsOutcome(outcome.error()); +} + +void HitsdbClient::updateInstanceSecurityGroupsAsync(const UpdateInstanceSecurityGroupsRequest& request, const UpdateInstanceSecurityGroupsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateInstanceSecurityGroups(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::UpdateInstanceSecurityGroupsOutcomeCallable HitsdbClient::updateInstanceSecurityGroupsCallable(const UpdateInstanceSecurityGroupsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateInstanceSecurityGroups(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + HitsdbClient::UpdateLdpsComputeGroupOutcome HitsdbClient::updateLdpsComputeGroup(const UpdateLdpsComputeGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/hitsdb/src/model/GetInstanceSecurityGroupsRequest.cc b/hitsdb/src/model/GetInstanceSecurityGroupsRequest.cc new file mode 100644 index 000000000..b6a28c550 --- /dev/null +++ b/hitsdb/src/model/GetInstanceSecurityGroupsRequest.cc @@ -0,0 +1,90 @@ +/* + * 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::Hitsdb::Model::GetInstanceSecurityGroupsRequest; + +GetInstanceSecurityGroupsRequest::GetInstanceSecurityGroupsRequest() + : RpcServiceRequest("hitsdb", "2020-06-15", "GetInstanceSecurityGroups") { + setMethod(HttpRequest::Method::Post); +} + +GetInstanceSecurityGroupsRequest::~GetInstanceSecurityGroupsRequest() {} + +long GetInstanceSecurityGroupsRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void GetInstanceSecurityGroupsRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string GetInstanceSecurityGroupsRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void GetInstanceSecurityGroupsRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +std::string GetInstanceSecurityGroupsRequest::getSecurityToken() const { + return securityToken_; +} + +void GetInstanceSecurityGroupsRequest::setSecurityToken(const std::string &securityToken) { + securityToken_ = securityToken; + setParameter(std::string("SecurityToken"), securityToken); +} + +std::string GetInstanceSecurityGroupsRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void GetInstanceSecurityGroupsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string GetInstanceSecurityGroupsRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void GetInstanceSecurityGroupsRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long GetInstanceSecurityGroupsRequest::getOwnerId() const { + return ownerId_; +} + +void GetInstanceSecurityGroupsRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string GetInstanceSecurityGroupsRequest::getInstanceId() const { + return instanceId_; +} + +void GetInstanceSecurityGroupsRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + diff --git a/hitsdb/src/model/GetInstanceSecurityGroupsResult.cc b/hitsdb/src/model/GetInstanceSecurityGroupsResult.cc new file mode 100644 index 000000000..b9d4b49ed --- /dev/null +++ b/hitsdb/src/model/GetInstanceSecurityGroupsResult.cc @@ -0,0 +1,59 @@ +/* + * 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::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +GetInstanceSecurityGroupsResult::GetInstanceSecurityGroupsResult() : + ServiceResult() +{} + +GetInstanceSecurityGroupsResult::GetInstanceSecurityGroupsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetInstanceSecurityGroupsResult::~GetInstanceSecurityGroupsResult() +{} + +void GetInstanceSecurityGroupsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allSecurityGroups = value["SecurityGroups"]["SecurityGroups"]; + for (const auto &item : allSecurityGroups) + securityGroups_.push_back(item.asString()); + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + +} + +std::vector GetInstanceSecurityGroupsResult::getSecurityGroups()const +{ + return securityGroups_; +} + +std::string GetInstanceSecurityGroupsResult::getInstanceId()const +{ + return instanceId_; +} + diff --git a/hitsdb/src/model/UpdateInstanceSecurityGroupsRequest.cc b/hitsdb/src/model/UpdateInstanceSecurityGroupsRequest.cc new file mode 100644 index 000000000..6dae655f2 --- /dev/null +++ b/hitsdb/src/model/UpdateInstanceSecurityGroupsRequest.cc @@ -0,0 +1,99 @@ +/* + * 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::Hitsdb::Model::UpdateInstanceSecurityGroupsRequest; + +UpdateInstanceSecurityGroupsRequest::UpdateInstanceSecurityGroupsRequest() + : RpcServiceRequest("hitsdb", "2020-06-15", "UpdateInstanceSecurityGroups") { + setMethod(HttpRequest::Method::Post); +} + +UpdateInstanceSecurityGroupsRequest::~UpdateInstanceSecurityGroupsRequest() {} + +long UpdateInstanceSecurityGroupsRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void UpdateInstanceSecurityGroupsRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string UpdateInstanceSecurityGroupsRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void UpdateInstanceSecurityGroupsRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +std::string UpdateInstanceSecurityGroupsRequest::getSecurityToken() const { + return securityToken_; +} + +void UpdateInstanceSecurityGroupsRequest::setSecurityToken(const std::string &securityToken) { + securityToken_ = securityToken; + setParameter(std::string("SecurityToken"), securityToken); +} + +std::string UpdateInstanceSecurityGroupsRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void UpdateInstanceSecurityGroupsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string UpdateInstanceSecurityGroupsRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void UpdateInstanceSecurityGroupsRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long UpdateInstanceSecurityGroupsRequest::getOwnerId() const { + return ownerId_; +} + +void UpdateInstanceSecurityGroupsRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string UpdateInstanceSecurityGroupsRequest::getInstanceId() const { + return instanceId_; +} + +void UpdateInstanceSecurityGroupsRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + +std::string UpdateInstanceSecurityGroupsRequest::getSecurityGroups() const { + return securityGroups_; +} + +void UpdateInstanceSecurityGroupsRequest::setSecurityGroups(const std::string &securityGroups) { + securityGroups_ = securityGroups; + setParameter(std::string("SecurityGroups"), securityGroups); +} + diff --git a/hitsdb/src/model/UpdateInstanceSecurityGroupsResult.cc b/hitsdb/src/model/UpdateInstanceSecurityGroupsResult.cc new file mode 100644 index 000000000..12426aa7a --- /dev/null +++ b/hitsdb/src/model/UpdateInstanceSecurityGroupsResult.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::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +UpdateInstanceSecurityGroupsResult::UpdateInstanceSecurityGroupsResult() : + ServiceResult() +{} + +UpdateInstanceSecurityGroupsResult::UpdateInstanceSecurityGroupsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateInstanceSecurityGroupsResult::~UpdateInstanceSecurityGroupsResult() +{} + +void UpdateInstanceSecurityGroupsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +