ModifyDiskSpec add PerformanceControlOptions.
This commit is contained in:
@@ -535,6 +535,8 @@ set(ecs_public_header_model
|
||||
include/alibabacloud/ecs/model/ModifyDiskAttributeResult.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskChargeTypeRequest.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskChargeTypeResult.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskDeploymentRequest.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskDeploymentResult.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskSpecRequest.h
|
||||
include/alibabacloud/ecs/model/ModifyDiskSpecResult.h
|
||||
include/alibabacloud/ecs/model/ModifyEipAddressAttributeRequest.h
|
||||
@@ -1230,6 +1232,8 @@ set(ecs_src
|
||||
src/model/ModifyDiskAttributeResult.cc
|
||||
src/model/ModifyDiskChargeTypeRequest.cc
|
||||
src/model/ModifyDiskChargeTypeResult.cc
|
||||
src/model/ModifyDiskDeploymentRequest.cc
|
||||
src/model/ModifyDiskDeploymentResult.cc
|
||||
src/model/ModifyDiskSpecRequest.cc
|
||||
src/model/ModifyDiskSpecResult.cc
|
||||
src/model/ModifyEipAddressAttributeRequest.cc
|
||||
|
||||
@@ -536,6 +536,8 @@
|
||||
#include "model/ModifyDiskAttributeResult.h"
|
||||
#include "model/ModifyDiskChargeTypeRequest.h"
|
||||
#include "model/ModifyDiskChargeTypeResult.h"
|
||||
#include "model/ModifyDiskDeploymentRequest.h"
|
||||
#include "model/ModifyDiskDeploymentResult.h"
|
||||
#include "model/ModifyDiskSpecRequest.h"
|
||||
#include "model/ModifyDiskSpecResult.h"
|
||||
#include "model/ModifyEipAddressAttributeRequest.h"
|
||||
@@ -1494,6 +1496,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ModifyDiskChargeTypeResult> ModifyDiskChargeTypeOutcome;
|
||||
typedef std::future<ModifyDiskChargeTypeOutcome> ModifyDiskChargeTypeOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::ModifyDiskChargeTypeRequest&, const ModifyDiskChargeTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDiskChargeTypeAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyDiskDeploymentResult> ModifyDiskDeploymentOutcome;
|
||||
typedef std::future<ModifyDiskDeploymentOutcome> ModifyDiskDeploymentOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::ModifyDiskDeploymentRequest&, const ModifyDiskDeploymentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDiskDeploymentAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyDiskSpecResult> ModifyDiskSpecOutcome;
|
||||
typedef std::future<ModifyDiskSpecOutcome> ModifyDiskSpecOutcomeCallable;
|
||||
typedef std::function<void(const EcsClient*, const Model::ModifyDiskSpecRequest&, const ModifyDiskSpecOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDiskSpecAsyncHandler;
|
||||
@@ -2537,6 +2542,9 @@ namespace AlibabaCloud
|
||||
ModifyDiskChargeTypeOutcome modifyDiskChargeType(const Model::ModifyDiskChargeTypeRequest &request)const;
|
||||
void modifyDiskChargeTypeAsync(const Model::ModifyDiskChargeTypeRequest& request, const ModifyDiskChargeTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDiskChargeTypeOutcomeCallable modifyDiskChargeTypeCallable(const Model::ModifyDiskChargeTypeRequest& request) const;
|
||||
ModifyDiskDeploymentOutcome modifyDiskDeployment(const Model::ModifyDiskDeploymentRequest &request)const;
|
||||
void modifyDiskDeploymentAsync(const Model::ModifyDiskDeploymentRequest& request, const ModifyDiskDeploymentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDiskDeploymentOutcomeCallable modifyDiskDeploymentCallable(const Model::ModifyDiskDeploymentRequest& request) const;
|
||||
ModifyDiskSpecOutcome modifyDiskSpec(const Model::ModifyDiskSpecRequest &request)const;
|
||||
void modifyDiskSpecAsync(const Model::ModifyDiskSpecRequest& request, const ModifyDiskSpecAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyDiskSpecOutcomeCallable modifyDiskSpecCallable(const Model::ModifyDiskSpecRequest& request) const;
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
void setDestinationResource(const std::string &destinationResource);
|
||||
std::string getZoneId() const;
|
||||
void setZoneId(const std::string &zoneId);
|
||||
std::vector<std::string> getConditions() const;
|
||||
void setConditions(const std::vector<std::string> &conditions);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
@@ -71,6 +73,7 @@ private:
|
||||
long ownerId_;
|
||||
std::string destinationResource_;
|
||||
std::string zoneId_;
|
||||
std::vector<std::string> conditions_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Ecs
|
||||
|
||||
@@ -45,7 +45,22 @@ namespace AlibabaCloud
|
||||
std::string value;
|
||||
std::string unit;
|
||||
};
|
||||
struct ConditionSupportedResource
|
||||
{
|
||||
struct Condition
|
||||
{
|
||||
std::string key;
|
||||
};
|
||||
std::string status;
|
||||
std::string statusCategory;
|
||||
int min;
|
||||
int max;
|
||||
std::string value;
|
||||
std::string unit;
|
||||
std::vector<ConditionSupportedResource::Condition> conditions;
|
||||
};
|
||||
std::string type;
|
||||
std::vector<AvailableResource::ConditionSupportedResource> conditionSupportedResources;
|
||||
std::vector<AvailableResource::SupportedResource> supportedResources;
|
||||
};
|
||||
std::string status;
|
||||
|
||||
@@ -41,16 +41,16 @@ namespace AlibabaCloud
|
||||
};
|
||||
int ecsCount;
|
||||
std::string description;
|
||||
std::string vpcId;
|
||||
bool serviceManaged;
|
||||
std::string resourceGroupId;
|
||||
std::string securityGroupName;
|
||||
std::string vpcId;
|
||||
std::string resourceGroupId;
|
||||
bool serviceManaged;
|
||||
std::string securityGroupId;
|
||||
std::string creationTime;
|
||||
std::string securityGroupType;
|
||||
std::string creationTime;
|
||||
std::vector<SecurityGroup::Tag> tags;
|
||||
long serviceID;
|
||||
int availableInstanceAmount;
|
||||
long serviceID;
|
||||
};
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace AlibabaCloud
|
||||
~DescribeSecurityGroupsResult();
|
||||
std::vector<SecurityGroup> getSecurityGroups()const;
|
||||
int getTotalCount()const;
|
||||
int getPageSize()const;
|
||||
std::string getNextToken()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
std::string getRegionId()const;
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace AlibabaCloud
|
||||
private:
|
||||
std::vector<SecurityGroup> securityGroups_;
|
||||
int totalCount_;
|
||||
int pageSize_;
|
||||
std::string nextToken_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
std::string regionId_;
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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_ECS_MODEL_MODIFYDISKDEPLOYMENTREQUEST_H_
|
||||
#define ALIBABACLOUD_ECS_MODEL_MODIFYDISKDEPLOYMENTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/ecs/EcsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Ecs {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ECS_EXPORT ModifyDiskDeploymentRequest : public RpcServiceRequest {
|
||||
public:
|
||||
ModifyDiskDeploymentRequest();
|
||||
~ModifyDiskDeploymentRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getDiskCategory() const;
|
||||
void setDiskCategory(const std::string &diskCategory);
|
||||
std::string getDiskId() const;
|
||||
void setDiskId(const std::string &diskId);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getPerformanceLevel() const;
|
||||
void setPerformanceLevel(const std::string &performanceLevel);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getStorageClusterId() const;
|
||||
void setStorageClusterId(const std::string &storageClusterId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string diskCategory_;
|
||||
std::string diskId_;
|
||||
bool dryRun_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string performanceLevel_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::string storageClusterId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Ecs
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ECS_MODEL_MODIFYDISKDEPLOYMENTREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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_ECS_MODEL_MODIFYDISKDEPLOYMENTRESULT_H_
|
||||
#define ALIBABACLOUD_ECS_MODEL_MODIFYDISKDEPLOYMENTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ecs/EcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ecs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ECS_EXPORT ModifyDiskDeploymentResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ModifyDiskDeploymentResult();
|
||||
explicit ModifyDiskDeploymentResult(const std::string &payload);
|
||||
~ModifyDiskDeploymentResult();
|
||||
std::string getTaskId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string taskId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ECS_MODEL_MODIFYDISKDEPLOYMENTRESULT_H_
|
||||
@@ -28,6 +28,11 @@ namespace Ecs {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ECS_EXPORT ModifyDiskSpecRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct PerformanceControlOptions {
|
||||
int iOPS;
|
||||
int throughput;
|
||||
std::string recover;
|
||||
};
|
||||
ModifyDiskSpecRequest();
|
||||
~ModifyDiskSpecRequest();
|
||||
long getResourceOwnerId() const;
|
||||
@@ -44,6 +49,8 @@ public:
|
||||
void setPerformanceLevel(const std::string &performanceLevel);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
PerformanceControlOptions getPerformanceControlOptions() const;
|
||||
void setPerformanceControlOptions(const PerformanceControlOptions &performanceControlOptions);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
long getProvisionedIops() const;
|
||||
@@ -57,6 +64,7 @@ private:
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string performanceLevel_;
|
||||
std::string ownerAccount_;
|
||||
PerformanceControlOptions performanceControlOptions_;
|
||||
long ownerId_;
|
||||
long provisionedIops_;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace Ecs {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ECS_EXPORT ModifyInstanceSpecRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Disk {
|
||||
std::string performanceLevel;
|
||||
std::string diskId;
|
||||
std::string category;
|
||||
};
|
||||
ModifyInstanceSpecRequest();
|
||||
~ModifyInstanceSpecRequest();
|
||||
long getResourceOwnerId() const;
|
||||
@@ -44,6 +49,8 @@ public:
|
||||
void setInstanceType(const std::string &instanceType);
|
||||
std::string getTemporaryEndTime() const;
|
||||
void setTemporaryEndTime(const std::string &temporaryEndTime);
|
||||
std::string getModifyMode() const;
|
||||
void setModifyMode(const std::string &modifyMode);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
@@ -56,6 +63,8 @@ public:
|
||||
void setTemporaryStartTime(const std::string &temporaryStartTime);
|
||||
bool getAsync() const;
|
||||
void setAsync(bool async);
|
||||
std::vector<Disk> getDisk() const;
|
||||
void setDisk(const std::vector<Disk> &disk);
|
||||
std::string getInstanceId() const;
|
||||
void setInstanceId(const std::string &instanceId);
|
||||
int getInternetMaxBandwidthIn() const;
|
||||
@@ -69,12 +78,14 @@ private:
|
||||
std::string systemDiskCategory_;
|
||||
std::string instanceType_;
|
||||
std::string temporaryEndTime_;
|
||||
std::string modifyMode_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
int temporaryInternetMaxBandwidthOut_;
|
||||
std::string temporaryStartTime_;
|
||||
bool async_;
|
||||
std::vector<Disk> disk_;
|
||||
std::string instanceId_;
|
||||
int internetMaxBandwidthIn_;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace Ecs {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ECS_EXPORT ModifyPrepayInstanceSpecRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Disk {
|
||||
std::string performanceLevel;
|
||||
std::string diskId;
|
||||
std::string category;
|
||||
};
|
||||
ModifyPrepayInstanceSpecRequest();
|
||||
~ModifyPrepayInstanceSpecRequest();
|
||||
long getResourceOwnerId() const;
|
||||
@@ -48,6 +53,8 @@ public:
|
||||
void setMigrateAcrossZone(bool migrateAcrossZone);
|
||||
std::string getInstanceType() const;
|
||||
void setInstanceType(const std::string &instanceType);
|
||||
std::string getModifyMode() const;
|
||||
void setModifyMode(const std::string &modifyMode);
|
||||
bool getAutoPay() const;
|
||||
void setAutoPay(bool autoPay);
|
||||
bool getRebootWhenFinished() const;
|
||||
@@ -60,6 +67,8 @@ public:
|
||||
void setEndTime(const std::string &endTime);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::vector<Disk> getDisk() const;
|
||||
void setDisk(const std::vector<Disk> &disk);
|
||||
std::string getInstanceId() const;
|
||||
void setInstanceId(const std::string &instanceId);
|
||||
|
||||
@@ -73,12 +82,14 @@ private:
|
||||
std::string regionId_;
|
||||
bool migrateAcrossZone_;
|
||||
std::string instanceType_;
|
||||
std::string modifyMode_;
|
||||
bool autoPay_;
|
||||
bool rebootWhenFinished_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
std::string endTime_;
|
||||
long ownerId_;
|
||||
std::vector<Disk> disk_;
|
||||
std::string instanceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -9303,6 +9303,42 @@ EcsClient::ModifyDiskChargeTypeOutcomeCallable EcsClient::modifyDiskChargeTypeCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::ModifyDiskDeploymentOutcome EcsClient::modifyDiskDeployment(const ModifyDiskDeploymentRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDiskDeploymentOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDiskDeploymentOutcome(ModifyDiskDeploymentResult(outcome.result()));
|
||||
else
|
||||
return ModifyDiskDeploymentOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EcsClient::modifyDiskDeploymentAsync(const ModifyDiskDeploymentRequest& request, const ModifyDiskDeploymentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDiskDeployment(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EcsClient::ModifyDiskDeploymentOutcomeCallable EcsClient::modifyDiskDeploymentCallable(const ModifyDiskDeploymentRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDiskDeploymentOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDiskDeployment(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::ModifyDiskSpecOutcome EcsClient::modifyDiskSpec(const ModifyDiskSpecRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -142,3 +142,11 @@ void DescribeResourcesModificationRequest::setZoneId(const std::string &zoneId)
|
||||
setParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeResourcesModificationRequest::getConditions() const {
|
||||
return conditions_;
|
||||
}
|
||||
|
||||
void DescribeResourcesModificationRequest::setConditions(const std::vector<std::string> &conditions) {
|
||||
conditions_ = conditions;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,32 @@ void DescribeResourcesModificationResult::parse(const std::string &payload)
|
||||
supportedResourcesObject.min = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceSupportedResourcesSupportedResource["Min"].asString());
|
||||
availableResourcesObject.supportedResources.push_back(supportedResourcesObject);
|
||||
}
|
||||
auto allConditionSupportedResourcesNode = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResource["ConditionSupportedResources"]["ConditionSupportedResource"];
|
||||
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource : allConditionSupportedResourcesNode)
|
||||
{
|
||||
AvailableZone::AvailableResource::ConditionSupportedResource conditionSupportedResourcesObject;
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Status"].isNull())
|
||||
conditionSupportedResourcesObject.status = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Status"].asString();
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Value"].isNull())
|
||||
conditionSupportedResourcesObject.value = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Value"].asString();
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Max"].isNull())
|
||||
conditionSupportedResourcesObject.max = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Max"].asString());
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Unit"].isNull())
|
||||
conditionSupportedResourcesObject.unit = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Unit"].asString();
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["StatusCategory"].isNull())
|
||||
conditionSupportedResourcesObject.statusCategory = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["StatusCategory"].asString();
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Min"].isNull())
|
||||
conditionSupportedResourcesObject.min = std::stoi(valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Min"].asString());
|
||||
auto allConditionsNode = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResource["Conditions"]["Condition"];
|
||||
for (auto valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResourceConditionsCondition : allConditionsNode)
|
||||
{
|
||||
AvailableZone::AvailableResource::ConditionSupportedResource::Condition conditionsObject;
|
||||
if(!valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResourceConditionsCondition["Key"].isNull())
|
||||
conditionsObject.key = valueAvailableZonesAvailableZoneAvailableResourcesAvailableResourceConditionSupportedResourcesConditionSupportedResourceConditionsCondition["Key"].asString();
|
||||
conditionSupportedResourcesObject.conditions.push_back(conditionsObject);
|
||||
}
|
||||
availableResourcesObject.conditionSupportedResources.push_back(conditionSupportedResourcesObject);
|
||||
}
|
||||
availableZonesObject.availableResources.push_back(availableResourcesObject);
|
||||
}
|
||||
availableZones_.push_back(availableZonesObject);
|
||||
|
||||
@@ -43,28 +43,28 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
|
||||
for (auto valueSecurityGroupsSecurityGroup : allSecurityGroupsNode)
|
||||
{
|
||||
SecurityGroup securityGroupsObject;
|
||||
if(!valueSecurityGroupsSecurityGroup["CreationTime"].isNull())
|
||||
securityGroupsObject.creationTime = valueSecurityGroupsSecurityGroup["CreationTime"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["VpcId"].isNull())
|
||||
securityGroupsObject.vpcId = valueSecurityGroupsSecurityGroup["VpcId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceManaged"].isNull())
|
||||
securityGroupsObject.serviceManaged = valueSecurityGroupsSecurityGroup["ServiceManaged"].asString() == "true";
|
||||
if(!valueSecurityGroupsSecurityGroup["Description"].isNull())
|
||||
securityGroupsObject.description = valueSecurityGroupsSecurityGroup["Description"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["SecurityGroupId"].isNull())
|
||||
securityGroupsObject.securityGroupId = valueSecurityGroupsSecurityGroup["SecurityGroupId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["ResourceGroupId"].isNull())
|
||||
securityGroupsObject.resourceGroupId = valueSecurityGroupsSecurityGroup["ResourceGroupId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["SecurityGroupName"].isNull())
|
||||
securityGroupsObject.securityGroupName = valueSecurityGroupsSecurityGroup["SecurityGroupName"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["EcsCount"].isNull())
|
||||
securityGroupsObject.ecsCount = std::stoi(valueSecurityGroupsSecurityGroup["EcsCount"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceID"].isNull())
|
||||
securityGroupsObject.serviceID = std::stol(valueSecurityGroupsSecurityGroup["ServiceID"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["Description"].isNull())
|
||||
securityGroupsObject.description = valueSecurityGroupsSecurityGroup["Description"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["SecurityGroupType"].isNull())
|
||||
securityGroupsObject.securityGroupType = valueSecurityGroupsSecurityGroup["SecurityGroupType"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["VpcId"].isNull())
|
||||
securityGroupsObject.vpcId = valueSecurityGroupsSecurityGroup["VpcId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["CreationTime"].isNull())
|
||||
securityGroupsObject.creationTime = valueSecurityGroupsSecurityGroup["CreationTime"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["EcsCount"].isNull())
|
||||
securityGroupsObject.ecsCount = std::stoi(valueSecurityGroupsSecurityGroup["EcsCount"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["AvailableInstanceAmount"].isNull())
|
||||
securityGroupsObject.availableInstanceAmount = std::stoi(valueSecurityGroupsSecurityGroup["AvailableInstanceAmount"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["ResourceGroupId"].isNull())
|
||||
securityGroupsObject.resourceGroupId = valueSecurityGroupsSecurityGroup["ResourceGroupId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceManaged"].isNull())
|
||||
securityGroupsObject.serviceManaged = valueSecurityGroupsSecurityGroup["ServiceManaged"].asString() == "true";
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceID"].isNull())
|
||||
securityGroupsObject.serviceID = std::stol(valueSecurityGroupsSecurityGroup["ServiceID"].asString());
|
||||
auto allTagsNode = valueSecurityGroupsSecurityGroup["Tags"]["Tag"];
|
||||
for (auto valueSecurityGroupsSecurityGroupTagsTag : allTagsNode)
|
||||
{
|
||||
@@ -77,16 +77,16 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
|
||||
}
|
||||
securityGroups_.push_back(securityGroupsObject);
|
||||
}
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -100,16 +100,16 @@ int DescribeSecurityGroupsResult::getTotalCount()const
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeSecurityGroupsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
std::string DescribeSecurityGroupsResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int DescribeSecurityGroupsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeSecurityGroupsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
|
||||
108
ecs/src/model/ModifyDiskDeploymentRequest.cc
Normal file
108
ecs/src/model/ModifyDiskDeploymentRequest.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/ecs/model/ModifyDiskDeploymentRequest.h>
|
||||
|
||||
using AlibabaCloud::Ecs::Model::ModifyDiskDeploymentRequest;
|
||||
|
||||
ModifyDiskDeploymentRequest::ModifyDiskDeploymentRequest()
|
||||
: RpcServiceRequest("ecs", "2014-05-26", "ModifyDiskDeployment") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDiskDeploymentRequest::~ModifyDiskDeploymentRequest() {}
|
||||
|
||||
long ModifyDiskDeploymentRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getDiskCategory() const {
|
||||
return diskCategory_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setDiskCategory(const std::string &diskCategory) {
|
||||
diskCategory_ = diskCategory;
|
||||
setParameter(std::string("DiskCategory"), diskCategory);
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getDiskId() const {
|
||||
return diskId_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setDiskId(const std::string &diskId) {
|
||||
diskId_ = diskId;
|
||||
setParameter(std::string("DiskId"), diskId);
|
||||
}
|
||||
|
||||
bool ModifyDiskDeploymentRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getPerformanceLevel() const {
|
||||
return performanceLevel_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setPerformanceLevel(const std::string &performanceLevel) {
|
||||
performanceLevel_ = performanceLevel;
|
||||
setParameter(std::string("PerformanceLevel"), performanceLevel);
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long ModifyDiskDeploymentRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentRequest::getStorageClusterId() const {
|
||||
return storageClusterId_;
|
||||
}
|
||||
|
||||
void ModifyDiskDeploymentRequest::setStorageClusterId(const std::string &storageClusterId) {
|
||||
storageClusterId_ = storageClusterId;
|
||||
setParameter(std::string("StorageClusterId"), storageClusterId);
|
||||
}
|
||||
|
||||
51
ecs/src/model/ModifyDiskDeploymentResult.cc
Normal file
51
ecs/src/model/ModifyDiskDeploymentResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/ecs/model/ModifyDiskDeploymentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ecs;
|
||||
using namespace AlibabaCloud::Ecs::Model;
|
||||
|
||||
ModifyDiskDeploymentResult::ModifyDiskDeploymentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDiskDeploymentResult::ModifyDiskDeploymentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDiskDeploymentResult::~ModifyDiskDeploymentResult()
|
||||
{}
|
||||
|
||||
void ModifyDiskDeploymentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyDiskDeploymentResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,17 @@ void ModifyDiskSpecRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
ModifyDiskSpecRequest::PerformanceControlOptions ModifyDiskSpecRequest::getPerformanceControlOptions() const {
|
||||
return performanceControlOptions_;
|
||||
}
|
||||
|
||||
void ModifyDiskSpecRequest::setPerformanceControlOptions(const ModifyDiskSpecRequest::PerformanceControlOptions &performanceControlOptions) {
|
||||
performanceControlOptions_ = performanceControlOptions;
|
||||
setParameter(std::string("PerformanceControlOptions") + ".IOPS", std::to_string(performanceControlOptions.iOPS));
|
||||
setParameter(std::string("PerformanceControlOptions") + ".Throughput", std::to_string(performanceControlOptions.throughput));
|
||||
setParameter(std::string("PerformanceControlOptions") + ".Recover", performanceControlOptions.recover);
|
||||
}
|
||||
|
||||
long ModifyDiskSpecRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,15 @@ void ModifyInstanceSpecRequest::setTemporaryEndTime(const std::string &temporary
|
||||
setParameter(std::string("Temporary.EndTime"), temporaryEndTime);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceSpecRequest::getModifyMode() const {
|
||||
return modifyMode_;
|
||||
}
|
||||
|
||||
void ModifyInstanceSpecRequest::setModifyMode(const std::string &modifyMode) {
|
||||
modifyMode_ = modifyMode;
|
||||
setParameter(std::string("ModifyMode"), modifyMode);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceSpecRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
@@ -142,6 +151,21 @@ void ModifyInstanceSpecRequest::setAsync(bool async) {
|
||||
setParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<ModifyInstanceSpecRequest::Disk> ModifyInstanceSpecRequest::getDisk() const {
|
||||
return disk_;
|
||||
}
|
||||
|
||||
void ModifyInstanceSpecRequest::setDisk(const std::vector<ModifyInstanceSpecRequest::Disk> &disk) {
|
||||
disk_ = disk;
|
||||
for(int dep1 = 0; dep1 != disk.size(); dep1++) {
|
||||
auto diskObj = disk.at(dep1);
|
||||
std::string diskObjStr = std::string("Disk") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(diskObjStr + ".PerformanceLevel", diskObj.performanceLevel);
|
||||
setParameter(diskObjStr + ".DiskId", diskObj.diskId);
|
||||
setParameter(diskObjStr + ".Category", diskObj.category);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModifyInstanceSpecRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,15 @@ void ModifyPrepayInstanceSpecRequest::setInstanceType(const std::string &instanc
|
||||
setParameter(std::string("InstanceType"), instanceType);
|
||||
}
|
||||
|
||||
std::string ModifyPrepayInstanceSpecRequest::getModifyMode() const {
|
||||
return modifyMode_;
|
||||
}
|
||||
|
||||
void ModifyPrepayInstanceSpecRequest::setModifyMode(const std::string &modifyMode) {
|
||||
modifyMode_ = modifyMode;
|
||||
setParameter(std::string("ModifyMode"), modifyMode);
|
||||
}
|
||||
|
||||
bool ModifyPrepayInstanceSpecRequest::getAutoPay() const {
|
||||
return autoPay_;
|
||||
}
|
||||
@@ -160,6 +169,21 @@ void ModifyPrepayInstanceSpecRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::vector<ModifyPrepayInstanceSpecRequest::Disk> ModifyPrepayInstanceSpecRequest::getDisk() const {
|
||||
return disk_;
|
||||
}
|
||||
|
||||
void ModifyPrepayInstanceSpecRequest::setDisk(const std::vector<ModifyPrepayInstanceSpecRequest::Disk> &disk) {
|
||||
disk_ = disk;
|
||||
for(int dep1 = 0; dep1 != disk.size(); dep1++) {
|
||||
auto diskObj = disk.at(dep1);
|
||||
std::string diskObjStr = std::string("Disk") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(diskObjStr + ".PerformanceLevel", diskObj.performanceLevel);
|
||||
setParameter(diskObjStr + ".DiskId", diskObj.diskId);
|
||||
setParameter(diskObjStr + ".Category", diskObj.category);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModifyPrepayInstanceSpecRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user