ESS SDK Auto Released By kangning.tkn,Version:1.19.3
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
BIN
ess/.DS_Store
vendored
BIN
ess/.DS_Store
vendored
Binary file not shown.
@@ -95,6 +95,8 @@ set(ess_public_header_model
|
||||
include/alibabacloud/ess/model/CreateScalingConfigurationResult.h
|
||||
include/alibabacloud/ess/model/DescribeRegionsRequest.h
|
||||
include/alibabacloud/ess/model/DescribeRegionsResult.h
|
||||
include/alibabacloud/ess/model/DetachDBInstancesRequest.h
|
||||
include/alibabacloud/ess/model/DetachDBInstancesResult.h
|
||||
include/alibabacloud/ess/model/SetInstancesProtectionRequest.h
|
||||
include/alibabacloud/ess/model/SetInstancesProtectionResult.h
|
||||
include/alibabacloud/ess/model/AttachLoadBalancersRequest.h
|
||||
@@ -119,6 +121,8 @@ set(ess_public_header_model
|
||||
include/alibabacloud/ess/model/ModifyScalingRuleResult.h
|
||||
include/alibabacloud/ess/model/DeleteScalingRuleRequest.h
|
||||
include/alibabacloud/ess/model/DeleteScalingRuleResult.h
|
||||
include/alibabacloud/ess/model/AttachDBInstancesRequest.h
|
||||
include/alibabacloud/ess/model/AttachDBInstancesResult.h
|
||||
include/alibabacloud/ess/model/CreateLifecycleHookRequest.h
|
||||
include/alibabacloud/ess/model/CreateLifecycleHookResult.h
|
||||
include/alibabacloud/ess/model/ModifyAlertConfigRequest.h
|
||||
@@ -200,6 +204,8 @@ set(ess_src
|
||||
src/model/CreateScalingConfigurationResult.cc
|
||||
src/model/DescribeRegionsRequest.cc
|
||||
src/model/DescribeRegionsResult.cc
|
||||
src/model/DetachDBInstancesRequest.cc
|
||||
src/model/DetachDBInstancesResult.cc
|
||||
src/model/SetInstancesProtectionRequest.cc
|
||||
src/model/SetInstancesProtectionResult.cc
|
||||
src/model/AttachLoadBalancersRequest.cc
|
||||
@@ -224,6 +230,8 @@ set(ess_src
|
||||
src/model/ModifyScalingRuleResult.cc
|
||||
src/model/DeleteScalingRuleRequest.cc
|
||||
src/model/DeleteScalingRuleResult.cc
|
||||
src/model/AttachDBInstancesRequest.cc
|
||||
src/model/AttachDBInstancesResult.cc
|
||||
src/model/CreateLifecycleHookRequest.cc
|
||||
src/model/CreateLifecycleHookResult.cc
|
||||
src/model/ModifyAlertConfigRequest.cc
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
#include "model/CreateScalingConfigurationResult.h"
|
||||
#include "model/DescribeRegionsRequest.h"
|
||||
#include "model/DescribeRegionsResult.h"
|
||||
#include "model/DetachDBInstancesRequest.h"
|
||||
#include "model/DetachDBInstancesResult.h"
|
||||
#include "model/SetInstancesProtectionRequest.h"
|
||||
#include "model/SetInstancesProtectionResult.h"
|
||||
#include "model/AttachLoadBalancersRequest.h"
|
||||
@@ -120,6 +122,8 @@
|
||||
#include "model/ModifyScalingRuleResult.h"
|
||||
#include "model/DeleteScalingRuleRequest.h"
|
||||
#include "model/DeleteScalingRuleResult.h"
|
||||
#include "model/AttachDBInstancesRequest.h"
|
||||
#include "model/AttachDBInstancesResult.h"
|
||||
#include "model/CreateLifecycleHookRequest.h"
|
||||
#include "model/CreateLifecycleHookResult.h"
|
||||
#include "model/ModifyAlertConfigRequest.h"
|
||||
@@ -244,6 +248,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeRegionsResult> DescribeRegionsOutcome;
|
||||
typedef std::future<DescribeRegionsOutcome> DescribeRegionsOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::DescribeRegionsRequest&, const DescribeRegionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetachDBInstancesResult> DetachDBInstancesOutcome;
|
||||
typedef std::future<DetachDBInstancesOutcome> DetachDBInstancesOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::DetachDBInstancesRequest&, const DetachDBInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetachDBInstancesAsyncHandler;
|
||||
typedef Outcome<Error, Model::SetInstancesProtectionResult> SetInstancesProtectionOutcome;
|
||||
typedef std::future<SetInstancesProtectionOutcome> SetInstancesProtectionOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::SetInstancesProtectionRequest&, const SetInstancesProtectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetInstancesProtectionAsyncHandler;
|
||||
@@ -280,6 +287,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DeleteScalingRuleResult> DeleteScalingRuleOutcome;
|
||||
typedef std::future<DeleteScalingRuleOutcome> DeleteScalingRuleOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::DeleteScalingRuleRequest&, const DeleteScalingRuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteScalingRuleAsyncHandler;
|
||||
typedef Outcome<Error, Model::AttachDBInstancesResult> AttachDBInstancesOutcome;
|
||||
typedef std::future<AttachDBInstancesOutcome> AttachDBInstancesOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::AttachDBInstancesRequest&, const AttachDBInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AttachDBInstancesAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateLifecycleHookResult> CreateLifecycleHookOutcome;
|
||||
typedef std::future<CreateLifecycleHookOutcome> CreateLifecycleHookOutcomeCallable;
|
||||
typedef std::function<void(const EssClient*, const Model::CreateLifecycleHookRequest&, const CreateLifecycleHookOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateLifecycleHookAsyncHandler;
|
||||
@@ -402,6 +412,9 @@ namespace AlibabaCloud
|
||||
DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const;
|
||||
void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const;
|
||||
DetachDBInstancesOutcome detachDBInstances(const Model::DetachDBInstancesRequest &request)const;
|
||||
void detachDBInstancesAsync(const Model::DetachDBInstancesRequest& request, const DetachDBInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetachDBInstancesOutcomeCallable detachDBInstancesCallable(const Model::DetachDBInstancesRequest& request) const;
|
||||
SetInstancesProtectionOutcome setInstancesProtection(const Model::SetInstancesProtectionRequest &request)const;
|
||||
void setInstancesProtectionAsync(const Model::SetInstancesProtectionRequest& request, const SetInstancesProtectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SetInstancesProtectionOutcomeCallable setInstancesProtectionCallable(const Model::SetInstancesProtectionRequest& request) const;
|
||||
@@ -438,6 +451,9 @@ namespace AlibabaCloud
|
||||
DeleteScalingRuleOutcome deleteScalingRule(const Model::DeleteScalingRuleRequest &request)const;
|
||||
void deleteScalingRuleAsync(const Model::DeleteScalingRuleRequest& request, const DeleteScalingRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteScalingRuleOutcomeCallable deleteScalingRuleCallable(const Model::DeleteScalingRuleRequest& request) const;
|
||||
AttachDBInstancesOutcome attachDBInstances(const Model::AttachDBInstancesRequest &request)const;
|
||||
void attachDBInstancesAsync(const Model::AttachDBInstancesRequest& request, const AttachDBInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AttachDBInstancesOutcomeCallable attachDBInstancesCallable(const Model::AttachDBInstancesRequest& request) const;
|
||||
CreateLifecycleHookOutcome createLifecycleHook(const Model::CreateLifecycleHookRequest &request)const;
|
||||
void createLifecycleHookAsync(const Model::CreateLifecycleHookRequest& request, const CreateLifecycleHookAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateLifecycleHookOutcomeCallable createLifecycleHookCallable(const Model::CreateLifecycleHookRequest& request) const;
|
||||
|
||||
63
ess/include/alibabacloud/ess/model/AttachDBInstancesRequest.h
Executable file
63
ess/include/alibabacloud/ess/model/AttachDBInstancesRequest.h
Executable file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ESS_MODEL_ATTACHDBINSTANCESREQUEST_H_
|
||||
#define ALIBABACLOUD_ESS_MODEL_ATTACHDBINSTANCESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ess/EssExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ess
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ESS_EXPORT AttachDBInstancesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AttachDBInstancesRequest();
|
||||
~AttachDBInstancesRequest();
|
||||
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getScalingGroupId()const;
|
||||
void setScalingGroupId(const std::string& scalingGroupId);
|
||||
bool getForceAttach()const;
|
||||
void setForceAttach(bool forceAttach);
|
||||
std::vector<std::string> getDBInstance()const;
|
||||
void setDBInstance(const std::vector<std::string>& dBInstance);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
|
||||
private:
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string scalingGroupId_;
|
||||
bool forceAttach_;
|
||||
std::vector<std::string> dBInstance_;
|
||||
long ownerId_;
|
||||
std::string accessKeyId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ESS_MODEL_ATTACHDBINSTANCESREQUEST_H_
|
||||
49
ess/include/alibabacloud/ess/model/AttachDBInstancesResult.h
Executable file
49
ess/include/alibabacloud/ess/model/AttachDBInstancesResult.h
Executable 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_ESS_MODEL_ATTACHDBINSTANCESRESULT_H_
|
||||
#define ALIBABACLOUD_ESS_MODEL_ATTACHDBINSTANCESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ess/EssExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ess
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ESS_EXPORT AttachDBInstancesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AttachDBInstancesResult();
|
||||
explicit AttachDBInstancesResult(const std::string &payload);
|
||||
~AttachDBInstancesResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ESS_MODEL_ATTACHDBINSTANCESRESULT_H_
|
||||
63
ess/include/alibabacloud/ess/model/DetachDBInstancesRequest.h
Executable file
63
ess/include/alibabacloud/ess/model/DetachDBInstancesRequest.h
Executable file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ESS_MODEL_DETACHDBINSTANCESREQUEST_H_
|
||||
#define ALIBABACLOUD_ESS_MODEL_DETACHDBINSTANCESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ess/EssExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ess
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ESS_EXPORT DetachDBInstancesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DetachDBInstancesRequest();
|
||||
~DetachDBInstancesRequest();
|
||||
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getScalingGroupId()const;
|
||||
void setScalingGroupId(const std::string& scalingGroupId);
|
||||
std::vector<std::string> getDBInstance()const;
|
||||
void setDBInstance(const std::vector<std::string>& dBInstance);
|
||||
bool getForceDetach()const;
|
||||
void setForceDetach(bool forceDetach);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
|
||||
private:
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string scalingGroupId_;
|
||||
std::vector<std::string> dBInstance_;
|
||||
bool forceDetach_;
|
||||
long ownerId_;
|
||||
std::string accessKeyId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ESS_MODEL_DETACHDBINSTANCESREQUEST_H_
|
||||
49
ess/include/alibabacloud/ess/model/DetachDBInstancesResult.h
Executable file
49
ess/include/alibabacloud/ess/model/DetachDBInstancesResult.h
Executable 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_ESS_MODEL_DETACHDBINSTANCESRESULT_H_
|
||||
#define ALIBABACLOUD_ESS_MODEL_DETACHDBINSTANCESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ess/EssExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ess
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ESS_EXPORT DetachDBInstancesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DetachDBInstancesResult();
|
||||
explicit DetachDBInstancesResult(const std::string &payload);
|
||||
~DetachDBInstancesResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ESS_MODEL_DETACHDBINSTANCESRESULT_H_
|
||||
BIN
ess/src/.DS_Store
vendored
BIN
ess/src/.DS_Store
vendored
Binary file not shown.
@@ -31,21 +31,21 @@ EssClient::EssClient(const Credentials &credentials, const ClientConfiguration &
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ESS");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ess");
|
||||
}
|
||||
|
||||
EssClient::EssClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ESS");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ess");
|
||||
}
|
||||
|
||||
EssClient::EssClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ESS");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ess");
|
||||
}
|
||||
|
||||
EssClient::~EssClient()
|
||||
@@ -1383,6 +1383,42 @@ EssClient::DescribeRegionsOutcomeCallable EssClient::describeRegionsCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DetachDBInstancesOutcome EssClient::detachDBInstances(const DetachDBInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DetachDBInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DetachDBInstancesOutcome(DetachDBInstancesResult(outcome.result()));
|
||||
else
|
||||
return DetachDBInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::detachDBInstancesAsync(const DetachDBInstancesRequest& request, const DetachDBInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, detachDBInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::DetachDBInstancesOutcomeCallable EssClient::detachDBInstancesCallable(const DetachDBInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DetachDBInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->detachDBInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::SetInstancesProtectionOutcome EssClient::setInstancesProtection(const SetInstancesProtectionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1815,6 +1851,42 @@ EssClient::DeleteScalingRuleOutcomeCallable EssClient::deleteScalingRuleCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::AttachDBInstancesOutcome EssClient::attachDBInstances(const AttachDBInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AttachDBInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AttachDBInstancesOutcome(AttachDBInstancesResult(outcome.result()));
|
||||
else
|
||||
return AttachDBInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::attachDBInstancesAsync(const AttachDBInstancesRequest& request, const AttachDBInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, attachDBInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::AttachDBInstancesOutcomeCallable EssClient::attachDBInstancesCallable(const AttachDBInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AttachDBInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->attachDBInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::CreateLifecycleHookOutcome EssClient::createLifecycleHook(const CreateLifecycleHookRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
94
ess/src/model/AttachDBInstancesRequest.cc
Executable file
94
ess/src/model/AttachDBInstancesRequest.cc
Executable file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/ess/model/AttachDBInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::AttachDBInstancesRequest;
|
||||
|
||||
AttachDBInstancesRequest::AttachDBInstancesRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "AttachDBInstances")
|
||||
{}
|
||||
|
||||
AttachDBInstancesRequest::~AttachDBInstancesRequest()
|
||||
{}
|
||||
|
||||
std::string AttachDBInstancesRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string AttachDBInstancesRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
bool AttachDBInstancesRequest::getForceAttach()const
|
||||
{
|
||||
return forceAttach_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setForceAttach(bool forceAttach)
|
||||
{
|
||||
forceAttach_ = forceAttach;
|
||||
setParameter("ForceAttach", std::to_string(forceAttach));
|
||||
}
|
||||
|
||||
std::vector<std::string> AttachDBInstancesRequest::getDBInstance()const
|
||||
{
|
||||
return dBInstance_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setDBInstance(const std::vector<std::string>& dBInstance)
|
||||
{
|
||||
dBInstance_ = dBInstance;
|
||||
for(int i = 0; i!= dBInstance.size(); i++)
|
||||
setParameter("DBInstance."+ std::to_string(i), dBInstance.at(i));
|
||||
}
|
||||
|
||||
long AttachDBInstancesRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string AttachDBInstancesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void AttachDBInstancesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
45
ess/src/model/AttachDBInstancesResult.cc
Executable file
45
ess/src/model/AttachDBInstancesResult.cc
Executable 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/ess/model/AttachDBInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
AttachDBInstancesResult::AttachDBInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AttachDBInstancesResult::AttachDBInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AttachDBInstancesResult::~AttachDBInstancesResult()
|
||||
{}
|
||||
|
||||
void AttachDBInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
94
ess/src/model/DetachDBInstancesRequest.cc
Executable file
94
ess/src/model/DetachDBInstancesRequest.cc
Executable file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/ess/model/DetachDBInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::DetachDBInstancesRequest;
|
||||
|
||||
DetachDBInstancesRequest::DetachDBInstancesRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "DetachDBInstances")
|
||||
{}
|
||||
|
||||
DetachDBInstancesRequest::~DetachDBInstancesRequest()
|
||||
{}
|
||||
|
||||
std::string DetachDBInstancesRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DetachDBInstancesRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
std::vector<std::string> DetachDBInstancesRequest::getDBInstance()const
|
||||
{
|
||||
return dBInstance_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setDBInstance(const std::vector<std::string>& dBInstance)
|
||||
{
|
||||
dBInstance_ = dBInstance;
|
||||
for(int i = 0; i!= dBInstance.size(); i++)
|
||||
setParameter("DBInstance."+ std::to_string(i), dBInstance.at(i));
|
||||
}
|
||||
|
||||
bool DetachDBInstancesRequest::getForceDetach()const
|
||||
{
|
||||
return forceDetach_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setForceDetach(bool forceDetach)
|
||||
{
|
||||
forceDetach_ = forceDetach;
|
||||
setParameter("ForceDetach", std::to_string(forceDetach));
|
||||
}
|
||||
|
||||
long DetachDBInstancesRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DetachDBInstancesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DetachDBInstancesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
45
ess/src/model/DetachDBInstancesResult.cc
Executable file
45
ess/src/model/DetachDBInstancesResult.cc
Executable 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/ess/model/DetachDBInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
DetachDBInstancesResult::DetachDBInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetachDBInstancesResult::DetachDBInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetachDBInstancesResult::~DetachDBInstancesResult()
|
||||
{}
|
||||
|
||||
void DetachDBInstancesResult::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