sdk-team 5 лет назад
Родитель
Сommit
e71ef9a243

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2021-02-03 Version: patch
+- Add ModifyAuditLogConfig API.
+
 2021-02-02 Version: patch
 - Add.
 

+ 4 - 0
r-kvstore/CMakeLists.txt

@@ -137,6 +137,8 @@ set(r-kvstore_public_header_model
 	include/alibabacloud/r-kvstore/model/ModifyAccountPasswordResult.h
 	include/alibabacloud/r-kvstore/model/ModifyActiveOperationTaskRequest.h
 	include/alibabacloud/r-kvstore/model/ModifyActiveOperationTaskResult.h
+	include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigRequest.h
+	include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigResult.h
 	include/alibabacloud/r-kvstore/model/ModifyBackupPolicyRequest.h
 	include/alibabacloud/r-kvstore/model/ModifyBackupPolicyResult.h
 	include/alibabacloud/r-kvstore/model/ModifyDBInstanceConnectionStringRequest.h
@@ -318,6 +320,8 @@ set(r-kvstore_src
 	src/model/ModifyAccountPasswordResult.cc
 	src/model/ModifyActiveOperationTaskRequest.cc
 	src/model/ModifyActiveOperationTaskResult.cc
+	src/model/ModifyAuditLogConfigRequest.cc
+	src/model/ModifyAuditLogConfigResult.cc
 	src/model/ModifyBackupPolicyRequest.cc
 	src/model/ModifyBackupPolicyResult.cc
 	src/model/ModifyDBInstanceConnectionStringRequest.cc

+ 8 - 0
r-kvstore/include/alibabacloud/r-kvstore/R_kvstoreClient.h

@@ -138,6 +138,8 @@
 #include "model/ModifyAccountPasswordResult.h"
 #include "model/ModifyActiveOperationTaskRequest.h"
 #include "model/ModifyActiveOperationTaskResult.h"
+#include "model/ModifyAuditLogConfigRequest.h"
+#include "model/ModifyAuditLogConfigResult.h"
 #include "model/ModifyBackupPolicyRequest.h"
 #include "model/ModifyBackupPolicyResult.h"
 #include "model/ModifyDBInstanceConnectionStringRequest.h"
@@ -383,6 +385,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::ModifyActiveOperationTaskResult> ModifyActiveOperationTaskOutcome;
 			typedef std::future<ModifyActiveOperationTaskOutcome> ModifyActiveOperationTaskOutcomeCallable;
 			typedef std::function<void(const R_kvstoreClient*, const Model::ModifyActiveOperationTaskRequest&, const ModifyActiveOperationTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyActiveOperationTaskAsyncHandler;
+			typedef Outcome<Error, Model::ModifyAuditLogConfigResult> ModifyAuditLogConfigOutcome;
+			typedef std::future<ModifyAuditLogConfigOutcome> ModifyAuditLogConfigOutcomeCallable;
+			typedef std::function<void(const R_kvstoreClient*, const Model::ModifyAuditLogConfigRequest&, const ModifyAuditLogConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyAuditLogConfigAsyncHandler;
 			typedef Outcome<Error, Model::ModifyBackupPolicyResult> ModifyBackupPolicyOutcome;
 			typedef std::future<ModifyBackupPolicyOutcome> ModifyBackupPolicyOutcomeCallable;
 			typedef std::function<void(const R_kvstoreClient*, const Model::ModifyBackupPolicyRequest&, const ModifyBackupPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyBackupPolicyAsyncHandler;
@@ -655,6 +660,9 @@ namespace AlibabaCloud
 			ModifyActiveOperationTaskOutcome modifyActiveOperationTask(const Model::ModifyActiveOperationTaskRequest &request)const;
 			void modifyActiveOperationTaskAsync(const Model::ModifyActiveOperationTaskRequest& request, const ModifyActiveOperationTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ModifyActiveOperationTaskOutcomeCallable modifyActiveOperationTaskCallable(const Model::ModifyActiveOperationTaskRequest& request) const;
+			ModifyAuditLogConfigOutcome modifyAuditLogConfig(const Model::ModifyAuditLogConfigRequest &request)const;
+			void modifyAuditLogConfigAsync(const Model::ModifyAuditLogConfigRequest& request, const ModifyAuditLogConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ModifyAuditLogConfigOutcomeCallable modifyAuditLogConfigCallable(const Model::ModifyAuditLogConfigRequest& request) const;
 			ModifyBackupPolicyOutcome modifyBackupPolicy(const Model::ModifyBackupPolicyRequest &request)const;
 			void modifyBackupPolicyAsync(const Model::ModifyBackupPolicyRequest& request, const ModifyBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ModifyBackupPolicyOutcomeCallable modifyBackupPolicyCallable(const Model::ModifyBackupPolicyRequest& request) const;

+ 3 - 0
r-kvstore/include/alibabacloud/r-kvstore/model/DescribeParameterTemplatesRequest.h

@@ -41,6 +41,8 @@ namespace AlibabaCloud
 				void setEngineVersion(const std::string& engineVersion);
 				std::string getAccessKeyId()const;
 				void setAccessKeyId(const std::string& accessKeyId);
+				std::string getResourceGroupId()const;
+				void setResourceGroupId(const std::string& resourceGroupId);
 				std::string getSecurityToken()const;
 				void setSecurityToken(const std::string& securityToken);
 				std::string getEngine()const;
@@ -58,6 +60,7 @@ namespace AlibabaCloud
 				long resourceOwnerId_;
 				std::string engineVersion_;
 				std::string accessKeyId_;
+				std::string resourceGroupId_;
 				std::string securityToken_;
 				std::string engine_;
 				std::string resourceOwnerAccount_;

+ 84 - 0
r-kvstore/include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigRequest.h

@@ -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.
+ */
+
+#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_
+#define ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
+
+namespace AlibabaCloud
+{
+	namespace R_kvstore
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_R_KVSTORE_EXPORT ModifyAuditLogConfigRequest : public RpcServiceRequest
+			{
+
+			public:
+				ModifyAuditLogConfigRequest();
+				~ModifyAuditLogConfigRequest();
+
+				long getResourceOwnerId()const;
+				void setResourceOwnerId(long resourceOwnerId);
+				std::string getAccessKeyId()const;
+				void setAccessKeyId(const std::string& accessKeyId);
+				std::string getSecurityToken()const;
+				void setSecurityToken(const std::string& securityToken);
+				std::string getAuditCommand()const;
+				void setAuditCommand(const std::string& auditCommand);
+				std::string getAuditLogSwitchSource()const;
+				void setAuditLogSwitchSource(const std::string& auditLogSwitchSource);
+				std::string getProxyAudit()const;
+				void setProxyAudit(const std::string& proxyAudit);
+				int getRetention()const;
+				void setRetention(int retention);
+				std::string getResourceOwnerAccount()const;
+				void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
+				std::string getOwnerAccount()const;
+				void setOwnerAccount(const std::string& ownerAccount);
+				bool getDbAudit()const;
+				void setDbAudit(bool dbAudit);
+				long getOwnerId()const;
+				void setOwnerId(long ownerId);
+				std::string getServiceType()const;
+				void setServiceType(const std::string& serviceType);
+				std::string getInstanceId()const;
+				void setInstanceId(const std::string& instanceId);
+
+            private:
+				long resourceOwnerId_;
+				std::string accessKeyId_;
+				std::string securityToken_;
+				std::string auditCommand_;
+				std::string auditLogSwitchSource_;
+				std::string proxyAudit_;
+				int retention_;
+				std::string resourceOwnerAccount_;
+				std::string ownerAccount_;
+				bool dbAudit_;
+				long ownerId_;
+				std::string serviceType_;
+				std::string instanceId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_

+ 49 - 0
r-kvstore/include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigResult.h

@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_
+#define ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
+
+namespace AlibabaCloud
+{
+	namespace R_kvstore
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_R_KVSTORE_EXPORT ModifyAuditLogConfigResult : public ServiceResult
+			{
+			public:
+
+
+				ModifyAuditLogConfigResult();
+				explicit ModifyAuditLogConfigResult(const std::string &payload);
+				~ModifyAuditLogConfigResult();
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_

+ 36 - 0
r-kvstore/src/R-kvstoreClient.cc

@@ -2139,6 +2139,42 @@ R_kvstoreClient::ModifyActiveOperationTaskOutcomeCallable R_kvstoreClient::modif
 	return task->get_future();
 }
 
+R_kvstoreClient::ModifyAuditLogConfigOutcome R_kvstoreClient::modifyAuditLogConfig(const ModifyAuditLogConfigRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ModifyAuditLogConfigOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ModifyAuditLogConfigOutcome(ModifyAuditLogConfigResult(outcome.result()));
+	else
+		return ModifyAuditLogConfigOutcome(outcome.error());
+}
+
+void R_kvstoreClient::modifyAuditLogConfigAsync(const ModifyAuditLogConfigRequest& request, const ModifyAuditLogConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, modifyAuditLogConfig(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+R_kvstoreClient::ModifyAuditLogConfigOutcomeCallable R_kvstoreClient::modifyAuditLogConfigCallable(const ModifyAuditLogConfigRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ModifyAuditLogConfigOutcome()>>(
+			[this, request]()
+			{
+			return this->modifyAuditLogConfig(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 R_kvstoreClient::ModifyBackupPolicyOutcome R_kvstoreClient::modifyBackupPolicy(const ModifyBackupPolicyRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 11 - 0
r-kvstore/src/model/DescribeParameterTemplatesRequest.cc

@@ -60,6 +60,17 @@ void DescribeParameterTemplatesRequest::setAccessKeyId(const std::string& access
 	setParameter("AccessKeyId", accessKeyId);
 }
 
+std::string DescribeParameterTemplatesRequest::getResourceGroupId()const
+{
+	return resourceGroupId_;
+}
+
+void DescribeParameterTemplatesRequest::setResourceGroupId(const std::string& resourceGroupId)
+{
+	resourceGroupId_ = resourceGroupId;
+	setParameter("ResourceGroupId", resourceGroupId);
+}
+
 std::string DescribeParameterTemplatesRequest::getSecurityToken()const
 {
 	return securityToken_;

+ 172 - 0
r-kvstore/src/model/ModifyAuditLogConfigRequest.cc

@@ -0,0 +1,172 @@
+/*
+ * 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/r-kvstore/model/ModifyAuditLogConfigRequest.h>
+
+using AlibabaCloud::R_kvstore::Model::ModifyAuditLogConfigRequest;
+
+ModifyAuditLogConfigRequest::ModifyAuditLogConfigRequest() :
+	RpcServiceRequest("r-kvstore", "2015-01-01", "ModifyAuditLogConfig")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+ModifyAuditLogConfigRequest::~ModifyAuditLogConfigRequest()
+{}
+
+long ModifyAuditLogConfigRequest::getResourceOwnerId()const
+{
+	return resourceOwnerId_;
+}
+
+void ModifyAuditLogConfigRequest::setResourceOwnerId(long resourceOwnerId)
+{
+	resourceOwnerId_ = resourceOwnerId;
+	setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
+}
+
+std::string ModifyAuditLogConfigRequest::getAccessKeyId()const
+{
+	return accessKeyId_;
+}
+
+void ModifyAuditLogConfigRequest::setAccessKeyId(const std::string& accessKeyId)
+{
+	accessKeyId_ = accessKeyId;
+	setParameter("AccessKeyId", accessKeyId);
+}
+
+std::string ModifyAuditLogConfigRequest::getSecurityToken()const
+{
+	return securityToken_;
+}
+
+void ModifyAuditLogConfigRequest::setSecurityToken(const std::string& securityToken)
+{
+	securityToken_ = securityToken;
+	setParameter("SecurityToken", securityToken);
+}
+
+std::string ModifyAuditLogConfigRequest::getAuditCommand()const
+{
+	return auditCommand_;
+}
+
+void ModifyAuditLogConfigRequest::setAuditCommand(const std::string& auditCommand)
+{
+	auditCommand_ = auditCommand;
+	setParameter("AuditCommand", auditCommand);
+}
+
+std::string ModifyAuditLogConfigRequest::getAuditLogSwitchSource()const
+{
+	return auditLogSwitchSource_;
+}
+
+void ModifyAuditLogConfigRequest::setAuditLogSwitchSource(const std::string& auditLogSwitchSource)
+{
+	auditLogSwitchSource_ = auditLogSwitchSource;
+	setParameter("AuditLogSwitchSource", auditLogSwitchSource);
+}
+
+std::string ModifyAuditLogConfigRequest::getProxyAudit()const
+{
+	return proxyAudit_;
+}
+
+void ModifyAuditLogConfigRequest::setProxyAudit(const std::string& proxyAudit)
+{
+	proxyAudit_ = proxyAudit;
+	setParameter("ProxyAudit", proxyAudit);
+}
+
+int ModifyAuditLogConfigRequest::getRetention()const
+{
+	return retention_;
+}
+
+void ModifyAuditLogConfigRequest::setRetention(int retention)
+{
+	retention_ = retention;
+	setParameter("Retention", std::to_string(retention));
+}
+
+std::string ModifyAuditLogConfigRequest::getResourceOwnerAccount()const
+{
+	return resourceOwnerAccount_;
+}
+
+void ModifyAuditLogConfigRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
+{
+	resourceOwnerAccount_ = resourceOwnerAccount;
+	setParameter("ResourceOwnerAccount", resourceOwnerAccount);
+}
+
+std::string ModifyAuditLogConfigRequest::getOwnerAccount()const
+{
+	return ownerAccount_;
+}
+
+void ModifyAuditLogConfigRequest::setOwnerAccount(const std::string& ownerAccount)
+{
+	ownerAccount_ = ownerAccount;
+	setParameter("OwnerAccount", ownerAccount);
+}
+
+bool ModifyAuditLogConfigRequest::getDbAudit()const
+{
+	return dbAudit_;
+}
+
+void ModifyAuditLogConfigRequest::setDbAudit(bool dbAudit)
+{
+	dbAudit_ = dbAudit;
+	setParameter("DbAudit", dbAudit ? "true" : "false");
+}
+
+long ModifyAuditLogConfigRequest::getOwnerId()const
+{
+	return ownerId_;
+}
+
+void ModifyAuditLogConfigRequest::setOwnerId(long ownerId)
+{
+	ownerId_ = ownerId;
+	setParameter("OwnerId", std::to_string(ownerId));
+}
+
+std::string ModifyAuditLogConfigRequest::getServiceType()const
+{
+	return serviceType_;
+}
+
+void ModifyAuditLogConfigRequest::setServiceType(const std::string& serviceType)
+{
+	serviceType_ = serviceType;
+	setParameter("ServiceType", serviceType);
+}
+
+std::string ModifyAuditLogConfigRequest::getInstanceId()const
+{
+	return instanceId_;
+}
+
+void ModifyAuditLogConfigRequest::setInstanceId(const std::string& instanceId)
+{
+	instanceId_ = instanceId;
+	setParameter("InstanceId", instanceId);
+}
+

+ 44 - 0
r-kvstore/src/model/ModifyAuditLogConfigResult.cc

@@ -0,0 +1,44 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <alibabacloud/r-kvstore/model/ModifyAuditLogConfigResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::R_kvstore;
+using namespace AlibabaCloud::R_kvstore::Model;
+
+ModifyAuditLogConfigResult::ModifyAuditLogConfigResult() :
+	ServiceResult()
+{}
+
+ModifyAuditLogConfigResult::ModifyAuditLogConfigResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+ModifyAuditLogConfigResult::~ModifyAuditLogConfigResult()
+{}
+
+void ModifyAuditLogConfigResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+
+}
+