Support managed rule query.
This commit is contained in:
@@ -153,6 +153,15 @@ void CreateAggregateConfigRuleRequest::setConfigRuleName(const std::string &conf
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getTagKeyLogicScope() const {
|
||||
return tagKeyLogicScope_;
|
||||
}
|
||||
|
||||
void CreateAggregateConfigRuleRequest::setTagKeyLogicScope(const std::string &tagKeyLogicScope) {
|
||||
tagKeyLogicScope_ = tagKeyLogicScope;
|
||||
setBodyParameter(std::string("TagKeyLogicScope"), tagKeyLogicScope);
|
||||
}
|
||||
|
||||
std::string CreateAggregateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,15 @@ void CreateConfigRuleRequest::setConfigRuleName(const std::string &configRuleNam
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getTagKeyLogicScope() const {
|
||||
return tagKeyLogicScope_;
|
||||
}
|
||||
|
||||
void CreateConfigRuleRequest::setTagKeyLogicScope(const std::string &tagKeyLogicScope) {
|
||||
tagKeyLogicScope_ = tagKeyLogicScope;
|
||||
setBodyParameter(std::string("TagKeyLogicScope"), tagKeyLogicScope);
|
||||
}
|
||||
|
||||
std::string CreateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ void GenerateAggregateConfigRulesReportRequest::setClientToken(const std::string
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GenerateAggregateConfigRulesReportRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setBodyParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
@@ -41,9 +41,16 @@ void GenerateAggregateConfigRulesReportResult::parse(const std::string &payload)
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AggregatorId"].isNull())
|
||||
aggregatorId_ = value["AggregatorId"].asString();
|
||||
if(!value["ReportId"].isNull())
|
||||
reportId_ = value["ReportId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportResult::getReportId()const
|
||||
{
|
||||
return reportId_;
|
||||
}
|
||||
|
||||
std::string GenerateAggregateConfigRulesReportResult::getAggregatorId()const
|
||||
{
|
||||
return aggregatorId_;
|
||||
|
||||
@@ -34,3 +34,12 @@ void GenerateConfigRulesReportRequest::setClientToken(const std::string &clientT
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string GenerateConfigRulesReportRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GenerateConfigRulesReportRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setBodyParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,13 @@ void GenerateConfigRulesReportResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ReportId"].isNull())
|
||||
reportId_ = value["ReportId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateConfigRulesReportResult::getReportId()const
|
||||
{
|
||||
return reportId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ void GetAggregateConfigRuleResult::parse(const std::string &payload)
|
||||
configRule_.tagValueScope = configRuleNode["TagValueScope"].asString();
|
||||
if(!configRuleNode["ConfigRuleTriggerTypes"].isNull())
|
||||
configRule_.configRuleTriggerTypes = configRuleNode["ConfigRuleTriggerTypes"].asString();
|
||||
if(!configRuleNode["TagKeyLogicScope"].isNull())
|
||||
configRule_.tagKeyLogicScope = configRuleNode["TagKeyLogicScope"].asString();
|
||||
auto sourceNode = configRuleNode["Source"];
|
||||
if(!sourceNode["Owner"].isNull())
|
||||
configRule_.source.owner = sourceNode["Owner"].asString();
|
||||
|
||||
@@ -20,11 +20,20 @@ using AlibabaCloud::Config::Model::GetAggregateConfigRulesReportRequest;
|
||||
|
||||
GetAggregateConfigRulesReportRequest::GetAggregateConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAggregateConfigRulesReportRequest::~GetAggregateConfigRulesReportRequest() {}
|
||||
|
||||
std::string GetAggregateConfigRulesReportRequest::getReportId() const {
|
||||
return reportId_;
|
||||
}
|
||||
|
||||
void GetAggregateConfigRulesReportRequest::setReportId(const std::string &reportId) {
|
||||
reportId_ = reportId;
|
||||
setParameter(std::string("ReportId"), reportId);
|
||||
}
|
||||
|
||||
std::string GetAggregateConfigRulesReportRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ void GetAggregateConfigRulesReportResult::parse(const std::string &payload)
|
||||
configRulesReport_.aggregatorId = configRulesReportNode["AggregatorId"].asString();
|
||||
if(!configRulesReportNode["ReportCreateTimestamp"].isNull())
|
||||
configRulesReport_.reportCreateTimestamp = std::stol(configRulesReportNode["ReportCreateTimestamp"].asString());
|
||||
if(!configRulesReportNode["ReportId"].isNull())
|
||||
configRulesReport_.reportId = configRulesReportNode["ReportId"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::GetAggregateResourceComplianceByConfigRuleReq
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleRequest::GetAggregateResourceComplianceByConfigRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceByConfigRule") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceByConfigRuleRequest::~GetAggregateResourceComplianceByConfigRuleRequest() {}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetAggregateResourceComplianceGroupByRegionRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceComplianceGroupByRegionRequest;
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionRequest::GetAggregateResourceComplianceGroupByRegionRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceGroupByRegion") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionRequest::~GetAggregateResourceComplianceGroupByRegionRequest() {}
|
||||
|
||||
std::string GetAggregateResourceComplianceGroupByRegionRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByRegionRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceGroupByRegionRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByRegionRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetAggregateResourceComplianceGroupByRegionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionResult::GetAggregateResourceComplianceGroupByRegionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionResult::GetAggregateResourceComplianceGroupByRegionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionResult::~GetAggregateResourceComplianceGroupByRegionResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByRegionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceResultNode = value["ComplianceResult"];
|
||||
auto allComplianceResultListNode = complianceResultNode["ComplianceResultList"]["ComplianceResultListItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItem : allComplianceResultListNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem complianceResultListItemObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItem["RegionId"].isNull())
|
||||
complianceResultListItemObject.regionId = complianceResultNodeComplianceResultListComplianceResultListItem["RegionId"].asString();
|
||||
auto allCompliancesNode = complianceResultNodeComplianceResultListComplianceResultListItem["Compliances"]["CompliancesItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem : allCompliancesNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem::CompliancesItem compliancesObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].isNull())
|
||||
compliancesObject.complianceType = complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].asString();
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].isNull())
|
||||
compliancesObject.count = std::stol(complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].asString());
|
||||
complianceResultListItemObject.compliances.push_back(compliancesObject);
|
||||
}
|
||||
complianceResult_.complianceResultList.push_back(complianceResultListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByRegionResult::ComplianceResult GetAggregateResourceComplianceGroupByRegionResult::getComplianceResult()const
|
||||
{
|
||||
return complianceResult_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetAggregateResourceComplianceGroupByResourceTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetAggregateResourceComplianceGroupByResourceTypeRequest;
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeRequest::GetAggregateResourceComplianceGroupByResourceTypeRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetAggregateResourceComplianceGroupByResourceType") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeRequest::~GetAggregateResourceComplianceGroupByResourceTypeRequest() {}
|
||||
|
||||
std::string GetAggregateResourceComplianceGroupByResourceTypeRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByResourceTypeRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
std::string GetAggregateResourceComplianceGroupByResourceTypeRequest::getAggregatorId() const {
|
||||
return aggregatorId_;
|
||||
}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByResourceTypeRequest::setAggregatorId(const std::string &aggregatorId) {
|
||||
aggregatorId_ = aggregatorId;
|
||||
setParameter(std::string("AggregatorId"), aggregatorId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetAggregateResourceComplianceGroupByResourceTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeResult::GetAggregateResourceComplianceGroupByResourceTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeResult::GetAggregateResourceComplianceGroupByResourceTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeResult::~GetAggregateResourceComplianceGroupByResourceTypeResult()
|
||||
{}
|
||||
|
||||
void GetAggregateResourceComplianceGroupByResourceTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceResultNode = value["ComplianceResult"];
|
||||
auto allComplianceResultListNode = complianceResultNode["ComplianceResultList"]["ComplianceResultListItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItem : allComplianceResultListNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem complianceResultListItemObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItem["ResourceType"].isNull())
|
||||
complianceResultListItemObject.resourceType = complianceResultNodeComplianceResultListComplianceResultListItem["ResourceType"].asString();
|
||||
auto allCompliancesNode = complianceResultNodeComplianceResultListComplianceResultListItem["Compliances"]["CompliancesItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem : allCompliancesNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem::CompliancesItem compliancesObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].isNull())
|
||||
compliancesObject.complianceType = complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].asString();
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].isNull())
|
||||
compliancesObject.count = std::stol(complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].asString());
|
||||
complianceResultListItemObject.compliances.push_back(compliancesObject);
|
||||
}
|
||||
complianceResult_.complianceResultList.push_back(complianceResultListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAggregateResourceComplianceGroupByResourceTypeResult::ComplianceResult GetAggregateResourceComplianceGroupByResourceTypeResult::getComplianceResult()const
|
||||
{
|
||||
return complianceResult_;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ void GetConfigRuleResult::parse(const std::string &payload)
|
||||
configRule_.tagValueScope = configRuleNode["TagValueScope"].asString();
|
||||
if(!configRuleNode["ConfigRuleTriggerTypes"].isNull())
|
||||
configRule_.configRuleTriggerTypes = configRuleNode["ConfigRuleTriggerTypes"].asString();
|
||||
if(!configRuleNode["TagKeyLogicScope"].isNull())
|
||||
configRule_.tagKeyLogicScope = configRuleNode["TagKeyLogicScope"].asString();
|
||||
auto sourceNode = configRuleNode["Source"];
|
||||
if(!sourceNode["Owner"].isNull())
|
||||
configRule_.source.owner = sourceNode["Owner"].asString();
|
||||
|
||||
@@ -20,8 +20,17 @@ using AlibabaCloud::Config::Model::GetConfigRulesReportRequest;
|
||||
|
||||
GetConfigRulesReportRequest::GetConfigRulesReportRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetConfigRulesReport") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetConfigRulesReportRequest::~GetConfigRulesReportRequest() {}
|
||||
|
||||
std::string GetConfigRulesReportRequest::getReportId() const {
|
||||
return reportId_;
|
||||
}
|
||||
|
||||
void GetConfigRulesReportRequest::setReportId(const std::string &reportId) {
|
||||
reportId_ = reportId;
|
||||
setParameter(std::string("ReportId"), reportId);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ void GetConfigRulesReportResult::parse(const std::string &payload)
|
||||
configRulesReport_.accountId = std::stol(configRulesReportNode["AccountId"].asString());
|
||||
if(!configRulesReportNode["ReportCreateTimestamp"].isNull())
|
||||
configRulesReport_.reportCreateTimestamp = std::stol(configRulesReportNode["ReportCreateTimestamp"].asString());
|
||||
if(!configRulesReportNode["ReportId"].isNull())
|
||||
configRulesReport_.reportId = configRulesReportNode["ReportId"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
36
config/src/model/GetManagedRuleRequest.cc
Normal file
36
config/src/model/GetManagedRuleRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetManagedRuleRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetManagedRuleRequest;
|
||||
|
||||
GetManagedRuleRequest::GetManagedRuleRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetManagedRule") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetManagedRuleRequest::~GetManagedRuleRequest() {}
|
||||
|
||||
std::string GetManagedRuleRequest::getIdentifier() const {
|
||||
return identifier_;
|
||||
}
|
||||
|
||||
void GetManagedRuleRequest::setIdentifier(const std::string &identifier) {
|
||||
identifier_ = identifier;
|
||||
setParameter(std::string("Identifier"), identifier);
|
||||
}
|
||||
|
||||
102
config/src/model/GetManagedRuleResult.cc
Normal file
102
config/src/model/GetManagedRuleResult.cc
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetManagedRuleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetManagedRuleResult::GetManagedRuleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetManagedRuleResult::GetManagedRuleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetManagedRuleResult::~GetManagedRuleResult()
|
||||
{}
|
||||
|
||||
void GetManagedRuleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto managedRuleNode = value["ManagedRule"];
|
||||
if(!managedRuleNode["RiskLevel"].isNull())
|
||||
managedRule_.riskLevel = std::stoi(managedRuleNode["RiskLevel"].asString());
|
||||
if(!managedRuleNode["HelpHint"].isNull())
|
||||
managedRule_.helpHint = managedRuleNode["HelpHint"].asString();
|
||||
if(!managedRuleNode["DefaultName"].isNull())
|
||||
managedRule_.defaultName = managedRuleNode["DefaultName"].asString();
|
||||
if(!managedRuleNode["Identifier"].isNull())
|
||||
managedRule_.identifier = managedRuleNode["Identifier"].asString();
|
||||
if(!managedRuleNode["RegionId"].isNull())
|
||||
managedRule_.regionId = managedRuleNode["RegionId"].asString();
|
||||
if(!managedRuleNode["Description"].isNull())
|
||||
managedRule_.description = managedRuleNode["Description"].asString();
|
||||
if(!managedRuleNode["FunctionName"].isNull())
|
||||
managedRule_.functionName = managedRuleNode["FunctionName"].asString();
|
||||
if(!managedRuleNode["ConfigRuleName"].isNull())
|
||||
managedRule_.configRuleName = managedRuleNode["ConfigRuleName"].asString();
|
||||
if(!managedRuleNode["HelpDoc"].isNull())
|
||||
managedRule_.helpDoc = managedRuleNode["HelpDoc"].asString();
|
||||
if(!managedRuleNode["HelpUrls"].isNull())
|
||||
managedRule_.helpUrls = managedRuleNode["HelpUrls"].asString();
|
||||
if(!managedRuleNode["ServiceName"].isNull())
|
||||
managedRule_.serviceName = managedRuleNode["ServiceName"].asString();
|
||||
if(!managedRuleNode["CreateTimestamp"].isNull())
|
||||
managedRule_.createTimestamp = std::stol(managedRuleNode["CreateTimestamp"].asString());
|
||||
auto allSourceDetailsNode = managedRuleNode["SourceDetails"]["SourceDetailsItem"];
|
||||
for (auto managedRuleNodeSourceDetailsSourceDetailsItem : allSourceDetailsNode)
|
||||
{
|
||||
ManagedRule::SourceDetailsItem sourceDetailsItemObject;
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["MessageType"].isNull())
|
||||
sourceDetailsItemObject.messageType = managedRuleNodeSourceDetailsSourceDetailsItem["MessageType"].asString();
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["EventSource"].isNull())
|
||||
sourceDetailsItemObject.eventSource = managedRuleNodeSourceDetailsSourceDetailsItem["EventSource"].asString();
|
||||
if(!managedRuleNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].isNull())
|
||||
sourceDetailsItemObject.maximumExecutionFrequency = managedRuleNodeSourceDetailsSourceDetailsItem["MaximumExecutionFrequency"].asString();
|
||||
managedRule_.sourceDetails.push_back(sourceDetailsItemObject);
|
||||
}
|
||||
auto scopeNode = managedRuleNode["Scope"];
|
||||
auto allComplianceResourceTypes = scopeNode["ComplianceResourceTypes"]["ComplianceResourceTypes"];
|
||||
for (auto value : allComplianceResourceTypes)
|
||||
managedRule_.scope.complianceResourceTypes.push_back(value.asString());
|
||||
auto allLabels = managedRuleNode["Labels"]["Labels"];
|
||||
for (auto value : allLabels)
|
||||
managedRule_.labels.push_back(value.asString());
|
||||
auto allSourceConditions = managedRuleNode["SourceConditions"]["SourceConditions"];
|
||||
for (auto value : allSourceConditions)
|
||||
managedRule_.sourceConditions.push_back(value.asString());
|
||||
auto allOptionalInputParameterDetails = managedRuleNode["OptionalInputParameterDetails"]["OptionalInputParameterDetails"];
|
||||
for (auto value : allOptionalInputParameterDetails)
|
||||
managedRule_.optionalInputParameterDetails.push_back(value.asString());
|
||||
auto allCompulsoryInputParameterDetails = managedRuleNode["CompulsoryInputParameterDetails"]["CompulsoryInputParameterDetails"];
|
||||
for (auto value : allCompulsoryInputParameterDetails)
|
||||
managedRule_.compulsoryInputParameterDetails.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
GetManagedRuleResult::ManagedRule GetManagedRuleResult::getManagedRule()const
|
||||
{
|
||||
return managedRule_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetResourceComplianceGroupByRegionRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetResourceComplianceGroupByRegionRequest;
|
||||
|
||||
GetResourceComplianceGroupByRegionRequest::GetResourceComplianceGroupByRegionRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetResourceComplianceGroupByRegion") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByRegionRequest::~GetResourceComplianceGroupByRegionRequest() {}
|
||||
|
||||
std::string GetResourceComplianceGroupByRegionRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GetResourceComplianceGroupByRegionRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
68
config/src/model/GetResourceComplianceGroupByRegionResult.cc
Normal file
68
config/src/model/GetResourceComplianceGroupByRegionResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetResourceComplianceGroupByRegionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetResourceComplianceGroupByRegionResult::GetResourceComplianceGroupByRegionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetResourceComplianceGroupByRegionResult::GetResourceComplianceGroupByRegionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByRegionResult::~GetResourceComplianceGroupByRegionResult()
|
||||
{}
|
||||
|
||||
void GetResourceComplianceGroupByRegionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceResultNode = value["ComplianceResult"];
|
||||
auto allComplianceResultListNode = complianceResultNode["ComplianceResultList"]["ComplianceResultListItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItem : allComplianceResultListNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem complianceResultListItemObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItem["RegionId"].isNull())
|
||||
complianceResultListItemObject.regionId = complianceResultNodeComplianceResultListComplianceResultListItem["RegionId"].asString();
|
||||
auto allCompliancesNode = complianceResultNodeComplianceResultListComplianceResultListItem["Compliances"]["CompliancesItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem : allCompliancesNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem::CompliancesItem compliancesObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].isNull())
|
||||
compliancesObject.complianceType = complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].asString();
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].isNull())
|
||||
compliancesObject.count = std::stol(complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].asString());
|
||||
complianceResultListItemObject.compliances.push_back(compliancesObject);
|
||||
}
|
||||
complianceResult_.complianceResultList.push_back(complianceResultListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByRegionResult::ComplianceResult GetResourceComplianceGroupByRegionResult::getComplianceResult()const
|
||||
{
|
||||
return complianceResult_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetResourceComplianceGroupByResourceTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::GetResourceComplianceGroupByResourceTypeRequest;
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeRequest::GetResourceComplianceGroupByResourceTypeRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "GetResourceComplianceGroupByResourceType") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeRequest::~GetResourceComplianceGroupByResourceTypeRequest() {}
|
||||
|
||||
std::string GetResourceComplianceGroupByResourceTypeRequest::getConfigRuleIds() const {
|
||||
return configRuleIds_;
|
||||
}
|
||||
|
||||
void GetResourceComplianceGroupByResourceTypeRequest::setConfigRuleIds(const std::string &configRuleIds) {
|
||||
configRuleIds_ = configRuleIds;
|
||||
setParameter(std::string("ConfigRuleIds"), configRuleIds);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 <alibabacloud/config/model/GetResourceComplianceGroupByResourceTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeResult::GetResourceComplianceGroupByResourceTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeResult::GetResourceComplianceGroupByResourceTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeResult::~GetResourceComplianceGroupByResourceTypeResult()
|
||||
{}
|
||||
|
||||
void GetResourceComplianceGroupByResourceTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto complianceResultNode = value["ComplianceResult"];
|
||||
auto allComplianceResultListNode = complianceResultNode["ComplianceResultList"]["ComplianceResultListItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItem : allComplianceResultListNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem complianceResultListItemObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItem["ResourceType"].isNull())
|
||||
complianceResultListItemObject.resourceType = complianceResultNodeComplianceResultListComplianceResultListItem["ResourceType"].asString();
|
||||
auto allCompliancesNode = complianceResultNodeComplianceResultListComplianceResultListItem["Compliances"]["CompliancesItem"];
|
||||
for (auto complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem : allCompliancesNode)
|
||||
{
|
||||
ComplianceResult::ComplianceResultListItem::CompliancesItem compliancesObject;
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].isNull())
|
||||
compliancesObject.complianceType = complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["ComplianceType"].asString();
|
||||
if(!complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].isNull())
|
||||
compliancesObject.count = std::stol(complianceResultNodeComplianceResultListComplianceResultListItemCompliancesCompliancesItem["Count"].asString());
|
||||
complianceResultListItemObject.compliances.push_back(compliancesObject);
|
||||
}
|
||||
complianceResult_.complianceResultList.push_back(complianceResultListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetResourceComplianceGroupByResourceTypeResult::ComplianceResult GetResourceComplianceGroupByResourceTypeResult::getComplianceResult()const
|
||||
{
|
||||
return complianceResult_;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListAggregateResourceEvaluationResultsRequest
|
||||
|
||||
ListAggregateResourceEvaluationResultsRequest::ListAggregateResourceEvaluationResultsRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "ListAggregateResourceEvaluationResults") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListAggregateResourceEvaluationResultsRequest::~ListAggregateResourceEvaluationResultsRequest() {}
|
||||
|
||||
63
config/src/model/ListManagedRulesRequest.cc
Normal file
63
config/src/model/ListManagedRulesRequest.cc
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/ListManagedRulesRequest.h>
|
||||
|
||||
using AlibabaCloud::Config::Model::ListManagedRulesRequest;
|
||||
|
||||
ListManagedRulesRequest::ListManagedRulesRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "ListManagedRules") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListManagedRulesRequest::~ListManagedRulesRequest() {}
|
||||
|
||||
int ListManagedRulesRequest::getRiskLevel() const {
|
||||
return riskLevel_;
|
||||
}
|
||||
|
||||
void ListManagedRulesRequest::setRiskLevel(int riskLevel) {
|
||||
riskLevel_ = riskLevel;
|
||||
setParameter(std::string("RiskLevel"), std::to_string(riskLevel));
|
||||
}
|
||||
|
||||
int ListManagedRulesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListManagedRulesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int ListManagedRulesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListManagedRulesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListManagedRulesRequest::getKeyword() const {
|
||||
return keyword_;
|
||||
}
|
||||
|
||||
void ListManagedRulesRequest::setKeyword(const std::string &keyword) {
|
||||
keyword_ = keyword;
|
||||
setParameter(std::string("Keyword"), keyword);
|
||||
}
|
||||
|
||||
84
config/src/model/ListManagedRulesResult.cc
Normal file
84
config/src/model/ListManagedRulesResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/config/model/ListManagedRulesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Config;
|
||||
using namespace AlibabaCloud::Config::Model;
|
||||
|
||||
ListManagedRulesResult::ListManagedRulesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListManagedRulesResult::ListManagedRulesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListManagedRulesResult::~ListManagedRulesResult()
|
||||
{}
|
||||
|
||||
void ListManagedRulesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allManagedRulesNode = value["ManagedRules"]["Data"];
|
||||
for (auto valueManagedRulesData : allManagedRulesNode)
|
||||
{
|
||||
Data managedRulesObject;
|
||||
if(!valueManagedRulesData["PageSize"].isNull())
|
||||
managedRulesObject.pageSize = std::stoi(valueManagedRulesData["PageSize"].asString());
|
||||
if(!valueManagedRulesData["PageNumber"].isNull())
|
||||
managedRulesObject.pageNumber = std::stoi(valueManagedRulesData["PageNumber"].asString());
|
||||
if(!valueManagedRulesData["TotalCount"].isNull())
|
||||
managedRulesObject.totalCount = std::stol(valueManagedRulesData["TotalCount"].asString());
|
||||
auto allManagedRuleListNode = valueManagedRulesData["ManagedRuleList"]["ManagedRule"];
|
||||
for (auto valueManagedRulesDataManagedRuleListManagedRule : allManagedRuleListNode)
|
||||
{
|
||||
Data::ManagedRule managedRuleListObject;
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["RiskLevel"].isNull())
|
||||
managedRuleListObject.riskLevel = std::stoi(valueManagedRulesDataManagedRuleListManagedRule["RiskLevel"].asString());
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["Description"].isNull())
|
||||
managedRuleListObject.description = valueManagedRulesDataManagedRuleListManagedRule["Description"].asString();
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["UseCases"].isNull())
|
||||
managedRuleListObject.useCases = valueManagedRulesDataManagedRuleListManagedRule["UseCases"].asString();
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["Identifier"].isNull())
|
||||
managedRuleListObject.identifier = valueManagedRulesDataManagedRuleListManagedRule["Identifier"].asString();
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["ConfigRuleName"].isNull())
|
||||
managedRuleListObject.configRuleName = valueManagedRulesDataManagedRuleListManagedRule["ConfigRuleName"].asString();
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["ReferenceCount"].isNull())
|
||||
managedRuleListObject.referenceCount = std::stoi(valueManagedRulesDataManagedRuleListManagedRule["ReferenceCount"].asString());
|
||||
if(!valueManagedRulesDataManagedRuleListManagedRule["HelpUrls"].isNull())
|
||||
managedRuleListObject.helpUrls = valueManagedRulesDataManagedRuleListManagedRule["HelpUrls"].asString();
|
||||
auto allLabels = value["Labels"]["Labels"];
|
||||
for (auto value : allLabels)
|
||||
managedRuleListObject.labels.push_back(value.asString());
|
||||
managedRulesObject.managedRuleList.push_back(managedRuleListObject);
|
||||
}
|
||||
managedRules_.push_back(managedRulesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListManagedRulesResult::Data> ListManagedRulesResult::getManagedRules()const
|
||||
{
|
||||
return managedRules_;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ using AlibabaCloud::Config::Model::ListResourceEvaluationResultsRequest;
|
||||
|
||||
ListResourceEvaluationResultsRequest::ListResourceEvaluationResultsRequest()
|
||||
: RpcServiceRequest("config", "2020-09-07", "ListResourceEvaluationResults") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListResourceEvaluationResultsRequest::~ListResourceEvaluationResultsRequest() {}
|
||||
|
||||
@@ -144,6 +144,15 @@ void UpdateAggregateConfigRuleRequest::setConfigRuleName(const std::string &conf
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string UpdateAggregateConfigRuleRequest::getTagKeyLogicScope() const {
|
||||
return tagKeyLogicScope_;
|
||||
}
|
||||
|
||||
void UpdateAggregateConfigRuleRequest::setTagKeyLogicScope(const std::string &tagKeyLogicScope) {
|
||||
tagKeyLogicScope_ = tagKeyLogicScope;
|
||||
setBodyParameter(std::string("TagKeyLogicScope"), tagKeyLogicScope);
|
||||
}
|
||||
|
||||
std::string UpdateAggregateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,15 @@ void UpdateConfigRuleRequest::setConfigRuleName(const std::string &configRuleNam
|
||||
setBodyParameter(std::string("ConfigRuleName"), configRuleName);
|
||||
}
|
||||
|
||||
std::string UpdateConfigRuleRequest::getTagKeyLogicScope() const {
|
||||
return tagKeyLogicScope_;
|
||||
}
|
||||
|
||||
void UpdateConfigRuleRequest::setTagKeyLogicScope(const std::string &tagKeyLogicScope) {
|
||||
tagKeyLogicScope_ = tagKeyLogicScope;
|
||||
setBodyParameter(std::string("TagKeyLogicScope"), tagKeyLogicScope);
|
||||
}
|
||||
|
||||
std::string UpdateConfigRuleRequest::getMaximumExecutionFrequency() const {
|
||||
return maximumExecutionFrequency_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user