Add DescribeInstances API.

This commit is contained in:
sdk-team
2021-04-29 13:45:05 +00:00
parent 0a9554513b
commit 29d344ab59
29 changed files with 962 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2021-04-29 Version: 1.36.706
- Add DescribeInstances API.
2021-04-29 Version: 1.36.705
- Update RecognizeFace.

View File

@@ -1 +1 @@
1.36.705
1.36.706

View File

@@ -37,6 +37,8 @@ set(r-kvstore_public_header_model
include/alibabacloud/r-kvstore/model/CreateGlobalDistributeCacheResult.h
include/alibabacloud/r-kvstore/model/CreateInstanceRequest.h
include/alibabacloud/r-kvstore/model/CreateInstanceResult.h
include/alibabacloud/r-kvstore/model/CreateInstancesRequest.h
include/alibabacloud/r-kvstore/model/CreateInstancesResult.h
include/alibabacloud/r-kvstore/model/CreateTairInstanceRequest.h
include/alibabacloud/r-kvstore/model/CreateTairInstanceResult.h
include/alibabacloud/r-kvstore/model/CreateUserClusterHostRequest.h
@@ -203,6 +205,8 @@ set(r-kvstore_public_header_model
include/alibabacloud/r-kvstore/model/SyncDtsStatusResult.h
include/alibabacloud/r-kvstore/model/TagResourcesRequest.h
include/alibabacloud/r-kvstore/model/TagResourcesResult.h
include/alibabacloud/r-kvstore/model/TransformInstanceChargeTypeRequest.h
include/alibabacloud/r-kvstore/model/TransformInstanceChargeTypeResult.h
include/alibabacloud/r-kvstore/model/TransformToPrePaidRequest.h
include/alibabacloud/r-kvstore/model/TransformToPrePaidResult.h
include/alibabacloud/r-kvstore/model/UntagResourcesRequest.h
@@ -226,6 +230,8 @@ set(r-kvstore_src
src/model/CreateGlobalDistributeCacheResult.cc
src/model/CreateInstanceRequest.cc
src/model/CreateInstanceResult.cc
src/model/CreateInstancesRequest.cc
src/model/CreateInstancesResult.cc
src/model/CreateTairInstanceRequest.cc
src/model/CreateTairInstanceResult.cc
src/model/CreateUserClusterHostRequest.cc
@@ -392,6 +398,8 @@ set(r-kvstore_src
src/model/SyncDtsStatusResult.cc
src/model/TagResourcesRequest.cc
src/model/TagResourcesResult.cc
src/model/TransformInstanceChargeTypeRequest.cc
src/model/TransformInstanceChargeTypeResult.cc
src/model/TransformToPrePaidRequest.cc
src/model/TransformToPrePaidResult.cc
src/model/UntagResourcesRequest.cc

View File

@@ -38,6 +38,8 @@
#include "model/CreateGlobalDistributeCacheResult.h"
#include "model/CreateInstanceRequest.h"
#include "model/CreateInstanceResult.h"
#include "model/CreateInstancesRequest.h"
#include "model/CreateInstancesResult.h"
#include "model/CreateTairInstanceRequest.h"
#include "model/CreateTairInstanceResult.h"
#include "model/CreateUserClusterHostRequest.h"
@@ -204,6 +206,8 @@
#include "model/SyncDtsStatusResult.h"
#include "model/TagResourcesRequest.h"
#include "model/TagResourcesResult.h"
#include "model/TransformInstanceChargeTypeRequest.h"
#include "model/TransformInstanceChargeTypeResult.h"
#include "model/TransformToPrePaidRequest.h"
#include "model/TransformToPrePaidResult.h"
#include "model/UntagResourcesRequest.h"
@@ -241,6 +245,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateInstanceResult> CreateInstanceOutcome;
typedef std::future<CreateInstanceOutcome> CreateInstanceOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::CreateInstanceRequest&, const CreateInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateInstanceAsyncHandler;
typedef Outcome<Error, Model::CreateInstancesResult> CreateInstancesOutcome;
typedef std::future<CreateInstancesOutcome> CreateInstancesOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::CreateInstancesRequest&, const CreateInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateInstancesAsyncHandler;
typedef Outcome<Error, Model::CreateTairInstanceResult> CreateTairInstanceOutcome;
typedef std::future<CreateTairInstanceOutcome> CreateTairInstanceOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::CreateTairInstanceRequest&, const CreateTairInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateTairInstanceAsyncHandler;
@@ -490,6 +497,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::TagResourcesResult> TagResourcesOutcome;
typedef std::future<TagResourcesOutcome> TagResourcesOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::TagResourcesRequest&, const TagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourcesAsyncHandler;
typedef Outcome<Error, Model::TransformInstanceChargeTypeResult> TransformInstanceChargeTypeOutcome;
typedef std::future<TransformInstanceChargeTypeOutcome> TransformInstanceChargeTypeOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::TransformInstanceChargeTypeRequest&, const TransformInstanceChargeTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TransformInstanceChargeTypeAsyncHandler;
typedef Outcome<Error, Model::TransformToPrePaidResult> TransformToPrePaidOutcome;
typedef std::future<TransformToPrePaidOutcome> TransformToPrePaidOutcomeCallable;
typedef std::function<void(const R_kvstoreClient*, const Model::TransformToPrePaidRequest&, const TransformToPrePaidOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TransformToPrePaidAsyncHandler;
@@ -525,6 +535,9 @@ namespace AlibabaCloud
CreateInstanceOutcome createInstance(const Model::CreateInstanceRequest &request)const;
void createInstanceAsync(const Model::CreateInstanceRequest& request, const CreateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateInstanceOutcomeCallable createInstanceCallable(const Model::CreateInstanceRequest& request) const;
CreateInstancesOutcome createInstances(const Model::CreateInstancesRequest &request)const;
void createInstancesAsync(const Model::CreateInstancesRequest& request, const CreateInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateInstancesOutcomeCallable createInstancesCallable(const Model::CreateInstancesRequest& request) const;
CreateTairInstanceOutcome createTairInstance(const Model::CreateTairInstanceRequest &request)const;
void createTairInstanceAsync(const Model::CreateTairInstanceRequest& request, const CreateTairInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateTairInstanceOutcomeCallable createTairInstanceCallable(const Model::CreateTairInstanceRequest& request) const;
@@ -774,6 +787,9 @@ namespace AlibabaCloud
TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const;
void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const;
TransformInstanceChargeTypeOutcome transformInstanceChargeType(const Model::TransformInstanceChargeTypeRequest &request)const;
void transformInstanceChargeTypeAsync(const Model::TransformInstanceChargeTypeRequest& request, const TransformInstanceChargeTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TransformInstanceChargeTypeOutcomeCallable transformInstanceChargeTypeCallable(const Model::TransformInstanceChargeTypeRequest& request) const;
TransformToPrePaidOutcome transformToPrePaid(const Model::TransformToPrePaidRequest &request)const;
void transformToPrePaidAsync(const Model::TransformToPrePaidRequest& request, const TransformToPrePaidAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TransformToPrePaidOutcomeCallable transformToPrePaidCallable(const Model::TransformToPrePaidRequest& request) const;

View File

@@ -0,0 +1,96 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESREQUEST_H_
#define ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
namespace AlibabaCloud
{
namespace R_kvstore
{
namespace Model
{
class ALIBABACLOUD_R_KVSTORE_EXPORT CreateInstancesRequest : public RpcServiceRequest
{
public:
CreateInstancesRequest();
~CreateInstancesRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstances()const;
void setInstances(const std::string& instances);
std::string getCouponNo()const;
void setCouponNo(const std::string& couponNo);
std::string getEngineVersion()const;
void setEngineVersion(const std::string& engineVersion);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
bool getRebuildInstance()const;
void setRebuildInstance(bool rebuildInstance);
std::string getBusinessInfo()const;
void setBusinessInfo(const std::string& businessInfo);
std::string getAgentId()const;
void setAgentId(const std::string& agentId);
std::string getRestoreTime()const;
void setRestoreTime(const std::string& restoreTime);
bool getAutoPay()const;
void setAutoPay(bool autoPay);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getToken()const;
void setToken(const std::string& token);
std::string getPrivateIpAddress()const;
void setPrivateIpAddress(const std::string& privateIpAddress);
std::string getAutoRenew()const;
void setAutoRenew(const std::string& autoRenew);
private:
long resourceOwnerId_;
std::string instances_;
std::string couponNo_;
std::string engineVersion_;
std::string accessKeyId_;
std::string securityToken_;
bool rebuildInstance_;
std::string businessInfo_;
std::string agentId_;
std::string restoreTime_;
bool autoPay_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string token_;
std::string privateIpAddress_;
std::string autoRenew_;
};
}
}
}
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESREQUEST_H_

View File

@@ -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.
*/
#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESRESULT_H_
#define ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
namespace AlibabaCloud
{
namespace R_kvstore
{
namespace Model
{
class ALIBABACLOUD_R_KVSTORE_EXPORT CreateInstancesResult : public ServiceResult
{
public:
CreateInstancesResult();
explicit CreateInstancesResult(const std::string &payload);
~CreateInstancesResult();
std::vector<std::string> getInstanceIds()const;
std::string getOrderId()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> instanceIds_;
std::string orderId_;
};
}
}
}
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_CREATEINSTANCESRESULT_H_

View File

@@ -36,6 +36,7 @@ namespace AlibabaCloud
{
std::string executeTime;
std::string databaseName;
std::string nodeId;
std::string totalExecutionTimes;
std::string hostAddress;
std::string iPAddress;

View File

@@ -47,6 +47,7 @@ namespace AlibabaCloud
std::string globalInstanceId;
std::string hasRenewChangeOrder;
int shardCount;
std::string zoneType;
std::string connectionDomain;
std::string maintainEndTime;
long capacity;
@@ -75,6 +76,7 @@ namespace AlibabaCloud
bool isRds;
std::string replicationMode;
std::string replicaId;
std::string secondaryZoneId;
std::string instanceName;
std::string storage;
std::string vpcId;

View File

@@ -57,6 +57,8 @@ namespace AlibabaCloud
void setBusinessInfo(const std::string& businessInfo);
long getPeriod()const;
void setPeriod(long period);
std::string getProduct()const;
void setProduct(const std::string& product);
long getQuantity()const;
void setQuantity(long quantity);
std::string getResourceOwnerAccount()const;
@@ -73,6 +75,8 @@ namespace AlibabaCloud
void setZoneId(const std::string& zoneId);
std::string getChargeType()const;
void setChargeType(const std::string& chargeType);
std::string getCategory()const;
void setCategory(const std::string& category);
bool getForceUpgrade()const;
void setForceUpgrade(bool forceUpgrade);
std::string getOrderType()const;
@@ -90,6 +94,7 @@ namespace AlibabaCloud
std::string regionId_;
std::string businessInfo_;
long period_;
std::string product_;
long quantity_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
@@ -98,6 +103,7 @@ namespace AlibabaCloud
std::string instanceId_;
std::string zoneId_;
std::string chargeType_;
std::string category_;
bool forceUpgrade_;
std::string orderType_;

View File

@@ -42,6 +42,7 @@ namespace AlibabaCloud
std::string name;
};
std::vector<std::string> ruleIds1;
std::string handlingFeeAmount;
std::string currency;
std::string tradeAmount;
std::vector<Coupon> coupons;

View File

@@ -39,6 +39,7 @@ namespace AlibabaCloud
std::string instanceId;
std::string content;
std::string createTime;
std::string nodeId;
std::string level;
int id;
};

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getSecondaryZoneId()const;
void setSecondaryZoneId(const std::string& secondaryZoneId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
@@ -58,6 +60,7 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string secondaryZoneId_;
std::string accessKeyId_;
std::string securityToken_;
std::string effectiveTime_;

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getProduct()const;
void setProduct(const std::string& product);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
@@ -49,6 +51,8 @@ namespace AlibabaCloud
void setOwnerId(long ownerId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getCategory()const;
void setCategory(const std::string& category);
std::string getConfig()const;
void setConfig(const std::string& config);
@@ -56,10 +60,12 @@ namespace AlibabaCloud
long resourceOwnerId_;
std::string accessKeyId_;
std::string securityToken_;
std::string product_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string instanceId_;
std::string category_;
std::string config_;
};

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPEREQUEST_H_
#define ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
namespace AlibabaCloud
{
namespace R_kvstore
{
namespace Model
{
class ALIBABACLOUD_R_KVSTORE_EXPORT TransformInstanceChargeTypeRequest : public RpcServiceRequest
{
public:
TransformInstanceChargeTypeRequest();
~TransformInstanceChargeTypeRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
long getPeriod()const;
void setPeriod(long period);
bool getAutoPay()const;
void setAutoPay(bool autoPay);
std::string getFromApp()const;
void setFromApp(const std::string& fromApp);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getChargeType()const;
void setChargeType(const std::string& chargeType);
private:
long resourceOwnerId_;
std::string accessKeyId_;
std::string securityToken_;
long period_;
bool autoPay_;
std::string fromApp_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string instanceId_;
std::string chargeType_;
};
}
}
}
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPEREQUEST_H_

View File

@@ -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.
*/
#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPERESULT_H_
#define ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
namespace AlibabaCloud
{
namespace R_kvstore
{
namespace Model
{
class ALIBABACLOUD_R_KVSTORE_EXPORT TransformInstanceChargeTypeResult : public ServiceResult
{
public:
TransformInstanceChargeTypeResult();
explicit TransformInstanceChargeTypeResult(const std::string &payload);
~TransformInstanceChargeTypeResult();
std::string getEndTime()const;
std::string getOrderId()const;
protected:
void parse(const std::string &payload);
private:
std::string endTime_;
std::string orderId_;
};
}
}
}
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_TRANSFORMINSTANCECHARGETYPERESULT_H_

View File

@@ -55,6 +55,8 @@ namespace AlibabaCloud
void setOwnerId(long ownerId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getChargeType()const;
void setChargeType(const std::string& chargeType);
private:
long resourceOwnerId_;
@@ -67,6 +69,7 @@ namespace AlibabaCloud
std::string ownerAccount_;
long ownerId_;
std::string instanceId_;
std::string chargeType_;
};
}

View File

@@ -339,6 +339,42 @@ R_kvstoreClient::CreateInstanceOutcomeCallable R_kvstoreClient::createInstanceCa
return task->get_future();
}
R_kvstoreClient::CreateInstancesOutcome R_kvstoreClient::createInstances(const CreateInstancesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateInstancesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateInstancesOutcome(CreateInstancesResult(outcome.result()));
else
return CreateInstancesOutcome(outcome.error());
}
void R_kvstoreClient::createInstancesAsync(const CreateInstancesRequest& request, const CreateInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createInstances(request), context);
};
asyncExecute(new Runnable(fn));
}
R_kvstoreClient::CreateInstancesOutcomeCallable R_kvstoreClient::createInstancesCallable(const CreateInstancesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateInstancesOutcome()>>(
[this, request]()
{
return this->createInstances(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
R_kvstoreClient::CreateTairInstanceOutcome R_kvstoreClient::createTairInstance(const CreateTairInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3327,6 +3363,42 @@ R_kvstoreClient::TagResourcesOutcomeCallable R_kvstoreClient::tagResourcesCallab
return task->get_future();
}
R_kvstoreClient::TransformInstanceChargeTypeOutcome R_kvstoreClient::transformInstanceChargeType(const TransformInstanceChargeTypeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TransformInstanceChargeTypeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TransformInstanceChargeTypeOutcome(TransformInstanceChargeTypeResult(outcome.result()));
else
return TransformInstanceChargeTypeOutcome(outcome.error());
}
void R_kvstoreClient::transformInstanceChargeTypeAsync(const TransformInstanceChargeTypeRequest& request, const TransformInstanceChargeTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, transformInstanceChargeType(request), context);
};
asyncExecute(new Runnable(fn));
}
R_kvstoreClient::TransformInstanceChargeTypeOutcomeCallable R_kvstoreClient::transformInstanceChargeTypeCallable(const TransformInstanceChargeTypeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TransformInstanceChargeTypeOutcome()>>(
[this, request]()
{
return this->transformInstanceChargeType(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
R_kvstoreClient::TransformToPrePaidOutcome R_kvstoreClient::transformToPrePaid(const TransformToPrePaidRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,216 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/r-kvstore/model/CreateInstancesRequest.h>
using AlibabaCloud::R_kvstore::Model::CreateInstancesRequest;
CreateInstancesRequest::CreateInstancesRequest() :
RpcServiceRequest("r-kvstore", "2015-01-01", "CreateInstances")
{
setMethod(HttpRequest::Method::Post);
}
CreateInstancesRequest::~CreateInstancesRequest()
{}
long CreateInstancesRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void CreateInstancesRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateInstancesRequest::getInstances()const
{
return instances_;
}
void CreateInstancesRequest::setInstances(const std::string& instances)
{
instances_ = instances;
setParameter("Instances", instances);
}
std::string CreateInstancesRequest::getCouponNo()const
{
return couponNo_;
}
void CreateInstancesRequest::setCouponNo(const std::string& couponNo)
{
couponNo_ = couponNo;
setParameter("CouponNo", couponNo);
}
std::string CreateInstancesRequest::getEngineVersion()const
{
return engineVersion_;
}
void CreateInstancesRequest::setEngineVersion(const std::string& engineVersion)
{
engineVersion_ = engineVersion;
setParameter("EngineVersion", engineVersion);
}
std::string CreateInstancesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateInstancesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateInstancesRequest::getSecurityToken()const
{
return securityToken_;
}
void CreateInstancesRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
bool CreateInstancesRequest::getRebuildInstance()const
{
return rebuildInstance_;
}
void CreateInstancesRequest::setRebuildInstance(bool rebuildInstance)
{
rebuildInstance_ = rebuildInstance;
setParameter("RebuildInstance", rebuildInstance ? "true" : "false");
}
std::string CreateInstancesRequest::getBusinessInfo()const
{
return businessInfo_;
}
void CreateInstancesRequest::setBusinessInfo(const std::string& businessInfo)
{
businessInfo_ = businessInfo;
setParameter("BusinessInfo", businessInfo);
}
std::string CreateInstancesRequest::getAgentId()const
{
return agentId_;
}
void CreateInstancesRequest::setAgentId(const std::string& agentId)
{
agentId_ = agentId;
setParameter("AgentId", agentId);
}
std::string CreateInstancesRequest::getRestoreTime()const
{
return restoreTime_;
}
void CreateInstancesRequest::setRestoreTime(const std::string& restoreTime)
{
restoreTime_ = restoreTime;
setParameter("RestoreTime", restoreTime);
}
bool CreateInstancesRequest::getAutoPay()const
{
return autoPay_;
}
void CreateInstancesRequest::setAutoPay(bool autoPay)
{
autoPay_ = autoPay;
setParameter("AutoPay", autoPay ? "true" : "false");
}
std::string CreateInstancesRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void CreateInstancesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string CreateInstancesRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void CreateInstancesRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long CreateInstancesRequest::getOwnerId()const
{
return ownerId_;
}
void CreateInstancesRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateInstancesRequest::getToken()const
{
return token_;
}
void CreateInstancesRequest::setToken(const std::string& token)
{
token_ = token;
setParameter("Token", token);
}
std::string CreateInstancesRequest::getPrivateIpAddress()const
{
return privateIpAddress_;
}
void CreateInstancesRequest::setPrivateIpAddress(const std::string& privateIpAddress)
{
privateIpAddress_ = privateIpAddress;
setParameter("PrivateIpAddress", privateIpAddress);
}
std::string CreateInstancesRequest::getAutoRenew()const
{
return autoRenew_;
}
void CreateInstancesRequest::setAutoRenew(const std::string& autoRenew)
{
autoRenew_ = autoRenew;
setParameter("AutoRenew", autoRenew);
}

View File

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

View File

@@ -59,6 +59,8 @@ void DescribeAuditRecordsResult::parse(const std::string &payload)
itemsObject.executeTime = valueItemsSQL["ExecuteTime"].asString();
if(!valueItemsSQL["AccountName"].isNull())
itemsObject.accountName = valueItemsSQL["AccountName"].asString();
if(!valueItemsSQL["NodeId"].isNull())
itemsObject.nodeId = valueItemsSQL["NodeId"].asString();
items_.push_back(itemsObject);
}
if(!value["PageNumber"].isNull())

View File

@@ -129,6 +129,10 @@ void DescribeInstanceAttributeResult::parse(const std::string &payload)
instancesObject.storageType = valueInstancesDBInstanceAttribute["StorageType"].asString();
if(!valueInstancesDBInstanceAttribute["GlobalInstanceId"].isNull())
instancesObject.globalInstanceId = valueInstancesDBInstanceAttribute["GlobalInstanceId"].asString();
if(!valueInstancesDBInstanceAttribute["SecondaryZoneId"].isNull())
instancesObject.secondaryZoneId = valueInstancesDBInstanceAttribute["SecondaryZoneId"].asString();
if(!valueInstancesDBInstanceAttribute["ZoneType"].isNull())
instancesObject.zoneType = valueInstancesDBInstanceAttribute["ZoneType"].asString();
auto allTagsNode = valueInstancesDBInstanceAttribute["Tags"]["Tag"];
for (auto valueInstancesDBInstanceAttributeTagsTag : allTagsNode)
{

View File

@@ -148,6 +148,17 @@ void DescribePriceRequest::setPeriod(long period)
setParameter("Period", std::to_string(period));
}
std::string DescribePriceRequest::getProduct()const
{
return product_;
}
void DescribePriceRequest::setProduct(const std::string& product)
{
product_ = product;
setParameter("Product", product);
}
long DescribePriceRequest::getQuantity()const
{
return quantity_;
@@ -236,6 +247,17 @@ void DescribePriceRequest::setChargeType(const std::string& chargeType)
setParameter("ChargeType", chargeType);
}
std::string DescribePriceRequest::getCategory()const
{
return category_;
}
void DescribePriceRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}
bool DescribePriceRequest::getForceUpgrade()const
{
return forceUpgrade_;

View File

@@ -77,6 +77,8 @@ void DescribePriceResult::parse(const std::string &payload)
order_.discountAmount = orderNode["DiscountAmount"].asString();
if(!orderNode["Currency"].isNull())
order_.currency = orderNode["Currency"].asString();
if(!orderNode["HandlingFeeAmount"].isNull())
order_.handlingFeeAmount = orderNode["HandlingFeeAmount"].asString();
auto allCouponsNode = orderNode["Coupons"]["Coupon"];
for (auto orderNodeCouponsCoupon : allCouponsNode)
{

View File

@@ -57,6 +57,8 @@ void DescribeRunningLogRecordsResult::parse(const std::string &payload)
itemsObject.content = valueItemsLogRecords["Content"].asString();
if(!valueItemsLogRecords["InstanceId"].isNull())
itemsObject.instanceId = valueItemsLogRecords["InstanceId"].asString();
if(!valueItemsLogRecords["NodeId"].isNull())
itemsObject.nodeId = valueItemsLogRecords["NodeId"].asString();
items_.push_back(itemsObject);
}
if(!value["InstanceId"].isNull())

View File

@@ -38,6 +38,17 @@ void MigrateToOtherZoneRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string MigrateToOtherZoneRequest::getSecondaryZoneId()const
{
return secondaryZoneId_;
}
void MigrateToOtherZoneRequest::setSecondaryZoneId(const std::string& secondaryZoneId)
{
secondaryZoneId_ = secondaryZoneId;
setParameter("SecondaryZoneId", secondaryZoneId);
}
std::string MigrateToOtherZoneRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -60,6 +60,17 @@ void ModifyInstanceConfigRequest::setSecurityToken(const std::string& securityTo
setParameter("SecurityToken", securityToken);
}
std::string ModifyInstanceConfigRequest::getProduct()const
{
return product_;
}
void ModifyInstanceConfigRequest::setProduct(const std::string& product)
{
product_ = product;
setParameter("Product", product);
}
std::string ModifyInstanceConfigRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
@@ -104,6 +115,17 @@ void ModifyInstanceConfigRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::string ModifyInstanceConfigRequest::getCategory()const
{
return category_;
}
void ModifyInstanceConfigRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}
std::string ModifyInstanceConfigRequest::getConfig()const
{
return config_;

View File

@@ -0,0 +1,150 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/r-kvstore/model/TransformInstanceChargeTypeRequest.h>
using AlibabaCloud::R_kvstore::Model::TransformInstanceChargeTypeRequest;
TransformInstanceChargeTypeRequest::TransformInstanceChargeTypeRequest() :
RpcServiceRequest("r-kvstore", "2015-01-01", "TransformInstanceChargeType")
{
setMethod(HttpRequest::Method::Post);
}
TransformInstanceChargeTypeRequest::~TransformInstanceChargeTypeRequest()
{}
long TransformInstanceChargeTypeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void TransformInstanceChargeTypeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string TransformInstanceChargeTypeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void TransformInstanceChargeTypeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string TransformInstanceChargeTypeRequest::getSecurityToken()const
{
return securityToken_;
}
void TransformInstanceChargeTypeRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
long TransformInstanceChargeTypeRequest::getPeriod()const
{
return period_;
}
void TransformInstanceChargeTypeRequest::setPeriod(long period)
{
period_ = period;
setParameter("Period", std::to_string(period));
}
bool TransformInstanceChargeTypeRequest::getAutoPay()const
{
return autoPay_;
}
void TransformInstanceChargeTypeRequest::setAutoPay(bool autoPay)
{
autoPay_ = autoPay;
setParameter("AutoPay", autoPay ? "true" : "false");
}
std::string TransformInstanceChargeTypeRequest::getFromApp()const
{
return fromApp_;
}
void TransformInstanceChargeTypeRequest::setFromApp(const std::string& fromApp)
{
fromApp_ = fromApp;
setParameter("FromApp", fromApp);
}
std::string TransformInstanceChargeTypeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void TransformInstanceChargeTypeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string TransformInstanceChargeTypeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void TransformInstanceChargeTypeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long TransformInstanceChargeTypeRequest::getOwnerId()const
{
return ownerId_;
}
void TransformInstanceChargeTypeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string TransformInstanceChargeTypeRequest::getInstanceId()const
{
return instanceId_;
}
void TransformInstanceChargeTypeRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string TransformInstanceChargeTypeRequest::getChargeType()const
{
return chargeType_;
}
void TransformInstanceChargeTypeRequest::setChargeType(const std::string& chargeType)
{
chargeType_ = chargeType;
setParameter("ChargeType", chargeType);
}

View File

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

View File

@@ -137,3 +137,14 @@ void TransformToPrePaidRequest::setInstanceId(const std::string& instanceId)
setParameter("InstanceId", instanceId);
}
std::string TransformToPrePaidRequest::getChargeType()const
{
return chargeType_;
}
void TransformToPrePaidRequest::setChargeType(const std::string& chargeType)
{
chargeType_ = chargeType;
setParameter("ChargeType", chargeType);
}