Support TransformDBClusterPayType.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-05-24 Version: 1.36.753
|
||||
- Support TransformDBClusterPayType.
|
||||
|
||||
2021-05-23 Version: 1.36.752
|
||||
- New API- GetDrdsDbRdsRelationInfo, which can get private RDS list under certain DB out of DRDS instance ID and DB name.
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ set(polardb_public_header_model
|
||||
include/alibabacloud/polardb/model/RevokeAccountPrivilegeResult.h
|
||||
include/alibabacloud/polardb/model/TagResourcesRequest.h
|
||||
include/alibabacloud/polardb/model/TagResourcesResult.h
|
||||
include/alibabacloud/polardb/model/TransformDBClusterPayTypeRequest.h
|
||||
include/alibabacloud/polardb/model/TransformDBClusterPayTypeResult.h
|
||||
include/alibabacloud/polardb/model/UntagResourcesRequest.h
|
||||
include/alibabacloud/polardb/model/UntagResourcesResult.h
|
||||
include/alibabacloud/polardb/model/UpgradeDBClusterMinorVersionRequest.h
|
||||
@@ -386,6 +388,8 @@ set(polardb_src
|
||||
src/model/RevokeAccountPrivilegeResult.cc
|
||||
src/model/TagResourcesRequest.cc
|
||||
src/model/TagResourcesResult.cc
|
||||
src/model/TransformDBClusterPayTypeRequest.cc
|
||||
src/model/TransformDBClusterPayTypeResult.cc
|
||||
src/model/UntagResourcesRequest.cc
|
||||
src/model/UntagResourcesResult.cc
|
||||
src/model/UpgradeDBClusterMinorVersionRequest.cc
|
||||
|
||||
@@ -200,6 +200,8 @@
|
||||
#include "model/RevokeAccountPrivilegeResult.h"
|
||||
#include "model/TagResourcesRequest.h"
|
||||
#include "model/TagResourcesResult.h"
|
||||
#include "model/TransformDBClusterPayTypeRequest.h"
|
||||
#include "model/TransformDBClusterPayTypeResult.h"
|
||||
#include "model/UntagResourcesRequest.h"
|
||||
#include "model/UntagResourcesResult.h"
|
||||
#include "model/UpgradeDBClusterMinorVersionRequest.h"
|
||||
@@ -482,6 +484,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::TagResourcesResult> TagResourcesOutcome;
|
||||
typedef std::future<TagResourcesOutcome> TagResourcesOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::TagResourcesRequest&, const TagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourcesAsyncHandler;
|
||||
typedef Outcome<Error, Model::TransformDBClusterPayTypeResult> TransformDBClusterPayTypeOutcome;
|
||||
typedef std::future<TransformDBClusterPayTypeOutcome> TransformDBClusterPayTypeOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::TransformDBClusterPayTypeRequest&, const TransformDBClusterPayTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TransformDBClusterPayTypeAsyncHandler;
|
||||
typedef Outcome<Error, Model::UntagResourcesResult> UntagResourcesOutcome;
|
||||
typedef std::future<UntagResourcesOutcome> UntagResourcesOutcomeCallable;
|
||||
typedef std::function<void(const PolardbClient*, const Model::UntagResourcesRequest&, const UntagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UntagResourcesAsyncHandler;
|
||||
@@ -763,6 +768,9 @@ namespace AlibabaCloud
|
||||
TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const;
|
||||
void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const;
|
||||
TransformDBClusterPayTypeOutcome transformDBClusterPayType(const Model::TransformDBClusterPayTypeRequest &request)const;
|
||||
void transformDBClusterPayTypeAsync(const Model::TransformDBClusterPayTypeRequest& request, const TransformDBClusterPayTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TransformDBClusterPayTypeOutcomeCallable transformDBClusterPayTypeCallable(const Model::TransformDBClusterPayTypeRequest& request) const;
|
||||
UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const;
|
||||
void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_POLARDB_MODEL_TRANSFORMDBCLUSTERPAYTYPEREQUEST_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_TRANSFORMDBCLUSTERPAYTYPEREQUEST_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 TransformDBClusterPayTypeRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
TransformDBClusterPayTypeRequest();
|
||||
~TransformDBClusterPayTypeRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getResourceGroupId()const;
|
||||
void setResourceGroupId(const std::string& resourceGroupId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getPeriod()const;
|
||||
void setPeriod(const std::string& period);
|
||||
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 getUsedTime()const;
|
||||
void setUsedTime(const std::string& usedTime);
|
||||
std::string getPayType()const;
|
||||
void setPayType(const std::string& payType);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string clientToken_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
std::string regionId_;
|
||||
std::string period_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string dBClusterId_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::string usedTime_;
|
||||
std::string payType_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_TRANSFORMDBCLUSTERPAYTYPEREQUEST_H_
|
||||
@@ -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_TRANSFORMDBCLUSTERPAYTYPERESULT_H_
|
||||
#define ALIBABACLOUD_POLARDB_MODEL_TRANSFORMDBCLUSTERPAYTYPERESULT_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 TransformDBClusterPayTypeResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
TransformDBClusterPayTypeResult();
|
||||
explicit TransformDBClusterPayTypeResult(const std::string &payload);
|
||||
~TransformDBClusterPayTypeResult();
|
||||
std::string getChargeType()const;
|
||||
std::string getExpiredTime()const;
|
||||
std::string getDBClusterId()const;
|
||||
std::string getOrderId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string chargeType_;
|
||||
std::string expiredTime_;
|
||||
std::string dBClusterId_;
|
||||
std::string orderId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_POLARDB_MODEL_TRANSFORMDBCLUSTERPAYTYPERESULT_H_
|
||||
@@ -3255,6 +3255,42 @@ PolardbClient::TagResourcesOutcomeCallable PolardbClient::tagResourcesCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::TransformDBClusterPayTypeOutcome PolardbClient::transformDBClusterPayType(const TransformDBClusterPayTypeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TransformDBClusterPayTypeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TransformDBClusterPayTypeOutcome(TransformDBClusterPayTypeResult(outcome.result()));
|
||||
else
|
||||
return TransformDBClusterPayTypeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PolardbClient::transformDBClusterPayTypeAsync(const TransformDBClusterPayTypeRequest& request, const TransformDBClusterPayTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, transformDBClusterPayType(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PolardbClient::TransformDBClusterPayTypeOutcomeCallable PolardbClient::transformDBClusterPayTypeCallable(const TransformDBClusterPayTypeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TransformDBClusterPayTypeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->transformDBClusterPayType(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PolardbClient::UntagResourcesOutcome PolardbClient::untagResources(const UntagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
161
polardb/src/model/TransformDBClusterPayTypeRequest.cc
Normal file
161
polardb/src/model/TransformDBClusterPayTypeRequest.cc
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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/TransformDBClusterPayTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::Polardb::Model::TransformDBClusterPayTypeRequest;
|
||||
|
||||
TransformDBClusterPayTypeRequest::TransformDBClusterPayTypeRequest() :
|
||||
RpcServiceRequest("polardb", "2017-08-01", "TransformDBClusterPayType")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TransformDBClusterPayTypeRequest::~TransformDBClusterPayTypeRequest()
|
||||
{}
|
||||
|
||||
long TransformDBClusterPayTypeRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setPeriod(const std::string& period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", period);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setDBClusterId(const std::string& dBClusterId)
|
||||
{
|
||||
dBClusterId_ = dBClusterId;
|
||||
setParameter("DBClusterId", dBClusterId);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long TransformDBClusterPayTypeRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getUsedTime()const
|
||||
{
|
||||
return usedTime_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setUsedTime(const std::string& usedTime)
|
||||
{
|
||||
usedTime_ = usedTime;
|
||||
setParameter("UsedTime", usedTime);
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeRequest::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
void TransformDBClusterPayTypeRequest::setPayType(const std::string& payType)
|
||||
{
|
||||
payType_ = payType;
|
||||
setParameter("PayType", payType);
|
||||
}
|
||||
|
||||
72
polardb/src/model/TransformDBClusterPayTypeResult.cc
Normal file
72
polardb/src/model/TransformDBClusterPayTypeResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/TransformDBClusterPayTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Polardb;
|
||||
using namespace AlibabaCloud::Polardb::Model;
|
||||
|
||||
TransformDBClusterPayTypeResult::TransformDBClusterPayTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TransformDBClusterPayTypeResult::TransformDBClusterPayTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TransformDBClusterPayTypeResult::~TransformDBClusterPayTypeResult()
|
||||
{}
|
||||
|
||||
void TransformDBClusterPayTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ChargeType"].isNull())
|
||||
chargeType_ = value["ChargeType"].asString();
|
||||
if(!value["DBClusterId"].isNull())
|
||||
dBClusterId_ = value["DBClusterId"].asString();
|
||||
if(!value["ExpiredTime"].isNull())
|
||||
expiredTime_ = value["ExpiredTime"].asString();
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeResult::getChargeType()const
|
||||
{
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeResult::getExpiredTime()const
|
||||
{
|
||||
return expiredTime_;
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeResult::getDBClusterId()const
|
||||
{
|
||||
return dBClusterId_;
|
||||
}
|
||||
|
||||
std::string TransformDBClusterPayTypeResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user