From 585388b89229ece57acbbe768ecd1392ed631917 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 22 Jun 2022 07:00:21 +0000 Subject: [PATCH] Fix bugs. --- CHANGELOG | 3 + VERSION | 2 +- config/CMakeLists.txt | 12 -- .../alibabacloud/config/ConfigClient.h | 24 ---- .../model/GetAggregateConfigRuleResult.h | 7 ++ .../config/model/GetConfigRuleResult.h | 25 ++-- .../config/model/ListTagResourcesRequest.h | 39 ------- .../config/model/ListTagResourcesResult.h | 60 ---------- .../config/model/TagResourcesRequest.h | 39 ------- .../config/model/TagResourcesResult.h | 49 -------- .../config/model/UntagResourcesRequest.h | 39 ------- .../config/model/UntagResourcesResult.h | 49 -------- config/src/ConfigClient.cc | 108 ------------------ .../src/model/GetAggregateConfigRuleResult.cc | 7 ++ config/src/model/GetConfigRuleResult.cc | 7 ++ .../ListAggregateCompliancePacksRequest.cc | 2 +- .../model/ListAggregateConfigRulesRequest.cc | 2 +- config/src/model/ListAggregatorsRequest.cc | 2 +- .../src/model/ListCompliancePacksRequest.cc | 2 +- config/src/model/ListTagResourcesRequest.cc | 27 ----- config/src/model/ListTagResourcesResult.cc | 70 ------------ config/src/model/TagResourcesRequest.cc | 27 ----- config/src/model/TagResourcesResult.cc | 44 ------- config/src/model/UntagResourcesRequest.cc | 27 ----- config/src/model/UntagResourcesResult.cc | 44 ------- 25 files changed, 45 insertions(+), 672 deletions(-) delete mode 100644 config/include/alibabacloud/config/model/ListTagResourcesRequest.h delete mode 100644 config/include/alibabacloud/config/model/ListTagResourcesResult.h delete mode 100644 config/include/alibabacloud/config/model/TagResourcesRequest.h delete mode 100644 config/include/alibabacloud/config/model/TagResourcesResult.h delete mode 100644 config/include/alibabacloud/config/model/UntagResourcesRequest.h delete mode 100644 config/include/alibabacloud/config/model/UntagResourcesResult.h delete mode 100644 config/src/model/ListTagResourcesRequest.cc delete mode 100644 config/src/model/ListTagResourcesResult.cc delete mode 100644 config/src/model/TagResourcesRequest.cc delete mode 100644 config/src/model/TagResourcesResult.cc delete mode 100644 config/src/model/UntagResourcesRequest.cc delete mode 100644 config/src/model/UntagResourcesResult.cc diff --git a/CHANGELOG b/CHANGELOG index df7cdebf7..4088dbdb9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-06-22 Version: 1.36.1156 +- Fix bugs. + 2022-06-21 Version: 1.36.1155 - Automatically generate sdk tasks. diff --git a/VERSION b/VERSION index e1b443ab6..ea2256c8f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1155 \ No newline at end of file +1.36.1156 \ No newline at end of file diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index ebeba8421..06da31b41 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -181,8 +181,6 @@ set(config_public_header_model include/alibabacloud/config/model/ListRemediationsResult.h include/alibabacloud/config/model/ListResourceEvaluationResultsRequest.h include/alibabacloud/config/model/ListResourceEvaluationResultsResult.h - include/alibabacloud/config/model/ListTagResourcesRequest.h - include/alibabacloud/config/model/ListTagResourcesResult.h include/alibabacloud/config/model/RevertAggregateEvaluationResultsRequest.h include/alibabacloud/config/model/RevertAggregateEvaluationResultsResult.h include/alibabacloud/config/model/RevertEvaluationResultsRequest.h @@ -193,10 +191,6 @@ set(config_public_header_model include/alibabacloud/config/model/StartAggregateRemediationResult.h include/alibabacloud/config/model/StartRemediationRequest.h include/alibabacloud/config/model/StartRemediationResult.h - include/alibabacloud/config/model/TagResourcesRequest.h - include/alibabacloud/config/model/TagResourcesResult.h - include/alibabacloud/config/model/UntagResourcesRequest.h - include/alibabacloud/config/model/UntagResourcesResult.h include/alibabacloud/config/model/UpdateAggregateCompliancePackRequest.h include/alibabacloud/config/model/UpdateAggregateCompliancePackResult.h include/alibabacloud/config/model/UpdateAggregateConfigDeliveryChannelRequest.h @@ -376,8 +370,6 @@ set(config_src src/model/ListRemediationsResult.cc src/model/ListResourceEvaluationResultsRequest.cc src/model/ListResourceEvaluationResultsResult.cc - src/model/ListTagResourcesRequest.cc - src/model/ListTagResourcesResult.cc src/model/RevertAggregateEvaluationResultsRequest.cc src/model/RevertAggregateEvaluationResultsResult.cc src/model/RevertEvaluationResultsRequest.cc @@ -388,10 +380,6 @@ set(config_src src/model/StartAggregateRemediationResult.cc src/model/StartRemediationRequest.cc src/model/StartRemediationResult.cc - src/model/TagResourcesRequest.cc - src/model/TagResourcesResult.cc - src/model/UntagResourcesRequest.cc - src/model/UntagResourcesResult.cc src/model/UpdateAggregateCompliancePackRequest.cc src/model/UpdateAggregateCompliancePackResult.cc src/model/UpdateAggregateConfigDeliveryChannelRequest.cc diff --git a/config/include/alibabacloud/config/ConfigClient.h b/config/include/alibabacloud/config/ConfigClient.h index 520fe4820..095c29f98 100644 --- a/config/include/alibabacloud/config/ConfigClient.h +++ b/config/include/alibabacloud/config/ConfigClient.h @@ -182,8 +182,6 @@ #include "model/ListRemediationsResult.h" #include "model/ListResourceEvaluationResultsRequest.h" #include "model/ListResourceEvaluationResultsResult.h" -#include "model/ListTagResourcesRequest.h" -#include "model/ListTagResourcesResult.h" #include "model/RevertAggregateEvaluationResultsRequest.h" #include "model/RevertAggregateEvaluationResultsResult.h" #include "model/RevertEvaluationResultsRequest.h" @@ -194,10 +192,6 @@ #include "model/StartAggregateRemediationResult.h" #include "model/StartRemediationRequest.h" #include "model/StartRemediationResult.h" -#include "model/TagResourcesRequest.h" -#include "model/TagResourcesResult.h" -#include "model/UntagResourcesRequest.h" -#include "model/UntagResourcesResult.h" #include "model/UpdateAggregateCompliancePackRequest.h" #include "model/UpdateAggregateCompliancePackResult.h" #include "model/UpdateAggregateConfigDeliveryChannelRequest.h" @@ -463,9 +457,6 @@ namespace AlibabaCloud typedef Outcome ListResourceEvaluationResultsOutcome; typedef std::future ListResourceEvaluationResultsOutcomeCallable; typedef std::function&)> ListResourceEvaluationResultsAsyncHandler; - typedef Outcome ListTagResourcesOutcome; - typedef std::future ListTagResourcesOutcomeCallable; - typedef std::function&)> ListTagResourcesAsyncHandler; typedef Outcome RevertAggregateEvaluationResultsOutcome; typedef std::future RevertAggregateEvaluationResultsOutcomeCallable; typedef std::function&)> RevertAggregateEvaluationResultsAsyncHandler; @@ -481,12 +472,6 @@ namespace AlibabaCloud typedef Outcome StartRemediationOutcome; typedef std::future StartRemediationOutcomeCallable; typedef std::function&)> StartRemediationAsyncHandler; - typedef Outcome TagResourcesOutcome; - typedef std::future TagResourcesOutcomeCallable; - typedef std::function&)> TagResourcesAsyncHandler; - typedef Outcome UntagResourcesOutcome; - typedef std::future UntagResourcesOutcomeCallable; - typedef std::function&)> UntagResourcesAsyncHandler; typedef Outcome UpdateAggregateCompliancePackOutcome; typedef std::future UpdateAggregateCompliancePackOutcomeCallable; typedef std::function&)> UpdateAggregateCompliancePackAsyncHandler; @@ -756,9 +741,6 @@ namespace AlibabaCloud ListResourceEvaluationResultsOutcome listResourceEvaluationResults(const Model::ListResourceEvaluationResultsRequest &request)const; void listResourceEvaluationResultsAsync(const Model::ListResourceEvaluationResultsRequest& request, const ListResourceEvaluationResultsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListResourceEvaluationResultsOutcomeCallable listResourceEvaluationResultsCallable(const Model::ListResourceEvaluationResultsRequest& request) const; - ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; - void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; RevertAggregateEvaluationResultsOutcome revertAggregateEvaluationResults(const Model::RevertAggregateEvaluationResultsRequest &request)const; void revertAggregateEvaluationResultsAsync(const Model::RevertAggregateEvaluationResultsRequest& request, const RevertAggregateEvaluationResultsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RevertAggregateEvaluationResultsOutcomeCallable revertAggregateEvaluationResultsCallable(const Model::RevertAggregateEvaluationResultsRequest& request) const; @@ -774,12 +756,6 @@ namespace AlibabaCloud StartRemediationOutcome startRemediation(const Model::StartRemediationRequest &request)const; void startRemediationAsync(const Model::StartRemediationRequest& request, const StartRemediationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StartRemediationOutcomeCallable startRemediationCallable(const Model::StartRemediationRequest& request) const; - TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; - void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; - UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const; - void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const; UpdateAggregateCompliancePackOutcome updateAggregateCompliancePack(const Model::UpdateAggregateCompliancePackRequest &request)const; void updateAggregateCompliancePackAsync(const Model::UpdateAggregateCompliancePackRequest& request, const UpdateAggregateCompliancePackAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateAggregateCompliancePackOutcomeCallable updateAggregateCompliancePackCallable(const Model::UpdateAggregateCompliancePackRequest& request) const; diff --git a/config/include/alibabacloud/config/model/GetAggregateConfigRuleResult.h b/config/include/alibabacloud/config/model/GetAggregateConfigRuleResult.h index 089d2c719..ed55c53b3 100644 --- a/config/include/alibabacloud/config/model/GetAggregateConfigRuleResult.h +++ b/config/include/alibabacloud/config/model/GetAggregateConfigRuleResult.h @@ -89,9 +89,16 @@ namespace AlibabaCloud { std::vector complianceResourceTypes; }; + struct Compliance + { + std::string complianceType; + int count; + }; std::string tagValueScope; std::string excludeAccountIdsScope; std::string description; + long accountId; + Compliance compliance; std::string tagKeyLogicScope; CreateBy createBy; ConfigRuleEvaluationStatus configRuleEvaluationStatus; diff --git a/config/include/alibabacloud/config/model/GetConfigRuleResult.h b/config/include/alibabacloud/config/model/GetConfigRuleResult.h index ea75e79eb..0ab69afc9 100644 --- a/config/include/alibabacloud/config/model/GetConfigRuleResult.h +++ b/config/include/alibabacloud/config/model/GetConfigRuleResult.h @@ -89,29 +89,36 @@ namespace AlibabaCloud { std::vector complianceResourceTypes; }; - std::string tagKeyScope; + struct Compliance + { + std::string complianceType; + int count; + }; std::string tagValueScope; - ManagedRule managedRule; std::string description; - std::string excludeResourceIdsScope; + long accountId; + Compliance compliance; std::string tagKeyLogicScope; CreateBy createBy; ConfigRuleEvaluationStatus configRuleEvaluationStatus; Source source; - std::string configRuleState; std::string maximumExecutionFrequency; + std::string regionIdsScope; + long modifiedTimestamp; + std::string resourceGroupIdsScope; + long createTimestamp; + std::string inputParameters; + std::string tagKeyScope; + ManagedRule managedRule; + std::string excludeResourceIdsScope; + std::string configRuleState; std::string configRuleId; Scope scope; std::string configRuleArn; - std::string regionIdsScope; - long modifiedTimestamp; std::string configRuleTriggerTypes; std::string configRuleName; - std::string resourceGroupIdsScope; int riskLevel; - long createTimestamp; std::string resourceTypesScope; - std::string inputParameters; }; diff --git a/config/include/alibabacloud/config/model/ListTagResourcesRequest.h b/config/include/alibabacloud/config/model/ListTagResourcesRequest.h deleted file mode 100644 index 35d37ddf4..000000000 --- a/config/include/alibabacloud/config/model/ListTagResourcesRequest.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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_CONFIG_MODEL_LISTTAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_CONFIG_MODEL_LISTTAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Config { -namespace Model { -class ALIBABACLOUD_CONFIG_EXPORT ListTagResourcesRequest : public RpcServiceRequest { -public: - ListTagResourcesRequest(); - ~ListTagResourcesRequest(); - -private: -}; -} // namespace Model -} // namespace Config -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_CONFIG_MODEL_LISTTAGRESOURCESREQUEST_H_ diff --git a/config/include/alibabacloud/config/model/ListTagResourcesResult.h b/config/include/alibabacloud/config/model/ListTagResourcesResult.h deleted file mode 100644 index 14ba71240..000000000 --- a/config/include/alibabacloud/config/model/ListTagResourcesResult.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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_CONFIG_MODEL_LISTTAGRESOURCESRESULT_H_ -#define ALIBABACLOUD_CONFIG_MODEL_LISTTAGRESOURCESRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Config - { - namespace Model - { - class ALIBABACLOUD_CONFIG_EXPORT ListTagResourcesResult : public ServiceResult - { - public: - struct TagResource - { - std::string resourceId; - std::string tagKey; - std::string resourceType; - std::string tagValue; - }; - - - ListTagResourcesResult(); - explicit ListTagResourcesResult(const std::string &payload); - ~ListTagResourcesResult(); - std::string getNextToken()const; - std::vector getTagResources()const; - - protected: - void parse(const std::string &payload); - private: - std::string nextToken_; - std::vector tagResources_; - - }; - } - } -} -#endif // !ALIBABACLOUD_CONFIG_MODEL_LISTTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/config/include/alibabacloud/config/model/TagResourcesRequest.h b/config/include/alibabacloud/config/model/TagResourcesRequest.h deleted file mode 100644 index caafc4876..000000000 --- a/config/include/alibabacloud/config/model/TagResourcesRequest.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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_CONFIG_MODEL_TAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_CONFIG_MODEL_TAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Config { -namespace Model { -class ALIBABACLOUD_CONFIG_EXPORT TagResourcesRequest : public RpcServiceRequest { -public: - TagResourcesRequest(); - ~TagResourcesRequest(); - -private: -}; -} // namespace Model -} // namespace Config -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_CONFIG_MODEL_TAGRESOURCESREQUEST_H_ diff --git a/config/include/alibabacloud/config/model/TagResourcesResult.h b/config/include/alibabacloud/config/model/TagResourcesResult.h deleted file mode 100644 index 7bd951315..000000000 --- a/config/include/alibabacloud/config/model/TagResourcesResult.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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_CONFIG_MODEL_TAGRESOURCESRESULT_H_ -#define ALIBABACLOUD_CONFIG_MODEL_TAGRESOURCESRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Config - { - namespace Model - { - class ALIBABACLOUD_CONFIG_EXPORT TagResourcesResult : public ServiceResult - { - public: - - - TagResourcesResult(); - explicit TagResourcesResult(const std::string &payload); - ~TagResourcesResult(); - - protected: - void parse(const std::string &payload); - private: - - }; - } - } -} -#endif // !ALIBABACLOUD_CONFIG_MODEL_TAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/config/include/alibabacloud/config/model/UntagResourcesRequest.h b/config/include/alibabacloud/config/model/UntagResourcesRequest.h deleted file mode 100644 index b1c79eeb1..000000000 --- a/config/include/alibabacloud/config/model/UntagResourcesRequest.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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_CONFIG_MODEL_UNTAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_CONFIG_MODEL_UNTAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Config { -namespace Model { -class ALIBABACLOUD_CONFIG_EXPORT UntagResourcesRequest : public RpcServiceRequest { -public: - UntagResourcesRequest(); - ~UntagResourcesRequest(); - -private: -}; -} // namespace Model -} // namespace Config -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_CONFIG_MODEL_UNTAGRESOURCESREQUEST_H_ diff --git a/config/include/alibabacloud/config/model/UntagResourcesResult.h b/config/include/alibabacloud/config/model/UntagResourcesResult.h deleted file mode 100644 index a33c3692c..000000000 --- a/config/include/alibabacloud/config/model/UntagResourcesResult.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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_CONFIG_MODEL_UNTAGRESOURCESRESULT_H_ -#define ALIBABACLOUD_CONFIG_MODEL_UNTAGRESOURCESRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Config - { - namespace Model - { - class ALIBABACLOUD_CONFIG_EXPORT UntagResourcesResult : public ServiceResult - { - public: - - - UntagResourcesResult(); - explicit UntagResourcesResult(const std::string &payload); - ~UntagResourcesResult(); - - protected: - void parse(const std::string &payload); - private: - - }; - } - } -} -#endif // !ALIBABACLOUD_CONFIG_MODEL_UNTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/config/src/ConfigClient.cc b/config/src/ConfigClient.cc index 1947cc29a..a93743575 100644 --- a/config/src/ConfigClient.cc +++ b/config/src/ConfigClient.cc @@ -2931,42 +2931,6 @@ ConfigClient::ListResourceEvaluationResultsOutcomeCallable ConfigClient::listRes return task->get_future(); } -ConfigClient::ListTagResourcesOutcome ConfigClient::listTagResources(const ListTagResourcesRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return ListTagResourcesOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result())); - else - return ListTagResourcesOutcome(outcome.error()); -} - -void ConfigClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, listTagResources(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ConfigClient::ListTagResourcesOutcomeCallable ConfigClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->listTagResources(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ConfigClient::RevertAggregateEvaluationResultsOutcome ConfigClient::revertAggregateEvaluationResults(const RevertAggregateEvaluationResultsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -3147,78 +3111,6 @@ ConfigClient::StartRemediationOutcomeCallable ConfigClient::startRemediationCall return task->get_future(); } -ConfigClient::TagResourcesOutcome ConfigClient::tagResources(const TagResourcesRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return TagResourcesOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return TagResourcesOutcome(TagResourcesResult(outcome.result())); - else - return TagResourcesOutcome(outcome.error()); -} - -void ConfigClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, tagResources(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ConfigClient::TagResourcesOutcomeCallable ConfigClient::tagResourcesCallable(const TagResourcesRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->tagResources(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - -ConfigClient::UntagResourcesOutcome ConfigClient::untagResources(const UntagResourcesRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return UntagResourcesOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return UntagResourcesOutcome(UntagResourcesResult(outcome.result())); - else - return UntagResourcesOutcome(outcome.error()); -} - -void ConfigClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, untagResources(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ConfigClient::UntagResourcesOutcomeCallable ConfigClient::untagResourcesCallable(const UntagResourcesRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->untagResources(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ConfigClient::UpdateAggregateCompliancePackOutcome ConfigClient::updateAggregateCompliancePack(const UpdateAggregateCompliancePackRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/config/src/model/GetAggregateConfigRuleResult.cc b/config/src/model/GetAggregateConfigRuleResult.cc index aa84a9498..6b79dd3ad 100644 --- a/config/src/model/GetAggregateConfigRuleResult.cc +++ b/config/src/model/GetAggregateConfigRuleResult.cc @@ -82,6 +82,8 @@ void GetAggregateConfigRuleResult::parse(const std::string &payload) configRule_.excludeFolderIdsScope = configRuleNode["ExcludeFolderIdsScope"].asString(); if(!configRuleNode["ExcludeAccountIdsScope"].isNull()) configRule_.excludeAccountIdsScope = configRuleNode["ExcludeAccountIdsScope"].asString(); + if(!configRuleNode["AccountId"].isNull()) + configRule_.accountId = std::stol(configRuleNode["AccountId"].asString()); auto sourceNode = configRuleNode["Source"]; if(!sourceNode["Owner"].isNull()) configRule_.source.owner = sourceNode["Owner"].asString(); @@ -166,6 +168,11 @@ void GetAggregateConfigRuleResult::parse(const std::string &payload) auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"]; for (auto value : allComplianceResourceTypes) configRule_.scope.complianceResourceTypes.push_back(value.asString()); + auto complianceNode = configRuleNode["Compliance"]; + if(!complianceNode["ComplianceType"].isNull()) + configRule_.compliance.complianceType = complianceNode["ComplianceType"].asString(); + if(!complianceNode["Count"].isNull()) + configRule_.compliance.count = std::stoi(complianceNode["Count"].asString()); } diff --git a/config/src/model/GetConfigRuleResult.cc b/config/src/model/GetConfigRuleResult.cc index cb7b42a2c..012f1ab1d 100644 --- a/config/src/model/GetConfigRuleResult.cc +++ b/config/src/model/GetConfigRuleResult.cc @@ -76,6 +76,8 @@ void GetConfigRuleResult::parse(const std::string &payload) configRule_.configRuleTriggerTypes = configRuleNode["ConfigRuleTriggerTypes"].asString(); if(!configRuleNode["TagKeyLogicScope"].isNull()) configRule_.tagKeyLogicScope = configRuleNode["TagKeyLogicScope"].asString(); + if(!configRuleNode["AccountId"].isNull()) + configRule_.accountId = std::stol(configRuleNode["AccountId"].asString()); auto sourceNode = configRuleNode["Source"]; if(!sourceNode["Owner"].isNull()) configRule_.source.owner = sourceNode["Owner"].asString(); @@ -160,6 +162,11 @@ void GetConfigRuleResult::parse(const std::string &payload) auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"]; for (auto value : allComplianceResourceTypes) configRule_.scope.complianceResourceTypes.push_back(value.asString()); + auto complianceNode = configRuleNode["Compliance"]; + if(!complianceNode["ComplianceType"].isNull()) + configRule_.compliance.complianceType = complianceNode["ComplianceType"].asString(); + if(!complianceNode["Count"].isNull()) + configRule_.compliance.count = std::stoi(complianceNode["Count"].asString()); } diff --git a/config/src/model/ListAggregateCompliancePacksRequest.cc b/config/src/model/ListAggregateCompliancePacksRequest.cc index 0e668fc0a..83677b6c5 100644 --- a/config/src/model/ListAggregateCompliancePacksRequest.cc +++ b/config/src/model/ListAggregateCompliancePacksRequest.cc @@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListAggregateCompliancePacksRequest; ListAggregateCompliancePacksRequest::ListAggregateCompliancePacksRequest() : RpcServiceRequest("config", "2020-09-07", "ListAggregateCompliancePacks") { - setMethod(HttpRequest::Method::Get); + setMethod(HttpRequest::Method::Post); } ListAggregateCompliancePacksRequest::~ListAggregateCompliancePacksRequest() {} diff --git a/config/src/model/ListAggregateConfigRulesRequest.cc b/config/src/model/ListAggregateConfigRulesRequest.cc index 507a87f19..8a0199fa0 100644 --- a/config/src/model/ListAggregateConfigRulesRequest.cc +++ b/config/src/model/ListAggregateConfigRulesRequest.cc @@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListAggregateConfigRulesRequest; ListAggregateConfigRulesRequest::ListAggregateConfigRulesRequest() : RpcServiceRequest("config", "2020-09-07", "ListAggregateConfigRules") { - setMethod(HttpRequest::Method::Get); + setMethod(HttpRequest::Method::Post); } ListAggregateConfigRulesRequest::~ListAggregateConfigRulesRequest() {} diff --git a/config/src/model/ListAggregatorsRequest.cc b/config/src/model/ListAggregatorsRequest.cc index 502eacacd..e58e555f6 100644 --- a/config/src/model/ListAggregatorsRequest.cc +++ b/config/src/model/ListAggregatorsRequest.cc @@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListAggregatorsRequest; ListAggregatorsRequest::ListAggregatorsRequest() : RpcServiceRequest("config", "2020-09-07", "ListAggregators") { - setMethod(HttpRequest::Method::Get); + setMethod(HttpRequest::Method::Post); } ListAggregatorsRequest::~ListAggregatorsRequest() {} diff --git a/config/src/model/ListCompliancePacksRequest.cc b/config/src/model/ListCompliancePacksRequest.cc index 3ad0c4f25..ce69106bf 100644 --- a/config/src/model/ListCompliancePacksRequest.cc +++ b/config/src/model/ListCompliancePacksRequest.cc @@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListCompliancePacksRequest; ListCompliancePacksRequest::ListCompliancePacksRequest() : RpcServiceRequest("config", "2020-09-07", "ListCompliancePacks") { - setMethod(HttpRequest::Method::Get); + setMethod(HttpRequest::Method::Post); } ListCompliancePacksRequest::~ListCompliancePacksRequest() {} diff --git a/config/src/model/ListTagResourcesRequest.cc b/config/src/model/ListTagResourcesRequest.cc deleted file mode 100644 index e1196bc8b..000000000 --- a/config/src/model/ListTagResourcesRequest.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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::Config::Model::ListTagResourcesRequest; - -ListTagResourcesRequest::ListTagResourcesRequest() - : RpcServiceRequest("config", "2020-09-07", "ListTagResources") { - setMethod(HttpRequest::Method::Post); -} - -ListTagResourcesRequest::~ListTagResourcesRequest() {} - diff --git a/config/src/model/ListTagResourcesResult.cc b/config/src/model/ListTagResourcesResult.cc deleted file mode 100644 index 25b24a34e..000000000 --- a/config/src/model/ListTagResourcesResult.cc +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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::Config; -using namespace AlibabaCloud::Config::Model; - -ListTagResourcesResult::ListTagResourcesResult() : - ServiceResult() -{} - -ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -ListTagResourcesResult::~ListTagResourcesResult() -{} - -void ListTagResourcesResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto allTagResourcesNode = value["TagResources"]["TagResource"]; - for (auto valueTagResourcesTagResource : allTagResourcesNode) - { - TagResource tagResourcesObject; - if(!valueTagResourcesTagResource["ResourceType"].isNull()) - tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString(); - if(!valueTagResourcesTagResource["TagValue"].isNull()) - tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString(); - if(!valueTagResourcesTagResource["ResourceId"].isNull()) - tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString(); - if(!valueTagResourcesTagResource["TagKey"].isNull()) - tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString(); - tagResources_.push_back(tagResourcesObject); - } - if(!value["NextToken"].isNull()) - nextToken_ = value["NextToken"].asString(); - -} - -std::string ListTagResourcesResult::getNextToken()const -{ - return nextToken_; -} - -std::vector ListTagResourcesResult::getTagResources()const -{ - return tagResources_; -} - diff --git a/config/src/model/TagResourcesRequest.cc b/config/src/model/TagResourcesRequest.cc deleted file mode 100644 index f94799c5d..000000000 --- a/config/src/model/TagResourcesRequest.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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::Config::Model::TagResourcesRequest; - -TagResourcesRequest::TagResourcesRequest() - : RpcServiceRequest("config", "2020-09-07", "TagResources") { - setMethod(HttpRequest::Method::Post); -} - -TagResourcesRequest::~TagResourcesRequest() {} - diff --git a/config/src/model/TagResourcesResult.cc b/config/src/model/TagResourcesResult.cc deleted file mode 100644 index 20787b1a5..000000000 --- a/config/src/model/TagResourcesResult.cc +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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::Config; -using namespace AlibabaCloud::Config::Model; - -TagResourcesResult::TagResourcesResult() : - ServiceResult() -{} - -TagResourcesResult::TagResourcesResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -TagResourcesResult::~TagResourcesResult() -{} - -void TagResourcesResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - -} - diff --git a/config/src/model/UntagResourcesRequest.cc b/config/src/model/UntagResourcesRequest.cc deleted file mode 100644 index c0f077e9c..000000000 --- a/config/src/model/UntagResourcesRequest.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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::Config::Model::UntagResourcesRequest; - -UntagResourcesRequest::UntagResourcesRequest() - : RpcServiceRequest("config", "2020-09-07", "UntagResources") { - setMethod(HttpRequest::Method::Post); -} - -UntagResourcesRequest::~UntagResourcesRequest() {} - diff --git a/config/src/model/UntagResourcesResult.cc b/config/src/model/UntagResourcesResult.cc deleted file mode 100644 index 7aafa93e2..000000000 --- a/config/src/model/UntagResourcesResult.cc +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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::Config; -using namespace AlibabaCloud::Config::Model; - -UntagResourcesResult::UntagResourcesResult() : - ServiceResult() -{} - -UntagResourcesResult::UntagResourcesResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -UntagResourcesResult::~UntagResourcesResult() -{} - -void UntagResourcesResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - -} -