Support API ARMInstance.
This commit is contained in:
@@ -253,6 +253,8 @@ set(ens_public_header_model
|
||||
include/alibabacloud/ens/model/ExportMeasurementDataResult.h
|
||||
include/alibabacloud/ens/model/GetDeviceInternetPortRequest.h
|
||||
include/alibabacloud/ens/model/GetDeviceInternetPortResult.h
|
||||
include/alibabacloud/ens/model/GetOssStorageAndAccByBucketsRequest.h
|
||||
include/alibabacloud/ens/model/GetOssStorageAndAccByBucketsResult.h
|
||||
include/alibabacloud/ens/model/ImportKeyPairRequest.h
|
||||
include/alibabacloud/ens/model/ImportKeyPairResult.h
|
||||
include/alibabacloud/ens/model/JoinPublicIpsToEpnInstanceRequest.h
|
||||
@@ -301,6 +303,8 @@ set(ens_public_header_model
|
||||
include/alibabacloud/ens/model/RebootARMServerInstanceResult.h
|
||||
include/alibabacloud/ens/model/RebootInstanceRequest.h
|
||||
include/alibabacloud/ens/model/RebootInstanceResult.h
|
||||
include/alibabacloud/ens/model/ReinitInstanceRequest.h
|
||||
include/alibabacloud/ens/model/ReinitInstanceResult.h
|
||||
include/alibabacloud/ens/model/ReleaseARMServerInstanceRequest.h
|
||||
include/alibabacloud/ens/model/ReleaseARMServerInstanceResult.h
|
||||
include/alibabacloud/ens/model/ReleaseInstanceRequest.h
|
||||
@@ -606,6 +610,8 @@ set(ens_src
|
||||
src/model/ExportMeasurementDataResult.cc
|
||||
src/model/GetDeviceInternetPortRequest.cc
|
||||
src/model/GetDeviceInternetPortResult.cc
|
||||
src/model/GetOssStorageAndAccByBucketsRequest.cc
|
||||
src/model/GetOssStorageAndAccByBucketsResult.cc
|
||||
src/model/ImportKeyPairRequest.cc
|
||||
src/model/ImportKeyPairResult.cc
|
||||
src/model/JoinPublicIpsToEpnInstanceRequest.cc
|
||||
@@ -654,6 +660,8 @@ set(ens_src
|
||||
src/model/RebootARMServerInstanceResult.cc
|
||||
src/model/RebootInstanceRequest.cc
|
||||
src/model/RebootInstanceResult.cc
|
||||
src/model/ReinitInstanceRequest.cc
|
||||
src/model/ReinitInstanceResult.cc
|
||||
src/model/ReleaseARMServerInstanceRequest.cc
|
||||
src/model/ReleaseARMServerInstanceResult.cc
|
||||
src/model/ReleaseInstanceRequest.cc
|
||||
|
||||
@@ -254,6 +254,8 @@
|
||||
#include "model/ExportMeasurementDataResult.h"
|
||||
#include "model/GetDeviceInternetPortRequest.h"
|
||||
#include "model/GetDeviceInternetPortResult.h"
|
||||
#include "model/GetOssStorageAndAccByBucketsRequest.h"
|
||||
#include "model/GetOssStorageAndAccByBucketsResult.h"
|
||||
#include "model/ImportKeyPairRequest.h"
|
||||
#include "model/ImportKeyPairResult.h"
|
||||
#include "model/JoinPublicIpsToEpnInstanceRequest.h"
|
||||
@@ -302,6 +304,8 @@
|
||||
#include "model/RebootARMServerInstanceResult.h"
|
||||
#include "model/RebootInstanceRequest.h"
|
||||
#include "model/RebootInstanceResult.h"
|
||||
#include "model/ReinitInstanceRequest.h"
|
||||
#include "model/ReinitInstanceResult.h"
|
||||
#include "model/ReleaseARMServerInstanceRequest.h"
|
||||
#include "model/ReleaseARMServerInstanceResult.h"
|
||||
#include "model/ReleaseInstanceRequest.h"
|
||||
@@ -729,6 +733,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetDeviceInternetPortResult> GetDeviceInternetPortOutcome;
|
||||
typedef std::future<GetDeviceInternetPortOutcome> GetDeviceInternetPortOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::GetDeviceInternetPortRequest&, const GetDeviceInternetPortOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDeviceInternetPortAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetOssStorageAndAccByBucketsResult> GetOssStorageAndAccByBucketsOutcome;
|
||||
typedef std::future<GetOssStorageAndAccByBucketsOutcome> GetOssStorageAndAccByBucketsOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::GetOssStorageAndAccByBucketsRequest&, const GetOssStorageAndAccByBucketsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOssStorageAndAccByBucketsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ImportKeyPairResult> ImportKeyPairOutcome;
|
||||
typedef std::future<ImportKeyPairOutcome> ImportKeyPairOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::ImportKeyPairRequest&, const ImportKeyPairOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ImportKeyPairAsyncHandler;
|
||||
@@ -801,6 +808,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::RebootInstanceResult> RebootInstanceOutcome;
|
||||
typedef std::future<RebootInstanceOutcome> RebootInstanceOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::RebootInstanceRequest&, const RebootInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RebootInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::ReinitInstanceResult> ReinitInstanceOutcome;
|
||||
typedef std::future<ReinitInstanceOutcome> ReinitInstanceOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::ReinitInstanceRequest&, const ReinitInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReinitInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::ReleaseARMServerInstanceResult> ReleaseARMServerInstanceOutcome;
|
||||
typedef std::future<ReleaseARMServerInstanceOutcome> ReleaseARMServerInstanceOutcomeCallable;
|
||||
typedef std::function<void(const EnsClient*, const Model::ReleaseARMServerInstanceRequest&, const ReleaseARMServerInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReleaseARMServerInstanceAsyncHandler;
|
||||
@@ -1259,6 +1269,9 @@ namespace AlibabaCloud
|
||||
GetDeviceInternetPortOutcome getDeviceInternetPort(const Model::GetDeviceInternetPortRequest &request)const;
|
||||
void getDeviceInternetPortAsync(const Model::GetDeviceInternetPortRequest& request, const GetDeviceInternetPortAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDeviceInternetPortOutcomeCallable getDeviceInternetPortCallable(const Model::GetDeviceInternetPortRequest& request) const;
|
||||
GetOssStorageAndAccByBucketsOutcome getOssStorageAndAccByBuckets(const Model::GetOssStorageAndAccByBucketsRequest &request)const;
|
||||
void getOssStorageAndAccByBucketsAsync(const Model::GetOssStorageAndAccByBucketsRequest& request, const GetOssStorageAndAccByBucketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetOssStorageAndAccByBucketsOutcomeCallable getOssStorageAndAccByBucketsCallable(const Model::GetOssStorageAndAccByBucketsRequest& request) const;
|
||||
ImportKeyPairOutcome importKeyPair(const Model::ImportKeyPairRequest &request)const;
|
||||
void importKeyPairAsync(const Model::ImportKeyPairRequest& request, const ImportKeyPairAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ImportKeyPairOutcomeCallable importKeyPairCallable(const Model::ImportKeyPairRequest& request) const;
|
||||
@@ -1331,6 +1344,9 @@ namespace AlibabaCloud
|
||||
RebootInstanceOutcome rebootInstance(const Model::RebootInstanceRequest &request)const;
|
||||
void rebootInstanceAsync(const Model::RebootInstanceRequest& request, const RebootInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RebootInstanceOutcomeCallable rebootInstanceCallable(const Model::RebootInstanceRequest& request) const;
|
||||
ReinitInstanceOutcome reinitInstance(const Model::ReinitInstanceRequest &request)const;
|
||||
void reinitInstanceAsync(const Model::ReinitInstanceRequest& request, const ReinitInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ReinitInstanceOutcomeCallable reinitInstanceCallable(const Model::ReinitInstanceRequest& request) const;
|
||||
ReleaseARMServerInstanceOutcome releaseARMServerInstance(const Model::ReleaseARMServerInstanceRequest &request)const;
|
||||
void releaseARMServerInstanceAsync(const Model::ReleaseARMServerInstanceRequest& request, const ReleaseARMServerInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ReleaseARMServerInstanceOutcomeCallable releaseARMServerInstanceCallable(const Model::ReleaseARMServerInstanceRequest& request) const;
|
||||
|
||||
@@ -32,6 +32,8 @@ public:
|
||||
~CreateNatGatewayRequest();
|
||||
std::string getEnsRegionId() const;
|
||||
void setEnsRegionId(const std::string &ensRegionId);
|
||||
std::string getInstanceType() const;
|
||||
void setInstanceType(const std::string &instanceType);
|
||||
std::string getVSwitchId() const;
|
||||
void setVSwitchId(const std::string &vSwitchId);
|
||||
std::string getName() const;
|
||||
@@ -41,6 +43,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string ensRegionId_;
|
||||
std::string instanceType_;
|
||||
std::string vSwitchId_;
|
||||
std::string name_;
|
||||
std::string networkId_;
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
void setSnatIp(const std::string &snatIp);
|
||||
std::string getSourceVSwitchId() const;
|
||||
void setSourceVSwitchId(const std::string &sourceVSwitchId);
|
||||
std::string getSourceNetworkId() const;
|
||||
void setSourceNetworkId(const std::string &sourceNetworkId);
|
||||
std::string getNatGatewayId() const;
|
||||
void setNatGatewayId(const std::string &natGatewayId);
|
||||
std::string getSnatEntryName() const;
|
||||
@@ -45,6 +47,7 @@ private:
|
||||
std::string sourceCIDR_;
|
||||
std::string snatIp_;
|
||||
std::string sourceVSwitchId_;
|
||||
std::string sourceNetworkId_;
|
||||
std::string natGatewayId_;
|
||||
std::string snatEntryName_;
|
||||
};
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace AlibabaCloud
|
||||
std::string creationTime;
|
||||
std::string ensRegionId;
|
||||
std::string networkId;
|
||||
std::string spec;
|
||||
std::string natGatewayId;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSREQUEST_H_
|
||||
#define ALIBABACLOUD_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSREQUEST_H_
|
||||
|
||||
#include <alibabacloud/ens/EnsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Ens {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ENS_EXPORT GetOssStorageAndAccByBucketsRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetOssStorageAndAccByBucketsRequest();
|
||||
~GetOssStorageAndAccByBucketsRequest();
|
||||
std::string getBucketList() const;
|
||||
void setBucketList(const std::string &bucketList);
|
||||
|
||||
private:
|
||||
std::string bucketList_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Ens
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSREQUEST_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_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSRESULT_H_
|
||||
#define ALIBABACLOUD_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ens/EnsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ens
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ENS_EXPORT GetOssStorageAndAccByBucketsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct BucketListItem
|
||||
{
|
||||
long acc;
|
||||
std::string bucket;
|
||||
long storageUsageByte;
|
||||
};
|
||||
|
||||
|
||||
GetOssStorageAndAccByBucketsResult();
|
||||
explicit GetOssStorageAndAccByBucketsResult(const std::string &payload);
|
||||
~GetOssStorageAndAccByBucketsResult();
|
||||
std::vector<BucketListItem> getBucketList()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<BucketListItem> bucketList_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ENS_MODEL_GETOSSSTORAGEANDACCBYBUCKETSRESULT_H_
|
||||
48
ens/include/alibabacloud/ens/model/ReinitInstanceRequest.h
Normal file
48
ens/include/alibabacloud/ens/model/ReinitInstanceRequest.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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_ENS_MODEL_REINITINSTANCEREQUEST_H_
|
||||
#define ALIBABACLOUD_ENS_MODEL_REINITINSTANCEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/ens/EnsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Ens {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ENS_EXPORT ReinitInstanceRequest : public RpcServiceRequest {
|
||||
public:
|
||||
ReinitInstanceRequest();
|
||||
~ReinitInstanceRequest();
|
||||
std::string getImageId() const;
|
||||
void setImageId(const std::string &imageId);
|
||||
std::string getPassword() const;
|
||||
void setPassword(const std::string &password);
|
||||
std::string getInstanceId() const;
|
||||
void setInstanceId(const std::string &instanceId);
|
||||
|
||||
private:
|
||||
std::string imageId_;
|
||||
std::string password_;
|
||||
std::string instanceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Ens
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ENS_MODEL_REINITINSTANCEREQUEST_H_
|
||||
49
ens/include/alibabacloud/ens/model/ReinitInstanceResult.h
Normal file
49
ens/include/alibabacloud/ens/model/ReinitInstanceResult.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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_ENS_MODEL_REINITINSTANCERESULT_H_
|
||||
#define ALIBABACLOUD_ENS_MODEL_REINITINSTANCERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ens/EnsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ens
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ENS_EXPORT ReinitInstanceResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ReinitInstanceResult();
|
||||
explicit ReinitInstanceResult(const std::string &payload);
|
||||
~ReinitInstanceResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ENS_MODEL_REINITINSTANCERESULT_H_
|
||||
@@ -4227,6 +4227,42 @@ EnsClient::GetDeviceInternetPortOutcomeCallable EnsClient::getDeviceInternetPort
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::GetOssStorageAndAccByBucketsOutcome EnsClient::getOssStorageAndAccByBuckets(const GetOssStorageAndAccByBucketsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetOssStorageAndAccByBucketsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetOssStorageAndAccByBucketsOutcome(GetOssStorageAndAccByBucketsResult(outcome.result()));
|
||||
else
|
||||
return GetOssStorageAndAccByBucketsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::getOssStorageAndAccByBucketsAsync(const GetOssStorageAndAccByBucketsRequest& request, const GetOssStorageAndAccByBucketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getOssStorageAndAccByBuckets(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::GetOssStorageAndAccByBucketsOutcomeCallable EnsClient::getOssStorageAndAccByBucketsCallable(const GetOssStorageAndAccByBucketsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetOssStorageAndAccByBucketsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getOssStorageAndAccByBuckets(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::ImportKeyPairOutcome EnsClient::importKeyPair(const ImportKeyPairRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -5091,6 +5127,42 @@ EnsClient::RebootInstanceOutcomeCallable EnsClient::rebootInstanceCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::ReinitInstanceOutcome EnsClient::reinitInstance(const ReinitInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReinitInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReinitInstanceOutcome(ReinitInstanceResult(outcome.result()));
|
||||
else
|
||||
return ReinitInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EnsClient::reinitInstanceAsync(const ReinitInstanceRequest& request, const ReinitInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, reinitInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EnsClient::ReinitInstanceOutcomeCallable EnsClient::reinitInstanceCallable(const ReinitInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReinitInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->reinitInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EnsClient::ReleaseARMServerInstanceOutcome EnsClient::releaseARMServerInstance(const ReleaseARMServerInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -34,6 +34,15 @@ void CreateNatGatewayRequest::setEnsRegionId(const std::string &ensRegionId) {
|
||||
setParameter(std::string("EnsRegionId"), ensRegionId);
|
||||
}
|
||||
|
||||
std::string CreateNatGatewayRequest::getInstanceType() const {
|
||||
return instanceType_;
|
||||
}
|
||||
|
||||
void CreateNatGatewayRequest::setInstanceType(const std::string &instanceType) {
|
||||
instanceType_ = instanceType;
|
||||
setParameter(std::string("InstanceType"), instanceType);
|
||||
}
|
||||
|
||||
std::string CreateNatGatewayRequest::getVSwitchId() const {
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,15 @@ void CreateSnatEntryRequest::setSourceVSwitchId(const std::string &sourceVSwitch
|
||||
setParameter(std::string("SourceVSwitchId"), sourceVSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateSnatEntryRequest::getSourceNetworkId() const {
|
||||
return sourceNetworkId_;
|
||||
}
|
||||
|
||||
void CreateSnatEntryRequest::setSourceNetworkId(const std::string &sourceNetworkId) {
|
||||
sourceNetworkId_ = sourceNetworkId;
|
||||
setParameter(std::string("SourceNetworkId"), sourceNetworkId);
|
||||
}
|
||||
|
||||
std::string CreateSnatEntryRequest::getNatGatewayId() const {
|
||||
return natGatewayId_;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ void DescribeNatGatewaysResult::parse(const std::string &payload)
|
||||
natGatewaysObject.name = valueNatGatewaysNatGateway["Name"].asString();
|
||||
if(!valueNatGatewaysNatGateway["CreationTime"].isNull())
|
||||
natGatewaysObject.creationTime = valueNatGatewaysNatGateway["CreationTime"].asString();
|
||||
if(!valueNatGatewaysNatGateway["Spec"].isNull())
|
||||
natGatewaysObject.spec = valueNatGatewaysNatGateway["Spec"].asString();
|
||||
natGateways_.push_back(natGatewaysObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
|
||||
36
ens/src/model/GetOssStorageAndAccByBucketsRequest.cc
Normal file
36
ens/src/model/GetOssStorageAndAccByBucketsRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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/ens/model/GetOssStorageAndAccByBucketsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::GetOssStorageAndAccByBucketsRequest;
|
||||
|
||||
GetOssStorageAndAccByBucketsRequest::GetOssStorageAndAccByBucketsRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "GetOssStorageAndAccByBuckets") {
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetOssStorageAndAccByBucketsRequest::~GetOssStorageAndAccByBucketsRequest() {}
|
||||
|
||||
std::string GetOssStorageAndAccByBucketsRequest::getBucketList() const {
|
||||
return bucketList_;
|
||||
}
|
||||
|
||||
void GetOssStorageAndAccByBucketsRequest::setBucketList(const std::string &bucketList) {
|
||||
bucketList_ = bucketList;
|
||||
setParameter(std::string("BucketList"), bucketList);
|
||||
}
|
||||
|
||||
61
ens/src/model/GetOssStorageAndAccByBucketsResult.cc
Normal file
61
ens/src/model/GetOssStorageAndAccByBucketsResult.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/ens/model/GetOssStorageAndAccByBucketsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
GetOssStorageAndAccByBucketsResult::GetOssStorageAndAccByBucketsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetOssStorageAndAccByBucketsResult::GetOssStorageAndAccByBucketsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetOssStorageAndAccByBucketsResult::~GetOssStorageAndAccByBucketsResult()
|
||||
{}
|
||||
|
||||
void GetOssStorageAndAccByBucketsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allBucketListNode = value["BucketList"]["BucketListItem"];
|
||||
for (auto valueBucketListBucketListItem : allBucketListNode)
|
||||
{
|
||||
BucketListItem bucketListObject;
|
||||
if(!valueBucketListBucketListItem["Acc"].isNull())
|
||||
bucketListObject.acc = std::stol(valueBucketListBucketListItem["Acc"].asString());
|
||||
if(!valueBucketListBucketListItem["Bucket"].isNull())
|
||||
bucketListObject.bucket = valueBucketListBucketListItem["Bucket"].asString();
|
||||
if(!valueBucketListBucketListItem["StorageUsageByte"].isNull())
|
||||
bucketListObject.storageUsageByte = std::stol(valueBucketListBucketListItem["StorageUsageByte"].asString());
|
||||
bucketList_.push_back(bucketListObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetOssStorageAndAccByBucketsResult::BucketListItem> GetOssStorageAndAccByBucketsResult::getBucketList()const
|
||||
{
|
||||
return bucketList_;
|
||||
}
|
||||
|
||||
54
ens/src/model/ReinitInstanceRequest.cc
Normal file
54
ens/src/model/ReinitInstanceRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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/ens/model/ReinitInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Ens::Model::ReinitInstanceRequest;
|
||||
|
||||
ReinitInstanceRequest::ReinitInstanceRequest()
|
||||
: RpcServiceRequest("ens", "2017-11-10", "ReinitInstance") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReinitInstanceRequest::~ReinitInstanceRequest() {}
|
||||
|
||||
std::string ReinitInstanceRequest::getImageId() const {
|
||||
return imageId_;
|
||||
}
|
||||
|
||||
void ReinitInstanceRequest::setImageId(const std::string &imageId) {
|
||||
imageId_ = imageId;
|
||||
setBodyParameter(std::string("ImageId"), imageId);
|
||||
}
|
||||
|
||||
std::string ReinitInstanceRequest::getPassword() const {
|
||||
return password_;
|
||||
}
|
||||
|
||||
void ReinitInstanceRequest::setPassword(const std::string &password) {
|
||||
password_ = password;
|
||||
setBodyParameter(std::string("Password"), password);
|
||||
}
|
||||
|
||||
std::string ReinitInstanceRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ReinitInstanceRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
44
ens/src/model/ReinitInstanceResult.cc
Normal file
44
ens/src/model/ReinitInstanceResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/ens/model/ReinitInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ens;
|
||||
using namespace AlibabaCloud::Ens::Model;
|
||||
|
||||
ReinitInstanceResult::ReinitInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReinitInstanceResult::ReinitInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReinitInstanceResult::~ReinitInstanceResult()
|
||||
{}
|
||||
|
||||
void ReinitInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user