Sfoglia il codice sorgente

Change RefreshAssets Public.

sdk-team 4 anni fa
parent
commit
70f6c89c06

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1252
+1.36.1253

+ 4 - 0
sas/CMakeLists.txt

@@ -25,6 +25,8 @@ set(sas_public_header_model
 	include/alibabacloud/sas/model/AddInstallCodeResult.h
 	include/alibabacloud/sas/model/AddVpcHoneyPotRequest.h
 	include/alibabacloud/sas/model/AddVpcHoneyPotResult.h
+	include/alibabacloud/sas/model/BindAuthToMachineRequest.h
+	include/alibabacloud/sas/model/BindAuthToMachineResult.h
 	include/alibabacloud/sas/model/CheckQuaraFileIdRequest.h
 	include/alibabacloud/sas/model/CheckQuaraFileIdResult.h
 	include/alibabacloud/sas/model/CheckSecurityEventIdRequest.h
@@ -468,6 +470,8 @@ set(sas_src
 	src/model/AddInstallCodeResult.cc
 	src/model/AddVpcHoneyPotRequest.cc
 	src/model/AddVpcHoneyPotResult.cc
+	src/model/BindAuthToMachineRequest.cc
+	src/model/BindAuthToMachineResult.cc
 	src/model/CheckQuaraFileIdRequest.cc
 	src/model/CheckQuaraFileIdResult.cc
 	src/model/CheckSecurityEventIdRequest.cc

+ 8 - 0
sas/include/alibabacloud/sas/SasClient.h

@@ -26,6 +26,8 @@
 #include "model/AddInstallCodeResult.h"
 #include "model/AddVpcHoneyPotRequest.h"
 #include "model/AddVpcHoneyPotResult.h"
+#include "model/BindAuthToMachineRequest.h"
+#include "model/BindAuthToMachineResult.h"
 #include "model/CheckQuaraFileIdRequest.h"
 #include "model/CheckQuaraFileIdResult.h"
 #include "model/CheckSecurityEventIdRequest.h"
@@ -477,6 +479,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::AddVpcHoneyPotResult> AddVpcHoneyPotOutcome;
 			typedef std::future<AddVpcHoneyPotOutcome> AddVpcHoneyPotOutcomeCallable;
 			typedef std::function<void(const SasClient*, const Model::AddVpcHoneyPotRequest&, const AddVpcHoneyPotOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddVpcHoneyPotAsyncHandler;
+			typedef Outcome<Error, Model::BindAuthToMachineResult> BindAuthToMachineOutcome;
+			typedef std::future<BindAuthToMachineOutcome> BindAuthToMachineOutcomeCallable;
+			typedef std::function<void(const SasClient*, const Model::BindAuthToMachineRequest&, const BindAuthToMachineOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BindAuthToMachineAsyncHandler;
 			typedef Outcome<Error, Model::CheckQuaraFileIdResult> CheckQuaraFileIdOutcome;
 			typedef std::future<CheckQuaraFileIdOutcome> CheckQuaraFileIdOutcomeCallable;
 			typedef std::function<void(const SasClient*, const Model::CheckQuaraFileIdRequest&, const CheckQuaraFileIdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckQuaraFileIdAsyncHandler;
@@ -1142,6 +1147,9 @@ namespace AlibabaCloud
 			AddVpcHoneyPotOutcome addVpcHoneyPot(const Model::AddVpcHoneyPotRequest &request)const;
 			void addVpcHoneyPotAsync(const Model::AddVpcHoneyPotRequest& request, const AddVpcHoneyPotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			AddVpcHoneyPotOutcomeCallable addVpcHoneyPotCallable(const Model::AddVpcHoneyPotRequest& request) const;
+			BindAuthToMachineOutcome bindAuthToMachine(const Model::BindAuthToMachineRequest &request)const;
+			void bindAuthToMachineAsync(const Model::BindAuthToMachineRequest& request, const BindAuthToMachineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			BindAuthToMachineOutcomeCallable bindAuthToMachineCallable(const Model::BindAuthToMachineRequest& request) const;
 			CheckQuaraFileIdOutcome checkQuaraFileId(const Model::CheckQuaraFileIdRequest &request)const;
 			void checkQuaraFileIdAsync(const Model::CheckQuaraFileIdRequest& request, const CheckQuaraFileIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CheckQuaraFileIdOutcomeCallable checkQuaraFileIdCallable(const Model::CheckQuaraFileIdRequest& request) const;

+ 63 - 0
sas/include/alibabacloud/sas/model/BindAuthToMachineRequest.h

@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_SAS_MODEL_BINDAUTHTOMACHINEREQUEST_H_
+#define ALIBABACLOUD_SAS_MODEL_BINDAUTHTOMACHINEREQUEST_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 BindAuthToMachineRequest : public RpcServiceRequest {
+public:
+	BindAuthToMachineRequest();
+	~BindAuthToMachineRequest();
+	std::string getCriteria() const;
+	void setCriteria(const std::string &criteria);
+	bool getBindAll() const;
+	void setBindAll(bool bindAll);
+	std::vector<std::string> getBind() const;
+	void setBind(const std::vector<std::string> &bind);
+	std::string getSourceIp() const;
+	void setSourceIp(const std::string &sourceIp);
+	int getAuthVersion() const;
+	void setAuthVersion(int authVersion);
+	std::string getLogicalExp() const;
+	void setLogicalExp(const std::string &logicalExp);
+	int getAutoBind() const;
+	void setAutoBind(int autoBind);
+	std::vector<std::string> getUnBind() const;
+	void setUnBind(const std::vector<std::string> &unBind);
+
+private:
+	std::string criteria_;
+	bool bindAll_;
+	std::vector<std::string> bind_;
+	std::string sourceIp_;
+	int authVersion_;
+	std::string logicalExp_;
+	int autoBind_;
+	std::vector<std::string> unBind_;
+};
+} // namespace Model
+} // namespace Sas
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_SAS_MODEL_BINDAUTHTOMACHINEREQUEST_H_

+ 61 - 0
sas/include/alibabacloud/sas/model/BindAuthToMachineResult.h

@@ -0,0 +1,61 @@
+/*
+ * 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_BINDAUTHTOMACHINERESULT_H_
+#define ALIBABACLOUD_SAS_MODEL_BINDAUTHTOMACHINERESULT_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 BindAuthToMachineResult : public ServiceResult
+			{
+			public:
+
+
+				BindAuthToMachineResult();
+				explicit BindAuthToMachineResult(const std::string &payload);
+				~BindAuthToMachineResult();
+				int getInsufficientCoreCount()const;
+				int getInsufficientCount()const;
+				int getBindCount()const;
+				int getInsufficientEcsCount()const;
+				int getUnBindCount()const;
+				int getResultCode()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				int insufficientCoreCount_;
+				int insufficientCount_;
+				int bindCount_;
+				int insufficientEcsCount_;
+				int unBindCount_;
+				int resultCode_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_SAS_MODEL_BINDAUTHTOMACHINERESULT_H_

+ 3 - 0
sas/include/alibabacloud/sas/model/DescribeAssetDetailByUuidsRequest.h

@@ -32,11 +32,14 @@ public:
 	~DescribeAssetDetailByUuidsRequest();
 	std::string getSourceIp() const;
 	void setSourceIp(const std::string &sourceIp);
+	std::string getLang() const;
+	void setLang(const std::string &lang);
 	std::string getUuids() const;
 	void setUuids(const std::string &uuids);
 
 private:
 	std::string sourceIp_;
+	std::string lang_;
 	std::string uuids_;
 };
 } // namespace Model

+ 3 - 0
sas/include/alibabacloud/sas/model/DescribeCloudCenterInstancesRequest.h

@@ -44,6 +44,8 @@ public:
 	void setPageSize(int pageSize);
 	std::string getLogicalExp() const;
 	void setLogicalExp(const std::string &logicalExp);
+	std::string getLang() const;
+	void setLang(const std::string &lang);
 	std::string getResourceDirectoryAccountId() const;
 	void setResourceDirectoryAccountId(const std::string &resourceDirectoryAccountId);
 	int getCurrentPage() const;
@@ -61,6 +63,7 @@ private:
 	bool noPage_;
 	int pageSize_;
 	std::string logicalExp_;
+	std::string lang_;
 	std::string resourceDirectoryAccountId_;
 	int currentPage_;
 	std::string machineTypes_;

+ 3 - 0
sas/include/alibabacloud/sas/model/DescribeFrontVulPatchListRequest.h

@@ -36,6 +36,8 @@ public:
 	void setSourceIp(const std::string &sourceIp);
 	std::string getOperateType() const;
 	void setOperateType(const std::string &operateType);
+	std::string getLang() const;
+	void setLang(const std::string &lang);
 	std::string getInfo() const;
 	void setInfo(const std::string &info);
 
@@ -43,6 +45,7 @@ private:
 	std::string type_;
 	std::string sourceIp_;
 	std::string operateType_;
+	std::string lang_;
 	std::string info_;
 };
 } // namespace Model

+ 6 - 0
sas/include/alibabacloud/sas/model/DescribeInstanceAntiBruteForceRulesRequest.h

@@ -32,14 +32,20 @@ public:
 	~DescribeInstanceAntiBruteForceRulesRequest();
 	long getResourceOwnerId() const;
 	void setResourceOwnerId(long resourceOwnerId);
+	int getCurrentPage() const;
+	void setCurrentPage(int currentPage);
 	std::string getSourceIp() const;
 	void setSourceIp(const std::string &sourceIp);
+	int getPageSize() const;
+	void setPageSize(int pageSize);
 	std::vector<std::string> getUuidList() const;
 	void setUuidList(const std::vector<std::string> &uuidList);
 
 private:
 	long resourceOwnerId_;
+	int currentPage_;
 	std::string sourceIp_;
+	int pageSize_;
 	std::vector<std::string> uuidList_;
 };
 } // namespace Model

+ 36 - 0
sas/src/SasClient.cc

@@ -123,6 +123,42 @@ SasClient::AddVpcHoneyPotOutcomeCallable SasClient::addVpcHoneyPotCallable(const
 	return task->get_future();
 }
 
+SasClient::BindAuthToMachineOutcome SasClient::bindAuthToMachine(const BindAuthToMachineRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return BindAuthToMachineOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return BindAuthToMachineOutcome(BindAuthToMachineResult(outcome.result()));
+	else
+		return BindAuthToMachineOutcome(outcome.error());
+}
+
+void SasClient::bindAuthToMachineAsync(const BindAuthToMachineRequest& request, const BindAuthToMachineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, bindAuthToMachine(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+SasClient::BindAuthToMachineOutcomeCallable SasClient::bindAuthToMachineCallable(const BindAuthToMachineRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<BindAuthToMachineOutcome()>>(
+			[this, request]()
+			{
+			return this->bindAuthToMachine(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 SasClient::CheckQuaraFileIdOutcome SasClient::checkQuaraFileId(const CheckQuaraFileIdRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 97 - 0
sas/src/model/BindAuthToMachineRequest.cc

@@ -0,0 +1,97 @@
+/*
+ * 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/BindAuthToMachineRequest.h>
+
+using AlibabaCloud::Sas::Model::BindAuthToMachineRequest;
+
+BindAuthToMachineRequest::BindAuthToMachineRequest()
+    : RpcServiceRequest("sas", "2018-12-03", "BindAuthToMachine") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+BindAuthToMachineRequest::~BindAuthToMachineRequest() {}
+
+std::string BindAuthToMachineRequest::getCriteria() const {
+  return criteria_;
+}
+
+void BindAuthToMachineRequest::setCriteria(const std::string &criteria) {
+  criteria_ = criteria;
+  setParameter(std::string("Criteria"), criteria);
+}
+
+bool BindAuthToMachineRequest::getBindAll() const {
+  return bindAll_;
+}
+
+void BindAuthToMachineRequest::setBindAll(bool bindAll) {
+  bindAll_ = bindAll;
+  setParameter(std::string("BindAll"), bindAll ? "true" : "false");
+}
+
+std::vector<std::string> BindAuthToMachineRequest::getBind() const {
+  return bind_;
+}
+
+void BindAuthToMachineRequest::setBind(const std::vector<std::string> &bind) {
+  bind_ = bind;
+}
+
+std::string BindAuthToMachineRequest::getSourceIp() const {
+  return sourceIp_;
+}
+
+void BindAuthToMachineRequest::setSourceIp(const std::string &sourceIp) {
+  sourceIp_ = sourceIp;
+  setParameter(std::string("SourceIp"), sourceIp);
+}
+
+int BindAuthToMachineRequest::getAuthVersion() const {
+  return authVersion_;
+}
+
+void BindAuthToMachineRequest::setAuthVersion(int authVersion) {
+  authVersion_ = authVersion;
+  setParameter(std::string("AuthVersion"), std::to_string(authVersion));
+}
+
+std::string BindAuthToMachineRequest::getLogicalExp() const {
+  return logicalExp_;
+}
+
+void BindAuthToMachineRequest::setLogicalExp(const std::string &logicalExp) {
+  logicalExp_ = logicalExp;
+  setParameter(std::string("LogicalExp"), logicalExp);
+}
+
+int BindAuthToMachineRequest::getAutoBind() const {
+  return autoBind_;
+}
+
+void BindAuthToMachineRequest::setAutoBind(int autoBind) {
+  autoBind_ = autoBind;
+  setParameter(std::string("AutoBind"), std::to_string(autoBind));
+}
+
+std::vector<std::string> BindAuthToMachineRequest::getUnBind() const {
+  return unBind_;
+}
+
+void BindAuthToMachineRequest::setUnBind(const std::vector<std::string> &unBind) {
+  unBind_ = unBind;
+}
+

+ 86 - 0
sas/src/model/BindAuthToMachineResult.cc

@@ -0,0 +1,86 @@
+/*
+ * 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/BindAuthToMachineResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Sas;
+using namespace AlibabaCloud::Sas::Model;
+
+BindAuthToMachineResult::BindAuthToMachineResult() :
+	ServiceResult()
+{}
+
+BindAuthToMachineResult::BindAuthToMachineResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+BindAuthToMachineResult::~BindAuthToMachineResult()
+{}
+
+void BindAuthToMachineResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	if(!value["ResultCode"].isNull())
+		resultCode_ = std::stoi(value["ResultCode"].asString());
+	if(!value["InsufficientCount"].isNull())
+		insufficientCount_ = std::stoi(value["InsufficientCount"].asString());
+	if(!value["UnBindCount"].isNull())
+		unBindCount_ = std::stoi(value["UnBindCount"].asString());
+	if(!value["BindCount"].isNull())
+		bindCount_ = std::stoi(value["BindCount"].asString());
+	if(!value["InsufficientEcsCount"].isNull())
+		insufficientEcsCount_ = std::stoi(value["InsufficientEcsCount"].asString());
+	if(!value["InsufficientCoreCount"].isNull())
+		insufficientCoreCount_ = std::stoi(value["InsufficientCoreCount"].asString());
+
+}
+
+int BindAuthToMachineResult::getInsufficientCoreCount()const
+{
+	return insufficientCoreCount_;
+}
+
+int BindAuthToMachineResult::getInsufficientCount()const
+{
+	return insufficientCount_;
+}
+
+int BindAuthToMachineResult::getBindCount()const
+{
+	return bindCount_;
+}
+
+int BindAuthToMachineResult::getInsufficientEcsCount()const
+{
+	return insufficientEcsCount_;
+}
+
+int BindAuthToMachineResult::getUnBindCount()const
+{
+	return unBindCount_;
+}
+
+int BindAuthToMachineResult::getResultCode()const
+{
+	return resultCode_;
+}
+

+ 9 - 0
sas/src/model/DescribeAssetDetailByUuidsRequest.cc

@@ -34,6 +34,15 @@ void DescribeAssetDetailByUuidsRequest::setSourceIp(const std::string &sourceIp)
   setParameter(std::string("SourceIp"), sourceIp);
 }
 
+std::string DescribeAssetDetailByUuidsRequest::getLang() const {
+  return lang_;
+}
+
+void DescribeAssetDetailByUuidsRequest::setLang(const std::string &lang) {
+  lang_ = lang;
+  setParameter(std::string("Lang"), lang);
+}
+
 std::string DescribeAssetDetailByUuidsRequest::getUuids() const {
   return uuids_;
 }

+ 9 - 0
sas/src/model/DescribeCloudCenterInstancesRequest.cc

@@ -88,6 +88,15 @@ void DescribeCloudCenterInstancesRequest::setLogicalExp(const std::string &logic
   setParameter(std::string("LogicalExp"), logicalExp);
 }
 
+std::string DescribeCloudCenterInstancesRequest::getLang() const {
+  return lang_;
+}
+
+void DescribeCloudCenterInstancesRequest::setLang(const std::string &lang) {
+  lang_ = lang;
+  setParameter(std::string("Lang"), lang);
+}
+
 std::string DescribeCloudCenterInstancesRequest::getResourceDirectoryAccountId() const {
   return resourceDirectoryAccountId_;
 }

+ 9 - 0
sas/src/model/DescribeFrontVulPatchListRequest.cc

@@ -52,6 +52,15 @@ void DescribeFrontVulPatchListRequest::setOperateType(const std::string &operate
   setParameter(std::string("OperateType"), operateType);
 }
 
+std::string DescribeFrontVulPatchListRequest::getLang() const {
+  return lang_;
+}
+
+void DescribeFrontVulPatchListRequest::setLang(const std::string &lang) {
+  lang_ = lang;
+  setParameter(std::string("Lang"), lang);
+}
+
 std::string DescribeFrontVulPatchListRequest::getInfo() const {
   return info_;
 }

+ 18 - 0
sas/src/model/DescribeInstanceAntiBruteForceRulesRequest.cc

@@ -34,6 +34,15 @@ void DescribeInstanceAntiBruteForceRulesRequest::setResourceOwnerId(long resourc
   setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
 }
 
+int DescribeInstanceAntiBruteForceRulesRequest::getCurrentPage() const {
+  return currentPage_;
+}
+
+void DescribeInstanceAntiBruteForceRulesRequest::setCurrentPage(int currentPage) {
+  currentPage_ = currentPage;
+  setParameter(std::string("CurrentPage"), std::to_string(currentPage));
+}
+
 std::string DescribeInstanceAntiBruteForceRulesRequest::getSourceIp() const {
   return sourceIp_;
 }
@@ -43,6 +52,15 @@ void DescribeInstanceAntiBruteForceRulesRequest::setSourceIp(const std::string &
   setParameter(std::string("SourceIp"), sourceIp);
 }
 
+int DescribeInstanceAntiBruteForceRulesRequest::getPageSize() const {
+  return pageSize_;
+}
+
+void DescribeInstanceAntiBruteForceRulesRequest::setPageSize(int pageSize) {
+  pageSize_ = pageSize;
+  setParameter(std::string("PageSize"), std::to_string(pageSize));
+}
+
 std::vector<std::string> DescribeInstanceAntiBruteForceRulesRequest::getUuidList() const {
   return uuidList_;
 }