diff --git a/CHANGELOG b/CHANGELOG index 1a85d5a2a..b97bee45c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2018-08-22 Version: 1.23.0 +1, Add api CreateSimulatedSystemEvents, support creating one or more simulated system events. +2, Add api CancelSimulatedSystemEvents, support cancelling one or more simulated system events. + 2018-08-21 Version: 1.22.9 1, Repair describeLaunchTemplateVersions securityEnhancementStrategy type diff --git a/VERSION b/VERSION index 23e932bdf..bfbadb3a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.22.9 \ No newline at end of file +1.23.0 \ No newline at end of file diff --git a/ecs/CMakeLists.txt b/ecs/CMakeLists.txt index 7a03b132d..7a21d14b4 100644 --- a/ecs/CMakeLists.txt +++ b/ecs/CMakeLists.txt @@ -111,6 +111,8 @@ set(ecs_public_header_model include/alibabacloud/ecs/model/AddIpRangeResult.h include/alibabacloud/ecs/model/GetInstanceConsoleOutputRequest.h include/alibabacloud/ecs/model/GetInstanceConsoleOutputResult.h + include/alibabacloud/ecs/model/CreateSimulatedSystemEventsRequest.h + include/alibabacloud/ecs/model/CreateSimulatedSystemEventsResult.h include/alibabacloud/ecs/model/CancelTaskRequest.h include/alibabacloud/ecs/model/CancelTaskResult.h include/alibabacloud/ecs/model/ModifyPhysicalConnectionAttributeRequest.h @@ -159,6 +161,8 @@ set(ecs_public_header_model include/alibabacloud/ecs/model/RemoveTagsResult.h include/alibabacloud/ecs/model/ModifySecurityGroupAttributeRequest.h include/alibabacloud/ecs/model/ModifySecurityGroupAttributeResult.h + include/alibabacloud/ecs/model/CancelSimulatedSystemEventsRequest.h + include/alibabacloud/ecs/model/CancelSimulatedSystemEventsResult.h include/alibabacloud/ecs/model/ModifyInstanceAutoReleaseTimeRequest.h include/alibabacloud/ecs/model/ModifyInstanceAutoReleaseTimeResult.h include/alibabacloud/ecs/model/DeleteNatGatewayRequest.h @@ -600,6 +604,8 @@ set(ecs_src src/model/AddIpRangeResult.cc src/model/GetInstanceConsoleOutputRequest.cc src/model/GetInstanceConsoleOutputResult.cc + src/model/CreateSimulatedSystemEventsRequest.cc + src/model/CreateSimulatedSystemEventsResult.cc src/model/CancelTaskRequest.cc src/model/CancelTaskResult.cc src/model/ModifyPhysicalConnectionAttributeRequest.cc @@ -648,6 +654,8 @@ set(ecs_src src/model/RemoveTagsResult.cc src/model/ModifySecurityGroupAttributeRequest.cc src/model/ModifySecurityGroupAttributeResult.cc + src/model/CancelSimulatedSystemEventsRequest.cc + src/model/CancelSimulatedSystemEventsResult.cc src/model/ModifyInstanceAutoReleaseTimeRequest.cc src/model/ModifyInstanceAutoReleaseTimeResult.cc src/model/DeleteNatGatewayRequest.cc diff --git a/ecs/include/alibabacloud/ecs/EcsClient.h b/ecs/include/alibabacloud/ecs/EcsClient.h index f98f411f6..db027e6a0 100644 --- a/ecs/include/alibabacloud/ecs/EcsClient.h +++ b/ecs/include/alibabacloud/ecs/EcsClient.h @@ -112,6 +112,8 @@ #include "model/AddIpRangeResult.h" #include "model/GetInstanceConsoleOutputRequest.h" #include "model/GetInstanceConsoleOutputResult.h" +#include "model/CreateSimulatedSystemEventsRequest.h" +#include "model/CreateSimulatedSystemEventsResult.h" #include "model/CancelTaskRequest.h" #include "model/CancelTaskResult.h" #include "model/ModifyPhysicalConnectionAttributeRequest.h" @@ -160,6 +162,8 @@ #include "model/RemoveTagsResult.h" #include "model/ModifySecurityGroupAttributeRequest.h" #include "model/ModifySecurityGroupAttributeResult.h" +#include "model/CancelSimulatedSystemEventsRequest.h" +#include "model/CancelSimulatedSystemEventsResult.h" #include "model/ModifyInstanceAutoReleaseTimeRequest.h" #include "model/ModifyInstanceAutoReleaseTimeResult.h" #include "model/DeleteNatGatewayRequest.h" @@ -652,6 +656,9 @@ namespace AlibabaCloud typedef Outcome GetInstanceConsoleOutputOutcome; typedef std::future GetInstanceConsoleOutputOutcomeCallable; typedef std::function&)> GetInstanceConsoleOutputAsyncHandler; + typedef Outcome CreateSimulatedSystemEventsOutcome; + typedef std::future CreateSimulatedSystemEventsOutcomeCallable; + typedef std::function&)> CreateSimulatedSystemEventsAsyncHandler; typedef Outcome CancelTaskOutcome; typedef std::future CancelTaskOutcomeCallable; typedef std::function&)> CancelTaskAsyncHandler; @@ -724,6 +731,9 @@ namespace AlibabaCloud typedef Outcome ModifySecurityGroupAttributeOutcome; typedef std::future ModifySecurityGroupAttributeOutcomeCallable; typedef std::function&)> ModifySecurityGroupAttributeAsyncHandler; + typedef Outcome CancelSimulatedSystemEventsOutcome; + typedef std::future CancelSimulatedSystemEventsOutcomeCallable; + typedef std::function&)> CancelSimulatedSystemEventsAsyncHandler; typedef Outcome ModifyInstanceAutoReleaseTimeOutcome; typedef std::future ModifyInstanceAutoReleaseTimeOutcomeCallable; typedef std::function&)> ModifyInstanceAutoReleaseTimeAsyncHandler; @@ -1386,6 +1396,9 @@ namespace AlibabaCloud GetInstanceConsoleOutputOutcome getInstanceConsoleOutput(const Model::GetInstanceConsoleOutputRequest &request)const; void getInstanceConsoleOutputAsync(const Model::GetInstanceConsoleOutputRequest& request, const GetInstanceConsoleOutputAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetInstanceConsoleOutputOutcomeCallable getInstanceConsoleOutputCallable(const Model::GetInstanceConsoleOutputRequest& request) const; + CreateSimulatedSystemEventsOutcome createSimulatedSystemEvents(const Model::CreateSimulatedSystemEventsRequest &request)const; + void createSimulatedSystemEventsAsync(const Model::CreateSimulatedSystemEventsRequest& request, const CreateSimulatedSystemEventsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateSimulatedSystemEventsOutcomeCallable createSimulatedSystemEventsCallable(const Model::CreateSimulatedSystemEventsRequest& request) const; CancelTaskOutcome cancelTask(const Model::CancelTaskRequest &request)const; void cancelTaskAsync(const Model::CancelTaskRequest& request, const CancelTaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CancelTaskOutcomeCallable cancelTaskCallable(const Model::CancelTaskRequest& request) const; @@ -1458,6 +1471,9 @@ namespace AlibabaCloud ModifySecurityGroupAttributeOutcome modifySecurityGroupAttribute(const Model::ModifySecurityGroupAttributeRequest &request)const; void modifySecurityGroupAttributeAsync(const Model::ModifySecurityGroupAttributeRequest& request, const ModifySecurityGroupAttributeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifySecurityGroupAttributeOutcomeCallable modifySecurityGroupAttributeCallable(const Model::ModifySecurityGroupAttributeRequest& request) const; + CancelSimulatedSystemEventsOutcome cancelSimulatedSystemEvents(const Model::CancelSimulatedSystemEventsRequest &request)const; + void cancelSimulatedSystemEventsAsync(const Model::CancelSimulatedSystemEventsRequest& request, const CancelSimulatedSystemEventsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CancelSimulatedSystemEventsOutcomeCallable cancelSimulatedSystemEventsCallable(const Model::CancelSimulatedSystemEventsRequest& request) const; ModifyInstanceAutoReleaseTimeOutcome modifyInstanceAutoReleaseTime(const Model::ModifyInstanceAutoReleaseTimeRequest &request)const; void modifyInstanceAutoReleaseTimeAsync(const Model::ModifyInstanceAutoReleaseTimeRequest& request, const ModifyInstanceAutoReleaseTimeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyInstanceAutoReleaseTimeOutcomeCallable modifyInstanceAutoReleaseTimeCallable(const Model::ModifyInstanceAutoReleaseTimeRequest& request) const; diff --git a/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsRequest.h b/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsRequest.h new file mode 100644 index 000000000..b4bfadc0e --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsRequest.h @@ -0,0 +1,120 @@ +/* + * 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_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSREQUEST_H_ +#define ALIBABACLOUD_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT CancelSimulatedSystemEventsRequest : public RpcServiceRequest + { + + public: + CancelSimulatedSystemEventsRequest(); + ~CancelSimulatedSystemEventsRequest(); + + std::vector getEventId()const; + void setEventId(const std::vector& eventId); + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + long getCallerParentId()const; + void setCallerParentId(long callerParentId); + bool getProxy_original_security_transport()const; + void setProxy_original_security_transport(bool proxy_original_security_transport); + std::string getProxy_original_source_ip()const; + void setProxy_original_source_ip(const std::string& proxy_original_source_ip); + std::string getOwnerIdLoginEmail()const; + void setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail); + std::string getCallerType()const; + void setCallerType(const std::string& callerType); + 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 getRegionId()const; + void setRegionId(const std::string& regionId); + bool getEnable()const; + void setEnable(bool enable); + std::string getRequestContent()const; + void setRequestContent(const std::string& requestContent); + std::string getCallerBidEmail()const; + void setCallerBidEmail(const std::string& callerBidEmail); + std::string getCallerUidEmail()const; + void setCallerUidEmail(const std::string& callerUidEmail); + long getCallerUid()const; + void setCallerUid(long callerUid); + std::string getApp_ip()const; + void setApp_ip(const std::string& app_ip); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + std::string getCallerBid()const; + void setCallerBid(const std::string& callerBid); + long getOwnerId()const; + void setOwnerId(long ownerId); + bool getProxy_trust_transport_info()const; + void setProxy_trust_transport_info(bool proxy_trust_transport_info); + bool getAk_mfa_present()const; + void setAk_mfa_present(bool ak_mfa_present); + bool getSecurity_transport()const; + void setSecurity_transport(bool security_transport); + std::string getRequestId()const; + void setRequestId(const std::string& requestId); + + private: + std::vector eventId_; + long resourceOwnerId_; + long callerParentId_; + bool proxy_original_security_transport_; + std::string proxy_original_source_ip_; + std::string ownerIdLoginEmail_; + std::string callerType_; + std::string accessKeyId_; + std::string resourceGroupId_; + std::string securityToken_; + std::string regionId_; + bool enable_; + std::string requestContent_; + std::string callerBidEmail_; + std::string callerUidEmail_; + long callerUid_; + std::string app_ip_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + std::string callerBid_; + long ownerId_; + bool proxy_trust_transport_info_; + bool ak_mfa_present_; + bool security_transport_; + std::string requestId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSREQUEST_H_ \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsResult.h b/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsResult.h new file mode 100644 index 000000000..c142926f3 --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/CancelSimulatedSystemEventsResult.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_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSRESULT_H_ +#define ALIBABACLOUD_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT CancelSimulatedSystemEventsResult : public ServiceResult + { + public: + + + CancelSimulatedSystemEventsResult(); + explicit CancelSimulatedSystemEventsResult(const std::string &payload); + ~CancelSimulatedSystemEventsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_CANCELSIMULATEDSYSTEMEVENTSRESULT_H_ \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsRequest.h b/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsRequest.h new file mode 100644 index 000000000..7103dde49 --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsRequest.h @@ -0,0 +1,126 @@ +/* + * 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_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSREQUEST_H_ +#define ALIBABACLOUD_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT CreateSimulatedSystemEventsRequest : public RpcServiceRequest + { + + public: + CreateSimulatedSystemEventsRequest(); + ~CreateSimulatedSystemEventsRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getNotBefore()const; + void setNotBefore(const std::string& notBefore); + long getCallerParentId()const; + void setCallerParentId(long callerParentId); + bool getProxy_original_security_transport()const; + void setProxy_original_security_transport(bool proxy_original_security_transport); + std::string getProxy_original_source_ip()const; + void setProxy_original_source_ip(const std::string& proxy_original_source_ip); + std::string getOwnerIdLoginEmail()const; + void setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail); + std::string getCallerType()const; + void setCallerType(const std::string& callerType); + 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 getRegionId()const; + void setRegionId(const std::string& regionId); + bool getEnable()const; + void setEnable(bool enable); + std::string getRequestContent()const; + void setRequestContent(const std::string& requestContent); + std::string getCallerBidEmail()const; + void setCallerBidEmail(const std::string& callerBidEmail); + std::string getCallerUidEmail()const; + void setCallerUidEmail(const std::string& callerUidEmail); + long getCallerUid()const; + void setCallerUid(long callerUid); + std::string getApp_ip()const; + void setApp_ip(const std::string& app_ip); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + std::string getCallerBid()const; + void setCallerBid(const std::string& callerBid); + long getOwnerId()const; + void setOwnerId(long ownerId); + bool getProxy_trust_transport_info()const; + void setProxy_trust_transport_info(bool proxy_trust_transport_info); + bool getAk_mfa_present()const; + void setAk_mfa_present(bool ak_mfa_present); + bool getSecurity_transport()const; + void setSecurity_transport(bool security_transport); + std::vector getInstanceId()const; + void setInstanceId(const std::vector& instanceId); + std::string getRequestId()const; + void setRequestId(const std::string& requestId); + std::string getEventType()const; + void setEventType(const std::string& eventType); + + private: + long resourceOwnerId_; + std::string notBefore_; + long callerParentId_; + bool proxy_original_security_transport_; + std::string proxy_original_source_ip_; + std::string ownerIdLoginEmail_; + std::string callerType_; + std::string accessKeyId_; + std::string resourceGroupId_; + std::string securityToken_; + std::string regionId_; + bool enable_; + std::string requestContent_; + std::string callerBidEmail_; + std::string callerUidEmail_; + long callerUid_; + std::string app_ip_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + std::string callerBid_; + long ownerId_; + bool proxy_trust_transport_info_; + bool ak_mfa_present_; + bool security_transport_; + std::vector instanceId_; + std::string requestId_; + std::string eventType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSREQUEST_H_ \ No newline at end of file diff --git a/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsResult.h b/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsResult.h new file mode 100644 index 000000000..b7351dad8 --- /dev/null +++ b/ecs/include/alibabacloud/ecs/model/CreateSimulatedSystemEventsResult.h @@ -0,0 +1,51 @@ +/* + * 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_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSRESULT_H_ +#define ALIBABACLOUD_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ecs + { + namespace Model + { + class ALIBABACLOUD_ECS_EXPORT CreateSimulatedSystemEventsResult : public ServiceResult + { + public: + + + CreateSimulatedSystemEventsResult(); + explicit CreateSimulatedSystemEventsResult(const std::string &payload); + ~CreateSimulatedSystemEventsResult(); + std::vector getEventIdSet()const; + + protected: + void parse(const std::string &payload); + private: + std::vector eventIdSet_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ECS_MODEL_CREATESIMULATEDSYSTEMEVENTSRESULT_H_ \ No newline at end of file diff --git a/ecs/src/EcsClient.cc b/ecs/src/EcsClient.cc index 1315e6087..59c857265 100644 --- a/ecs/src/EcsClient.cc +++ b/ecs/src/EcsClient.cc @@ -1671,6 +1671,42 @@ EcsClient::GetInstanceConsoleOutputOutcomeCallable EcsClient::getInstanceConsole return task->get_future(); } +EcsClient::CreateSimulatedSystemEventsOutcome EcsClient::createSimulatedSystemEvents(const CreateSimulatedSystemEventsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateSimulatedSystemEventsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateSimulatedSystemEventsOutcome(CreateSimulatedSystemEventsResult(outcome.result())); + else + return CreateSimulatedSystemEventsOutcome(outcome.error()); +} + +void EcsClient::createSimulatedSystemEventsAsync(const CreateSimulatedSystemEventsRequest& request, const CreateSimulatedSystemEventsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createSimulatedSystemEvents(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EcsClient::CreateSimulatedSystemEventsOutcomeCallable EcsClient::createSimulatedSystemEventsCallable(const CreateSimulatedSystemEventsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createSimulatedSystemEvents(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EcsClient::CancelTaskOutcome EcsClient::cancelTask(const CancelTaskRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2535,6 +2571,42 @@ EcsClient::ModifySecurityGroupAttributeOutcomeCallable EcsClient::modifySecurity return task->get_future(); } +EcsClient::CancelSimulatedSystemEventsOutcome EcsClient::cancelSimulatedSystemEvents(const CancelSimulatedSystemEventsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CancelSimulatedSystemEventsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CancelSimulatedSystemEventsOutcome(CancelSimulatedSystemEventsResult(outcome.result())); + else + return CancelSimulatedSystemEventsOutcome(outcome.error()); +} + +void EcsClient::cancelSimulatedSystemEventsAsync(const CancelSimulatedSystemEventsRequest& request, const CancelSimulatedSystemEventsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, cancelSimulatedSystemEvents(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EcsClient::CancelSimulatedSystemEventsOutcomeCallable EcsClient::cancelSimulatedSystemEventsCallable(const CancelSimulatedSystemEventsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->cancelSimulatedSystemEvents(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EcsClient::ModifyInstanceAutoReleaseTimeOutcome EcsClient::modifyInstanceAutoReleaseTime(const ModifyInstanceAutoReleaseTimeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ecs/src/model/CancelSimulatedSystemEventsRequest.cc b/ecs/src/model/CancelSimulatedSystemEventsRequest.cc new file mode 100644 index 000000000..9a60c201f --- /dev/null +++ b/ecs/src/model/CancelSimulatedSystemEventsRequest.cc @@ -0,0 +1,303 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ecs::Model::CancelSimulatedSystemEventsRequest; + +CancelSimulatedSystemEventsRequest::CancelSimulatedSystemEventsRequest() : + RpcServiceRequest("ecs", "2014-05-26", "CancelSimulatedSystemEvents") +{} + +CancelSimulatedSystemEventsRequest::~CancelSimulatedSystemEventsRequest() +{} + +std::vector CancelSimulatedSystemEventsRequest::getEventId()const +{ + return eventId_; +} + +void CancelSimulatedSystemEventsRequest::setEventId(const std::vector& eventId) +{ + eventId_ = eventId; + for(int i = 0; i!= eventId.size(); i++) + setParameter("EventId."+ std::to_string(i), eventId.at(i)); +} + +long CancelSimulatedSystemEventsRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void CancelSimulatedSystemEventsRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +long CancelSimulatedSystemEventsRequest::getCallerParentId()const +{ + return callerParentId_; +} + +void CancelSimulatedSystemEventsRequest::setCallerParentId(long callerParentId) +{ + callerParentId_ = callerParentId; + setParameter("CallerParentId", std::to_string(callerParentId)); +} + +bool CancelSimulatedSystemEventsRequest::getProxy_original_security_transport()const +{ + return proxy_original_security_transport_; +} + +void CancelSimulatedSystemEventsRequest::setProxy_original_security_transport(bool proxy_original_security_transport) +{ + proxy_original_security_transport_ = proxy_original_security_transport; + setParameter("Proxy_original_security_transport", std::to_string(proxy_original_security_transport)); +} + +std::string CancelSimulatedSystemEventsRequest::getProxy_original_source_ip()const +{ + return proxy_original_source_ip_; +} + +void CancelSimulatedSystemEventsRequest::setProxy_original_source_ip(const std::string& proxy_original_source_ip) +{ + proxy_original_source_ip_ = proxy_original_source_ip; + setParameter("Proxy_original_source_ip", proxy_original_source_ip); +} + +std::string CancelSimulatedSystemEventsRequest::getOwnerIdLoginEmail()const +{ + return ownerIdLoginEmail_; +} + +void CancelSimulatedSystemEventsRequest::setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail) +{ + ownerIdLoginEmail_ = ownerIdLoginEmail; + setParameter("OwnerIdLoginEmail", ownerIdLoginEmail); +} + +std::string CancelSimulatedSystemEventsRequest::getCallerType()const +{ + return callerType_; +} + +void CancelSimulatedSystemEventsRequest::setCallerType(const std::string& callerType) +{ + callerType_ = callerType; + setParameter("CallerType", callerType); +} + +std::string CancelSimulatedSystemEventsRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void CancelSimulatedSystemEventsRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string CancelSimulatedSystemEventsRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void CancelSimulatedSystemEventsRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string CancelSimulatedSystemEventsRequest::getSecurityToken()const +{ + return securityToken_; +} + +void CancelSimulatedSystemEventsRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string CancelSimulatedSystemEventsRequest::getRegionId()const +{ + return regionId_; +} + +void CancelSimulatedSystemEventsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +bool CancelSimulatedSystemEventsRequest::getEnable()const +{ + return enable_; +} + +void CancelSimulatedSystemEventsRequest::setEnable(bool enable) +{ + enable_ = enable; + setParameter("Enable", std::to_string(enable)); +} + +std::string CancelSimulatedSystemEventsRequest::getRequestContent()const +{ + return requestContent_; +} + +void CancelSimulatedSystemEventsRequest::setRequestContent(const std::string& requestContent) +{ + requestContent_ = requestContent; + setParameter("RequestContent", requestContent); +} + +std::string CancelSimulatedSystemEventsRequest::getCallerBidEmail()const +{ + return callerBidEmail_; +} + +void CancelSimulatedSystemEventsRequest::setCallerBidEmail(const std::string& callerBidEmail) +{ + callerBidEmail_ = callerBidEmail; + setParameter("CallerBidEmail", callerBidEmail); +} + +std::string CancelSimulatedSystemEventsRequest::getCallerUidEmail()const +{ + return callerUidEmail_; +} + +void CancelSimulatedSystemEventsRequest::setCallerUidEmail(const std::string& callerUidEmail) +{ + callerUidEmail_ = callerUidEmail; + setParameter("CallerUidEmail", callerUidEmail); +} + +long CancelSimulatedSystemEventsRequest::getCallerUid()const +{ + return callerUid_; +} + +void CancelSimulatedSystemEventsRequest::setCallerUid(long callerUid) +{ + callerUid_ = callerUid; + setParameter("CallerUid", std::to_string(callerUid)); +} + +std::string CancelSimulatedSystemEventsRequest::getApp_ip()const +{ + return app_ip_; +} + +void CancelSimulatedSystemEventsRequest::setApp_ip(const std::string& app_ip) +{ + app_ip_ = app_ip; + setParameter("App_ip", app_ip); +} + +std::string CancelSimulatedSystemEventsRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void CancelSimulatedSystemEventsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string CancelSimulatedSystemEventsRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void CancelSimulatedSystemEventsRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +std::string CancelSimulatedSystemEventsRequest::getCallerBid()const +{ + return callerBid_; +} + +void CancelSimulatedSystemEventsRequest::setCallerBid(const std::string& callerBid) +{ + callerBid_ = callerBid; + setParameter("CallerBid", callerBid); +} + +long CancelSimulatedSystemEventsRequest::getOwnerId()const +{ + return ownerId_; +} + +void CancelSimulatedSystemEventsRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +bool CancelSimulatedSystemEventsRequest::getProxy_trust_transport_info()const +{ + return proxy_trust_transport_info_; +} + +void CancelSimulatedSystemEventsRequest::setProxy_trust_transport_info(bool proxy_trust_transport_info) +{ + proxy_trust_transport_info_ = proxy_trust_transport_info; + setParameter("Proxy_trust_transport_info", std::to_string(proxy_trust_transport_info)); +} + +bool CancelSimulatedSystemEventsRequest::getAk_mfa_present()const +{ + return ak_mfa_present_; +} + +void CancelSimulatedSystemEventsRequest::setAk_mfa_present(bool ak_mfa_present) +{ + ak_mfa_present_ = ak_mfa_present; + setParameter("Ak_mfa_present", std::to_string(ak_mfa_present)); +} + +bool CancelSimulatedSystemEventsRequest::getSecurity_transport()const +{ + return security_transport_; +} + +void CancelSimulatedSystemEventsRequest::setSecurity_transport(bool security_transport) +{ + security_transport_ = security_transport; + setParameter("Security_transport", std::to_string(security_transport)); +} + +std::string CancelSimulatedSystemEventsRequest::getRequestId()const +{ + return requestId_; +} + +void CancelSimulatedSystemEventsRequest::setRequestId(const std::string& requestId) +{ + requestId_ = requestId; + setParameter("RequestId", requestId); +} + diff --git a/ecs/src/model/CancelSimulatedSystemEventsResult.cc b/ecs/src/model/CancelSimulatedSystemEventsResult.cc new file mode 100644 index 000000000..e6efa79ca --- /dev/null +++ b/ecs/src/model/CancelSimulatedSystemEventsResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Ecs; +using namespace AlibabaCloud::Ecs::Model; + +CancelSimulatedSystemEventsResult::CancelSimulatedSystemEventsResult() : + ServiceResult() +{} + +CancelSimulatedSystemEventsResult::CancelSimulatedSystemEventsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CancelSimulatedSystemEventsResult::~CancelSimulatedSystemEventsResult() +{} + +void CancelSimulatedSystemEventsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ecs/src/model/CreateSimulatedSystemEventsRequest.cc b/ecs/src/model/CreateSimulatedSystemEventsRequest.cc new file mode 100644 index 000000000..188d6135b --- /dev/null +++ b/ecs/src/model/CreateSimulatedSystemEventsRequest.cc @@ -0,0 +1,325 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ecs::Model::CreateSimulatedSystemEventsRequest; + +CreateSimulatedSystemEventsRequest::CreateSimulatedSystemEventsRequest() : + RpcServiceRequest("ecs", "2014-05-26", "CreateSimulatedSystemEvents") +{} + +CreateSimulatedSystemEventsRequest::~CreateSimulatedSystemEventsRequest() +{} + +long CreateSimulatedSystemEventsRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void CreateSimulatedSystemEventsRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string CreateSimulatedSystemEventsRequest::getNotBefore()const +{ + return notBefore_; +} + +void CreateSimulatedSystemEventsRequest::setNotBefore(const std::string& notBefore) +{ + notBefore_ = notBefore; + setParameter("NotBefore", notBefore); +} + +long CreateSimulatedSystemEventsRequest::getCallerParentId()const +{ + return callerParentId_; +} + +void CreateSimulatedSystemEventsRequest::setCallerParentId(long callerParentId) +{ + callerParentId_ = callerParentId; + setParameter("CallerParentId", std::to_string(callerParentId)); +} + +bool CreateSimulatedSystemEventsRequest::getProxy_original_security_transport()const +{ + return proxy_original_security_transport_; +} + +void CreateSimulatedSystemEventsRequest::setProxy_original_security_transport(bool proxy_original_security_transport) +{ + proxy_original_security_transport_ = proxy_original_security_transport; + setParameter("Proxy_original_security_transport", std::to_string(proxy_original_security_transport)); +} + +std::string CreateSimulatedSystemEventsRequest::getProxy_original_source_ip()const +{ + return proxy_original_source_ip_; +} + +void CreateSimulatedSystemEventsRequest::setProxy_original_source_ip(const std::string& proxy_original_source_ip) +{ + proxy_original_source_ip_ = proxy_original_source_ip; + setParameter("Proxy_original_source_ip", proxy_original_source_ip); +} + +std::string CreateSimulatedSystemEventsRequest::getOwnerIdLoginEmail()const +{ + return ownerIdLoginEmail_; +} + +void CreateSimulatedSystemEventsRequest::setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail) +{ + ownerIdLoginEmail_ = ownerIdLoginEmail; + setParameter("OwnerIdLoginEmail", ownerIdLoginEmail); +} + +std::string CreateSimulatedSystemEventsRequest::getCallerType()const +{ + return callerType_; +} + +void CreateSimulatedSystemEventsRequest::setCallerType(const std::string& callerType) +{ + callerType_ = callerType; + setParameter("CallerType", callerType); +} + +std::string CreateSimulatedSystemEventsRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void CreateSimulatedSystemEventsRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string CreateSimulatedSystemEventsRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void CreateSimulatedSystemEventsRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string CreateSimulatedSystemEventsRequest::getSecurityToken()const +{ + return securityToken_; +} + +void CreateSimulatedSystemEventsRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string CreateSimulatedSystemEventsRequest::getRegionId()const +{ + return regionId_; +} + +void CreateSimulatedSystemEventsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +bool CreateSimulatedSystemEventsRequest::getEnable()const +{ + return enable_; +} + +void CreateSimulatedSystemEventsRequest::setEnable(bool enable) +{ + enable_ = enable; + setParameter("Enable", std::to_string(enable)); +} + +std::string CreateSimulatedSystemEventsRequest::getRequestContent()const +{ + return requestContent_; +} + +void CreateSimulatedSystemEventsRequest::setRequestContent(const std::string& requestContent) +{ + requestContent_ = requestContent; + setParameter("RequestContent", requestContent); +} + +std::string CreateSimulatedSystemEventsRequest::getCallerBidEmail()const +{ + return callerBidEmail_; +} + +void CreateSimulatedSystemEventsRequest::setCallerBidEmail(const std::string& callerBidEmail) +{ + callerBidEmail_ = callerBidEmail; + setParameter("CallerBidEmail", callerBidEmail); +} + +std::string CreateSimulatedSystemEventsRequest::getCallerUidEmail()const +{ + return callerUidEmail_; +} + +void CreateSimulatedSystemEventsRequest::setCallerUidEmail(const std::string& callerUidEmail) +{ + callerUidEmail_ = callerUidEmail; + setParameter("CallerUidEmail", callerUidEmail); +} + +long CreateSimulatedSystemEventsRequest::getCallerUid()const +{ + return callerUid_; +} + +void CreateSimulatedSystemEventsRequest::setCallerUid(long callerUid) +{ + callerUid_ = callerUid; + setParameter("CallerUid", std::to_string(callerUid)); +} + +std::string CreateSimulatedSystemEventsRequest::getApp_ip()const +{ + return app_ip_; +} + +void CreateSimulatedSystemEventsRequest::setApp_ip(const std::string& app_ip) +{ + app_ip_ = app_ip; + setParameter("App_ip", app_ip); +} + +std::string CreateSimulatedSystemEventsRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void CreateSimulatedSystemEventsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string CreateSimulatedSystemEventsRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void CreateSimulatedSystemEventsRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +std::string CreateSimulatedSystemEventsRequest::getCallerBid()const +{ + return callerBid_; +} + +void CreateSimulatedSystemEventsRequest::setCallerBid(const std::string& callerBid) +{ + callerBid_ = callerBid; + setParameter("CallerBid", callerBid); +} + +long CreateSimulatedSystemEventsRequest::getOwnerId()const +{ + return ownerId_; +} + +void CreateSimulatedSystemEventsRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +bool CreateSimulatedSystemEventsRequest::getProxy_trust_transport_info()const +{ + return proxy_trust_transport_info_; +} + +void CreateSimulatedSystemEventsRequest::setProxy_trust_transport_info(bool proxy_trust_transport_info) +{ + proxy_trust_transport_info_ = proxy_trust_transport_info; + setParameter("Proxy_trust_transport_info", std::to_string(proxy_trust_transport_info)); +} + +bool CreateSimulatedSystemEventsRequest::getAk_mfa_present()const +{ + return ak_mfa_present_; +} + +void CreateSimulatedSystemEventsRequest::setAk_mfa_present(bool ak_mfa_present) +{ + ak_mfa_present_ = ak_mfa_present; + setParameter("Ak_mfa_present", std::to_string(ak_mfa_present)); +} + +bool CreateSimulatedSystemEventsRequest::getSecurity_transport()const +{ + return security_transport_; +} + +void CreateSimulatedSystemEventsRequest::setSecurity_transport(bool security_transport) +{ + security_transport_ = security_transport; + setParameter("Security_transport", std::to_string(security_transport)); +} + +std::vector CreateSimulatedSystemEventsRequest::getInstanceId()const +{ + return instanceId_; +} + +void CreateSimulatedSystemEventsRequest::setInstanceId(const std::vector& instanceId) +{ + instanceId_ = instanceId; + for(int i = 0; i!= instanceId.size(); i++) + setParameter("InstanceId."+ std::to_string(i), instanceId.at(i)); +} + +std::string CreateSimulatedSystemEventsRequest::getRequestId()const +{ + return requestId_; +} + +void CreateSimulatedSystemEventsRequest::setRequestId(const std::string& requestId) +{ + requestId_ = requestId; + setParameter("RequestId", requestId); +} + +std::string CreateSimulatedSystemEventsRequest::getEventType()const +{ + return eventType_; +} + +void CreateSimulatedSystemEventsRequest::setEventType(const std::string& eventType) +{ + eventType_ = eventType; + setParameter("EventType", eventType); +} + diff --git a/ecs/src/model/CreateSimulatedSystemEventsResult.cc b/ecs/src/model/CreateSimulatedSystemEventsResult.cc new file mode 100644 index 000000000..24e4cdeae --- /dev/null +++ b/ecs/src/model/CreateSimulatedSystemEventsResult.cc @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ecs; +using namespace AlibabaCloud::Ecs::Model; + +CreateSimulatedSystemEventsResult::CreateSimulatedSystemEventsResult() : + ServiceResult() +{} + +CreateSimulatedSystemEventsResult::CreateSimulatedSystemEventsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateSimulatedSystemEventsResult::~CreateSimulatedSystemEventsResult() +{} + +void CreateSimulatedSystemEventsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allEventIdSet = value["EventIdSet"]["EventId"]; + for (const auto &item : allEventIdSet) + eventIdSet_.push_back(item.asString()); + +} + +std::vector CreateSimulatedSystemEventsResult::getEventIdSet()const +{ + return eventIdSet_; +} +