Support throughput for API DescribeDisks.
This commit is contained in:
@@ -91,6 +91,14 @@ void CreateAutoProvisioningGroupRequest::setLaunchConfigurationHostNames(const s
|
||||
launchConfigurationHostNames_ = launchConfigurationHostNames;
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateAutoProvisioningGroupRequest::getLaunchConfigurationSecurityGroupIds() const {
|
||||
return launchConfigurationSecurityGroupIds_;
|
||||
}
|
||||
|
||||
void CreateAutoProvisioningGroupRequest::setLaunchConfigurationSecurityGroupIds(const std::vector<std::string> &launchConfigurationSecurityGroupIds) {
|
||||
launchConfigurationSecurityGroupIds_ = launchConfigurationSecurityGroupIds;
|
||||
}
|
||||
|
||||
std::string CreateAutoProvisioningGroupRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
@@ -198,6 +198,24 @@ void CreateDiskRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
bool CreateDiskRequest::getBurstingEnabled() const {
|
||||
return burstingEnabled_;
|
||||
}
|
||||
|
||||
void CreateDiskRequest::setBurstingEnabled(bool burstingEnabled) {
|
||||
burstingEnabled_ = burstingEnabled;
|
||||
setParameter(std::string("BurstingEnabled"), burstingEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
long CreateDiskRequest::getProvisionedIops() const {
|
||||
return provisionedIops_;
|
||||
}
|
||||
|
||||
void CreateDiskRequest::setProvisionedIops(long provisionedIops) {
|
||||
provisionedIops_ = provisionedIops;
|
||||
setParameter(std::string("ProvisionedIops"), std::to_string(provisionedIops));
|
||||
}
|
||||
|
||||
std::string CreateDiskRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ void DescribeDedicatedHostsResult::parse(const std::string &payload)
|
||||
DedicatedHost dedicatedHostsObject;
|
||||
if(!valueDedicatedHostsDedicatedHost["CreationTime"].isNull())
|
||||
dedicatedHostsObject.creationTime = valueDedicatedHostsDedicatedHost["CreationTime"].asString();
|
||||
if(!valueDedicatedHostsDedicatedHost["SchedulerOptions.ManagedPrivateSpaceId"].isNull())
|
||||
dedicatedHostsObject.schedulerOptionsManagedPrivateSpaceId = valueDedicatedHostsDedicatedHost["SchedulerOptions.ManagedPrivateSpaceId"].asString();
|
||||
if(!valueDedicatedHostsDedicatedHost["Status"].isNull())
|
||||
dedicatedHostsObject.status = valueDedicatedHostsDedicatedHost["Status"].asString();
|
||||
if(!valueDedicatedHostsDedicatedHost["Cores"].isNull())
|
||||
|
||||
@@ -63,6 +63,18 @@ void DescribeDeploymentSetsResult::parse(const std::string &payload)
|
||||
deploymentSetsObject.deploymentSetName = valueDeploymentSetsDeploymentSet["DeploymentSetName"].asString();
|
||||
if(!valueDeploymentSetsDeploymentSet["InstanceAmount"].isNull())
|
||||
deploymentSetsObject.instanceAmount = std::stoi(valueDeploymentSetsDeploymentSet["InstanceAmount"].asString());
|
||||
auto allCapacitiesNode = valueDeploymentSetsDeploymentSet["Capacities"]["Capacity"];
|
||||
for (auto valueDeploymentSetsDeploymentSetCapacitiesCapacity : allCapacitiesNode)
|
||||
{
|
||||
DeploymentSet::Capacity capacitiesObject;
|
||||
if(!valueDeploymentSetsDeploymentSetCapacitiesCapacity["ZoneId"].isNull())
|
||||
capacitiesObject.zoneId = valueDeploymentSetsDeploymentSetCapacitiesCapacity["ZoneId"].asString();
|
||||
if(!valueDeploymentSetsDeploymentSetCapacitiesCapacity["UsedAmount"].isNull())
|
||||
capacitiesObject.usedAmount = std::stoi(valueDeploymentSetsDeploymentSetCapacitiesCapacity["UsedAmount"].asString());
|
||||
if(!valueDeploymentSetsDeploymentSetCapacitiesCapacity["AvailableAmount"].isNull())
|
||||
capacitiesObject.availableAmount = std::stoi(valueDeploymentSetsDeploymentSetCapacitiesCapacity["AvailableAmount"].asString());
|
||||
deploymentSetsObject.capacities.push_back(capacitiesObject);
|
||||
}
|
||||
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
|
||||
for (auto value : allInstanceIds)
|
||||
deploymentSetsObject.instanceIds.push_back(value.asString());
|
||||
|
||||
@@ -121,6 +121,12 @@ void DescribeDisksResult::parse(const std::string &payload)
|
||||
disksObject.productCode = valueDisksDisk["ProductCode"].asString();
|
||||
if(!valueDisksDisk["MultiAttach"].isNull())
|
||||
disksObject.multiAttach = valueDisksDisk["MultiAttach"].asString();
|
||||
if(!valueDisksDisk["ProvisionedIops"].isNull())
|
||||
disksObject.provisionedIops = std::stol(valueDisksDisk["ProvisionedIops"].asString());
|
||||
if(!valueDisksDisk["BurstingEnabled"].isNull())
|
||||
disksObject.burstingEnabled = valueDisksDisk["BurstingEnabled"].asString() == "true";
|
||||
if(!valueDisksDisk["Throughput"].isNull())
|
||||
disksObject.throughput = std::stoi(valueDisksDisk["Throughput"].asString());
|
||||
auto allOperationLocksNode = valueDisksDisk["OperationLocks"]["OperationLock"];
|
||||
for (auto valueDisksDiskOperationLocksOperationLock : allOperationLocksNode)
|
||||
{
|
||||
|
||||
@@ -93,6 +93,10 @@ void DescribeImagesResult::parse(const std::string &payload)
|
||||
imagesObject.isPublic = valueImagesImage["IsPublic"].asString() == "true";
|
||||
if(!valueImagesImage["ImageOwnerId"].isNull())
|
||||
imagesObject.imageOwnerId = std::stol(valueImagesImage["ImageOwnerId"].asString());
|
||||
if(!valueImagesImage["LoginAsNonRootSupported"].isNull())
|
||||
imagesObject.loginAsNonRootSupported = valueImagesImage["LoginAsNonRootSupported"].asString() == "true";
|
||||
if(!valueImagesImage["SupplierName"].isNull())
|
||||
imagesObject.supplierName = valueImagesImage["SupplierName"].asString();
|
||||
auto allDiskDeviceMappingsNode = valueImagesImage["DiskDeviceMappings"]["DiskDeviceMapping"];
|
||||
for (auto valueImagesImageDiskDeviceMappingsDiskDeviceMapping : allDiskDeviceMappingsNode)
|
||||
{
|
||||
|
||||
@@ -78,6 +78,8 @@ void DescribeInstanceHistoryEventsResult::parse(const std::string &payload)
|
||||
instanceSystemEventSetObject.extendedAttribute.hostType = extendedAttributeNode["HostType"].asString();
|
||||
if(!extendedAttributeNode["HostId"].isNull())
|
||||
instanceSystemEventSetObject.extendedAttribute.hostId = extendedAttributeNode["HostId"].asString();
|
||||
if(!extendedAttributeNode["OnlineRepairPolicy"].isNull())
|
||||
instanceSystemEventSetObject.extendedAttribute.onlineRepairPolicy = extendedAttributeNode["OnlineRepairPolicy"].asString();
|
||||
auto allInactiveDisksNode = extendedAttributeNode["InactiveDisks"]["InactiveDisk"];
|
||||
for (auto extendedAttributeNodeInactiveDisksInactiveDisk : allInactiveDisksNode)
|
||||
{
|
||||
|
||||
@@ -244,6 +244,9 @@ void DescribeInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.metadataOptions.httpPutResponseHopLimit = std::stoi(metadataOptionsNode["HttpPutResponseHopLimit"].asString());
|
||||
if(!metadataOptionsNode["HttpTokens"].isNull())
|
||||
instancesObject.metadataOptions.httpTokens = metadataOptionsNode["HttpTokens"].asString();
|
||||
auto imageOptionsNode = value["ImageOptions"];
|
||||
if(!imageOptionsNode["LoginAsNonRoot"].isNull())
|
||||
instancesObject.imageOptions.loginAsNonRoot = imageOptionsNode["LoginAsNonRoot"].asString() == "true";
|
||||
auto allRdmaIpAddress = value["RdmaIpAddress"]["IpAddress"];
|
||||
for (auto value : allRdmaIpAddress)
|
||||
instancesObject.rdmaIpAddress.push_back(value.asString());
|
||||
|
||||
@@ -132,3 +132,12 @@ void ModifyDiskAttributeRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
bool ModifyDiskAttributeRequest::getBurstingEnabled() const {
|
||||
return burstingEnabled_;
|
||||
}
|
||||
|
||||
void ModifyDiskAttributeRequest::setBurstingEnabled(bool burstingEnabled) {
|
||||
burstingEnabled_ = burstingEnabled;
|
||||
setParameter(std::string("BurstingEnabled"), burstingEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -97,3 +97,12 @@ void ModifyDiskSpecRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
long ModifyDiskSpecRequest::getProvisionedIops() const {
|
||||
return provisionedIops_;
|
||||
}
|
||||
|
||||
void ModifyDiskSpecRequest::setProvisionedIops(long provisionedIops) {
|
||||
provisionedIops_ = provisionedIops;
|
||||
setParameter(std::string("ProvisionedIops"), std::to_string(provisionedIops));
|
||||
}
|
||||
|
||||
|
||||
@@ -159,3 +159,13 @@ void ModifyInstanceAttributeRequest::setInstanceName(const std::string &instance
|
||||
setParameter(std::string("InstanceName"), instanceName);
|
||||
}
|
||||
|
||||
ModifyInstanceAttributeRequest::RemoteConnectionOptions ModifyInstanceAttributeRequest::getRemoteConnectionOptions() const {
|
||||
return remoteConnectionOptions_;
|
||||
}
|
||||
|
||||
void ModifyInstanceAttributeRequest::setRemoteConnectionOptions(const ModifyInstanceAttributeRequest::RemoteConnectionOptions &remoteConnectionOptions) {
|
||||
remoteConnectionOptions_ = remoteConnectionOptions;
|
||||
setParameter(std::string("RemoteConnectionOptions") + ".Password", remoteConnectionOptions.password);
|
||||
setParameter(std::string("RemoteConnectionOptions") + ".Type", remoteConnectionOptions.type);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,15 @@ void ReInitDiskRequest::setPassword(const std::string &password) {
|
||||
setParameter(std::string("Password"), password);
|
||||
}
|
||||
|
||||
bool ReInitDiskRequest::getLoginAsNonRoot() const {
|
||||
return loginAsNonRoot_;
|
||||
}
|
||||
|
||||
void ReInitDiskRequest::setLoginAsNonRoot(bool loginAsNonRoot) {
|
||||
loginAsNonRoot_ = loginAsNonRoot;
|
||||
setParameter(std::string("LoginAsNonRoot"), loginAsNonRoot ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ReInitDiskRequest::getDiskId() const {
|
||||
return diskId_;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,15 @@ void ReplaceSystemDiskRequest::setPassword(const std::string &password) {
|
||||
setParameter(std::string("Password"), password);
|
||||
}
|
||||
|
||||
bool ReplaceSystemDiskRequest::getLoginAsNonRoot() const {
|
||||
return loginAsNonRoot_;
|
||||
}
|
||||
|
||||
void ReplaceSystemDiskRequest::setLoginAsNonRoot(bool loginAsNonRoot) {
|
||||
loginAsNonRoot_ = loginAsNonRoot;
|
||||
setParameter(std::string("LoginAsNonRoot"), loginAsNonRoot ? "true" : "false");
|
||||
}
|
||||
|
||||
bool ReplaceSystemDiskRequest::getPasswordInherit() const {
|
||||
return passwordInherit_;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,20 @@ RunInstancesRequest::SystemDisk RunInstancesRequest::getSystemDisk() const {
|
||||
void RunInstancesRequest::setSystemDisk(const RunInstancesRequest::SystemDisk &systemDisk) {
|
||||
systemDisk_ = systemDisk;
|
||||
setParameter(std::string("SystemDisk") + ".StorageClusterId", systemDisk.storageClusterId);
|
||||
setParameter(std::string("SystemDisk") + ".ProvisionedIops", std::to_string(systemDisk.provisionedIops));
|
||||
setParameter(std::string("SystemDisk") + ".BurstingEnabled", systemDisk.burstingEnabled ? "true" : "false");
|
||||
setParameter(std::string("SystemDisk") + ".Encrypted", systemDisk.encrypted);
|
||||
setParameter(std::string("SystemDisk") + ".KMSKeyId", systemDisk.kMSKeyId);
|
||||
setParameter(std::string("SystemDisk") + ".EncryptAlgorithm", systemDisk.encryptAlgorithm);
|
||||
}
|
||||
|
||||
RunInstancesRequest::ImageOptions RunInstancesRequest::getImageOptions() const {
|
||||
return imageOptions_;
|
||||
}
|
||||
|
||||
void RunInstancesRequest::setImageOptions(const RunInstancesRequest::ImageOptions &imageOptions) {
|
||||
imageOptions_ = imageOptions;
|
||||
setParameter(std::string("ImageOptions") + ".LoginAsNonRoot", imageOptions.loginAsNonRoot ? "true" : "false");
|
||||
}
|
||||
|
||||
int RunInstancesRequest::getDeploymentSetGroupNo() const {
|
||||
@@ -806,6 +820,8 @@ void RunInstancesRequest::setDataDisk(const std::vector<RunInstancesRequest::Dat
|
||||
setParameter(dataDiskObjStr + ".DeleteWithInstance", dataDiskObj.deleteWithInstance ? "true" : "false");
|
||||
setParameter(dataDiskObjStr + ".KMSKeyId", dataDiskObj.kMSKeyId);
|
||||
setParameter(dataDiskObjStr + ".StorageClusterId", dataDiskObj.storageClusterId);
|
||||
setParameter(dataDiskObjStr + ".ProvisionedIops", std::to_string(dataDiskObj.provisionedIops));
|
||||
setParameter(dataDiskObjStr + ".BurstingEnabled", dataDiskObj.burstingEnabled ? "true" : "false");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user