Support ModifyDBClusterPrimaryZone.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2020-11-17 Version: patch
|
||||
- Support ModifyDBClusterPrimaryZone.
|
||||
- Support DescribeGlobalDatabaseNetworks.
|
||||
|
||||
2020-11-17 Version: patch
|
||||
- Supported International-26888 Sites Region Endpoints.
|
||||
|
||||
|
||||
@@ -95,6 +95,8 @@ set(polardb_public_header_model
|
||||
include/alibabacloud/polardb/model/DescribeDatabasesResult.h
|
||||
include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h
|
||||
include/alibabacloud/polardb/model/DescribeDetachedBackupsResult.h
|
||||
include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksRequest.h
|
||||
include/alibabacloud/polardb/model/DescribeGlobalDatabaseNetworksResult.h
|
||||
include/alibabacloud/polardb/model/DescribeLogBackupPolicyRequest.h
|
||||
include/alibabacloud/polardb/model/DescribeLogBackupPolicyResult.h
|
||||
include/alibabacloud/polardb/model/DescribePendingMaintenanceActionRequest.h
|
||||
@@ -137,6 +139,8 @@ set(polardb_public_header_model
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterMonitorResult.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterParametersRequest.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterParametersResult.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterPrimaryZoneRequest.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterPrimaryZoneResult.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterSSLRequest.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterSSLResult.h
|
||||
include/alibabacloud/polardb/model/ModifyDBClusterTDERequest.h
|
||||
@@ -238,6 +242,8 @@ set(polardb_src
|
||||
src/model/DescribeDatabasesResult.cc
|
||||
src/model/DescribeDetachedBackupsRequest.cc
|
||||
src/model/DescribeDetachedBackupsResult.cc
|
||||
src/model/DescribeGlobalDatabaseNetworksRequest.cc
|
||||
src/model/DescribeGlobalDatabaseNetworksResult.cc
|
||||
src/model/DescribeLogBackupPolicyRequest.cc
|
||||
src/model/DescribeLogBackupPolicyResult.cc
|
||||
src/model/DescribePendingMaintenanceActionRequest.cc
|
||||
@@ -280,6 +286,8 @@ set(polardb_src
|
||||
src/model/ModifyDBClusterMonitorResult.cc
|
||||
src/model/ModifyDBClusterParametersRequest.cc
|
||||
src/model/ModifyDBClusterParametersResult.cc
|
||||
src/model/ModifyDBClusterPrimaryZoneRequest.cc
|
||||
src/model/ModifyDBClusterPrimaryZoneResult.cc
|
||||
src/model/ModifyDBClusterSSLRequest.cc
|
||||
src/model/ModifyDBClusterSSLResult.cc
|
||||
src/model/ModifyDBClusterTDERequest.cc
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
#include "model/DescribeDatabasesResult.h"
|
||||
#include "model/DescribeDetachedBackupsRequest.h"
|
||||
#include "model/DescribeDetachedBackupsResult.h"
|
||||
#include "model/DescribeGlobalDatabaseNetworksRequest.h"
|
||||
#include "model/DescribeGlobalDatabaseNetworksResult.h"
|
||||
#include "model/DescribeLogBackupPolicyRequest.h"
|
||||
#include "model/DescribeLogBackupPolicyResult.h"
|
||||
#include "model/DescribePendingMaintenanceActionRequest.h"
|
||||
@@ -138,6 +140,8 @@
|
||||
#include "model/ModifyDBClusterMonitorResult.h"
|
||||
#include "model/ModifyDBClusterParametersRequest.h"
|
||||
#include "model/ModifyDBClusterParametersResult.h"
|
||||
#include "model/ModifyDBClusterPrimaryZoneRequest.h"
|
||||
#include "model/ModifyDBClusterPrimaryZoneResult.h"
|
||||
#include "model/ModifyDBClusterSSLRequest.h"
|
||||
#include "model/ModifyDBClusterSSLResult.h"
|
||||
#include "model/ModifyDBClusterTDERequest.h"
|
||||
@@ -282,6 +286,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeDetachedBackupsResult> DescribeDetachedBackupsOutcome;
|
||||
typedef std::future<DescribeDetachedBackupsOutcome> DescribeDetachedBackupsOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDetachedBackupsRequest&, const DescribeDetachedBackupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDetachedBackupsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeGlobalDatabaseNetworksResult> DescribeGlobalDatabaseNetworksOutcome;
|
||||
typedef std::future<DescribeGlobalDatabaseNetworksOutcome> DescribeGlobalDatabaseNetworksOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeGlobalDatabaseNetworksRequest&, const DescribeGlobalDatabaseNetworksOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeGlobalDatabaseNetworksAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeLogBackupPolicyResult> DescribeLogBackupPolicyOutcome;
|
||||
typedef std::future<DescribeLogBackupPolicyOutcome> DescribeLogBackupPolicyOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeLogBackupPolicyRequest&, const DescribeLogBackupPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLogBackupPolicyAsyncHandler;
|
||||
@@ -345,6 +352,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ModifyDBClusterParametersResult> ModifyDBClusterParametersOutcome;
|
||||
typedef std::future<ModifyDBClusterParametersOutcome> ModifyDBClusterParametersOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::ModifyDBClusterParametersRequest&, const ModifyDBClusterParametersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDBClusterParametersAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyDBClusterPrimaryZoneResult> ModifyDBClusterPrimaryZoneOutcome;
|
||||
typedef std::future<ModifyDBClusterPrimaryZoneOutcome> ModifyDBClusterPrimaryZoneOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::ModifyDBClusterPrimaryZoneRequest&, const ModifyDBClusterPrimaryZoneOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDBClusterPrimaryZoneAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyDBClusterSSLResult> ModifyDBClusterSSLOutcome;
|
||||
typedef std::future<ModifyDBClusterSSLOutcome> ModifyDBClusterSSLOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::ModifyDBClusterSSLRequest&, const ModifyDBClusterSSLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDBClusterSSLAsyncHandler;
|
||||
@@ -497,6 +507,9 @@ namespace AlibabaCloud
|
||||
DescribeDetachedBackupsOutcome describeDetachedBackups(const Model::DescribeDetachedBackupsRequest &request)const;
|
||||
void describeDetachedBackupsAsync(const Model::DescribeDetachedBackupsRequest& request, const DescribeDetachedBackupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeDetachedBackupsOutcomeCallable describeDetachedBackupsCallable(const Model::DescribeDetachedBackupsRequest& request) const;
|
||||
DescribeGlobalDatabaseNetworksOutcome describeGlobalDatabaseNetworks(const Model::DescribeGlobalDatabaseNetworksRequest &request)const;
|
||||
void describeGlobalDatabaseNetworksAsync(const Model::DescribeGlobalDatabaseNetworksRequest& request, const DescribeGlobalDatabaseNetworksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeGlobalDatabaseNetworksOutcomeCallable describeGlobalDatabaseNetworksCallable(const Model::DescribeGlobalDatabaseNetworksRequest& request) const;
|
||||
DescribeLogBackupPolicyOutcome describeLogBackupPolicy(const Model::DescribeLogBackupPolicyRequest &request)const;
|
||||
void describeLogBackupPolicyAsync(const Model::DescribeLogBackupPolicyRequest& request, const DescribeLogBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeLogBackupPolicyOutcomeCallable describeLogBackupPolicyCallable(const Model::DescribeLogBackupPolicyRequest& request) const;
|
||||
@@ -560,6 +573,9 @@ namespace AlibabaCloud
|
||||
ModifyDBClusterParametersOutcome modifyDBClusterParameters(const Model::ModifyDBClusterParametersRequest &request)const;
|
||||
void modifyDBClusterParametersAsync(const Model::ModifyDBClusterParametersRequest& request, const ModifyDBClusterParametersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDBClusterParametersOutcomeCallable modifyDBClusterParametersCallable(const Model::ModifyDBClusterParametersRequest& request) const;
|
||||
ModifyDBClusterPrimaryZoneOutcome modifyDBClusterPrimaryZone(const Model::ModifyDBClusterPrimaryZoneRequest &request)const;
|
||||
void modifyDBClusterPrimaryZoneAsync(const Model::ModifyDBClusterPrimaryZoneRequest& request, const ModifyDBClusterPrimaryZoneAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDBClusterPrimaryZoneOutcomeCallable modifyDBClusterPrimaryZoneCallable(const Model::ModifyDBClusterPrimaryZoneRequest& request) const;
|
||||
ModifyDBClusterSSLOutcome modifyDBClusterSSL(const Model::ModifyDBClusterSSLRequest &request)const;
|
||||
void modifyDBClusterSSLAsync(const Model::ModifyDBClusterSSLRequest& request, const ModifyDBClusterSSLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDBClusterSSLOutcomeCallable modifyDBClusterSSLCallable(const Model::ModifyDBClusterSSLRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKSREQUEST_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/polardb/PolardbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Polardb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_POLARDB_EXPORT DescribeGlobalDatabaseNetworksRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeGlobalDatabaseNetworksRequest();
|
||||
~DescribeGlobalDatabaseNetworksRequest();
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKSREQUEST_H_
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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_DESCRIBEGLOBALDATABASENETWORKSRESULT_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKSRESULT_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 DescribeGlobalDatabaseNetworksResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct GlobalDatabaseNetwork
|
||||
{
|
||||
struct DBCluster
|
||||
{
|
||||
std::string role;
|
||||
std::string dBClusterId;
|
||||
std::string regionId;
|
||||
};
|
||||
std::string gDNStatus;
|
||||
std::string dBVersion;
|
||||
std::string gDNId;
|
||||
std::string createTime;
|
||||
std::string gDNDescription;
|
||||
std::string dBType;
|
||||
std::vector<GlobalDatabaseNetwork::DBCluster> dBClusters;
|
||||
};
|
||||
|
||||
|
||||
DescribeGlobalDatabaseNetworksResult();
|
||||
explicit DescribeGlobalDatabaseNetworksResult(const std::string &payload);
|
||||
~DescribeGlobalDatabaseNetworksResult();
|
||||
int getTotalRecordCount()const;
|
||||
int getPageRecordCount()const;
|
||||
int getPageNumber()const;
|
||||
std::vector<GlobalDatabaseNetwork> getItems()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int totalRecordCount_;
|
||||
int pageRecordCount_;
|
||||
int pageNumber_;
|
||||
std::vector<GlobalDatabaseNetwork> items_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEGLOBALDATABASENETWORKSRESULT_H_
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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_MODIFYDBCLUSTERPRIMARYZONEREQUEST_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_MODIFYDBCLUSTERPRIMARYZONEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/polardb/PolardbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Polardb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_POLARDB_EXPORT ModifyDBClusterPrimaryZoneRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ModifyDBClusterPrimaryZoneRequest();
|
||||
~ModifyDBClusterPrimaryZoneRequest();
|
||||
|
||||
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);
|
||||
std::string getVSwitchId()const;
|
||||
void setVSwitchId(const std::string& vSwitchId);
|
||||
std::string getZoneId()const;
|
||||
void setZoneId(const std::string& zoneId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string dBClusterId_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::string vSwitchId_;
|
||||
std::string zoneId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYDBCLUSTERPRIMARYZONEREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_POLARDB_MODEL_MODIFYDBCLUSTERPRIMARYZONERESULT_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_MODIFYDBCLUSTERPRIMARYZONERESULT_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 ModifyDBClusterPrimaryZoneResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ModifyDBClusterPrimaryZoneResult();
|
||||
explicit ModifyDBClusterPrimaryZoneResult(const std::string &payload);
|
||||
~ModifyDBClusterPrimaryZoneResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYDBCLUSTERPRIMARYZONERESULT_H_
|
||||
@@ -1383,6 +1383,42 @@ PolardbClient::DescribeDetachedBackupsOutcomeCallable PolardbClient::describeDet
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeGlobalDatabaseNetworksOutcome PolardbClient::describeGlobalDatabaseNetworks(const DescribeGlobalDatabaseNetworksRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeGlobalDatabaseNetworksOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeGlobalDatabaseNetworksOutcome(DescribeGlobalDatabaseNetworksResult(outcome.result()));
|
||||
else
|
||||
return DescribeGlobalDatabaseNetworksOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::describeGlobalDatabaseNetworksAsync(const DescribeGlobalDatabaseNetworksRequest& request, const DescribeGlobalDatabaseNetworksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeGlobalDatabaseNetworks(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::DescribeGlobalDatabaseNetworksOutcomeCallable PolardbClient::describeGlobalDatabaseNetworksCallable(const DescribeGlobalDatabaseNetworksRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeGlobalDatabaseNetworksOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeGlobalDatabaseNetworks(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeLogBackupPolicyOutcome PolardbClient::describeLogBackupPolicy(const DescribeLogBackupPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2139,6 +2175,42 @@ PolardbClient::ModifyDBClusterParametersOutcomeCallable PolardbClient::modifyDBC
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterPrimaryZoneOutcome PolardbClient::modifyDBClusterPrimaryZone(const ModifyDBClusterPrimaryZoneRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDBClusterPrimaryZoneOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDBClusterPrimaryZoneOutcome(ModifyDBClusterPrimaryZoneResult(outcome.result()));
|
||||
else
|
||||
return ModifyDBClusterPrimaryZoneOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::modifyDBClusterPrimaryZoneAsync(const ModifyDBClusterPrimaryZoneRequest& request, const ModifyDBClusterPrimaryZoneAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDBClusterPrimaryZone(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterPrimaryZoneOutcomeCallable PolardbClient::modifyDBClusterPrimaryZoneCallable(const ModifyDBClusterPrimaryZoneRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDBClusterPrimaryZoneOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDBClusterPrimaryZone(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterSSLOutcome PolardbClient::modifyDBClusterSSL(const ModifyDBClusterSSLRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
95
polardb/src/model/DescribeGlobalDatabaseNetworksRequest.cc
Normal file
95
polardb/src/model/DescribeGlobalDatabaseNetworksRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/DescribeGlobalDatabaseNetworksRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::DescribeGlobalDatabaseNetworksRequest;
|
||||
|
||||
DescribeGlobalDatabaseNetworksRequest::DescribeGlobalDatabaseNetworksRequest() :
|
||||
RpcServiceRequest("polardb", "2017-08-01", "DescribeGlobalDatabaseNetworks")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeGlobalDatabaseNetworksRequest::~DescribeGlobalDatabaseNetworksRequest()
|
||||
{}
|
||||
|
||||
long DescribeGlobalDatabaseNetworksRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeGlobalDatabaseNetworksRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeGlobalDatabaseNetworksRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
100
polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc
Normal file
100
polardb/src/model/DescribeGlobalDatabaseNetworksResult.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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/DescribeGlobalDatabaseNetworksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
DescribeGlobalDatabaseNetworksResult::DescribeGlobalDatabaseNetworksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeGlobalDatabaseNetworksResult::DescribeGlobalDatabaseNetworksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeGlobalDatabaseNetworksResult::~DescribeGlobalDatabaseNetworksResult()
|
||||
{}
|
||||
|
||||
void DescribeGlobalDatabaseNetworksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItemsNode = value["Items"]["GlobalDatabaseNetwork"];
|
||||
for (auto valueItemsGlobalDatabaseNetwork : allItemsNode)
|
||||
{
|
||||
GlobalDatabaseNetwork itemsObject;
|
||||
if(!valueItemsGlobalDatabaseNetwork["GDNId"].isNull())
|
||||
itemsObject.gDNId = valueItemsGlobalDatabaseNetwork["GDNId"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetwork["GDNStatus"].isNull())
|
||||
itemsObject.gDNStatus = valueItemsGlobalDatabaseNetwork["GDNStatus"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetwork["GDNDescription"].isNull())
|
||||
itemsObject.gDNDescription = valueItemsGlobalDatabaseNetwork["GDNDescription"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetwork["DBType"].isNull())
|
||||
itemsObject.dBType = valueItemsGlobalDatabaseNetwork["DBType"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetwork["DBVersion"].isNull())
|
||||
itemsObject.dBVersion = valueItemsGlobalDatabaseNetwork["DBVersion"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetwork["CreateTime"].isNull())
|
||||
itemsObject.createTime = valueItemsGlobalDatabaseNetwork["CreateTime"].asString();
|
||||
auto allDBClustersNode = valueItemsGlobalDatabaseNetwork["DBClusters"]["DBCluster"];
|
||||
for (auto valueItemsGlobalDatabaseNetworkDBClustersDBCluster : allDBClustersNode)
|
||||
{
|
||||
GlobalDatabaseNetwork::DBCluster dBClustersObject;
|
||||
if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["DBClusterId"].isNull())
|
||||
dBClustersObject.dBClusterId = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["DBClusterId"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["RegionId"].isNull())
|
||||
dBClustersObject.regionId = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["RegionId"].asString();
|
||||
if(!valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].isNull())
|
||||
dBClustersObject.role = valueItemsGlobalDatabaseNetworkDBClustersDBCluster["Role"].asString();
|
||||
itemsObject.dBClusters.push_back(dBClustersObject);
|
||||
}
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeGlobalDatabaseNetworksResult::getTotalRecordCount()const
|
||||
{
|
||||
return totalRecordCount_;
|
||||
}
|
||||
|
||||
int DescribeGlobalDatabaseNetworksResult::getPageRecordCount()const
|
||||
{
|
||||
return pageRecordCount_;
|
||||
}
|
||||
|
||||
int DescribeGlobalDatabaseNetworksResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<DescribeGlobalDatabaseNetworksResult::GlobalDatabaseNetwork> DescribeGlobalDatabaseNetworksResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
117
polardb/src/model/ModifyDBClusterPrimaryZoneRequest.cc
Normal file
117
polardb/src/model/ModifyDBClusterPrimaryZoneRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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/ModifyDBClusterPrimaryZoneRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::ModifyDBClusterPrimaryZoneRequest;
|
||||
|
||||
ModifyDBClusterPrimaryZoneRequest::ModifyDBClusterPrimaryZoneRequest() :
|
||||
RpcServiceRequest("polardb", "2017-08-01", "ModifyDBClusterPrimaryZone")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDBClusterPrimaryZoneRequest::~ModifyDBClusterPrimaryZoneRequest()
|
||||
{}
|
||||
|
||||
long ModifyDBClusterPrimaryZoneRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setDBClusterId(const std::string& dBClusterId)
|
||||
{
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter("DBClusterId", dBClusterId);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long ModifyDBClusterPrimaryZoneRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getVSwitchId()const
|
||||
{
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setVSwitchId(const std::string& vSwitchId)
|
||||
{
|
||||
vSwitchId_ = vSwitchId;
|
||||
setParameter("VSwitchId", vSwitchId);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterPrimaryZoneRequest::getZoneId()const
|
||||
{
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneRequest::setZoneId(const std::string& zoneId)
|
||||
{
|
||||
zoneId_ = zoneId;
|
||||
setParameter("ZoneId", zoneId);
|
||||
}
|
||||
|
||||
44
polardb/src/model/ModifyDBClusterPrimaryZoneResult.cc
Normal file
44
polardb/src/model/ModifyDBClusterPrimaryZoneResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/ModifyDBClusterPrimaryZoneResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
ModifyDBClusterPrimaryZoneResult::ModifyDBClusterPrimaryZoneResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDBClusterPrimaryZoneResult::ModifyDBClusterPrimaryZoneResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDBClusterPrimaryZoneResult::~ModifyDBClusterPrimaryZoneResult()
|
||||
{}
|
||||
|
||||
void ModifyDBClusterPrimaryZoneResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user