Support SLB DescribeLoadBalancerListeners.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-05-08 Version: 1.36.717
|
||||
- Support SLB DescribeLoadBalancerListeners.
|
||||
|
||||
2021-05-08 Version: 1.36.716
|
||||
- Generated 2020-05-18 for `dataworks-public`.
|
||||
|
||||
|
||||
@@ -95,6 +95,8 @@ set(slb_public_header_model
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerHTTPListenerAttributeResult.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerHTTPSListenerAttributeRequest.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerHTTPSListenerAttributeResult.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerListenersRequest.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerListenersResult.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerTCPListenerAttributeRequest.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerTCPListenerAttributeResult.h
|
||||
include/alibabacloud/slb/model/DescribeLoadBalancerUDPListenerAttributeRequest.h
|
||||
@@ -266,6 +268,8 @@ set(slb_src
|
||||
src/model/DescribeLoadBalancerHTTPListenerAttributeResult.cc
|
||||
src/model/DescribeLoadBalancerHTTPSListenerAttributeRequest.cc
|
||||
src/model/DescribeLoadBalancerHTTPSListenerAttributeResult.cc
|
||||
src/model/DescribeLoadBalancerListenersRequest.cc
|
||||
src/model/DescribeLoadBalancerListenersResult.cc
|
||||
src/model/DescribeLoadBalancerTCPListenerAttributeRequest.cc
|
||||
src/model/DescribeLoadBalancerTCPListenerAttributeResult.cc
|
||||
src/model/DescribeLoadBalancerUDPListenerAttributeRequest.cc
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
#include "model/DescribeLoadBalancerHTTPListenerAttributeResult.h"
|
||||
#include "model/DescribeLoadBalancerHTTPSListenerAttributeRequest.h"
|
||||
#include "model/DescribeLoadBalancerHTTPSListenerAttributeResult.h"
|
||||
#include "model/DescribeLoadBalancerListenersRequest.h"
|
||||
#include "model/DescribeLoadBalancerListenersResult.h"
|
||||
#include "model/DescribeLoadBalancerTCPListenerAttributeRequest.h"
|
||||
#include "model/DescribeLoadBalancerTCPListenerAttributeResult.h"
|
||||
#include "model/DescribeLoadBalancerUDPListenerAttributeRequest.h"
|
||||
@@ -310,6 +312,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeLoadBalancerHTTPSListenerAttributeResult> DescribeLoadBalancerHTTPSListenerAttributeOutcome;
|
||||
typedef std::future<DescribeLoadBalancerHTTPSListenerAttributeOutcome> DescribeLoadBalancerHTTPSListenerAttributeOutcomeCallable;
|
||||
typedef std::function<void(const SlbClient*, const Model::DescribeLoadBalancerHTTPSListenerAttributeRequest&, const DescribeLoadBalancerHTTPSListenerAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLoadBalancerHTTPSListenerAttributeAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeLoadBalancerListenersResult> DescribeLoadBalancerListenersOutcome;
|
||||
typedef std::future<DescribeLoadBalancerListenersOutcome> DescribeLoadBalancerListenersOutcomeCallable;
|
||||
typedef std::function<void(const SlbClient*, const Model::DescribeLoadBalancerListenersRequest&, const DescribeLoadBalancerListenersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLoadBalancerListenersAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeLoadBalancerTCPListenerAttributeResult> DescribeLoadBalancerTCPListenerAttributeOutcome;
|
||||
typedef std::future<DescribeLoadBalancerTCPListenerAttributeOutcome> DescribeLoadBalancerTCPListenerAttributeOutcomeCallable;
|
||||
typedef std::function<void(const SlbClient*, const Model::DescribeLoadBalancerTCPListenerAttributeRequest&, const DescribeLoadBalancerTCPListenerAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLoadBalancerTCPListenerAttributeAsyncHandler;
|
||||
@@ -567,6 +572,9 @@ namespace AlibabaCloud
|
||||
DescribeLoadBalancerHTTPSListenerAttributeOutcome describeLoadBalancerHTTPSListenerAttribute(const Model::DescribeLoadBalancerHTTPSListenerAttributeRequest &request)const;
|
||||
void describeLoadBalancerHTTPSListenerAttributeAsync(const Model::DescribeLoadBalancerHTTPSListenerAttributeRequest& request, const DescribeLoadBalancerHTTPSListenerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeLoadBalancerHTTPSListenerAttributeOutcomeCallable describeLoadBalancerHTTPSListenerAttributeCallable(const Model::DescribeLoadBalancerHTTPSListenerAttributeRequest& request) const;
|
||||
DescribeLoadBalancerListenersOutcome describeLoadBalancerListeners(const Model::DescribeLoadBalancerListenersRequest &request)const;
|
||||
void describeLoadBalancerListenersAsync(const Model::DescribeLoadBalancerListenersRequest& request, const DescribeLoadBalancerListenersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeLoadBalancerListenersOutcomeCallable describeLoadBalancerListenersCallable(const Model::DescribeLoadBalancerListenersRequest& request) const;
|
||||
DescribeLoadBalancerTCPListenerAttributeOutcome describeLoadBalancerTCPListenerAttribute(const Model::DescribeLoadBalancerTCPListenerAttributeRequest &request)const;
|
||||
void describeLoadBalancerTCPListenerAttributeAsync(const Model::DescribeLoadBalancerTCPListenerAttributeRequest& request, const DescribeLoadBalancerTCPListenerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeLoadBalancerTCPListenerAttributeOutcomeCallable describeLoadBalancerTCPListenerAttributeCallable(const Model::DescribeLoadBalancerTCPListenerAttributeRequest& request) const;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSREQUEST_H_
|
||||
#define ALIBABACLOUD_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/slb/SlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Slb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SLB_EXPORT DescribeLoadBalancerListenersRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeLoadBalancerListenersRequest();
|
||||
~DescribeLoadBalancerListenersRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getNextToken()const;
|
||||
void setNextToken(const std::string& nextToken);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getOwnerAccount()const;
|
||||
void setOwnerAccount(const std::string& ownerAccount);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getListenerProtocol()const;
|
||||
void setListenerProtocol(const std::string& listenerProtocol);
|
||||
std::vector<std::string> getLoadBalancerId()const;
|
||||
void setLoadBalancerId(const std::vector<std::string>& loadBalancerId);
|
||||
int getMaxResults()const;
|
||||
void setMaxResults(int maxResults);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string regionId_;
|
||||
std::string nextToken_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::string listenerProtocol_;
|
||||
std::vector<std::string> loadBalancerId_;
|
||||
int maxResults_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSREQUEST_H_
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* 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_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSRESULT_H_
|
||||
#define ALIBABACLOUD_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/slb/SlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Slb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SLB_EXPORT DescribeLoadBalancerListenersResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Listener
|
||||
{
|
||||
struct HTTPListenerConfig
|
||||
{
|
||||
int cookieTimeout;
|
||||
int unhealthyThreshold;
|
||||
std::string healthCheckURI;
|
||||
std::string healthCheck;
|
||||
int idleTimeout;
|
||||
std::string xForwardedFor_SLBID;
|
||||
int healthCheckConnectPort;
|
||||
std::string xForwardedFor_SLBPORT;
|
||||
std::string healthCheckMethod;
|
||||
std::string gzip;
|
||||
std::string stickySessionType;
|
||||
std::string xForwardedFor_SLBIP;
|
||||
std::string healthCheckHttpCode;
|
||||
int forwardCode;
|
||||
std::string cookie;
|
||||
int requestTimeout;
|
||||
int healthCheckInterval;
|
||||
std::string healthCheckHttpVersion;
|
||||
int healthCheckTimeout;
|
||||
std::string listenerForward;
|
||||
std::string stickySession;
|
||||
int forwardPort;
|
||||
int healthyThreshold;
|
||||
std::string xForwardedFor;
|
||||
std::string xForwardedFor_ClientSrcPort;
|
||||
std::string healthCheckDomain;
|
||||
std::string xForwardedFor_proto;
|
||||
std::string healthCheckType;
|
||||
};
|
||||
struct HTTPSListenerConfig
|
||||
{
|
||||
int cookieTimeout;
|
||||
int unhealthyThreshold;
|
||||
std::string healthCheckURI;
|
||||
std::string healthCheck;
|
||||
int idleTimeout;
|
||||
std::string xForwardedFor_SLBID;
|
||||
int healthCheckConnectPort;
|
||||
std::string xForwardedFor_SLBPORT;
|
||||
std::string healthCheckMethod;
|
||||
std::string gzip;
|
||||
std::string serverCertificateId;
|
||||
std::string stickySessionType;
|
||||
std::string xForwardedFor_SLBIP;
|
||||
std::string healthCheckHttpCode;
|
||||
std::string xForwardedFor_ClientCertSubjectDNAlias;
|
||||
std::string cookie;
|
||||
int requestTimeout;
|
||||
std::string xForwardedFor_ClientCertClientVerifyAlias;
|
||||
int healthCheckInterval;
|
||||
std::string tLSCipherPolicy;
|
||||
std::string cACertificateId;
|
||||
std::string xForwardedFor_ClientCertSubjectDN;
|
||||
std::string healthCheckHttpVersion;
|
||||
std::string xForwardedFor_ClientCertFingerprintAlias;
|
||||
std::string xForwardedFor_ClientCertIssuerDNAlias;
|
||||
int healthCheckTimeout;
|
||||
std::string xForwardedFor_ClientCertIssuerDN;
|
||||
std::string stickySession;
|
||||
int healthyThreshold;
|
||||
std::string xForwardedFor;
|
||||
std::string xForwardedFor_ClientSrcPort;
|
||||
std::string healthCheckDomain;
|
||||
std::string xForwardedFor_proto;
|
||||
std::string enableHttp2;
|
||||
std::string xForwardedFor_ClientCertClientVerify;
|
||||
std::string xForwardedFor_ClientCertFingerprint;
|
||||
std::string healthCheckType;
|
||||
};
|
||||
struct TCPListenerConfig
|
||||
{
|
||||
struct PortRange
|
||||
{
|
||||
int endPort;
|
||||
int startPort;
|
||||
};
|
||||
int healthCheckInterval;
|
||||
int unhealthyThreshold;
|
||||
std::string healthCheckURI;
|
||||
std::vector<PortRange> portRanges;
|
||||
std::string healthCheck;
|
||||
int healthCheckConnectTimeout;
|
||||
std::string connectionDrain;
|
||||
std::string healthCheckSwitch;
|
||||
int connectionDrainTimeout;
|
||||
int persistenceTimeout;
|
||||
int healthCheckConnectPort;
|
||||
std::string healthCheckMethod;
|
||||
int healthyThreshold;
|
||||
std::string healthCheckDomain;
|
||||
std::string masterSlaveServerGroupId;
|
||||
std::string healthCheckHttpCode;
|
||||
std::string healthCheckType;
|
||||
int establishedTimeout;
|
||||
};
|
||||
struct TCPSListenerConfig
|
||||
{
|
||||
std::string cookie;
|
||||
int cookieTimeout;
|
||||
int healthCheckInterval;
|
||||
std::string tLSCipherPolicy;
|
||||
std::string cACertificateId;
|
||||
int unhealthyThreshold;
|
||||
std::string healthCheckURI;
|
||||
std::string healthCheck;
|
||||
int idleTimeout;
|
||||
int healthCheckTimeout;
|
||||
std::string stickySession;
|
||||
int healthCheckConnectPort;
|
||||
std::string healthCheckMethod;
|
||||
int healthyThreshold;
|
||||
std::string healthCheckDomain;
|
||||
std::string serverCertificateId;
|
||||
std::string stickySessionType;
|
||||
std::string healthCheckHttpCode;
|
||||
std::string healthCheckType;
|
||||
};
|
||||
struct UDPListenerConfig
|
||||
{
|
||||
struct PortRange2
|
||||
{
|
||||
int endPort;
|
||||
int startPort;
|
||||
};
|
||||
int healthCheckInterval;
|
||||
int unhealthyThreshold;
|
||||
std::string healthCheckURI;
|
||||
std::string healthCheck;
|
||||
int healthCheckConnectTimeout;
|
||||
std::string connectionDrain;
|
||||
std::vector<PortRange2> portRanges1;
|
||||
std::string healthCheckSwitch;
|
||||
int connectionDrainTimeout;
|
||||
int healthCheckConnectPort;
|
||||
std::string healthCheckReq;
|
||||
std::string healthCheckMethod;
|
||||
std::string healthCheckExp;
|
||||
int healthyThreshold;
|
||||
std::string healthCheckDomain;
|
||||
std::string masterSlaveServerGroupId;
|
||||
std::string healthCheckHttpCode;
|
||||
std::string healthCheckType;
|
||||
};
|
||||
std::string status;
|
||||
int listenerPort;
|
||||
std::string vServerGroupId;
|
||||
std::string description;
|
||||
HTTPSListenerConfig hTTPSListenerConfig;
|
||||
std::string scheduler;
|
||||
HTTPListenerConfig hTTPListenerConfig;
|
||||
std::string aclId;
|
||||
UDPListenerConfig uDPListenerConfig;
|
||||
std::string loadBalancerId;
|
||||
int backendServerPort;
|
||||
std::string listenerProtocol;
|
||||
std::string aclStatus;
|
||||
TCPListenerConfig tCPListenerConfig;
|
||||
int bandwidth;
|
||||
TCPSListenerConfig tCPSListenerConfig;
|
||||
std::string aclType;
|
||||
std::vector<std::string> aclIds;
|
||||
};
|
||||
|
||||
|
||||
DescribeLoadBalancerListenersResult();
|
||||
explicit DescribeLoadBalancerListenersResult(const std::string &payload);
|
||||
~DescribeLoadBalancerListenersResult();
|
||||
std::vector<Listener> getListeners()const;
|
||||
int getTotalCount()const;
|
||||
std::string getNextToken()const;
|
||||
int getMaxResults()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<Listener> listeners_;
|
||||
int totalCount_;
|
||||
std::string nextToken_;
|
||||
int maxResults_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SLB_MODEL_DESCRIBELOADBALANCERLISTENERSRESULT_H_
|
||||
@@ -1383,6 +1383,42 @@ SlbClient::DescribeLoadBalancerHTTPSListenerAttributeOutcomeCallable SlbClient::
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SlbClient::DescribeLoadBalancerListenersOutcome SlbClient::describeLoadBalancerListeners(const DescribeLoadBalancerListenersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeLoadBalancerListenersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeLoadBalancerListenersOutcome(DescribeLoadBalancerListenersResult(outcome.result()));
|
||||
else
|
||||
return DescribeLoadBalancerListenersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SlbClient::describeLoadBalancerListenersAsync(const DescribeLoadBalancerListenersRequest& request, const DescribeLoadBalancerListenersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeLoadBalancerListeners(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SlbClient::DescribeLoadBalancerListenersOutcomeCallable SlbClient::describeLoadBalancerListenersCallable(const DescribeLoadBalancerListenersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeLoadBalancerListenersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeLoadBalancerListeners(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SlbClient::DescribeLoadBalancerTCPListenerAttributeOutcome SlbClient::describeLoadBalancerTCPListenerAttribute(const DescribeLoadBalancerTCPListenerAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
130
slb/src/model/DescribeLoadBalancerListenersRequest.cc
Normal file
130
slb/src/model/DescribeLoadBalancerListenersRequest.cc
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* 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/slb/model/DescribeLoadBalancerListenersRequest.h>
|
||||
|
||||
using AlibabaCloud::Slb::Model::DescribeLoadBalancerListenersRequest;
|
||||
|
||||
DescribeLoadBalancerListenersRequest::DescribeLoadBalancerListenersRequest() :
|
||||
RpcServiceRequest("slb", "2014-05-15", "DescribeLoadBalancerListeners")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeLoadBalancerListenersRequest::~DescribeLoadBalancerListenersRequest()
|
||||
{}
|
||||
|
||||
long DescribeLoadBalancerListenersRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersRequest::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setNextToken(const std::string& nextToken)
|
||||
{
|
||||
nextToken_ = nextToken;
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeLoadBalancerListenersRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersRequest::getListenerProtocol()const
|
||||
{
|
||||
return listenerProtocol_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setListenerProtocol(const std::string& listenerProtocol)
|
||||
{
|
||||
listenerProtocol_ = listenerProtocol;
|
||||
setParameter("ListenerProtocol", listenerProtocol);
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeLoadBalancerListenersRequest::getLoadBalancerId()const
|
||||
{
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setLoadBalancerId(const std::vector<std::string>& loadBalancerId)
|
||||
{
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
for(int dep1 = 0; dep1!= loadBalancerId.size(); dep1++) {
|
||||
setParameter("LoadBalancerId."+ std::to_string(dep1), loadBalancerId.at(dep1));
|
||||
}
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerListenersRequest::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void DescribeLoadBalancerListenersRequest::setMaxResults(int maxResults)
|
||||
{
|
||||
maxResults_ = maxResults;
|
||||
setParameter("MaxResults", std::to_string(maxResults));
|
||||
}
|
||||
|
||||
364
slb/src/model/DescribeLoadBalancerListenersResult.cc
Normal file
364
slb/src/model/DescribeLoadBalancerListenersResult.cc
Normal file
@@ -0,0 +1,364 @@
|
||||
/*
|
||||
* 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/slb/model/DescribeLoadBalancerListenersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Slb;
|
||||
using namespace AlibabaCloud::Slb::Model;
|
||||
|
||||
DescribeLoadBalancerListenersResult::DescribeLoadBalancerListenersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeLoadBalancerListenersResult::DescribeLoadBalancerListenersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeLoadBalancerListenersResult::~DescribeLoadBalancerListenersResult()
|
||||
{}
|
||||
|
||||
void DescribeLoadBalancerListenersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allListenersNode = value["Listeners"]["Listener"];
|
||||
for (auto valueListenersListener : allListenersNode)
|
||||
{
|
||||
Listener listenersObject;
|
||||
if(!valueListenersListener["AclId"].isNull())
|
||||
listenersObject.aclId = valueListenersListener["AclId"].asString();
|
||||
if(!valueListenersListener["AclStatus"].isNull())
|
||||
listenersObject.aclStatus = valueListenersListener["AclStatus"].asString();
|
||||
if(!valueListenersListener["AclType"].isNull())
|
||||
listenersObject.aclType = valueListenersListener["AclType"].asString();
|
||||
if(!valueListenersListener["BackendServerPort"].isNull())
|
||||
listenersObject.backendServerPort = std::stoi(valueListenersListener["BackendServerPort"].asString());
|
||||
if(!valueListenersListener["Bandwidth"].isNull())
|
||||
listenersObject.bandwidth = std::stoi(valueListenersListener["Bandwidth"].asString());
|
||||
if(!valueListenersListener["Description"].isNull())
|
||||
listenersObject.description = valueListenersListener["Description"].asString();
|
||||
if(!valueListenersListener["ListenerPort"].isNull())
|
||||
listenersObject.listenerPort = std::stoi(valueListenersListener["ListenerPort"].asString());
|
||||
if(!valueListenersListener["ListenerProtocol"].isNull())
|
||||
listenersObject.listenerProtocol = valueListenersListener["ListenerProtocol"].asString();
|
||||
if(!valueListenersListener["LoadBalancerId"].isNull())
|
||||
listenersObject.loadBalancerId = valueListenersListener["LoadBalancerId"].asString();
|
||||
if(!valueListenersListener["Scheduler"].isNull())
|
||||
listenersObject.scheduler = valueListenersListener["Scheduler"].asString();
|
||||
if(!valueListenersListener["Status"].isNull())
|
||||
listenersObject.status = valueListenersListener["Status"].asString();
|
||||
if(!valueListenersListener["VServerGroupId"].isNull())
|
||||
listenersObject.vServerGroupId = valueListenersListener["VServerGroupId"].asString();
|
||||
auto hTTPListenerConfigNode = value["HTTPListenerConfig"];
|
||||
if(!hTTPListenerConfigNode["Cookie"].isNull())
|
||||
listenersObject.hTTPListenerConfig.cookie = hTTPListenerConfigNode["Cookie"].asString();
|
||||
if(!hTTPListenerConfigNode["CookieTimeout"].isNull())
|
||||
listenersObject.hTTPListenerConfig.cookieTimeout = std::stoi(hTTPListenerConfigNode["CookieTimeout"].asString());
|
||||
if(!hTTPListenerConfigNode["ForwardCode"].isNull())
|
||||
listenersObject.hTTPListenerConfig.forwardCode = std::stoi(hTTPListenerConfigNode["ForwardCode"].asString());
|
||||
if(!hTTPListenerConfigNode["ForwardPort"].isNull())
|
||||
listenersObject.hTTPListenerConfig.forwardPort = std::stoi(hTTPListenerConfigNode["ForwardPort"].asString());
|
||||
if(!hTTPListenerConfigNode["Gzip"].isNull())
|
||||
listenersObject.hTTPListenerConfig.gzip = hTTPListenerConfigNode["Gzip"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheck"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheck = hTTPListenerConfigNode["HealthCheck"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckConnectPort"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckConnectPort = std::stoi(hTTPListenerConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!hTTPListenerConfigNode["HealthCheckDomain"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckDomain = hTTPListenerConfigNode["HealthCheckDomain"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckHttpCode"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckHttpCode = hTTPListenerConfigNode["HealthCheckHttpCode"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckHttpVersion"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckHttpVersion = hTTPListenerConfigNode["HealthCheckHttpVersion"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckInterval"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckInterval = std::stoi(hTTPListenerConfigNode["HealthCheckInterval"].asString());
|
||||
if(!hTTPListenerConfigNode["HealthCheckMethod"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckMethod = hTTPListenerConfigNode["HealthCheckMethod"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckTimeout"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckTimeout = std::stoi(hTTPListenerConfigNode["HealthCheckTimeout"].asString());
|
||||
if(!hTTPListenerConfigNode["HealthCheckType"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckType = hTTPListenerConfigNode["HealthCheckType"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthCheckURI"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthCheckURI = hTTPListenerConfigNode["HealthCheckURI"].asString();
|
||||
if(!hTTPListenerConfigNode["HealthyThreshold"].isNull())
|
||||
listenersObject.hTTPListenerConfig.healthyThreshold = std::stoi(hTTPListenerConfigNode["HealthyThreshold"].asString());
|
||||
if(!hTTPListenerConfigNode["IdleTimeout"].isNull())
|
||||
listenersObject.hTTPListenerConfig.idleTimeout = std::stoi(hTTPListenerConfigNode["IdleTimeout"].asString());
|
||||
if(!hTTPListenerConfigNode["ListenerForward"].isNull())
|
||||
listenersObject.hTTPListenerConfig.listenerForward = hTTPListenerConfigNode["ListenerForward"].asString();
|
||||
if(!hTTPListenerConfigNode["RequestTimeout"].isNull())
|
||||
listenersObject.hTTPListenerConfig.requestTimeout = std::stoi(hTTPListenerConfigNode["RequestTimeout"].asString());
|
||||
if(!hTTPListenerConfigNode["StickySession"].isNull())
|
||||
listenersObject.hTTPListenerConfig.stickySession = hTTPListenerConfigNode["StickySession"].asString();
|
||||
if(!hTTPListenerConfigNode["StickySessionType"].isNull())
|
||||
listenersObject.hTTPListenerConfig.stickySessionType = hTTPListenerConfigNode["StickySessionType"].asString();
|
||||
if(!hTTPListenerConfigNode["UnhealthyThreshold"].isNull())
|
||||
listenersObject.hTTPListenerConfig.unhealthyThreshold = std::stoi(hTTPListenerConfigNode["UnhealthyThreshold"].asString());
|
||||
if(!hTTPListenerConfigNode["XForwardedFor"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor = hTTPListenerConfigNode["XForwardedFor"].asString();
|
||||
if(!hTTPListenerConfigNode["XForwardedFor_ClientSrcPort"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor_ClientSrcPort = hTTPListenerConfigNode["XForwardedFor_ClientSrcPort"].asString();
|
||||
if(!hTTPListenerConfigNode["XForwardedFor_SLBID"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor_SLBID = hTTPListenerConfigNode["XForwardedFor_SLBID"].asString();
|
||||
if(!hTTPListenerConfigNode["XForwardedFor_SLBIP"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor_SLBIP = hTTPListenerConfigNode["XForwardedFor_SLBIP"].asString();
|
||||
if(!hTTPListenerConfigNode["XForwardedFor_SLBPORT"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor_SLBPORT = hTTPListenerConfigNode["XForwardedFor_SLBPORT"].asString();
|
||||
if(!hTTPListenerConfigNode["XForwardedFor_proto"].isNull())
|
||||
listenersObject.hTTPListenerConfig.xForwardedFor_proto = hTTPListenerConfigNode["XForwardedFor_proto"].asString();
|
||||
auto hTTPSListenerConfigNode = value["HTTPSListenerConfig"];
|
||||
if(!hTTPSListenerConfigNode["CACertificateId"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.cACertificateId = hTTPSListenerConfigNode["CACertificateId"].asString();
|
||||
if(!hTTPSListenerConfigNode["Cookie"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.cookie = hTTPSListenerConfigNode["Cookie"].asString();
|
||||
if(!hTTPSListenerConfigNode["CookieTimeout"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.cookieTimeout = std::stoi(hTTPSListenerConfigNode["CookieTimeout"].asString());
|
||||
if(!hTTPSListenerConfigNode["EnableHttp2"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.enableHttp2 = hTTPSListenerConfigNode["EnableHttp2"].asString();
|
||||
if(!hTTPSListenerConfigNode["Gzip"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.gzip = hTTPSListenerConfigNode["Gzip"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheck"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheck = hTTPSListenerConfigNode["HealthCheck"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckConnectPort"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckConnectPort = std::stoi(hTTPSListenerConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!hTTPSListenerConfigNode["HealthCheckDomain"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckDomain = hTTPSListenerConfigNode["HealthCheckDomain"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckHttpCode"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckHttpCode = hTTPSListenerConfigNode["HealthCheckHttpCode"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckHttpVersion"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckHttpVersion = hTTPSListenerConfigNode["HealthCheckHttpVersion"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckInterval"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckInterval = std::stoi(hTTPSListenerConfigNode["HealthCheckInterval"].asString());
|
||||
if(!hTTPSListenerConfigNode["HealthCheckMethod"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckMethod = hTTPSListenerConfigNode["HealthCheckMethod"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckTimeout"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckTimeout = std::stoi(hTTPSListenerConfigNode["HealthCheckTimeout"].asString());
|
||||
if(!hTTPSListenerConfigNode["HealthCheckType"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckType = hTTPSListenerConfigNode["HealthCheckType"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthCheckURI"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthCheckURI = hTTPSListenerConfigNode["HealthCheckURI"].asString();
|
||||
if(!hTTPSListenerConfigNode["HealthyThreshold"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.healthyThreshold = std::stoi(hTTPSListenerConfigNode["HealthyThreshold"].asString());
|
||||
if(!hTTPSListenerConfigNode["IdleTimeout"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.idleTimeout = std::stoi(hTTPSListenerConfigNode["IdleTimeout"].asString());
|
||||
if(!hTTPSListenerConfigNode["RequestTimeout"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.requestTimeout = std::stoi(hTTPSListenerConfigNode["RequestTimeout"].asString());
|
||||
if(!hTTPSListenerConfigNode["ServerCertificateId"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.serverCertificateId = hTTPSListenerConfigNode["ServerCertificateId"].asString();
|
||||
if(!hTTPSListenerConfigNode["StickySession"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.stickySession = hTTPSListenerConfigNode["StickySession"].asString();
|
||||
if(!hTTPSListenerConfigNode["StickySessionType"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.stickySessionType = hTTPSListenerConfigNode["StickySessionType"].asString();
|
||||
if(!hTTPSListenerConfigNode["TLSCipherPolicy"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.tLSCipherPolicy = hTTPSListenerConfigNode["TLSCipherPolicy"].asString();
|
||||
if(!hTTPSListenerConfigNode["UnhealthyThreshold"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.unhealthyThreshold = std::stoi(hTTPSListenerConfigNode["UnhealthyThreshold"].asString());
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor = hTTPSListenerConfigNode["XForwardedFor"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertClientVerify"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertClientVerify = hTTPSListenerConfigNode["XForwardedFor_ClientCertClientVerify"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertClientVerifyAlias"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertClientVerifyAlias = hTTPSListenerConfigNode["XForwardedFor_ClientCertClientVerifyAlias"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertFingerprint"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertFingerprint = hTTPSListenerConfigNode["XForwardedFor_ClientCertFingerprint"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertFingerprintAlias"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertFingerprintAlias = hTTPSListenerConfigNode["XForwardedFor_ClientCertFingerprintAlias"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertIssuerDN"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertIssuerDN = hTTPSListenerConfigNode["XForwardedFor_ClientCertIssuerDN"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertIssuerDNAlias"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertIssuerDNAlias = hTTPSListenerConfigNode["XForwardedFor_ClientCertIssuerDNAlias"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertSubjectDN"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertSubjectDN = hTTPSListenerConfigNode["XForwardedFor_ClientCertSubjectDN"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientCertSubjectDNAlias"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientCertSubjectDNAlias = hTTPSListenerConfigNode["XForwardedFor_ClientCertSubjectDNAlias"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_ClientSrcPort"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_ClientSrcPort = hTTPSListenerConfigNode["XForwardedFor_ClientSrcPort"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_SLBID"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_SLBID = hTTPSListenerConfigNode["XForwardedFor_SLBID"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_SLBIP"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_SLBIP = hTTPSListenerConfigNode["XForwardedFor_SLBIP"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_SLBPORT"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_SLBPORT = hTTPSListenerConfigNode["XForwardedFor_SLBPORT"].asString();
|
||||
if(!hTTPSListenerConfigNode["XForwardedFor_proto"].isNull())
|
||||
listenersObject.hTTPSListenerConfig.xForwardedFor_proto = hTTPSListenerConfigNode["XForwardedFor_proto"].asString();
|
||||
auto tCPListenerConfigNode = value["TCPListenerConfig"];
|
||||
if(!tCPListenerConfigNode["ConnectionDrain"].isNull())
|
||||
listenersObject.tCPListenerConfig.connectionDrain = tCPListenerConfigNode["ConnectionDrain"].asString();
|
||||
if(!tCPListenerConfigNode["ConnectionDrainTimeout"].isNull())
|
||||
listenersObject.tCPListenerConfig.connectionDrainTimeout = std::stoi(tCPListenerConfigNode["ConnectionDrainTimeout"].asString());
|
||||
if(!tCPListenerConfigNode["EstablishedTimeout"].isNull())
|
||||
listenersObject.tCPListenerConfig.establishedTimeout = std::stoi(tCPListenerConfigNode["EstablishedTimeout"].asString());
|
||||
if(!tCPListenerConfigNode["HealthCheck"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheck = tCPListenerConfigNode["HealthCheck"].asString();
|
||||
if(!tCPListenerConfigNode["HealthCheckConnectPort"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckConnectPort = std::stoi(tCPListenerConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!tCPListenerConfigNode["HealthCheckConnectTimeout"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckConnectTimeout = std::stoi(tCPListenerConfigNode["HealthCheckConnectTimeout"].asString());
|
||||
if(!tCPListenerConfigNode["HealthCheckDomain"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckDomain = tCPListenerConfigNode["HealthCheckDomain"].asString();
|
||||
if(!tCPListenerConfigNode["HealthCheckHttpCode"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckHttpCode = tCPListenerConfigNode["HealthCheckHttpCode"].asString();
|
||||
if(!tCPListenerConfigNode["HealthCheckInterval"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckInterval = std::stoi(tCPListenerConfigNode["HealthCheckInterval"].asString());
|
||||
if(!tCPListenerConfigNode["HealthCheckMethod"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckMethod = tCPListenerConfigNode["HealthCheckMethod"].asString();
|
||||
if(!tCPListenerConfigNode["HealthCheckType"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckType = tCPListenerConfigNode["HealthCheckType"].asString();
|
||||
if(!tCPListenerConfigNode["HealthCheckURI"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckURI = tCPListenerConfigNode["HealthCheckURI"].asString();
|
||||
if(!tCPListenerConfigNode["HealthyThreshold"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthyThreshold = std::stoi(tCPListenerConfigNode["HealthyThreshold"].asString());
|
||||
if(!tCPListenerConfigNode["MasterSlaveServerGroupId"].isNull())
|
||||
listenersObject.tCPListenerConfig.masterSlaveServerGroupId = tCPListenerConfigNode["MasterSlaveServerGroupId"].asString();
|
||||
if(!tCPListenerConfigNode["PersistenceTimeout"].isNull())
|
||||
listenersObject.tCPListenerConfig.persistenceTimeout = std::stoi(tCPListenerConfigNode["PersistenceTimeout"].asString());
|
||||
if(!tCPListenerConfigNode["UnhealthyThreshold"].isNull())
|
||||
listenersObject.tCPListenerConfig.unhealthyThreshold = std::stoi(tCPListenerConfigNode["UnhealthyThreshold"].asString());
|
||||
if(!tCPListenerConfigNode["HealthCheckSwitch"].isNull())
|
||||
listenersObject.tCPListenerConfig.healthCheckSwitch = tCPListenerConfigNode["HealthCheckSwitch"].asString();
|
||||
auto allPortRangesNode = tCPListenerConfigNode["PortRanges"]["PortRange"];
|
||||
for (auto tCPListenerConfigNodePortRangesPortRange : allPortRangesNode)
|
||||
{
|
||||
Listener::TCPListenerConfig::PortRange portRangeObject;
|
||||
if(!tCPListenerConfigNodePortRangesPortRange["EndPort"].isNull())
|
||||
portRangeObject.endPort = std::stoi(tCPListenerConfigNodePortRangesPortRange["EndPort"].asString());
|
||||
if(!tCPListenerConfigNodePortRangesPortRange["StartPort"].isNull())
|
||||
portRangeObject.startPort = std::stoi(tCPListenerConfigNodePortRangesPortRange["StartPort"].asString());
|
||||
listenersObject.tCPListenerConfig.portRanges.push_back(portRangeObject);
|
||||
}
|
||||
auto tCPSListenerConfigNode = value["TCPSListenerConfig"];
|
||||
if(!tCPSListenerConfigNode["CACertificateId"].isNull())
|
||||
listenersObject.tCPSListenerConfig.cACertificateId = tCPSListenerConfigNode["CACertificateId"].asString();
|
||||
if(!tCPSListenerConfigNode["Cookie"].isNull())
|
||||
listenersObject.tCPSListenerConfig.cookie = tCPSListenerConfigNode["Cookie"].asString();
|
||||
if(!tCPSListenerConfigNode["CookieTimeout"].isNull())
|
||||
listenersObject.tCPSListenerConfig.cookieTimeout = std::stoi(tCPSListenerConfigNode["CookieTimeout"].asString());
|
||||
if(!tCPSListenerConfigNode["HealthCheck"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheck = tCPSListenerConfigNode["HealthCheck"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthCheckConnectPort"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckConnectPort = std::stoi(tCPSListenerConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!tCPSListenerConfigNode["HealthCheckDomain"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckDomain = tCPSListenerConfigNode["HealthCheckDomain"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthCheckHttpCode"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckHttpCode = tCPSListenerConfigNode["HealthCheckHttpCode"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthCheckInterval"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckInterval = std::stoi(tCPSListenerConfigNode["HealthCheckInterval"].asString());
|
||||
if(!tCPSListenerConfigNode["HealthCheckMethod"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckMethod = tCPSListenerConfigNode["HealthCheckMethod"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthCheckTimeout"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckTimeout = std::stoi(tCPSListenerConfigNode["HealthCheckTimeout"].asString());
|
||||
if(!tCPSListenerConfigNode["HealthCheckType"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckType = tCPSListenerConfigNode["HealthCheckType"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthCheckURI"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthCheckURI = tCPSListenerConfigNode["HealthCheckURI"].asString();
|
||||
if(!tCPSListenerConfigNode["HealthyThreshold"].isNull())
|
||||
listenersObject.tCPSListenerConfig.healthyThreshold = std::stoi(tCPSListenerConfigNode["HealthyThreshold"].asString());
|
||||
if(!tCPSListenerConfigNode["IdleTimeout"].isNull())
|
||||
listenersObject.tCPSListenerConfig.idleTimeout = std::stoi(tCPSListenerConfigNode["IdleTimeout"].asString());
|
||||
if(!tCPSListenerConfigNode["ServerCertificateId"].isNull())
|
||||
listenersObject.tCPSListenerConfig.serverCertificateId = tCPSListenerConfigNode["ServerCertificateId"].asString();
|
||||
if(!tCPSListenerConfigNode["StickySession"].isNull())
|
||||
listenersObject.tCPSListenerConfig.stickySession = tCPSListenerConfigNode["StickySession"].asString();
|
||||
if(!tCPSListenerConfigNode["StickySessionType"].isNull())
|
||||
listenersObject.tCPSListenerConfig.stickySessionType = tCPSListenerConfigNode["StickySessionType"].asString();
|
||||
if(!tCPSListenerConfigNode["TLSCipherPolicy"].isNull())
|
||||
listenersObject.tCPSListenerConfig.tLSCipherPolicy = tCPSListenerConfigNode["TLSCipherPolicy"].asString();
|
||||
if(!tCPSListenerConfigNode["UnhealthyThreshold"].isNull())
|
||||
listenersObject.tCPSListenerConfig.unhealthyThreshold = std::stoi(tCPSListenerConfigNode["UnhealthyThreshold"].asString());
|
||||
auto uDPListenerConfigNode = value["UDPListenerConfig"];
|
||||
if(!uDPListenerConfigNode["ConnectionDrain"].isNull())
|
||||
listenersObject.uDPListenerConfig.connectionDrain = uDPListenerConfigNode["ConnectionDrain"].asString();
|
||||
if(!uDPListenerConfigNode["ConnectionDrainTimeout"].isNull())
|
||||
listenersObject.uDPListenerConfig.connectionDrainTimeout = std::stoi(uDPListenerConfigNode["ConnectionDrainTimeout"].asString());
|
||||
if(!uDPListenerConfigNode["HealthCheck"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheck = uDPListenerConfigNode["HealthCheck"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckConnectPort"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckConnectPort = std::stoi(uDPListenerConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!uDPListenerConfigNode["HealthCheckConnectTimeout"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckConnectTimeout = std::stoi(uDPListenerConfigNode["HealthCheckConnectTimeout"].asString());
|
||||
if(!uDPListenerConfigNode["HealthCheckDomain"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckDomain = uDPListenerConfigNode["HealthCheckDomain"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckExp"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckExp = uDPListenerConfigNode["HealthCheckExp"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckHttpCode"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckHttpCode = uDPListenerConfigNode["HealthCheckHttpCode"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckInterval"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckInterval = std::stoi(uDPListenerConfigNode["HealthCheckInterval"].asString());
|
||||
if(!uDPListenerConfigNode["HealthCheckMethod"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckMethod = uDPListenerConfigNode["HealthCheckMethod"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckReq"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckReq = uDPListenerConfigNode["HealthCheckReq"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckType"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckType = uDPListenerConfigNode["HealthCheckType"].asString();
|
||||
if(!uDPListenerConfigNode["HealthCheckURI"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckURI = uDPListenerConfigNode["HealthCheckURI"].asString();
|
||||
if(!uDPListenerConfigNode["HealthyThreshold"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthyThreshold = std::stoi(uDPListenerConfigNode["HealthyThreshold"].asString());
|
||||
if(!uDPListenerConfigNode["MasterSlaveServerGroupId"].isNull())
|
||||
listenersObject.uDPListenerConfig.masterSlaveServerGroupId = uDPListenerConfigNode["MasterSlaveServerGroupId"].asString();
|
||||
if(!uDPListenerConfigNode["UnhealthyThreshold"].isNull())
|
||||
listenersObject.uDPListenerConfig.unhealthyThreshold = std::stoi(uDPListenerConfigNode["UnhealthyThreshold"].asString());
|
||||
if(!uDPListenerConfigNode["HealthCheckSwitch"].isNull())
|
||||
listenersObject.uDPListenerConfig.healthCheckSwitch = uDPListenerConfigNode["HealthCheckSwitch"].asString();
|
||||
auto allPortRanges1Node = uDPListenerConfigNode["PortRanges"]["PortRange"];
|
||||
for (auto uDPListenerConfigNodePortRangesPortRange : allPortRanges1Node)
|
||||
{
|
||||
Listener::UDPListenerConfig::PortRange2 portRange2Object;
|
||||
if(!uDPListenerConfigNodePortRangesPortRange["EndPort"].isNull())
|
||||
portRange2Object.endPort = std::stoi(uDPListenerConfigNodePortRangesPortRange["EndPort"].asString());
|
||||
if(!uDPListenerConfigNodePortRangesPortRange["StartPort"].isNull())
|
||||
portRange2Object.startPort = std::stoi(uDPListenerConfigNodePortRangesPortRange["StartPort"].asString());
|
||||
listenersObject.uDPListenerConfig.portRanges1.push_back(portRange2Object);
|
||||
}
|
||||
auto allAclIds = value["AclIds"]["AclId"];
|
||||
for (auto value : allAclIds)
|
||||
listenersObject.aclIds.push_back(value.asString());
|
||||
listeners_.push_back(listenersObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeLoadBalancerListenersResult::Listener> DescribeLoadBalancerListenersResult::getListeners()const
|
||||
{
|
||||
return listeners_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerListenersResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string DescribeLoadBalancerListenersResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int DescribeLoadBalancerListenersResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user