Support DescribeDBClusterVersion.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-11-25 Version: patch
|
||||
- Support DescribeDBClusterVersion.
|
||||
|
||||
2020-11-25 Version: patch
|
||||
- Add extension field for image translation.
|
||||
|
||||
|
||||
@@ -85,6 +85,8 @@ set(polardb_public_header_model
|
||||
include/alibabacloud/polardb/model/DescribeDBClusterSSLResult.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClusterTDERequest.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClusterTDEResult.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClusterVersionRequest.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClusterVersionResult.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClustersRequest.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClustersResult.h
|
||||
include/alibabacloud/polardb/model/DescribeDBClustersWithBackupsRequest.h
|
||||
@@ -232,6 +234,8 @@ set(polardb_src
|
||||
src/model/DescribeDBClusterSSLResult.cc
|
||||
src/model/DescribeDBClusterTDERequest.cc
|
||||
src/model/DescribeDBClusterTDEResult.cc
|
||||
src/model/DescribeDBClusterVersionRequest.cc
|
||||
src/model/DescribeDBClusterVersionResult.cc
|
||||
src/model/DescribeDBClustersRequest.cc
|
||||
src/model/DescribeDBClustersResult.cc
|
||||
src/model/DescribeDBClustersWithBackupsRequest.cc
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
#include "model/DescribeDBClusterSSLResult.h"
|
||||
#include "model/DescribeDBClusterTDERequest.h"
|
||||
#include "model/DescribeDBClusterTDEResult.h"
|
||||
#include "model/DescribeDBClusterVersionRequest.h"
|
||||
#include "model/DescribeDBClusterVersionResult.h"
|
||||
#include "model/DescribeDBClustersRequest.h"
|
||||
#include "model/DescribeDBClustersResult.h"
|
||||
#include "model/DescribeDBClustersWithBackupsRequest.h"
|
||||
@@ -271,6 +273,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeDBClusterTDEResult> DescribeDBClusterTDEOutcome;
|
||||
typedef std::future<DescribeDBClusterTDEOutcome> DescribeDBClusterTDEOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDBClusterTDERequest&, const DescribeDBClusterTDEOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBClusterTDEAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeDBClusterVersionResult> DescribeDBClusterVersionOutcome;
|
||||
typedef std::future<DescribeDBClusterVersionOutcome> DescribeDBClusterVersionOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDBClusterVersionRequest&, const DescribeDBClusterVersionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBClusterVersionAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeDBClustersResult> DescribeDBClustersOutcome;
|
||||
typedef std::future<DescribeDBClustersOutcome> DescribeDBClustersOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::DescribeDBClustersRequest&, const DescribeDBClustersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBClustersAsyncHandler;
|
||||
@@ -492,6 +497,9 @@ namespace AlibabaCloud
|
||||
DescribeDBClusterTDEOutcome describeDBClusterTDE(const Model::DescribeDBClusterTDERequest &request)const;
|
||||
void describeDBClusterTDEAsync(const Model::DescribeDBClusterTDERequest& request, const DescribeDBClusterTDEAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeDBClusterTDEOutcomeCallable describeDBClusterTDECallable(const Model::DescribeDBClusterTDERequest& request) const;
|
||||
DescribeDBClusterVersionOutcome describeDBClusterVersion(const Model::DescribeDBClusterVersionRequest &request)const;
|
||||
void describeDBClusterVersionAsync(const Model::DescribeDBClusterVersionRequest& request, const DescribeDBClusterVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeDBClusterVersionOutcomeCallable describeDBClusterVersionCallable(const Model::DescribeDBClusterVersionRequest& request) const;
|
||||
DescribeDBClustersOutcome describeDBClusters(const Model::DescribeDBClustersRequest &request)const;
|
||||
void describeDBClustersAsync(const Model::DescribeDBClustersRequest& request, const DescribeDBClustersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeDBClustersOutcomeCallable describeDBClustersCallable(const Model::DescribeDBClustersRequest& 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_DESCRIBEDBCLUSTERVERSIONREQUEST_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERVERSIONREQUEST_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 DescribeDBClusterVersionRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeDBClusterVersionRequest();
|
||||
~DescribeDBClusterVersionRequest();
|
||||
|
||||
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_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERVERSIONREQUEST_H_
|
||||
@@ -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_DESCRIBEDBCLUSTERVERSIONRESULT_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERVERSIONRESULT_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 DescribeDBClusterVersionResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DescribeDBClusterVersionResult();
|
||||
explicit DescribeDBClusterVersionResult(const std::string &payload);
|
||||
~DescribeDBClusterVersionResult();
|
||||
std::string getLatestRevisionVersion()const;
|
||||
std::string getIsLatestVersion()const;
|
||||
std::string getDBVersion()const;
|
||||
std::string getDBRevisionVersion()const;
|
||||
std::string getDBVersionStatus()const;
|
||||
std::string getDBMinorVersion()const;
|
||||
std::string getDBInstanceName()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string latestRevisionVersion_;
|
||||
std::string isLatestVersion_;
|
||||
std::string dBVersion_;
|
||||
std::string dBRevisionVersion_;
|
||||
std::string dBVersionStatus_;
|
||||
std::string dBMinorVersion_;
|
||||
std::string dBInstanceName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERVERSIONRESULT_H_
|
||||
@@ -1203,6 +1203,42 @@ PolardbClient::DescribeDBClusterTDEOutcomeCallable PolardbClient::describeDBClus
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeDBClusterVersionOutcome PolardbClient::describeDBClusterVersion(const DescribeDBClusterVersionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeDBClusterVersionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeDBClusterVersionOutcome(DescribeDBClusterVersionResult(outcome.result()));
|
||||
else
|
||||
return DescribeDBClusterVersionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::describeDBClusterVersionAsync(const DescribeDBClusterVersionRequest& request, const DescribeDBClusterVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeDBClusterVersion(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::DescribeDBClusterVersionOutcomeCallable PolardbClient::describeDBClusterVersionCallable(const DescribeDBClusterVersionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeDBClusterVersionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeDBClusterVersion(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::DescribeDBClustersOutcome PolardbClient::describeDBClusters(const DescribeDBClustersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
95
polardb/src/model/DescribeDBClusterVersionRequest.cc
Normal file
95
polardb/src/model/DescribeDBClusterVersionRequest.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/DescribeDBClusterVersionRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::DescribeDBClusterVersionRequest;
|
||||
|
||||
DescribeDBClusterVersionRequest::DescribeDBClusterVersionRequest() :
|
||||
RpcServiceRequest("polardb", "2017-08-01", "DescribeDBClusterVersion")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeDBClusterVersionRequest::~DescribeDBClusterVersionRequest()
|
||||
{}
|
||||
|
||||
long DescribeDBClusterVersionRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionRequest::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setDBClusterId(const std::string& dBClusterId)
|
||||
{
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter("DBClusterId", dBClusterId);
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeDBClusterVersionRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeDBClusterVersionRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
93
polardb/src/model/DescribeDBClusterVersionResult.cc
Normal file
93
polardb/src/model/DescribeDBClusterVersionResult.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/polardb/model/DescribeDBClusterVersionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
DescribeDBClusterVersionResult::DescribeDBClusterVersionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDBClusterVersionResult::DescribeDBClusterVersionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDBClusterVersionResult::~DescribeDBClusterVersionResult()
|
||||
{}
|
||||
|
||||
void DescribeDBClusterVersionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DBInstanceName"].isNull())
|
||||
dBInstanceName_ = value["DBInstanceName"].asString();
|
||||
if(!value["DBVersion"].isNull())
|
||||
dBVersion_ = value["DBVersion"].asString();
|
||||
if(!value["DBMinorVersion"].isNull())
|
||||
dBMinorVersion_ = value["DBMinorVersion"].asString();
|
||||
if(!value["DBRevisionVersion"].isNull())
|
||||
dBRevisionVersion_ = value["DBRevisionVersion"].asString();
|
||||
if(!value["DBVersionStatus"].isNull())
|
||||
dBVersionStatus_ = value["DBVersionStatus"].asString();
|
||||
if(!value["IsLatestVersion"].isNull())
|
||||
isLatestVersion_ = value["IsLatestVersion"].asString();
|
||||
if(!value["LatestRevisionVersion"].isNull())
|
||||
latestRevisionVersion_ = value["LatestRevisionVersion"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getLatestRevisionVersion()const
|
||||
{
|
||||
return latestRevisionVersion_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getIsLatestVersion()const
|
||||
{
|
||||
return isLatestVersion_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getDBVersion()const
|
||||
{
|
||||
return dBVersion_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getDBRevisionVersion()const
|
||||
{
|
||||
return dBRevisionVersion_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getDBVersionStatus()const
|
||||
{
|
||||
return dBVersionStatus_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getDBMinorVersion()const
|
||||
{
|
||||
return dBMinorVersion_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterVersionResult::getDBInstanceName()const
|
||||
{
|
||||
return dBInstanceName_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user