Support modify dbcluster storage space.
This commit is contained in:
@@ -3723,6 +3723,42 @@ PolardbClient::ModifyDBClusterServerlessConfOutcomeCallable PolardbClient::modif
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterStorageSpaceOutcome PolardbClient::modifyDBClusterStorageSpace(const ModifyDBClusterStorageSpaceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDBClusterStorageSpaceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDBClusterStorageSpaceOutcome(ModifyDBClusterStorageSpaceResult(outcome.result()));
|
||||
else
|
||||
return ModifyDBClusterStorageSpaceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::modifyDBClusterStorageSpaceAsync(const ModifyDBClusterStorageSpaceRequest& request, const ModifyDBClusterStorageSpaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDBClusterStorageSpace(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterStorageSpaceOutcomeCallable PolardbClient::modifyDBClusterStorageSpaceCallable(const ModifyDBClusterStorageSpaceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDBClusterStorageSpaceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDBClusterStorageSpace(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::ModifyDBClusterTDEOutcome PolardbClient::modifyDBClusterTDE(const ModifyDBClusterTDERequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -73,6 +73,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
|
||||
dBNodesObject.sccMode = valueDBNodesDBNode["SccMode"].asString();
|
||||
if(!valueDBNodesDBNode["ServerWeight"].isNull())
|
||||
dBNodesObject.serverWeight = valueDBNodesDBNode["ServerWeight"].asString();
|
||||
if(!valueDBNodesDBNode["ServerlessType"].isNull())
|
||||
dBNodesObject.serverlessType = valueDBNodesDBNode["ServerlessType"].asString();
|
||||
dBNodes_.push_back(dBNodesObject);
|
||||
}
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
@@ -85,6 +87,15 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
|
||||
tagsObject.value = valueTagsTag["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto relatedAPInstanceNode = value["RelatedAPInstance"];
|
||||
if(!relatedAPInstanceNode["Name"].isNull())
|
||||
relatedAPInstance_.name = relatedAPInstanceNode["Name"].asString();
|
||||
if(!relatedAPInstanceNode["ClassCode"].isNull())
|
||||
relatedAPInstance_.classCode = relatedAPInstanceNode["ClassCode"].asString();
|
||||
if(!relatedAPInstanceNode["OssStorageUsed"].isNull())
|
||||
relatedAPInstance_.ossStorageUsed = relatedAPInstanceNode["OssStorageUsed"].asString();
|
||||
if(!relatedAPInstanceNode["TotalAPNodes"].isNull())
|
||||
relatedAPInstance_.totalAPNodes = relatedAPInstanceNode["TotalAPNodes"].asString();
|
||||
if(!value["DeletionLock"].isNull())
|
||||
deletionLock_ = std::stoi(value["DeletionLock"].asString());
|
||||
if(!value["Category"].isNull())
|
||||
@@ -165,6 +176,10 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
|
||||
proxyType_ = value["ProxyType"].asString();
|
||||
if(!value["ProxyStatus"].isNull())
|
||||
proxyStatus_ = value["ProxyStatus"].asString();
|
||||
if(!value["FeatureHTAPSupported"].isNull())
|
||||
featureHTAPSupported_ = value["FeatureHTAPSupported"].asString();
|
||||
if(!value["ProxyServerlessType"].isNull())
|
||||
proxyServerlessType_ = value["ProxyServerlessType"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -243,6 +258,11 @@ std::vector<DescribeDBClusterAttributeResult::DBNode> DescribeDBClusterAttribute
|
||||
return dBNodes_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterAttributeResult::getFeatureHTAPSupported()const
|
||||
{
|
||||
return featureHTAPSupported_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterAttributeResult::getZoneIds()const
|
||||
{
|
||||
return zoneIds_;
|
||||
@@ -343,6 +363,11 @@ std::string DescribeDBClusterAttributeResult::getDBVersionStatus()const
|
||||
return dBVersionStatus_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterAttributeResult::getProxyServerlessType()const
|
||||
{
|
||||
return proxyServerlessType_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterAttributeResult::getServerlessType()const
|
||||
{
|
||||
return serverlessType_;
|
||||
@@ -358,6 +383,11 @@ std::string DescribeDBClusterAttributeResult::getSubCategory()const
|
||||
return subCategory_;
|
||||
}
|
||||
|
||||
DescribeDBClusterAttributeResult::RelatedAPInstance DescribeDBClusterAttributeResult::getRelatedAPInstance()const
|
||||
{
|
||||
return relatedAPInstance_;
|
||||
}
|
||||
|
||||
long DescribeDBClusterAttributeResult::getSQLSize()const
|
||||
{
|
||||
return sQLSize_;
|
||||
|
||||
@@ -53,6 +53,10 @@ void DescribeDBClusterServerlessConfResult::parse(const std::string &payload)
|
||||
secondsUntilAutoPause_ = value["SecondsUntilAutoPause"].asString();
|
||||
if(!value["DBClusterId"].isNull())
|
||||
dBClusterId_ = value["DBClusterId"].asString();
|
||||
if(!value["ScaleApRoNumMin"].isNull())
|
||||
scaleApRoNumMin_ = value["ScaleApRoNumMin"].asString();
|
||||
if(!value["ScaleApRoNumMax"].isNull())
|
||||
scaleApRoNumMax_ = value["ScaleApRoNumMax"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +70,16 @@ std::string DescribeDBClusterServerlessConfResult::getAllowShutDown()const
|
||||
return allowShutDown_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterServerlessConfResult::getScaleApRoNumMin()const
|
||||
{
|
||||
return scaleApRoNumMin_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterServerlessConfResult::getScaleApRoNumMax()const
|
||||
{
|
||||
return scaleApRoNumMax_;
|
||||
}
|
||||
|
||||
std::string DescribeDBClusterServerlessConfResult::getScaleRoNumMax()const
|
||||
{
|
||||
return scaleRoNumMax_;
|
||||
|
||||
@@ -43,6 +43,15 @@ void ModifyDBClusterServerlessConfRequest::setResourceOwnerId(long resourceOwner
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterServerlessConfRequest::getScaleApRoNumMax() const {
|
||||
return scaleApRoNumMax_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterServerlessConfRequest::setScaleApRoNumMax(const std::string &scaleApRoNumMax) {
|
||||
scaleApRoNumMax_ = scaleApRoNumMax;
|
||||
setParameter(std::string("ScaleApRoNumMax"), scaleApRoNumMax);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterServerlessConfRequest::getScaleMax() const {
|
||||
return scaleMax_;
|
||||
}
|
||||
@@ -70,6 +79,15 @@ void ModifyDBClusterServerlessConfRequest::setSecondsUntilAutoPause(const std::s
|
||||
setParameter(std::string("SecondsUntilAutoPause"), secondsUntilAutoPause);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterServerlessConfRequest::getScaleApRoNumMin() const {
|
||||
return scaleApRoNumMin_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterServerlessConfRequest::setScaleApRoNumMin(const std::string &scaleApRoNumMin) {
|
||||
scaleApRoNumMin_ = scaleApRoNumMin;
|
||||
setParameter(std::string("ScaleApRoNumMin"), scaleApRoNumMin);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterServerlessConfRequest::getScaleMin() const {
|
||||
return scaleMin_;
|
||||
}
|
||||
|
||||
126
polardb/src/model/ModifyDBClusterStorageSpaceRequest.cc
Normal file
126
polardb/src/model/ModifyDBClusterStorageSpaceRequest.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/ModifyDBClusterStorageSpaceRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::ModifyDBClusterStorageSpaceRequest;
|
||||
|
||||
ModifyDBClusterStorageSpaceRequest::ModifyDBClusterStorageSpaceRequest()
|
||||
: RpcServiceRequest("polardb", "2017-08-01", "ModifyDBClusterStorageSpace") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDBClusterStorageSpaceRequest::~ModifyDBClusterStorageSpaceRequest() {}
|
||||
|
||||
long ModifyDBClusterStorageSpaceRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getPlannedEndTime() const {
|
||||
return plannedEndTime_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setPlannedEndTime(const std::string &plannedEndTime) {
|
||||
plannedEndTime_ = plannedEndTime;
|
||||
setParameter(std::string("PlannedEndTime"), plannedEndTime);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getDBClusterId() const {
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setDBClusterId(const std::string &dBClusterId) {
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter(std::string("DBClusterId"), dBClusterId);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long ModifyDBClusterStorageSpaceRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getPlannedStartTime() const {
|
||||
return plannedStartTime_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setPlannedStartTime(const std::string &plannedStartTime) {
|
||||
plannedStartTime_ = plannedStartTime;
|
||||
setParameter(std::string("PlannedStartTime"), plannedStartTime);
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceRequest::getSubCategory() const {
|
||||
return subCategory_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setSubCategory(const std::string &subCategory) {
|
||||
subCategory_ = subCategory;
|
||||
setParameter(std::string("SubCategory"), subCategory);
|
||||
}
|
||||
|
||||
long ModifyDBClusterStorageSpaceRequest::getStorageSpace() const {
|
||||
return storageSpace_;
|
||||
}
|
||||
|
||||
void ModifyDBClusterStorageSpaceRequest::setStorageSpace(long storageSpace) {
|
||||
storageSpace_ = storageSpace;
|
||||
setParameter(std::string("StorageSpace"), std::to_string(storageSpace));
|
||||
}
|
||||
|
||||
58
polardb/src/model/ModifyDBClusterStorageSpaceResult.cc
Normal file
58
polardb/src/model/ModifyDBClusterStorageSpaceResult.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/ModifyDBClusterStorageSpaceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
ModifyDBClusterStorageSpaceResult::ModifyDBClusterStorageSpaceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDBClusterStorageSpaceResult::ModifyDBClusterStorageSpaceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDBClusterStorageSpaceResult::~ModifyDBClusterStorageSpaceResult()
|
||||
{}
|
||||
|
||||
void ModifyDBClusterStorageSpaceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DBClusterId"].isNull())
|
||||
dBClusterId_ = value["DBClusterId"].asString();
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceResult::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
std::string ModifyDBClusterStorageSpaceResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user