由武进发起的ESS SDK自动发布, 版本号:1.8.1
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
BIN
ess/src/.DS_Store
vendored
Normal file
BIN
ess/src/.DS_Store
vendored
Normal file
Binary file not shown.
184
ess/src/EssClient.cc
Normal file → Executable file
184
ess/src/EssClient.cc
Normal file → Executable file
@@ -86,7 +86,7 @@ EssClient::AttachInstancesOutcomeCallable EssClient::attachInstancesCallable(con
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingGroupsOutcome EssClient::describeScalingGroups(const DescribeScalingGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -122,7 +122,7 @@ EssClient::DescribeScalingGroupsOutcomeCallable EssClient::describeScalingGroups
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::EnterStandbyOutcome EssClient::enterStandby(const EnterStandbyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -158,7 +158,7 @@ EssClient::EnterStandbyOutcomeCallable EssClient::enterStandbyCallable(const Ent
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingActivitiesOutcome EssClient::describeScalingActivities(const DescribeScalingActivitiesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -194,7 +194,7 @@ EssClient::DescribeScalingActivitiesOutcomeCallable EssClient::describeScalingAc
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ExitStandbyOutcome EssClient::exitStandby(const ExitStandbyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -230,7 +230,7 @@ EssClient::ExitStandbyOutcomeCallable EssClient::exitStandbyCallable(const ExitS
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeNotificationConfigurationsOutcome EssClient::describeNotificationConfigurations(const DescribeNotificationConfigurationsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -266,7 +266,7 @@ EssClient::DescribeNotificationConfigurationsOutcomeCallable EssClient::describe
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingRulesOutcome EssClient::describeScalingRules(const DescribeScalingRulesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -302,7 +302,7 @@ EssClient::DescribeScalingRulesOutcomeCallable EssClient::describeScalingRulesCa
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ModifyScalingGroupOutcome EssClient::modifyScalingGroup(const ModifyScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -338,7 +338,7 @@ EssClient::ModifyScalingGroupOutcomeCallable EssClient::modifyScalingGroupCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::EnableScalingGroupOutcome EssClient::enableScalingGroup(const EnableScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -374,7 +374,7 @@ EssClient::EnableScalingGroupOutcomeCallable EssClient::enableScalingGroupCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DeactivateScalingConfigurationOutcome EssClient::deactivateScalingConfiguration(const DeactivateScalingConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -410,7 +410,43 @@ EssClient::DeactivateScalingConfigurationOutcomeCallable EssClient::deactivateSc
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::RebalanceInstancesOutcome EssClient::rebalanceInstances(const RebalanceInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RebalanceInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RebalanceInstancesOutcome(RebalanceInstancesResult(outcome.result()));
|
||||
else
|
||||
return RebalanceInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::rebalanceInstancesAsync(const RebalanceInstancesRequest& request, const RebalanceInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, rebalanceInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::RebalanceInstancesOutcomeCallable EssClient::rebalanceInstancesCallable(const RebalanceInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RebalanceInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->rebalanceInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::CreateNotificationConfigurationOutcome EssClient::createNotificationConfiguration(const CreateNotificationConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -446,7 +482,7 @@ EssClient::CreateNotificationConfigurationOutcomeCallable EssClient::createNotif
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::VerifyAuthenticationOutcome EssClient::verifyAuthentication(const VerifyAuthenticationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -482,7 +518,7 @@ EssClient::VerifyAuthenticationOutcomeCallable EssClient::verifyAuthenticationCa
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::CreateScheduledTaskOutcome EssClient::createScheduledTask(const CreateScheduledTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -518,7 +554,7 @@ EssClient::CreateScheduledTaskOutcomeCallable EssClient::createScheduledTaskCall
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DeleteScheduledTaskOutcome EssClient::deleteScheduledTask(const DeleteScheduledTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -554,7 +590,7 @@ EssClient::DeleteScheduledTaskOutcomeCallable EssClient::deleteScheduledTaskCall
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ModifyNotificationConfigurationOutcome EssClient::modifyNotificationConfiguration(const ModifyNotificationConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -590,7 +626,7 @@ EssClient::ModifyNotificationConfigurationOutcomeCallable EssClient::modifyNotif
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::CreateScalingRuleOutcome EssClient::createScalingRule(const CreateScalingRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -626,7 +662,7 @@ EssClient::CreateScalingRuleOutcomeCallable EssClient::createScalingRuleCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingConfigurationsOutcome EssClient::describeScalingConfigurations(const DescribeScalingConfigurationsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -662,7 +698,7 @@ EssClient::DescribeScalingConfigurationsOutcomeCallable EssClient::describeScali
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ModifyScheduledTaskOutcome EssClient::modifyScheduledTask(const ModifyScheduledTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -698,7 +734,7 @@ EssClient::ModifyScheduledTaskOutcomeCallable EssClient::modifyScheduledTaskCall
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::RemoveInstancesOutcome EssClient::removeInstances(const RemoveInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -734,7 +770,7 @@ EssClient::RemoveInstancesOutcomeCallable EssClient::removeInstancesCallable(con
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeNotificationTypesOutcome EssClient::describeNotificationTypes(const DescribeNotificationTypesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -770,7 +806,7 @@ EssClient::DescribeNotificationTypesOutcomeCallable EssClient::describeNotificat
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ExecuteScalingRuleOutcome EssClient::executeScalingRule(const ExecuteScalingRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -806,7 +842,7 @@ EssClient::ExecuteScalingRuleOutcomeCallable EssClient::executeScalingRuleCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DeleteScalingGroupOutcome EssClient::deleteScalingGroup(const DeleteScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -842,7 +878,7 @@ EssClient::DeleteScalingGroupOutcomeCallable EssClient::deleteScalingGroupCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingInstancesOutcome EssClient::describeScalingInstances(const DescribeScalingInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -878,7 +914,7 @@ EssClient::DescribeScalingInstancesOutcomeCallable EssClient::describeScalingIns
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::CreateScalingConfigurationOutcome EssClient::createScalingConfiguration(const CreateScalingConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -914,7 +950,7 @@ EssClient::CreateScalingConfigurationOutcomeCallable EssClient::createScalingCon
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeCapacityHistoryOutcome EssClient::describeCapacityHistory(const DescribeCapacityHistoryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -950,7 +986,7 @@ EssClient::DescribeCapacityHistoryOutcomeCallable EssClient::describeCapacityHis
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeRegionsOutcome EssClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -986,7 +1022,7 @@ EssClient::DescribeRegionsOutcomeCallable EssClient::describeRegionsCallable(con
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScheduledTasksOutcome EssClient::describeScheduledTasks(const DescribeScheduledTasksRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1022,7 +1058,43 @@ EssClient::DescribeScheduledTasksOutcomeCallable EssClient::describeScheduledTas
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::SetInstancesProtectionOutcome EssClient::setInstancesProtection(const SetInstancesProtectionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SetInstancesProtectionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SetInstancesProtectionOutcome(SetInstancesProtectionResult(outcome.result()));
|
||||
else
|
||||
return SetInstancesProtectionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::setInstancesProtectionAsync(const SetInstancesProtectionRequest& request, const SetInstancesProtectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, setInstancesProtection(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::SetInstancesProtectionOutcomeCallable EssClient::setInstancesProtectionCallable(const SetInstancesProtectionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SetInstancesProtectionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->setInstancesProtection(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DeleteNotificationConfigurationOutcome EssClient::deleteNotificationConfiguration(const DeleteNotificationConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1058,43 +1130,7 @@ EssClient::DeleteNotificationConfigurationOutcomeCallable EssClient::deleteNotif
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DescribeAccountAttributesOutcome EssClient::describeAccountAttributes(const DescribeAccountAttributesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAccountAttributesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAccountAttributesOutcome(DescribeAccountAttributesResult(outcome.result()));
|
||||
else
|
||||
return DescribeAccountAttributesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EssClient::describeAccountAttributesAsync(const DescribeAccountAttributesRequest& request, const DescribeAccountAttributesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAccountAttributes(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EssClient::DescribeAccountAttributesOutcomeCallable EssClient::describeAccountAttributesCallable(const DescribeAccountAttributesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAccountAttributesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAccountAttributes(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EssClient::DetachInstancesOutcome EssClient::detachInstances(const DetachInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1130,7 +1166,7 @@ EssClient::DetachInstancesOutcomeCallable EssClient::detachInstancesCallable(con
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeLimitationOutcome EssClient::describeLimitation(const DescribeLimitationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1166,7 +1202,7 @@ EssClient::DescribeLimitationOutcomeCallable EssClient::describeLimitationCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeScalingActivityDetailOutcome EssClient::describeScalingActivityDetail(const DescribeScalingActivityDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1202,7 +1238,7 @@ EssClient::DescribeScalingActivityDetailOutcomeCallable EssClient::describeScali
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DescribeAlertConfigOutcome EssClient::describeAlertConfig(const DescribeAlertConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1238,7 +1274,7 @@ EssClient::DescribeAlertConfigOutcomeCallable EssClient::describeAlertConfigCall
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::CreateScalingGroupOutcome EssClient::createScalingGroup(const CreateScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1274,7 +1310,7 @@ EssClient::CreateScalingGroupOutcomeCallable EssClient::createScalingGroupCallab
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DeleteScalingConfigurationOutcome EssClient::deleteScalingConfiguration(const DeleteScalingConfigurationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1310,7 +1346,7 @@ EssClient::DeleteScalingConfigurationOutcomeCallable EssClient::deleteScalingCon
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DisableScalingGroupOutcome EssClient::disableScalingGroup(const DisableScalingGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1346,7 +1382,7 @@ EssClient::DisableScalingGroupOutcomeCallable EssClient::disableScalingGroupCall
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ModifyScalingRuleOutcome EssClient::modifyScalingRule(const ModifyScalingRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1382,7 +1418,7 @@ EssClient::ModifyScalingRuleOutcomeCallable EssClient::modifyScalingRuleCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::DeleteScalingRuleOutcome EssClient::deleteScalingRule(const DeleteScalingRuleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1418,7 +1454,7 @@ EssClient::DeleteScalingRuleOutcomeCallable EssClient::deleteScalingRuleCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::VerifyUserOutcome EssClient::verifyUser(const VerifyUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1454,7 +1490,7 @@ EssClient::VerifyUserOutcomeCallable EssClient::verifyUserCallable(const VerifyU
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
EssClient::ModifyAlertConfigOutcome EssClient::modifyAlertConfig(const ModifyAlertConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1490,4 +1526,4 @@ EssClient::ModifyAlertConfigOutcomeCallable EssClient::modifyAlertConfigCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
ess/src/model/.DS_Store
vendored
Normal file
BIN
ess/src/model/.DS_Store
vendored
Normal file
Binary file not shown.
0
ess/src/model/AttachInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/AttachInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/AttachInstancesResult.cc
Normal file → Executable file
0
ess/src/model/AttachInstancesResult.cc
Normal file → Executable file
0
ess/src/model/CreateNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/CreateNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/CreateNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/CreateNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/CreateScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScalingConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/CreateScalingConfigurationResult.cc
Normal file → Executable file
11
ess/src/model/CreateScalingGroupRequest.cc
Normal file → Executable file
11
ess/src/model/CreateScalingGroupRequest.cc
Normal file → Executable file
@@ -25,6 +25,17 @@ CreateScalingGroupRequest::CreateScalingGroupRequest() :
|
||||
CreateScalingGroupRequest::~CreateScalingGroupRequest()
|
||||
{}
|
||||
|
||||
std::string CreateScalingGroupRequest::getMultiAZPolicy()const
|
||||
{
|
||||
return multiAZPolicy_;
|
||||
}
|
||||
|
||||
void CreateScalingGroupRequest::setMultiAZPolicy(const std::string& multiAZPolicy)
|
||||
{
|
||||
multiAZPolicy_ = multiAZPolicy;
|
||||
setParameter("MultiAZPolicy", multiAZPolicy);
|
||||
}
|
||||
|
||||
std::string CreateScalingGroupRequest::getDBInstanceIds()const
|
||||
{
|
||||
return dBInstanceIds_;
|
||||
|
||||
0
ess/src/model/CreateScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/CreateScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/CreateScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/CreateScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/CreateScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/CreateScheduledTaskResult.cc
Normal file → Executable file
0
ess/src/model/CreateScheduledTaskResult.cc
Normal file → Executable file
0
ess/src/model/DeactivateScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeactivateScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeactivateScalingConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeactivateScalingConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeleteNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeleteNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/DeleteScheduledTaskResult.cc
Normal file → Executable file
0
ess/src/model/DeleteScheduledTaskResult.cc
Normal file → Executable file
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* 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/DescribeAccountAttributesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::DescribeAccountAttributesRequest;
|
||||
|
||||
DescribeAccountAttributesRequest::DescribeAccountAttributesRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "DescribeAccountAttributes")
|
||||
{}
|
||||
|
||||
DescribeAccountAttributesRequest::~DescribeAccountAttributesRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAccountAttributesRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeAccountAttributesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
long DescribeAccountAttributesRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeAccountAttributesRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeAccountAttributesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeAccountAttributesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* 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/DescribeAccountAttributesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
DescribeAccountAttributesResult::DescribeAccountAttributesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAccountAttributesResult::DescribeAccountAttributesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAccountAttributesResult::~DescribeAccountAttributesResult()
|
||||
{}
|
||||
|
||||
void DescribeAccountAttributesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MaxNumberOfScalingGroups"].isNull())
|
||||
maxNumberOfScalingGroups_ = std::stoi(value["MaxNumberOfScalingGroups"].asString());
|
||||
if(!value["MaxNumberOfScalingConfigurations"].isNull())
|
||||
maxNumberOfScalingConfigurations_ = std::stoi(value["MaxNumberOfScalingConfigurations"].asString());
|
||||
if(!value["MaxNumberOfScalingRules"].isNull())
|
||||
maxNumberOfScalingRules_ = std::stoi(value["MaxNumberOfScalingRules"].asString());
|
||||
if(!value["MaxNumberOfScheduledTasks"].isNull())
|
||||
maxNumberOfScheduledTasks_ = std::stoi(value["MaxNumberOfScheduledTasks"].asString());
|
||||
if(!value["MaxNumberOfScalingInstances"].isNull())
|
||||
maxNumberOfScalingInstances_ = std::stoi(value["MaxNumberOfScalingInstances"].asString());
|
||||
if(!value["MaxNumberOfDBInstances"].isNull())
|
||||
maxNumberOfDBInstances_ = std::stoi(value["MaxNumberOfDBInstances"].asString());
|
||||
if(!value["MaxNumberOfLoadBalancers"].isNull())
|
||||
maxNumberOfLoadBalancers_ = std::stoi(value["MaxNumberOfLoadBalancers"].asString());
|
||||
if(!value["MaxNumberOfMinSize"].isNull())
|
||||
maxNumberOfMinSize_ = std::stoi(value["MaxNumberOfMinSize"].asString());
|
||||
if(!value["MaxNumberOfMaxSize"].isNull())
|
||||
maxNumberOfMaxSize_ = std::stoi(value["MaxNumberOfMaxSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfScalingRules()const
|
||||
{
|
||||
return maxNumberOfScalingRules_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfScalingInstances()const
|
||||
{
|
||||
return maxNumberOfScalingInstances_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfScheduledTasks()const
|
||||
{
|
||||
return maxNumberOfScheduledTasks_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfLoadBalancers()const
|
||||
{
|
||||
return maxNumberOfLoadBalancers_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfMinSize()const
|
||||
{
|
||||
return maxNumberOfMinSize_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfScalingGroups()const
|
||||
{
|
||||
return maxNumberOfScalingGroups_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfScalingConfigurations()const
|
||||
{
|
||||
return maxNumberOfScalingConfigurations_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfDBInstances()const
|
||||
{
|
||||
return maxNumberOfDBInstances_;
|
||||
}
|
||||
|
||||
int DescribeAccountAttributesResult::getMaxNumberOfMaxSize()const
|
||||
{
|
||||
return maxNumberOfMaxSize_;
|
||||
}
|
||||
|
||||
0
ess/src/model/DescribeAlertConfigRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeAlertConfigRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeAlertConfigResult.cc
Normal file → Executable file
0
ess/src/model/DescribeAlertConfigResult.cc
Normal file → Executable file
0
ess/src/model/DescribeCapacityHistoryRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeCapacityHistoryRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeCapacityHistoryResult.cc
Normal file → Executable file
0
ess/src/model/DescribeCapacityHistoryResult.cc
Normal file → Executable file
0
ess/src/model/DescribeLimitationRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeLimitationRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeLimitationResult.cc
Normal file → Executable file
0
ess/src/model/DescribeLimitationResult.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationConfigurationsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationConfigurationsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationConfigurationsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationConfigurationsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationTypesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationTypesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationTypesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeNotificationTypesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeRegionsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeRegionsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeRegionsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeRegionsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivitiesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivitiesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivitiesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivitiesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivityDetailRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivityDetailRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivityDetailResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingActivityDetailResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingConfigurationsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingConfigurationsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingConfigurationsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingConfigurationsResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingGroupsRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingGroupsRequest.cc
Normal file → Executable file
4
ess/src/model/DescribeScalingGroupsResult.cc
Normal file → Executable file
4
ess/src/model/DescribeScalingGroupsResult.cc
Normal file → Executable file
@@ -58,6 +58,8 @@ void DescribeScalingGroupsResult::parse(const std::string &payload)
|
||||
scalingGroupsObject.activeCapacity = std::stoi(value["ActiveCapacity"].asString());
|
||||
if(!value["StandbyCapacity"].isNull())
|
||||
scalingGroupsObject.standbyCapacity = std::stoi(value["StandbyCapacity"].asString());
|
||||
if(!value["ProtectedCapacity"].isNull())
|
||||
scalingGroupsObject.protectedCapacity = std::stoi(value["ProtectedCapacity"].asString());
|
||||
if(!value["ActiveScalingConfigurationId"].isNull())
|
||||
scalingGroupsObject.activeScalingConfigurationId = value["ActiveScalingConfigurationId"].asString();
|
||||
if(!value["ScalingGroupId"].isNull())
|
||||
@@ -78,6 +80,8 @@ void DescribeScalingGroupsResult::parse(const std::string &payload)
|
||||
scalingGroupsObject.vpcId = value["VpcId"].asString();
|
||||
if(!value["VSwitchId"].isNull())
|
||||
scalingGroupsObject.vSwitchId = value["VSwitchId"].asString();
|
||||
if(!value["MultiAZPolicy"].isNull())
|
||||
scalingGroupsObject.multiAZPolicy = value["MultiAZPolicy"].asString();
|
||||
auto allVSwitchIds = value["VSwitchIds"]["VSwitchId"];
|
||||
for (auto value : allVSwitchIds)
|
||||
scalingGroupsObject.vSwitchIds.push_back(value.asString());
|
||||
|
||||
0
ess/src/model/DescribeScalingInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingInstancesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingInstancesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingRulesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingRulesRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingRulesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScalingRulesResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScheduledTasksRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScheduledTasksRequest.cc
Normal file → Executable file
0
ess/src/model/DescribeScheduledTasksResult.cc
Normal file → Executable file
0
ess/src/model/DescribeScheduledTasksResult.cc
Normal file → Executable file
0
ess/src/model/DetachInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/DetachInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/DetachInstancesResult.cc
Normal file → Executable file
0
ess/src/model/DetachInstancesResult.cc
Normal file → Executable file
0
ess/src/model/DisableScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/DisableScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/DisableScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/DisableScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/EnableScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/EnableScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/EnableScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/EnableScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/EnterStandbyRequest.cc
Normal file → Executable file
0
ess/src/model/EnterStandbyRequest.cc
Normal file → Executable file
0
ess/src/model/EnterStandbyResult.cc
Normal file → Executable file
0
ess/src/model/EnterStandbyResult.cc
Normal file → Executable file
0
ess/src/model/ExecuteScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/ExecuteScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/ExecuteScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/ExecuteScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/ExitStandbyRequest.cc
Normal file → Executable file
0
ess/src/model/ExitStandbyRequest.cc
Normal file → Executable file
0
ess/src/model/ExitStandbyResult.cc
Normal file → Executable file
0
ess/src/model/ExitStandbyResult.cc
Normal file → Executable file
0
ess/src/model/ModifyAlertConfigRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyAlertConfigRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyAlertConfigResult.cc
Normal file → Executable file
0
ess/src/model/ModifyAlertConfigResult.cc
Normal file → Executable file
0
ess/src/model/ModifyNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyNotificationConfigurationRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/ModifyNotificationConfigurationResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingGroupRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingGroupResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingRuleRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScalingRuleResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScheduledTaskRequest.cc
Normal file → Executable file
0
ess/src/model/ModifyScheduledTaskResult.cc
Normal file → Executable file
0
ess/src/model/ModifyScheduledTaskResult.cc
Normal file → Executable file
93
ess/src/model/RebalanceInstancesRequest.cc
Executable file
93
ess/src/model/RebalanceInstancesRequest.cc
Executable file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/RebalanceInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::RebalanceInstancesRequest;
|
||||
|
||||
RebalanceInstancesRequest::RebalanceInstancesRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "RebalanceInstances")
|
||||
{}
|
||||
|
||||
RebalanceInstancesRequest::~RebalanceInstancesRequest()
|
||||
{}
|
||||
|
||||
long RebalanceInstancesRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string RebalanceInstancesRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string RebalanceInstancesRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
std::string RebalanceInstancesRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long RebalanceInstancesRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string RebalanceInstancesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RebalanceInstancesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
52
ess/src/model/RebalanceInstancesResult.cc
Executable file
52
ess/src/model/RebalanceInstancesResult.cc
Executable file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/RebalanceInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
RebalanceInstancesResult::RebalanceInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RebalanceInstancesResult::RebalanceInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RebalanceInstancesResult::~RebalanceInstancesResult()
|
||||
{}
|
||||
|
||||
void RebalanceInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ScalingActivityId"].isNull())
|
||||
scalingActivityId_ = value["ScalingActivityId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RebalanceInstancesResult::getScalingActivityId()const
|
||||
{
|
||||
return scalingActivityId_;
|
||||
}
|
||||
|
||||
0
ess/src/model/RemoveInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/RemoveInstancesRequest.cc
Normal file → Executable file
0
ess/src/model/RemoveInstancesResult.cc
Normal file → Executable file
0
ess/src/model/RemoveInstancesResult.cc
Normal file → Executable file
94
ess/src/model/SetInstancesProtectionRequest.cc
Executable file
94
ess/src/model/SetInstancesProtectionRequest.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/SetInstancesProtectionRequest.h>
|
||||
|
||||
using AlibabaCloud::Ess::Model::SetInstancesProtectionRequest;
|
||||
|
||||
SetInstancesProtectionRequest::SetInstancesProtectionRequest() :
|
||||
RpcServiceRequest("ess", "2014-08-28", "SetInstancesProtection")
|
||||
{}
|
||||
|
||||
SetInstancesProtectionRequest::~SetInstancesProtectionRequest()
|
||||
{}
|
||||
|
||||
std::vector<std::string> SetInstancesProtectionRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setInstanceId(const std::vector<std::string>& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
for(int i = 0; i!= instanceId.size(); i++)
|
||||
setParameter("InstanceId."+ std::to_string(i), instanceId.at(i));
|
||||
}
|
||||
|
||||
std::string SetInstancesProtectionRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string SetInstancesProtectionRequest::getScalingGroupId()const
|
||||
{
|
||||
return scalingGroupId_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setScalingGroupId(const std::string& scalingGroupId)
|
||||
{
|
||||
scalingGroupId_ = scalingGroupId;
|
||||
setParameter("ScalingGroupId", scalingGroupId);
|
||||
}
|
||||
|
||||
long SetInstancesProtectionRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string SetInstancesProtectionRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
bool SetInstancesProtectionRequest::getProtectedFromScaleIn()const
|
||||
{
|
||||
return protectedFromScaleIn_;
|
||||
}
|
||||
|
||||
void SetInstancesProtectionRequest::setProtectedFromScaleIn(bool protectedFromScaleIn)
|
||||
{
|
||||
protectedFromScaleIn_ = protectedFromScaleIn;
|
||||
setParameter("ProtectedFromScaleIn", std::to_string(protectedFromScaleIn));
|
||||
}
|
||||
|
||||
45
ess/src/model/SetInstancesProtectionResult.cc
Executable file
45
ess/src/model/SetInstancesProtectionResult.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/SetInstancesProtectionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ess;
|
||||
using namespace AlibabaCloud::Ess::Model;
|
||||
|
||||
SetInstancesProtectionResult::SetInstancesProtectionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SetInstancesProtectionResult::SetInstancesProtectionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SetInstancesProtectionResult::~SetInstancesProtectionResult()
|
||||
{}
|
||||
|
||||
void SetInstancesProtectionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
0
ess/src/model/VerifyAuthenticationRequest.cc
Normal file → Executable file
0
ess/src/model/VerifyAuthenticationRequest.cc
Normal file → Executable file
0
ess/src/model/VerifyAuthenticationResult.cc
Normal file → Executable file
0
ess/src/model/VerifyAuthenticationResult.cc
Normal file → Executable file
0
ess/src/model/VerifyUserRequest.cc
Normal file → Executable file
0
ess/src/model/VerifyUserRequest.cc
Normal file → Executable file
0
ess/src/model/VerifyUserResult.cc
Normal file → Executable file
0
ess/src/model/VerifyUserResult.cc
Normal file → Executable file
Reference in New Issue
Block a user