Add open file detect api.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2022-07-15 Version: 1.36.1180
|
||||
- Add open file detect api.
|
||||
|
||||
2022-07-15 Version: 1.36.1179
|
||||
- Support Security Group Batch Manager Rules.
|
||||
|
||||
|
||||
@@ -175,6 +175,8 @@ set(sas_public_header_model
|
||||
include/alibabacloud/sas/model/DescribeInstallCodesResult.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceAntiBruteForceRulesRequest.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceAntiBruteForceRulesResult.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceRebootStatusRequest.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceRebootStatusResult.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceStatisticsRequest.h
|
||||
include/alibabacloud/sas/model/DescribeInstanceStatisticsResult.h
|
||||
include/alibabacloud/sas/model/DescribeLoginBaseConfigsRequest.h
|
||||
@@ -403,6 +405,8 @@ set(sas_public_header_model
|
||||
include/alibabacloud/sas/model/QueryGroupIdByGroupNameResult.h
|
||||
include/alibabacloud/sas/model/QueryGroupedSecurityEventMarkMissListRequest.h
|
||||
include/alibabacloud/sas/model/QueryGroupedSecurityEventMarkMissListResult.h
|
||||
include/alibabacloud/sas/model/RebootMachineRequest.h
|
||||
include/alibabacloud/sas/model/RebootMachineResult.h
|
||||
include/alibabacloud/sas/model/RefreshAssetsRequest.h
|
||||
include/alibabacloud/sas/model/RefreshAssetsResult.h
|
||||
include/alibabacloud/sas/model/RefreshContainerAssetsRequest.h
|
||||
@@ -578,6 +582,8 @@ set(sas_src
|
||||
src/model/DescribeInstallCodesResult.cc
|
||||
src/model/DescribeInstanceAntiBruteForceRulesRequest.cc
|
||||
src/model/DescribeInstanceAntiBruteForceRulesResult.cc
|
||||
src/model/DescribeInstanceRebootStatusRequest.cc
|
||||
src/model/DescribeInstanceRebootStatusResult.cc
|
||||
src/model/DescribeInstanceStatisticsRequest.cc
|
||||
src/model/DescribeInstanceStatisticsResult.cc
|
||||
src/model/DescribeLoginBaseConfigsRequest.cc
|
||||
@@ -806,6 +812,8 @@ set(sas_src
|
||||
src/model/QueryGroupIdByGroupNameResult.cc
|
||||
src/model/QueryGroupedSecurityEventMarkMissListRequest.cc
|
||||
src/model/QueryGroupedSecurityEventMarkMissListResult.cc
|
||||
src/model/RebootMachineRequest.cc
|
||||
src/model/RebootMachineResult.cc
|
||||
src/model/RefreshAssetsRequest.cc
|
||||
src/model/RefreshAssetsResult.cc
|
||||
src/model/RefreshContainerAssetsRequest.cc
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
#include "model/DescribeInstallCodesResult.h"
|
||||
#include "model/DescribeInstanceAntiBruteForceRulesRequest.h"
|
||||
#include "model/DescribeInstanceAntiBruteForceRulesResult.h"
|
||||
#include "model/DescribeInstanceRebootStatusRequest.h"
|
||||
#include "model/DescribeInstanceRebootStatusResult.h"
|
||||
#include "model/DescribeInstanceStatisticsRequest.h"
|
||||
#include "model/DescribeInstanceStatisticsResult.h"
|
||||
#include "model/DescribeLoginBaseConfigsRequest.h"
|
||||
@@ -404,6 +406,8 @@
|
||||
#include "model/QueryGroupIdByGroupNameResult.h"
|
||||
#include "model/QueryGroupedSecurityEventMarkMissListRequest.h"
|
||||
#include "model/QueryGroupedSecurityEventMarkMissListResult.h"
|
||||
#include "model/RebootMachineRequest.h"
|
||||
#include "model/RebootMachineResult.h"
|
||||
#include "model/RefreshAssetsRequest.h"
|
||||
#include "model/RefreshAssetsResult.h"
|
||||
#include "model/RefreshContainerAssetsRequest.h"
|
||||
@@ -662,6 +666,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeInstanceAntiBruteForceRulesResult> DescribeInstanceAntiBruteForceRulesOutcome;
|
||||
typedef std::future<DescribeInstanceAntiBruteForceRulesOutcome> DescribeInstanceAntiBruteForceRulesOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::DescribeInstanceAntiBruteForceRulesRequest&, const DescribeInstanceAntiBruteForceRulesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeInstanceAntiBruteForceRulesAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeInstanceRebootStatusResult> DescribeInstanceRebootStatusOutcome;
|
||||
typedef std::future<DescribeInstanceRebootStatusOutcome> DescribeInstanceRebootStatusOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::DescribeInstanceRebootStatusRequest&, const DescribeInstanceRebootStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeInstanceRebootStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeInstanceStatisticsResult> DescribeInstanceStatisticsOutcome;
|
||||
typedef std::future<DescribeInstanceStatisticsOutcome> DescribeInstanceStatisticsOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::DescribeInstanceStatisticsRequest&, const DescribeInstanceStatisticsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeInstanceStatisticsAsyncHandler;
|
||||
@@ -1004,6 +1011,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::QueryGroupedSecurityEventMarkMissListResult> QueryGroupedSecurityEventMarkMissListOutcome;
|
||||
typedef std::future<QueryGroupedSecurityEventMarkMissListOutcome> QueryGroupedSecurityEventMarkMissListOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::QueryGroupedSecurityEventMarkMissListRequest&, const QueryGroupedSecurityEventMarkMissListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryGroupedSecurityEventMarkMissListAsyncHandler;
|
||||
typedef Outcome<Error, Model::RebootMachineResult> RebootMachineOutcome;
|
||||
typedef std::future<RebootMachineOutcome> RebootMachineOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::RebootMachineRequest&, const RebootMachineOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RebootMachineAsyncHandler;
|
||||
typedef Outcome<Error, Model::RefreshAssetsResult> RefreshAssetsOutcome;
|
||||
typedef std::future<RefreshAssetsOutcome> RefreshAssetsOutcomeCallable;
|
||||
typedef std::function<void(const SasClient*, const Model::RefreshAssetsRequest&, const RefreshAssetsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshAssetsAsyncHandler;
|
||||
@@ -1267,6 +1277,9 @@ namespace AlibabaCloud
|
||||
DescribeInstanceAntiBruteForceRulesOutcome describeInstanceAntiBruteForceRules(const Model::DescribeInstanceAntiBruteForceRulesRequest &request)const;
|
||||
void describeInstanceAntiBruteForceRulesAsync(const Model::DescribeInstanceAntiBruteForceRulesRequest& request, const DescribeInstanceAntiBruteForceRulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeInstanceAntiBruteForceRulesOutcomeCallable describeInstanceAntiBruteForceRulesCallable(const Model::DescribeInstanceAntiBruteForceRulesRequest& request) const;
|
||||
DescribeInstanceRebootStatusOutcome describeInstanceRebootStatus(const Model::DescribeInstanceRebootStatusRequest &request)const;
|
||||
void describeInstanceRebootStatusAsync(const Model::DescribeInstanceRebootStatusRequest& request, const DescribeInstanceRebootStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeInstanceRebootStatusOutcomeCallable describeInstanceRebootStatusCallable(const Model::DescribeInstanceRebootStatusRequest& request) const;
|
||||
DescribeInstanceStatisticsOutcome describeInstanceStatistics(const Model::DescribeInstanceStatisticsRequest &request)const;
|
||||
void describeInstanceStatisticsAsync(const Model::DescribeInstanceStatisticsRequest& request, const DescribeInstanceStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeInstanceStatisticsOutcomeCallable describeInstanceStatisticsCallable(const Model::DescribeInstanceStatisticsRequest& request) const;
|
||||
@@ -1609,6 +1622,9 @@ namespace AlibabaCloud
|
||||
QueryGroupedSecurityEventMarkMissListOutcome queryGroupedSecurityEventMarkMissList(const Model::QueryGroupedSecurityEventMarkMissListRequest &request)const;
|
||||
void queryGroupedSecurityEventMarkMissListAsync(const Model::QueryGroupedSecurityEventMarkMissListRequest& request, const QueryGroupedSecurityEventMarkMissListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryGroupedSecurityEventMarkMissListOutcomeCallable queryGroupedSecurityEventMarkMissListCallable(const Model::QueryGroupedSecurityEventMarkMissListRequest& request) const;
|
||||
RebootMachineOutcome rebootMachine(const Model::RebootMachineRequest &request)const;
|
||||
void rebootMachineAsync(const Model::RebootMachineRequest& request, const RebootMachineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RebootMachineOutcomeCallable rebootMachineCallable(const Model::RebootMachineRequest& request) const;
|
||||
RefreshAssetsOutcome refreshAssets(const Model::RefreshAssetsRequest &request)const;
|
||||
void refreshAssetsAsync(const Model::RefreshAssetsRequest& request, const RefreshAssetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RefreshAssetsOutcomeCallable refreshAssetsCallable(const Model::RefreshAssetsRequest& request) const;
|
||||
|
||||
@@ -34,17 +34,19 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct WarningSummary
|
||||
{
|
||||
std::string lastFoundTime;
|
||||
long riskId;
|
||||
int mediumWarningCount;
|
||||
bool checkExploit;
|
||||
int checkCount;
|
||||
int warningMachineCount;
|
||||
int highWarningCount;
|
||||
std::string typeAlias;
|
||||
std::string level;
|
||||
int lowWarningCount;
|
||||
std::string subTypeAlias;
|
||||
std::string riskName;
|
||||
std::string lastFoundTime;
|
||||
int mediumWarningCount;
|
||||
int warningMachineCount;
|
||||
int highWarningCount;
|
||||
std::string level;
|
||||
bool databaseRisk;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ public:
|
||||
~DescribeCheckWarningsRequest();
|
||||
std::string getUuid() const;
|
||||
void setUuid(const std::string &uuid);
|
||||
std::string getCheckType() const;
|
||||
void setCheckType(const std::string &checkType);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
int getPageSize() const;
|
||||
@@ -47,6 +49,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string uuid_;
|
||||
std::string checkType_;
|
||||
std::string sourceIp_;
|
||||
int pageSize_;
|
||||
std::string lang_;
|
||||
|
||||
@@ -40,7 +40,9 @@ namespace AlibabaCloud
|
||||
std::string uuid;
|
||||
long checkId;
|
||||
long checkWarningId;
|
||||
int fixStatus;
|
||||
std::string level;
|
||||
std::string reason;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct Criteria
|
||||
{
|
||||
std::string multiValues;
|
||||
std::string type;
|
||||
std::string values;
|
||||
std::string name;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSREQUEST_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSREQUEST_H_
|
||||
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Sas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_SAS_EXPORT DescribeInstanceRebootStatusRequest : public RpcServiceRequest {
|
||||
public:
|
||||
DescribeInstanceRebootStatusRequest();
|
||||
~DescribeInstanceRebootStatusRequest();
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
std::string getUuids() const;
|
||||
void setUuids(const std::string &uuids);
|
||||
|
||||
private:
|
||||
std::string sourceIp_;
|
||||
std::string uuids_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Sas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSREQUEST_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_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSRESULT_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Sas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAS_EXPORT DescribeInstanceRebootStatusResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RebootStatus
|
||||
{
|
||||
std::string msg;
|
||||
std::string uuid;
|
||||
int rebootStatus;
|
||||
std::string code;
|
||||
};
|
||||
|
||||
|
||||
DescribeInstanceRebootStatusResult();
|
||||
explicit DescribeInstanceRebootStatusResult(const std::string &payload);
|
||||
~DescribeInstanceRebootStatusResult();
|
||||
std::vector<RebootStatus> getRebootStatuses()const;
|
||||
int getTotalCount()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<RebootStatus> rebootStatuses_;
|
||||
int totalCount_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_DESCRIBEINSTANCEREBOOTSTATUSRESULT_H_
|
||||
@@ -32,26 +32,15 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_SAS_EXPORT DescribeRiskCheckItemResultResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct PageContentResource
|
||||
{
|
||||
int totalCount;
|
||||
std::string contentResource;
|
||||
int pageSize;
|
||||
int pageCount;
|
||||
int currentPage;
|
||||
int count;
|
||||
};
|
||||
|
||||
|
||||
DescribeRiskCheckItemResultResult();
|
||||
explicit DescribeRiskCheckItemResultResult(const std::string &payload);
|
||||
~DescribeRiskCheckItemResultResult();
|
||||
PageContentResource getPageContentResource()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
PageContentResource pageContentResource_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,17 +35,19 @@ namespace AlibabaCloud
|
||||
struct WarningMachine
|
||||
{
|
||||
int status;
|
||||
bool bind;
|
||||
std::string instanceId;
|
||||
bool portOpen;
|
||||
std::string intranetIp;
|
||||
int lowWarningCount;
|
||||
std::string instanceName;
|
||||
int mediumWarningCount;
|
||||
std::string uuid;
|
||||
std::string internetIp;
|
||||
std::string instanceId;
|
||||
bool portOpen;
|
||||
int highWarningCount;
|
||||
std::string regionId;
|
||||
int passCount;
|
||||
std::string intranetIp;
|
||||
int lowWarningCount;
|
||||
int authVersion;
|
||||
};
|
||||
|
||||
|
||||
|
||||
45
sas/include/alibabacloud/sas/model/RebootMachineRequest.h
Normal file
45
sas/include/alibabacloud/sas/model/RebootMachineRequest.h
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SAS_MODEL_REBOOTMACHINEREQUEST_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_REBOOTMACHINEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Sas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_SAS_EXPORT RebootMachineRequest : public RpcServiceRequest {
|
||||
public:
|
||||
RebootMachineRequest();
|
||||
~RebootMachineRequest();
|
||||
std::string getUuid() const;
|
||||
void setUuid(const std::string &uuid);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
|
||||
private:
|
||||
std::string uuid_;
|
||||
std::string sourceIp_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Sas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_REBOOTMACHINEREQUEST_H_
|
||||
49
sas/include/alibabacloud/sas/model/RebootMachineResult.h
Normal file
49
sas/include/alibabacloud/sas/model/RebootMachineResult.h
Normal file
@@ -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_SAS_MODEL_REBOOTMACHINERESULT_H_
|
||||
#define ALIBABACLOUD_SAS_MODEL_REBOOTMACHINERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/sas/SasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Sas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAS_EXPORT RebootMachineResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RebootMachineResult();
|
||||
explicit RebootMachineResult(const std::string &payload);
|
||||
~RebootMachineResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAS_MODEL_REBOOTMACHINERESULT_H_
|
||||
@@ -2823,6 +2823,42 @@ SasClient::DescribeInstanceAntiBruteForceRulesOutcomeCallable SasClient::describ
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::DescribeInstanceRebootStatusOutcome SasClient::describeInstanceRebootStatus(const DescribeInstanceRebootStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeInstanceRebootStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeInstanceRebootStatusOutcome(DescribeInstanceRebootStatusResult(outcome.result()));
|
||||
else
|
||||
return DescribeInstanceRebootStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SasClient::describeInstanceRebootStatusAsync(const DescribeInstanceRebootStatusRequest& request, const DescribeInstanceRebootStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeInstanceRebootStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SasClient::DescribeInstanceRebootStatusOutcomeCallable SasClient::describeInstanceRebootStatusCallable(const DescribeInstanceRebootStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeInstanceRebootStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeInstanceRebootStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::DescribeInstanceStatisticsOutcome SasClient::describeInstanceStatistics(const DescribeInstanceStatisticsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -6927,6 +6963,42 @@ SasClient::QueryGroupedSecurityEventMarkMissListOutcomeCallable SasClient::query
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::RebootMachineOutcome SasClient::rebootMachine(const RebootMachineRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RebootMachineOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RebootMachineOutcome(RebootMachineResult(outcome.result()));
|
||||
else
|
||||
return RebootMachineOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SasClient::rebootMachineAsync(const RebootMachineRequest& request, const RebootMachineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, rebootMachine(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SasClient::RebootMachineOutcomeCallable SasClient::rebootMachineCallable(const RebootMachineRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RebootMachineOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->rebootMachine(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SasClient::RefreshAssetsOutcome SasClient::refreshAssets(const RefreshAssetsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -65,6 +65,10 @@ void DescribeCheckWarningSummaryResult::parse(const std::string &payload)
|
||||
warningSummarysObject.riskName = valueWarningSummarysWarningSummary["RiskName"].asString();
|
||||
if(!valueWarningSummarysWarningSummary["Level"].isNull())
|
||||
warningSummarysObject.level = valueWarningSummarysWarningSummary["Level"].asString();
|
||||
if(!valueWarningSummarysWarningSummary["CheckExploit"].isNull())
|
||||
warningSummarysObject.checkExploit = valueWarningSummarysWarningSummary["CheckExploit"].asString() == "true";
|
||||
if(!valueWarningSummarysWarningSummary["DatabaseRisk"].isNull())
|
||||
warningSummarysObject.databaseRisk = valueWarningSummarysWarningSummary["DatabaseRisk"].asString() == "true";
|
||||
warningSummarys_.push_back(warningSummarysObject);
|
||||
}
|
||||
if(!value["CurrentPage"].isNull())
|
||||
|
||||
@@ -34,6 +34,15 @@ void DescribeCheckWarningsRequest::setUuid(const std::string &uuid) {
|
||||
setParameter(std::string("Uuid"), uuid);
|
||||
}
|
||||
|
||||
std::string DescribeCheckWarningsRequest::getCheckType() const {
|
||||
return checkType_;
|
||||
}
|
||||
|
||||
void DescribeCheckWarningsRequest::setCheckType(const std::string &checkType) {
|
||||
checkType_ = checkType;
|
||||
setParameter(std::string("CheckType"), checkType);
|
||||
}
|
||||
|
||||
std::string DescribeCheckWarningsRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,10 @@ void DescribeCheckWarningsResult::parse(const std::string &payload)
|
||||
checkWarningsObject.checkId = std::stol(valueCheckWarningsCheckWarning["CheckId"].asString());
|
||||
if(!valueCheckWarningsCheckWarning["Level"].isNull())
|
||||
checkWarningsObject.level = valueCheckWarningsCheckWarning["Level"].asString();
|
||||
if(!valueCheckWarningsCheckWarning["Reason"].isNull())
|
||||
checkWarningsObject.reason = valueCheckWarningsCheckWarning["Reason"].asString();
|
||||
if(!valueCheckWarningsCheckWarning["FixStatus"].isNull())
|
||||
checkWarningsObject.fixStatus = std::stoi(valueCheckWarningsCheckWarning["FixStatus"].asString());
|
||||
checkWarnings_.push_back(checkWarningsObject);
|
||||
}
|
||||
if(!value["CurrentPage"].isNull())
|
||||
|
||||
@@ -49,6 +49,8 @@ void DescribeCriteriaResult::parse(const std::string &payload)
|
||||
criteriaListObject.name = valueCriteriaListCriteria["Name"].asString();
|
||||
if(!valueCriteriaListCriteria["Values"].isNull())
|
||||
criteriaListObject.values = valueCriteriaListCriteria["Values"].asString();
|
||||
if(!valueCriteriaListCriteria["MultiValues"].isNull())
|
||||
criteriaListObject.multiValues = valueCriteriaListCriteria["MultiValues"].asString();
|
||||
criteriaList_.push_back(criteriaListObject);
|
||||
}
|
||||
|
||||
|
||||
45
sas/src/model/DescribeInstanceRebootStatusRequest.cc
Normal file
45
sas/src/model/DescribeInstanceRebootStatusRequest.cc
Normal file
@@ -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/sas/model/DescribeInstanceRebootStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas::Model::DescribeInstanceRebootStatusRequest;
|
||||
|
||||
DescribeInstanceRebootStatusRequest::DescribeInstanceRebootStatusRequest()
|
||||
: RpcServiceRequest("sas", "2018-12-03", "DescribeInstanceRebootStatus") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeInstanceRebootStatusRequest::~DescribeInstanceRebootStatusRequest() {}
|
||||
|
||||
std::string DescribeInstanceRebootStatusRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeInstanceRebootStatusRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRebootStatusRequest::getUuids() const {
|
||||
return uuids_;
|
||||
}
|
||||
|
||||
void DescribeInstanceRebootStatusRequest::setUuids(const std::string &uuids) {
|
||||
uuids_ = uuids;
|
||||
setParameter(std::string("Uuids"), uuids);
|
||||
}
|
||||
|
||||
70
sas/src/model/DescribeInstanceRebootStatusResult.cc
Normal file
70
sas/src/model/DescribeInstanceRebootStatusResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/sas/model/DescribeInstanceRebootStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas;
|
||||
using namespace AlibabaCloud::Sas::Model;
|
||||
|
||||
DescribeInstanceRebootStatusResult::DescribeInstanceRebootStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeInstanceRebootStatusResult::DescribeInstanceRebootStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeInstanceRebootStatusResult::~DescribeInstanceRebootStatusResult()
|
||||
{}
|
||||
|
||||
void DescribeInstanceRebootStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRebootStatusesNode = value["RebootStatuses"]["RebootStatus"];
|
||||
for (auto valueRebootStatusesRebootStatus : allRebootStatusesNode)
|
||||
{
|
||||
RebootStatus rebootStatusesObject;
|
||||
if(!valueRebootStatusesRebootStatus["Uuid"].isNull())
|
||||
rebootStatusesObject.uuid = valueRebootStatusesRebootStatus["Uuid"].asString();
|
||||
if(!valueRebootStatusesRebootStatus["RebootStatus"].isNull())
|
||||
rebootStatusesObject.rebootStatus = std::stoi(valueRebootStatusesRebootStatus["RebootStatus"].asString());
|
||||
if(!valueRebootStatusesRebootStatus["Code"].isNull())
|
||||
rebootStatusesObject.code = valueRebootStatusesRebootStatus["Code"].asString();
|
||||
if(!valueRebootStatusesRebootStatus["Msg"].isNull())
|
||||
rebootStatusesObject.msg = valueRebootStatusesRebootStatus["Msg"].asString();
|
||||
rebootStatuses_.push_back(rebootStatusesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeInstanceRebootStatusResult::RebootStatus> DescribeInstanceRebootStatusResult::getRebootStatuses()const
|
||||
{
|
||||
return rebootStatuses_;
|
||||
}
|
||||
|
||||
int DescribeInstanceRebootStatusResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
@@ -39,24 +39,6 @@ void DescribeRiskCheckItemResultResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto pageContentResourceNode = value["PageContentResource"];
|
||||
if(!pageContentResourceNode["CurrentPage"].isNull())
|
||||
pageContentResource_.currentPage = std::stoi(pageContentResourceNode["CurrentPage"].asString());
|
||||
if(!pageContentResourceNode["ContentResource"].isNull())
|
||||
pageContentResource_.contentResource = pageContentResourceNode["ContentResource"].asString();
|
||||
if(!pageContentResourceNode["PageSize"].isNull())
|
||||
pageContentResource_.pageSize = std::stoi(pageContentResourceNode["PageSize"].asString());
|
||||
if(!pageContentResourceNode["TotalCount"].isNull())
|
||||
pageContentResource_.totalCount = std::stoi(pageContentResourceNode["TotalCount"].asString());
|
||||
if(!pageContentResourceNode["PageCount"].isNull())
|
||||
pageContentResource_.pageCount = std::stoi(pageContentResourceNode["PageCount"].asString());
|
||||
if(!pageContentResourceNode["Count"].isNull())
|
||||
pageContentResource_.count = std::stoi(pageContentResourceNode["Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeRiskCheckItemResultResult::PageContentResource DescribeRiskCheckItemResultResult::getPageContentResource()const
|
||||
{
|
||||
return pageContentResource_;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ void DescribeWarningMachinesResult::parse(const std::string &payload)
|
||||
warningMachinesObject.passCount = std::stoi(valueWarningMachinesWarningMachine["PassCount"].asString());
|
||||
if(!valueWarningMachinesWarningMachine["InstanceName"].isNull())
|
||||
warningMachinesObject.instanceName = valueWarningMachinesWarningMachine["InstanceName"].asString();
|
||||
if(!valueWarningMachinesWarningMachine["Bind"].isNull())
|
||||
warningMachinesObject.bind = valueWarningMachinesWarningMachine["Bind"].asString() == "true";
|
||||
if(!valueWarningMachinesWarningMachine["AuthVersion"].isNull())
|
||||
warningMachinesObject.authVersion = std::stoi(valueWarningMachinesWarningMachine["AuthVersion"].asString());
|
||||
warningMachines_.push_back(warningMachinesObject);
|
||||
}
|
||||
if(!value["CurrentPage"].isNull())
|
||||
|
||||
45
sas/src/model/RebootMachineRequest.cc
Normal file
45
sas/src/model/RebootMachineRequest.cc
Normal file
@@ -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/sas/model/RebootMachineRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas::Model::RebootMachineRequest;
|
||||
|
||||
RebootMachineRequest::RebootMachineRequest()
|
||||
: RpcServiceRequest("sas", "2018-12-03", "RebootMachine") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RebootMachineRequest::~RebootMachineRequest() {}
|
||||
|
||||
std::string RebootMachineRequest::getUuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
void RebootMachineRequest::setUuid(const std::string &uuid) {
|
||||
uuid_ = uuid;
|
||||
setParameter(std::string("Uuid"), uuid);
|
||||
}
|
||||
|
||||
std::string RebootMachineRequest::getSourceIp() const {
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void RebootMachineRequest::setSourceIp(const std::string &sourceIp) {
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter(std::string("SourceIp"), sourceIp);
|
||||
}
|
||||
|
||||
44
sas/src/model/RebootMachineResult.cc
Normal file
44
sas/src/model/RebootMachineResult.cc
Normal file
@@ -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 <alibabacloud/sas/model/RebootMachineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas;
|
||||
using namespace AlibabaCloud::Sas::Model;
|
||||
|
||||
RebootMachineResult::RebootMachineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RebootMachineResult::RebootMachineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RebootMachineResult::~RebootMachineResult()
|
||||
{}
|
||||
|
||||
void RebootMachineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user