Support new feature.
This commit is contained in:
@@ -147,6 +147,8 @@ set(polardb_public_header_model
|
|||||||
include/alibabacloud/polardb/model/DescribeDBNodesParametersResult.h
|
include/alibabacloud/polardb/model/DescribeDBNodesParametersResult.h
|
||||||
include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h
|
include/alibabacloud/polardb/model/DescribeDBProxyPerformanceRequest.h
|
||||||
include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.h
|
include/alibabacloud/polardb/model/DescribeDBProxyPerformanceResult.h
|
||||||
|
include/alibabacloud/polardb/model/DescribeDasConfigRequest.h
|
||||||
|
include/alibabacloud/polardb/model/DescribeDasConfigResult.h
|
||||||
include/alibabacloud/polardb/model/DescribeDatabasesRequest.h
|
include/alibabacloud/polardb/model/DescribeDatabasesRequest.h
|
||||||
include/alibabacloud/polardb/model/DescribeDatabasesResult.h
|
include/alibabacloud/polardb/model/DescribeDatabasesResult.h
|
||||||
include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h
|
include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h
|
||||||
@@ -434,6 +436,8 @@ set(polardb_src
|
|||||||
src/model/DescribeDBNodesParametersResult.cc
|
src/model/DescribeDBNodesParametersResult.cc
|
||||||
src/model/DescribeDBProxyPerformanceRequest.cc
|
src/model/DescribeDBProxyPerformanceRequest.cc
|
||||||
src/model/DescribeDBProxyPerformanceResult.cc
|
src/model/DescribeDBProxyPerformanceResult.cc
|
||||||
|
src/model/DescribeDasConfigRequest.cc
|
||||||
|
src/model/DescribeDasConfigResult.cc
|
||||||
src/model/DescribeDatabasesRequest.cc
|
src/model/DescribeDatabasesRequest.cc
|
||||||
src/model/DescribeDatabasesResult.cc
|
src/model/DescribeDatabasesResult.cc
|
||||||
src/model/DescribeDetachedBackupsRequest.cc
|
src/model/DescribeDetachedBackupsRequest.cc
|
||||||
|
|||||||
@@ -148,6 +148,8 @@
|
|||||||
#include "model/DescribeDBNodesParametersResult.h"
|
#include "model/DescribeDBNodesParametersResult.h"
|
||||||
#include "model/DescribeDBProxyPerformanceRequest.h"
|
#include "model/DescribeDBProxyPerformanceRequest.h"
|
||||||
#include "model/DescribeDBProxyPerformanceResult.h"
|
#include "model/DescribeDBProxyPerformanceResult.h"
|
||||||
|
#include "model/DescribeDasConfigRequest.h"
|
||||||
|
#include "model/DescribeDasConfigResult.h"
|
||||||
#include "model/DescribeDatabasesRequest.h"
|
#include "model/DescribeDatabasesRequest.h"
|
||||||
#include "model/DescribeDatabasesResult.h"
|
#include "model/DescribeDatabasesResult.h"
|
||||||
#include "model/DescribeDetachedBackupsRequest.h"
|
#include "model/DescribeDetachedBackupsRequest.h"
|
||||||
@@ -504,6 +506,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::DescribeDBProxyPerformanceResult> DescribeDBProxyPerformanceOutcome;
|
typedef Outcome<Error, Model::DescribeDBProxyPerformanceResult> DescribeDBProxyPerformanceOutcome;
|
||||||
typedef std::future<DescribeDBProxyPerformanceOutcome> DescribeDBProxyPerformanceOutcomeCallable;
|
typedef std::future<DescribeDBProxyPerformanceOutcome> DescribeDBProxyPerformanceOutcomeCallable;
|
||||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDBProxyPerformanceRequest&, const DescribeDBProxyPerformanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBProxyPerformanceAsyncHandler;
|
typedef std::function<void(const PolardbClient*, const Model::DescribeDBProxyPerformanceRequest&, const DescribeDBProxyPerformanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBProxyPerformanceAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DescribeDasConfigResult> DescribeDasConfigOutcome;
|
||||||
|
typedef std::future<DescribeDasConfigOutcome> DescribeDasConfigOutcomeCallable;
|
||||||
|
typedef std::function<void(const PolardbClient*, const Model::DescribeDasConfigRequest&, const DescribeDasConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDasConfigAsyncHandler;
|
||||||
typedef Outcome<Error, Model::DescribeDatabasesResult> DescribeDatabasesOutcome;
|
typedef Outcome<Error, Model::DescribeDatabasesResult> DescribeDatabasesOutcome;
|
||||||
typedef std::future<DescribeDatabasesOutcome> DescribeDatabasesOutcomeCallable;
|
typedef std::future<DescribeDatabasesOutcome> DescribeDatabasesOutcomeCallable;
|
||||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDatabasesRequest&, const DescribeDatabasesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDatabasesAsyncHandler;
|
typedef std::function<void(const PolardbClient*, const Model::DescribeDatabasesRequest&, const DescribeDatabasesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDatabasesAsyncHandler;
|
||||||
@@ -935,6 +940,9 @@ namespace AlibabaCloud
|
|||||||
DescribeDBProxyPerformanceOutcome describeDBProxyPerformance(const Model::DescribeDBProxyPerformanceRequest &request)const;
|
DescribeDBProxyPerformanceOutcome describeDBProxyPerformance(const Model::DescribeDBProxyPerformanceRequest &request)const;
|
||||||
void describeDBProxyPerformanceAsync(const Model::DescribeDBProxyPerformanceRequest& request, const DescribeDBProxyPerformanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void describeDBProxyPerformanceAsync(const Model::DescribeDBProxyPerformanceRequest& request, const DescribeDBProxyPerformanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
DescribeDBProxyPerformanceOutcomeCallable describeDBProxyPerformanceCallable(const Model::DescribeDBProxyPerformanceRequest& request) const;
|
DescribeDBProxyPerformanceOutcomeCallable describeDBProxyPerformanceCallable(const Model::DescribeDBProxyPerformanceRequest& request) const;
|
||||||
|
DescribeDasConfigOutcome describeDasConfig(const Model::DescribeDasConfigRequest &request)const;
|
||||||
|
void describeDasConfigAsync(const Model::DescribeDasConfigRequest& request, const DescribeDasConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DescribeDasConfigOutcomeCallable describeDasConfigCallable(const Model::DescribeDasConfigRequest& request) const;
|
||||||
DescribeDatabasesOutcome describeDatabases(const Model::DescribeDatabasesRequest &request)const;
|
DescribeDatabasesOutcome describeDatabases(const Model::DescribeDatabasesRequest &request)const;
|
||||||
void describeDatabasesAsync(const Model::DescribeDatabasesRequest& request, const DescribeDatabasesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void describeDatabasesAsync(const Model::DescribeDatabasesRequest& request, const DescribeDatabasesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
DescribeDatabasesOutcomeCallable describeDatabasesCallable(const Model::DescribeDatabasesRequest& request) const;
|
DescribeDatabasesOutcomeCallable describeDatabasesCallable(const Model::DescribeDatabasesRequest& request) const;
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ public:
|
|||||||
void setAccountPrivilege(const std::string &accountPrivilege);
|
void setAccountPrivilege(const std::string &accountPrivilege);
|
||||||
std::string getAccountName() const;
|
std::string getAccountName() const;
|
||||||
void setAccountName(const std::string &accountName);
|
void setAccountName(const std::string &accountName);
|
||||||
|
std::string getTairAccountPassword() const;
|
||||||
|
void setTairAccountPassword(const std::string &tairAccountPassword);
|
||||||
std::string getResourceOwnerAccount() const;
|
std::string getResourceOwnerAccount() const;
|
||||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||||
std::string getDBClusterId() const;
|
std::string getDBClusterId() const;
|
||||||
@@ -67,6 +69,7 @@ private:
|
|||||||
std::string accessKeyId_;
|
std::string accessKeyId_;
|
||||||
std::string accountPrivilege_;
|
std::string accountPrivilege_;
|
||||||
std::string accountName_;
|
std::string accountName_;
|
||||||
|
std::string tairAccountPassword_;
|
||||||
std::string resourceOwnerAccount_;
|
std::string resourceOwnerAccount_;
|
||||||
std::string dBClusterId_;
|
std::string dBClusterId_;
|
||||||
std::string ownerAccount_;
|
std::string ownerAccount_;
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ public:
|
|||||||
void setSecurityIPList(const std::string &securityIPList);
|
void setSecurityIPList(const std::string &securityIPList);
|
||||||
std::string getDBMinorVersion() const;
|
std::string getDBMinorVersion() const;
|
||||||
void setDBMinorVersion(const std::string &dBMinorVersion);
|
void setDBMinorVersion(const std::string &dBMinorVersion);
|
||||||
int getProvisionedIops() const;
|
long getProvisionedIops() const;
|
||||||
void setProvisionedIops(int provisionedIops);
|
void setProvisionedIops(long provisionedIops);
|
||||||
bool getAutoRenew() const;
|
bool getAutoRenew() const;
|
||||||
void setAutoRenew(bool autoRenew);
|
void setAutoRenew(bool autoRenew);
|
||||||
std::string getHotStandbyCluster() const;
|
std::string getHotStandbyCluster() const;
|
||||||
@@ -167,7 +167,7 @@ private:
|
|||||||
std::string vSwitchId_;
|
std::string vSwitchId_;
|
||||||
std::string securityIPList_;
|
std::string securityIPList_;
|
||||||
std::string dBMinorVersion_;
|
std::string dBMinorVersion_;
|
||||||
int provisionedIops_;
|
long provisionedIops_;
|
||||||
bool autoRenew_;
|
bool autoRenew_;
|
||||||
std::string hotStandbyCluster_;
|
std::string hotStandbyCluster_;
|
||||||
std::string storagePayType_;
|
std::string storagePayType_;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ namespace AlibabaCloud
|
|||||||
std::string accountLockState;
|
std::string accountLockState;
|
||||||
std::string accountPasswordValidTime;
|
std::string accountPasswordValidTime;
|
||||||
std::string accountType;
|
std::string accountType;
|
||||||
|
std::string tairPasswordSetted;
|
||||||
std::vector<DBAccount::DatabasePrivilege> databasePrivileges;
|
std::vector<DBAccount::DatabasePrivilege> databasePrivileges;
|
||||||
std::string accountName;
|
std::string accountName;
|
||||||
std::string accountPassword;
|
std::string accountPassword;
|
||||||
|
|||||||
@@ -49,10 +49,12 @@ namespace AlibabaCloud
|
|||||||
int maxConnections;
|
int maxConnections;
|
||||||
std::string addedCpuCores;
|
std::string addedCpuCores;
|
||||||
std::string dBNodeRole;
|
std::string dBNodeRole;
|
||||||
|
std::string subCluster;
|
||||||
std::string imciSwitch;
|
std::string imciSwitch;
|
||||||
std::string dBNodeId;
|
std::string dBNodeId;
|
||||||
int maxIOPS;
|
int maxIOPS;
|
||||||
std::string dBNodeClass;
|
std::string dBNodeClass;
|
||||||
|
std::string tair;
|
||||||
std::string serverlessType;
|
std::string serverlessType;
|
||||||
std::string creationTime;
|
std::string creationTime;
|
||||||
std::string cpuCores;
|
std::string cpuCores;
|
||||||
@@ -129,6 +131,7 @@ namespace AlibabaCloud
|
|||||||
RelatedAPInstance getRelatedAPInstance()const;
|
RelatedAPInstance getRelatedAPInstance()const;
|
||||||
long getSQLSize()const;
|
long getSQLSize()const;
|
||||||
std::string getRegionId()const;
|
std::string getRegionId()const;
|
||||||
|
bool getHotStandbyHealthy()const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
@@ -190,6 +193,7 @@ namespace AlibabaCloud
|
|||||||
RelatedAPInstance relatedAPInstance_;
|
RelatedAPInstance relatedAPInstance_;
|
||||||
long sQLSize_;
|
long sQLSize_;
|
||||||
std::string regionId_;
|
std::string regionId_;
|
||||||
|
bool hotStandbyHealthy_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ namespace AlibabaCloud
|
|||||||
std::string dBEndpointId;
|
std::string dBEndpointId;
|
||||||
std::string endpointType;
|
std::string endpointType;
|
||||||
std::vector<DBClusterEndpoint::Address> addressItems;
|
std::vector<DBClusterEndpoint::Address> addressItems;
|
||||||
|
std::string readWriteMode;
|
||||||
};
|
};
|
||||||
struct RdsEndpoint
|
struct RdsEndpoint
|
||||||
{
|
{
|
||||||
@@ -61,6 +62,7 @@ namespace AlibabaCloud
|
|||||||
std::string netType;
|
std::string netType;
|
||||||
};
|
};
|
||||||
std::string dBEndpointId;
|
std::string dBEndpointId;
|
||||||
|
std::string custinsType;
|
||||||
std::string endpointType;
|
std::string endpointType;
|
||||||
std::vector<RdsEndpoint::Address2> addressItems1;
|
std::vector<RdsEndpoint::Address2> addressItems1;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ public:
|
|||||||
void setConnectionString(const std::string &connectionString);
|
void setConnectionString(const std::string &connectionString);
|
||||||
int getRecentExpirationInterval() const;
|
int getRecentExpirationInterval() const;
|
||||||
void setRecentExpirationInterval(int recentExpirationInterval);
|
void setRecentExpirationInterval(int recentExpirationInterval);
|
||||||
|
std::string getDescribeType() const;
|
||||||
|
void setDescribeType(const std::string &describeType);
|
||||||
int getPageNumber() const;
|
int getPageNumber() const;
|
||||||
void setPageNumber(int pageNumber);
|
void setPageNumber(int pageNumber);
|
||||||
std::string getDBNodeIds() const;
|
std::string getDBNodeIds() const;
|
||||||
@@ -83,6 +85,7 @@ private:
|
|||||||
std::string dBClusterStatus_;
|
std::string dBClusterStatus_;
|
||||||
std::string connectionString_;
|
std::string connectionString_;
|
||||||
int recentExpirationInterval_;
|
int recentExpirationInterval_;
|
||||||
|
std::string describeType_;
|
||||||
int pageNumber_;
|
int pageNumber_;
|
||||||
std::string dBNodeIds_;
|
std::string dBNodeIds_;
|
||||||
std::string accessKeyId_;
|
std::string accessKeyId_;
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* 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_POLARDB_MODEL_DESCRIBEDASCONFIGREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDASCONFIGREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/polardb/PolardbExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace Polardb {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_POLARDB_EXPORT DescribeDasConfigRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
DescribeDasConfigRequest();
|
||||||
|
~DescribeDasConfigRequest();
|
||||||
|
long getResourceOwnerId() const;
|
||||||
|
void setResourceOwnerId(long resourceOwnerId);
|
||||||
|
std::string getAccessKeyId() const;
|
||||||
|
void setAccessKeyId(const std::string &accessKeyId);
|
||||||
|
std::string getResourceOwnerAccount() const;
|
||||||
|
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||||
|
std::string getDBClusterId() const;
|
||||||
|
void setDBClusterId(const std::string &dBClusterId);
|
||||||
|
std::string getOwnerAccount() const;
|
||||||
|
void setOwnerAccount(const std::string &ownerAccount);
|
||||||
|
long getOwnerId() const;
|
||||||
|
void setOwnerId(long ownerId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
long resourceOwnerId_;
|
||||||
|
std::string accessKeyId_;
|
||||||
|
std::string resourceOwnerAccount_;
|
||||||
|
std::string dBClusterId_;
|
||||||
|
std::string ownerAccount_;
|
||||||
|
long ownerId_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace Polardb
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDASCONFIGREQUEST_H_
|
||||||
@@ -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_POLARDB_MODEL_DESCRIBEDASCONFIGRESULT_H_
|
||||||
|
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDASCONFIGRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/polardb/PolardbExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Polardb
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_POLARDB_EXPORT DescribeDasConfigResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
DescribeDasConfigResult();
|
||||||
|
explicit DescribeDasConfigResult(const std::string &payload);
|
||||||
|
~DescribeDasConfigResult();
|
||||||
|
long getStorageUpperBound()const;
|
||||||
|
std::string getStorageAutoScale()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
long storageUpperBound_;
|
||||||
|
std::string storageAutoScale_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDASCONFIGRESULT_H_
|
||||||
@@ -36,6 +36,8 @@ public:
|
|||||||
void setClientToken(const std::string &clientToken);
|
void setClientToken(const std::string &clientToken);
|
||||||
std::string getAccessKeyId() const;
|
std::string getAccessKeyId() const;
|
||||||
void setAccessKeyId(const std::string &accessKeyId);
|
void setAccessKeyId(const std::string &accessKeyId);
|
||||||
|
bool getRollBackForDisaster() const;
|
||||||
|
void setRollBackForDisaster(bool rollBackForDisaster);
|
||||||
std::string getResourceOwnerAccount() const;
|
std::string getResourceOwnerAccount() const;
|
||||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||||
std::string getDBClusterId() const;
|
std::string getDBClusterId() const;
|
||||||
@@ -51,6 +53,7 @@ private:
|
|||||||
long resourceOwnerId_;
|
long resourceOwnerId_;
|
||||||
std::string clientToken_;
|
std::string clientToken_;
|
||||||
std::string accessKeyId_;
|
std::string accessKeyId_;
|
||||||
|
bool rollBackForDisaster_;
|
||||||
std::string resourceOwnerAccount_;
|
std::string resourceOwnerAccount_;
|
||||||
std::string dBClusterId_;
|
std::string dBClusterId_;
|
||||||
std::string ownerAccount_;
|
std::string ownerAccount_;
|
||||||
|
|||||||
@@ -2319,6 +2319,42 @@ PolardbClient::DescribeDBProxyPerformanceOutcomeCallable PolardbClient::describe
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PolardbClient::DescribeDasConfigOutcome PolardbClient::describeDasConfig(const DescribeDasConfigRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DescribeDasConfigOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DescribeDasConfigOutcome(DescribeDasConfigResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DescribeDasConfigOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PolardbClient::describeDasConfigAsync(const DescribeDasConfigRequest& request, const DescribeDasConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, describeDasConfig(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
PolardbClient::DescribeDasConfigOutcomeCallable PolardbClient::describeDasConfigCallable(const DescribeDasConfigRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DescribeDasConfigOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->describeDasConfig(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
PolardbClient::DescribeDatabasesOutcome PolardbClient::describeDatabases(const DescribeDatabasesRequest &request) const
|
PolardbClient::DescribeDatabasesOutcome PolardbClient::describeDatabases(const DescribeDatabasesRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ void CreateAccountRequest::setAccountName(const std::string &accountName) {
|
|||||||
setParameter(std::string("AccountName"), accountName);
|
setParameter(std::string("AccountName"), accountName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CreateAccountRequest::getTairAccountPassword() const {
|
||||||
|
return tairAccountPassword_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateAccountRequest::setTairAccountPassword(const std::string &tairAccountPassword) {
|
||||||
|
tairAccountPassword_ = tairAccountPassword;
|
||||||
|
setParameter(std::string("TairAccountPassword"), tairAccountPassword);
|
||||||
|
}
|
||||||
|
|
||||||
std::string CreateAccountRequest::getResourceOwnerAccount() const {
|
std::string CreateAccountRequest::getResourceOwnerAccount() const {
|
||||||
return resourceOwnerAccount_;
|
return resourceOwnerAccount_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,11 +201,11 @@ void CreateDBClusterRequest::setDBMinorVersion(const std::string &dBMinorVersion
|
|||||||
setParameter(std::string("DBMinorVersion"), dBMinorVersion);
|
setParameter(std::string("DBMinorVersion"), dBMinorVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CreateDBClusterRequest::getProvisionedIops() const {
|
long CreateDBClusterRequest::getProvisionedIops() const {
|
||||||
return provisionedIops_;
|
return provisionedIops_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDBClusterRequest::setProvisionedIops(int provisionedIops) {
|
void CreateDBClusterRequest::setProvisionedIops(long provisionedIops) {
|
||||||
provisionedIops_ = provisionedIops;
|
provisionedIops_ = provisionedIops;
|
||||||
setParameter(std::string("ProvisionedIops"), std::to_string(provisionedIops));
|
setParameter(std::string("ProvisionedIops"), std::to_string(provisionedIops));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ void DescribeAccountsResult::parse(const std::string &payload)
|
|||||||
accountsObject.accountName = valueAccountsDBAccount["AccountName"].asString();
|
accountsObject.accountName = valueAccountsDBAccount["AccountName"].asString();
|
||||||
if(!valueAccountsDBAccount["AccountPassword"].isNull())
|
if(!valueAccountsDBAccount["AccountPassword"].isNull())
|
||||||
accountsObject.accountPassword = valueAccountsDBAccount["AccountPassword"].asString();
|
accountsObject.accountPassword = valueAccountsDBAccount["AccountPassword"].asString();
|
||||||
|
if(!valueAccountsDBAccount["TairPasswordSetted"].isNull())
|
||||||
|
accountsObject.tairPasswordSetted = valueAccountsDBAccount["TairPasswordSetted"].asString();
|
||||||
auto allDatabasePrivilegesNode = valueAccountsDBAccount["DatabasePrivileges"]["DatabasePrivilege"];
|
auto allDatabasePrivilegesNode = valueAccountsDBAccount["DatabasePrivileges"]["DatabasePrivilege"];
|
||||||
for (auto valueAccountsDBAccountDatabasePrivilegesDatabasePrivilege : allDatabasePrivilegesNode)
|
for (auto valueAccountsDBAccountDatabasePrivilegesDatabasePrivilege : allDatabasePrivilegesNode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,10 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
|
|||||||
dBNodesObject.serverWeight = valueDBNodesDBNode["ServerWeight"].asString();
|
dBNodesObject.serverWeight = valueDBNodesDBNode["ServerWeight"].asString();
|
||||||
if(!valueDBNodesDBNode["ServerlessType"].isNull())
|
if(!valueDBNodesDBNode["ServerlessType"].isNull())
|
||||||
dBNodesObject.serverlessType = valueDBNodesDBNode["ServerlessType"].asString();
|
dBNodesObject.serverlessType = valueDBNodesDBNode["ServerlessType"].asString();
|
||||||
|
if(!valueDBNodesDBNode["SubCluster"].isNull())
|
||||||
|
dBNodesObject.subCluster = valueDBNodesDBNode["SubCluster"].asString();
|
||||||
|
if(!valueDBNodesDBNode["Tair"].isNull())
|
||||||
|
dBNodesObject.tair = valueDBNodesDBNode["Tair"].asString();
|
||||||
dBNodes_.push_back(dBNodesObject);
|
dBNodes_.push_back(dBNodesObject);
|
||||||
}
|
}
|
||||||
auto allTagsNode = value["Tags"]["Tag"];
|
auto allTagsNode = value["Tags"]["Tag"];
|
||||||
@@ -212,6 +216,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
|
|||||||
aiType_ = value["AiType"].asString();
|
aiType_ = value["AiType"].asString();
|
||||||
if(!value["ProvisionedIops"].isNull())
|
if(!value["ProvisionedIops"].isNull())
|
||||||
provisionedIops_ = value["ProvisionedIops"].asString();
|
provisionedIops_ = value["ProvisionedIops"].asString();
|
||||||
|
if(!value["HotStandbyHealthy"].isNull())
|
||||||
|
hotStandbyHealthy_ = value["HotStandbyHealthy"].asString() == "true";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,3 +506,8 @@ std::string DescribeDBClusterAttributeResult::getRegionId()const
|
|||||||
return regionId_;
|
return regionId_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DescribeDBClusterAttributeResult::getHotStandbyHealthy()const
|
||||||
|
{
|
||||||
|
return hotStandbyHealthy_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ void DescribeDBClusterMigrationResult::parse(const std::string &payload)
|
|||||||
dBClusterEndpointListObject.dBEndpointId = valueDBClusterEndpointListDBClusterEndpoint["DBEndpointId"].asString();
|
dBClusterEndpointListObject.dBEndpointId = valueDBClusterEndpointListDBClusterEndpoint["DBEndpointId"].asString();
|
||||||
if(!valueDBClusterEndpointListDBClusterEndpoint["EndpointType"].isNull())
|
if(!valueDBClusterEndpointListDBClusterEndpoint["EndpointType"].isNull())
|
||||||
dBClusterEndpointListObject.endpointType = valueDBClusterEndpointListDBClusterEndpoint["EndpointType"].asString();
|
dBClusterEndpointListObject.endpointType = valueDBClusterEndpointListDBClusterEndpoint["EndpointType"].asString();
|
||||||
|
if(!valueDBClusterEndpointListDBClusterEndpoint["ReadWriteMode"].isNull())
|
||||||
|
dBClusterEndpointListObject.readWriteMode = valueDBClusterEndpointListDBClusterEndpoint["ReadWriteMode"].asString();
|
||||||
auto allAddressItemsNode = valueDBClusterEndpointListDBClusterEndpoint["AddressItems"]["Address"];
|
auto allAddressItemsNode = valueDBClusterEndpointListDBClusterEndpoint["AddressItems"]["Address"];
|
||||||
for (auto valueDBClusterEndpointListDBClusterEndpointAddressItemsAddress : allAddressItemsNode)
|
for (auto valueDBClusterEndpointListDBClusterEndpointAddressItemsAddress : allAddressItemsNode)
|
||||||
{
|
{
|
||||||
@@ -77,6 +79,8 @@ void DescribeDBClusterMigrationResult::parse(const std::string &payload)
|
|||||||
rdsEndpointListObject.dBEndpointId = valueRdsEndpointListRdsEndpoint["DBEndpointId"].asString();
|
rdsEndpointListObject.dBEndpointId = valueRdsEndpointListRdsEndpoint["DBEndpointId"].asString();
|
||||||
if(!valueRdsEndpointListRdsEndpoint["EndpointType"].isNull())
|
if(!valueRdsEndpointListRdsEndpoint["EndpointType"].isNull())
|
||||||
rdsEndpointListObject.endpointType = valueRdsEndpointListRdsEndpoint["EndpointType"].asString();
|
rdsEndpointListObject.endpointType = valueRdsEndpointListRdsEndpoint["EndpointType"].asString();
|
||||||
|
if(!valueRdsEndpointListRdsEndpoint["CustinsType"].isNull())
|
||||||
|
rdsEndpointListObject.custinsType = valueRdsEndpointListRdsEndpoint["CustinsType"].asString();
|
||||||
auto allAddressItems1Node = valueRdsEndpointListRdsEndpoint["AddressItems"]["Address"];
|
auto allAddressItems1Node = valueRdsEndpointListRdsEndpoint["AddressItems"]["Address"];
|
||||||
for (auto valueRdsEndpointListRdsEndpointAddressItemsAddress : allAddressItems1Node)
|
for (auto valueRdsEndpointListRdsEndpointAddressItemsAddress : allAddressItems1Node)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,6 +70,15 @@ void DescribeDBClustersRequest::setRecentExpirationInterval(int recentExpiration
|
|||||||
setParameter(std::string("RecentExpirationInterval"), std::to_string(recentExpirationInterval));
|
setParameter(std::string("RecentExpirationInterval"), std::to_string(recentExpirationInterval));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string DescribeDBClustersRequest::getDescribeType() const {
|
||||||
|
return describeType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDBClustersRequest::setDescribeType(const std::string &describeType) {
|
||||||
|
describeType_ = describeType;
|
||||||
|
setParameter(std::string("DescribeType"), describeType);
|
||||||
|
}
|
||||||
|
|
||||||
int DescribeDBClustersRequest::getPageNumber() const {
|
int DescribeDBClustersRequest::getPageNumber() const {
|
||||||
return pageNumber_;
|
return pageNumber_;
|
||||||
}
|
}
|
||||||
|
|||||||
81
polardb/src/model/DescribeDasConfigRequest.cc
Normal file
81
polardb/src/model/DescribeDasConfigRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* 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/polardb/model/DescribeDasConfigRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Polardb::Model::DescribeDasConfigRequest;
|
||||||
|
|
||||||
|
DescribeDasConfigRequest::DescribeDasConfigRequest()
|
||||||
|
: RpcServiceRequest("polardb", "2017-08-01", "DescribeDasConfig") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DescribeDasConfigRequest::~DescribeDasConfigRequest() {}
|
||||||
|
|
||||||
|
long DescribeDasConfigRequest::getResourceOwnerId() const {
|
||||||
|
return resourceOwnerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||||
|
resourceOwnerId_ = resourceOwnerId;
|
||||||
|
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DescribeDasConfigRequest::getAccessKeyId() const {
|
||||||
|
return accessKeyId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||||
|
accessKeyId_ = accessKeyId;
|
||||||
|
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DescribeDasConfigRequest::getResourceOwnerAccount() const {
|
||||||
|
return resourceOwnerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||||
|
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||||
|
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DescribeDasConfigRequest::getDBClusterId() const {
|
||||||
|
return dBClusterId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setDBClusterId(const std::string &dBClusterId) {
|
||||||
|
dBClusterId_ = dBClusterId;
|
||||||
|
setParameter(std::string("DBClusterId"), dBClusterId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DescribeDasConfigRequest::getOwnerAccount() const {
|
||||||
|
return ownerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||||
|
ownerAccount_ = ownerAccount;
|
||||||
|
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
long DescribeDasConfigRequest::getOwnerId() const {
|
||||||
|
return ownerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DescribeDasConfigRequest::setOwnerId(long ownerId) {
|
||||||
|
ownerId_ = ownerId;
|
||||||
|
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||||
|
}
|
||||||
|
|
||||||
58
polardb/src/model/DescribeDasConfigResult.cc
Normal file
58
polardb/src/model/DescribeDasConfigResult.cc
Normal 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/polardb/model/DescribeDasConfigResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Polardb;
|
||||||
|
using namespace AlibabaCloud::Polardb::Model;
|
||||||
|
|
||||||
|
DescribeDasConfigResult::DescribeDasConfigResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DescribeDasConfigResult::DescribeDasConfigResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DescribeDasConfigResult::~DescribeDasConfigResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DescribeDasConfigResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["StorageAutoScale"].isNull())
|
||||||
|
storageAutoScale_ = value["StorageAutoScale"].asString();
|
||||||
|
if(!value["StorageUpperBound"].isNull())
|
||||||
|
storageUpperBound_ = std::stol(value["StorageUpperBound"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
long DescribeDasConfigResult::getStorageUpperBound()const
|
||||||
|
{
|
||||||
|
return storageUpperBound_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DescribeDasConfigResult::getStorageAutoScale()const
|
||||||
|
{
|
||||||
|
return storageAutoScale_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -52,6 +52,15 @@ void FailoverDBClusterRequest::setAccessKeyId(const std::string &accessKeyId) {
|
|||||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FailoverDBClusterRequest::getRollBackForDisaster() const {
|
||||||
|
return rollBackForDisaster_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FailoverDBClusterRequest::setRollBackForDisaster(bool rollBackForDisaster) {
|
||||||
|
rollBackForDisaster_ = rollBackForDisaster;
|
||||||
|
setParameter(std::string("RollBackForDisaster"), rollBackForDisaster ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
std::string FailoverDBClusterRequest::getResourceOwnerAccount() const {
|
std::string FailoverDBClusterRequest::getResourceOwnerAccount() const {
|
||||||
return resourceOwnerAccount_;
|
return resourceOwnerAccount_;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user