diff --git a/CHANGELOG b/CHANGELOG index 283588c49..9dc7b9348 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-01-07 Version: 1.36.1016 +- Support Service name. + 2022-01-07 Version: 1.36.1015 - Supported minReadyInstanceRatio parameter for deploy. diff --git a/VERSION b/VERSION index 81c89afb8..c348df5c6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1015 \ No newline at end of file +1.36.1016 \ No newline at end of file diff --git a/alb/CMakeLists.txt b/alb/CMakeLists.txt index 836a0c0f4..905d51d36 100644 --- a/alb/CMakeLists.txt +++ b/alb/CMakeLists.txt @@ -149,6 +149,8 @@ set(alb_public_header_model include/alibabacloud/alb/model/UpdateListenerAttributeResult.h include/alibabacloud/alb/model/UpdateListenerLogConfigRequest.h include/alibabacloud/alb/model/UpdateListenerLogConfigResult.h + include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigRequest.h + include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigResult.h include/alibabacloud/alb/model/UpdateLoadBalancerAttributeRequest.h include/alibabacloud/alb/model/UpdateLoadBalancerAttributeResult.h include/alibabacloud/alb/model/UpdateLoadBalancerEditionRequest.h @@ -296,6 +298,8 @@ set(alb_src src/model/UpdateListenerAttributeResult.cc src/model/UpdateListenerLogConfigRequest.cc src/model/UpdateListenerLogConfigResult.cc + src/model/UpdateLoadBalancerAddressTypeConfigRequest.cc + src/model/UpdateLoadBalancerAddressTypeConfigResult.cc src/model/UpdateLoadBalancerAttributeRequest.cc src/model/UpdateLoadBalancerAttributeResult.cc src/model/UpdateLoadBalancerEditionRequest.cc diff --git a/alb/include/alibabacloud/alb/AlbClient.h b/alb/include/alibabacloud/alb/AlbClient.h index 2d01b0dac..d2cf2eec4 100644 --- a/alb/include/alibabacloud/alb/AlbClient.h +++ b/alb/include/alibabacloud/alb/AlbClient.h @@ -150,6 +150,8 @@ #include "model/UpdateListenerAttributeResult.h" #include "model/UpdateListenerLogConfigRequest.h" #include "model/UpdateListenerLogConfigResult.h" +#include "model/UpdateLoadBalancerAddressTypeConfigRequest.h" +#include "model/UpdateLoadBalancerAddressTypeConfigResult.h" #include "model/UpdateLoadBalancerAttributeRequest.h" #include "model/UpdateLoadBalancerAttributeResult.h" #include "model/UpdateLoadBalancerEditionRequest.h" @@ -367,6 +369,9 @@ namespace AlibabaCloud typedef Outcome UpdateListenerLogConfigOutcome; typedef std::future UpdateListenerLogConfigOutcomeCallable; typedef std::function&)> UpdateListenerLogConfigAsyncHandler; + typedef Outcome UpdateLoadBalancerAddressTypeConfigOutcome; + typedef std::future UpdateLoadBalancerAddressTypeConfigOutcomeCallable; + typedef std::function&)> UpdateLoadBalancerAddressTypeConfigAsyncHandler; typedef Outcome UpdateLoadBalancerAttributeOutcome; typedef std::future UpdateLoadBalancerAttributeOutcomeCallable; typedef std::function&)> UpdateLoadBalancerAttributeAsyncHandler; @@ -588,6 +593,9 @@ namespace AlibabaCloud UpdateListenerLogConfigOutcome updateListenerLogConfig(const Model::UpdateListenerLogConfigRequest &request)const; void updateListenerLogConfigAsync(const Model::UpdateListenerLogConfigRequest& request, const UpdateListenerLogConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateListenerLogConfigOutcomeCallable updateListenerLogConfigCallable(const Model::UpdateListenerLogConfigRequest& request) const; + UpdateLoadBalancerAddressTypeConfigOutcome updateLoadBalancerAddressTypeConfig(const Model::UpdateLoadBalancerAddressTypeConfigRequest &request)const; + void updateLoadBalancerAddressTypeConfigAsync(const Model::UpdateLoadBalancerAddressTypeConfigRequest& request, const UpdateLoadBalancerAddressTypeConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateLoadBalancerAddressTypeConfigOutcomeCallable updateLoadBalancerAddressTypeConfigCallable(const Model::UpdateLoadBalancerAddressTypeConfigRequest& request) const; UpdateLoadBalancerAttributeOutcome updateLoadBalancerAttribute(const Model::UpdateLoadBalancerAttributeRequest &request)const; void updateLoadBalancerAttributeAsync(const Model::UpdateLoadBalancerAttributeRequest& request, const UpdateLoadBalancerAttributeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateLoadBalancerAttributeOutcomeCallable updateLoadBalancerAttributeCallable(const Model::UpdateLoadBalancerAttributeRequest& request) const; diff --git a/alb/include/alibabacloud/alb/model/CreateServerGroupRequest.h b/alb/include/alibabacloud/alb/model/CreateServerGroupRequest.h index 1c6e1a7ea..78e3adfb3 100644 --- a/alb/include/alibabacloud/alb/model/CreateServerGroupRequest.h +++ b/alb/include/alibabacloud/alb/model/CreateServerGroupRequest.h @@ -68,6 +68,8 @@ public: void setProtocol(const std::string &protocol); bool getUpstreamKeepaliveEnabled() const; void setUpstreamKeepaliveEnabled(bool upstreamKeepaliveEnabled); + std::string getServiceName() const; + void setServiceName(const std::string &serviceName); StickySessionConfig getStickySessionConfig() const; void setStickySessionConfig(const StickySessionConfig &stickySessionConfig); bool getDryRun() const; @@ -87,6 +89,7 @@ private: std::string resourceGroupId_; std::string protocol_; bool upstreamKeepaliveEnabled_; + std::string serviceName_; StickySessionConfig stickySessionConfig_; bool dryRun_; bool ipv6Enabled_; diff --git a/alb/include/alibabacloud/alb/model/ListServerGroupsResult.h b/alb/include/alibabacloud/alb/model/ListServerGroupsResult.h index b2ecebc2e..87fdbcb30 100644 --- a/alb/include/alibabacloud/alb/model/ListServerGroupsResult.h +++ b/alb/include/alibabacloud/alb/model/ListServerGroupsResult.h @@ -76,6 +76,7 @@ namespace AlibabaCloud bool ipv6Enabled; bool configManagedEnabled; std::string vpcId; + std::string serviceName; std::string serviceManagedMode; HealthCheckConfig healthCheckConfig; std::string protocol; diff --git a/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigRequest.h b/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigRequest.h new file mode 100644 index 000000000..6981d71e1 --- /dev/null +++ b/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigRequest.h @@ -0,0 +1,59 @@ +/* + * 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_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGREQUEST_H_ +#define ALIBABACLOUD_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Alb { +namespace Model { +class ALIBABACLOUD_ALB_EXPORT UpdateLoadBalancerAddressTypeConfigRequest : public RpcServiceRequest { +public: + struct ZoneMappings { + std::string vSwitchId; + std::string zoneId; + std::string allocationId; + }; + UpdateLoadBalancerAddressTypeConfigRequest(); + ~UpdateLoadBalancerAddressTypeConfigRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getAddressType() const; + void setAddressType(const std::string &addressType); + std::string getDryRun() const; + void setDryRun(const std::string &dryRun); + std::vector getZoneMappings() const; + void setZoneMappings(const std::vector &zoneMappings); + std::string getLoadBalancerId() const; + void setLoadBalancerId(const std::string &loadBalancerId); + +private: + std::string clientToken_; + std::string addressType_; + std::string dryRun_; + std::vector zoneMappings_; + std::string loadBalancerId_; +}; +} // namespace Model +} // namespace Alb +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGREQUEST_H_ diff --git a/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigResult.h b/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigResult.h new file mode 100644 index 000000000..faf7f14de --- /dev/null +++ b/alb/include/alibabacloud/alb/model/UpdateLoadBalancerAddressTypeConfigResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGRESULT_H_ +#define ALIBABACLOUD_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alb + { + namespace Model + { + class ALIBABACLOUD_ALB_EXPORT UpdateLoadBalancerAddressTypeConfigResult : public ServiceResult + { + public: + + + UpdateLoadBalancerAddressTypeConfigResult(); + explicit UpdateLoadBalancerAddressTypeConfigResult(const std::string &payload); + ~UpdateLoadBalancerAddressTypeConfigResult(); + std::string getJobId()const; + + protected: + void parse(const std::string &payload); + private: + std::string jobId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALB_MODEL_UPDATELOADBALANCERADDRESSTYPECONFIGRESULT_H_ \ No newline at end of file diff --git a/alb/include/alibabacloud/alb/model/UpdateServerGroupAttributeRequest.h b/alb/include/alibabacloud/alb/model/UpdateServerGroupAttributeRequest.h index e9966b8e9..beada5e1c 100644 --- a/alb/include/alibabacloud/alb/model/UpdateServerGroupAttributeRequest.h +++ b/alb/include/alibabacloud/alb/model/UpdateServerGroupAttributeRequest.h @@ -66,6 +66,8 @@ public: void setServerGroupId(const std::string &serverGroupId); bool getUpstreamKeepaliveEnabled() const; void setUpstreamKeepaliveEnabled(bool upstreamKeepaliveEnabled); + std::string getServiceName() const; + void setServiceName(const std::string &serviceName); StickySessionConfig getStickySessionConfig() const; void setStickySessionConfig(const StickySessionConfig &stickySessionConfig); bool getDryRun() const; @@ -78,6 +80,7 @@ private: std::string scheduler_; std::string serverGroupId_; bool upstreamKeepaliveEnabled_; + std::string serviceName_; StickySessionConfig stickySessionConfig_; bool dryRun_; }; diff --git a/alb/src/AlbClient.cc b/alb/src/AlbClient.cc index 642beb37f..c970ea062 100644 --- a/alb/src/AlbClient.cc +++ b/alb/src/AlbClient.cc @@ -2355,6 +2355,42 @@ AlbClient::UpdateListenerLogConfigOutcomeCallable AlbClient::updateListenerLogCo return task->get_future(); } +AlbClient::UpdateLoadBalancerAddressTypeConfigOutcome AlbClient::updateLoadBalancerAddressTypeConfig(const UpdateLoadBalancerAddressTypeConfigRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateLoadBalancerAddressTypeConfigOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateLoadBalancerAddressTypeConfigOutcome(UpdateLoadBalancerAddressTypeConfigResult(outcome.result())); + else + return UpdateLoadBalancerAddressTypeConfigOutcome(outcome.error()); +} + +void AlbClient::updateLoadBalancerAddressTypeConfigAsync(const UpdateLoadBalancerAddressTypeConfigRequest& request, const UpdateLoadBalancerAddressTypeConfigAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateLoadBalancerAddressTypeConfig(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlbClient::UpdateLoadBalancerAddressTypeConfigOutcomeCallable AlbClient::updateLoadBalancerAddressTypeConfigCallable(const UpdateLoadBalancerAddressTypeConfigRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateLoadBalancerAddressTypeConfig(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlbClient::UpdateLoadBalancerAttributeOutcome AlbClient::updateLoadBalancerAttribute(const UpdateLoadBalancerAttributeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/alb/src/model/CreateServerGroupRequest.cc b/alb/src/model/CreateServerGroupRequest.cc index 614f78c2d..f3ab4d54e 100644 --- a/alb/src/model/CreateServerGroupRequest.cc +++ b/alb/src/model/CreateServerGroupRequest.cc @@ -105,6 +105,15 @@ void CreateServerGroupRequest::setUpstreamKeepaliveEnabled(bool upstreamKeepaliv setParameter(std::string("UpstreamKeepaliveEnabled"), upstreamKeepaliveEnabled ? "true" : "false"); } +std::string CreateServerGroupRequest::getServiceName() const { + return serviceName_; +} + +void CreateServerGroupRequest::setServiceName(const std::string &serviceName) { + serviceName_ = serviceName; + setParameter(std::string("ServiceName"), serviceName); +} + CreateServerGroupRequest::StickySessionConfig CreateServerGroupRequest::getStickySessionConfig() const { return stickySessionConfig_; } diff --git a/alb/src/model/ListServerGroupsResult.cc b/alb/src/model/ListServerGroupsResult.cc index c72fc7094..8a5761afb 100644 --- a/alb/src/model/ListServerGroupsResult.cc +++ b/alb/src/model/ListServerGroupsResult.cc @@ -71,6 +71,8 @@ void ListServerGroupsResult::parse(const std::string &payload) serverGroupsObject.ipv6Enabled = valueServerGroupsServerGroup["Ipv6Enabled"].asString() == "true"; if(!valueServerGroupsServerGroup["ServerCount"].isNull()) serverGroupsObject.serverCount = std::stoi(valueServerGroupsServerGroup["ServerCount"].asString()); + if(!valueServerGroupsServerGroup["ServiceName"].isNull()) + serverGroupsObject.serviceName = valueServerGroupsServerGroup["ServiceName"].asString(); auto allTagsNode = valueServerGroupsServerGroup["Tags"]["Tag"]; for (auto valueServerGroupsServerGroupTagsTag : allTagsNode) { diff --git a/alb/src/model/UpdateLoadBalancerAddressTypeConfigRequest.cc b/alb/src/model/UpdateLoadBalancerAddressTypeConfigRequest.cc new file mode 100644 index 000000000..57d712db6 --- /dev/null +++ b/alb/src/model/UpdateLoadBalancerAddressTypeConfigRequest.cc @@ -0,0 +1,76 @@ +/* + * 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 + +using AlibabaCloud::Alb::Model::UpdateLoadBalancerAddressTypeConfigRequest; + +UpdateLoadBalancerAddressTypeConfigRequest::UpdateLoadBalancerAddressTypeConfigRequest() + : RpcServiceRequest("alb", "2020-06-16", "UpdateLoadBalancerAddressTypeConfig") { + setMethod(HttpRequest::Method::Post); +} + +UpdateLoadBalancerAddressTypeConfigRequest::~UpdateLoadBalancerAddressTypeConfigRequest() {} + +std::string UpdateLoadBalancerAddressTypeConfigRequest::getClientToken() const { + return clientToken_; +} + +void UpdateLoadBalancerAddressTypeConfigRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string UpdateLoadBalancerAddressTypeConfigRequest::getAddressType() const { + return addressType_; +} + +void UpdateLoadBalancerAddressTypeConfigRequest::setAddressType(const std::string &addressType) { + addressType_ = addressType; + setParameter(std::string("AddressType"), addressType); +} + +std::string UpdateLoadBalancerAddressTypeConfigRequest::getDryRun() const { + return dryRun_; +} + +void UpdateLoadBalancerAddressTypeConfigRequest::setDryRun(const std::string &dryRun) { + dryRun_ = dryRun; + setParameter(std::string("DryRun"), dryRun); +} + +std::vector UpdateLoadBalancerAddressTypeConfigRequest::getZoneMappings() const { + return zoneMappings_; +} + +void UpdateLoadBalancerAddressTypeConfigRequest::setZoneMappings(const std::vector &zoneMappings) { + zoneMappings_ = zoneMappings; + for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) { + setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId); + setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId); + setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".AllocationId", zoneMappings[dep1].allocationId); + } +} + +std::string UpdateLoadBalancerAddressTypeConfigRequest::getLoadBalancerId() const { + return loadBalancerId_; +} + +void UpdateLoadBalancerAddressTypeConfigRequest::setLoadBalancerId(const std::string &loadBalancerId) { + loadBalancerId_ = loadBalancerId; + setParameter(std::string("LoadBalancerId"), loadBalancerId); +} + diff --git a/alb/src/model/UpdateLoadBalancerAddressTypeConfigResult.cc b/alb/src/model/UpdateLoadBalancerAddressTypeConfigResult.cc new file mode 100644 index 000000000..18bf70ca4 --- /dev/null +++ b/alb/src/model/UpdateLoadBalancerAddressTypeConfigResult.cc @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Alb; +using namespace AlibabaCloud::Alb::Model; + +UpdateLoadBalancerAddressTypeConfigResult::UpdateLoadBalancerAddressTypeConfigResult() : + ServiceResult() +{} + +UpdateLoadBalancerAddressTypeConfigResult::UpdateLoadBalancerAddressTypeConfigResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateLoadBalancerAddressTypeConfigResult::~UpdateLoadBalancerAddressTypeConfigResult() +{} + +void UpdateLoadBalancerAddressTypeConfigResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["JobId"].isNull()) + jobId_ = value["JobId"].asString(); + +} + +std::string UpdateLoadBalancerAddressTypeConfigResult::getJobId()const +{ + return jobId_; +} + diff --git a/alb/src/model/UpdateServerGroupAttributeRequest.cc b/alb/src/model/UpdateServerGroupAttributeRequest.cc index 78d8edca0..145922dff 100644 --- a/alb/src/model/UpdateServerGroupAttributeRequest.cc +++ b/alb/src/model/UpdateServerGroupAttributeRequest.cc @@ -96,6 +96,15 @@ void UpdateServerGroupAttributeRequest::setUpstreamKeepaliveEnabled(bool upstrea setParameter(std::string("UpstreamKeepaliveEnabled"), upstreamKeepaliveEnabled ? "true" : "false"); } +std::string UpdateServerGroupAttributeRequest::getServiceName() const { + return serviceName_; +} + +void UpdateServerGroupAttributeRequest::setServiceName(const std::string &serviceName) { + serviceName_ = serviceName; + setParameter(std::string("ServiceName"), serviceName); +} + UpdateServerGroupAttributeRequest::StickySessionConfig UpdateServerGroupAttributeRequest::getStickySessionConfig() const { return stickySessionConfig_; }