From 6b431571d575c786b95453b9581416516a2eb578 Mon Sep 17 00:00:00 2001 From: sdk-team <sdk-team@alibabacloud.com> Date: Wed, 11 Dec 2024 03:19:46 +0000 Subject: [PATCH] Support fromData for UpdateRulesAttribute and Createrules --- aliyun-python-sdk-alb/ChangeLog.txt | 3 + .../aliyunsdkalb/__init__.py | 2 +- .../request/v20200616/CreateRulesRequest.py | 106 +++++++++--------- .../v20200616/CreateServerGroupRequest.py | 5 + .../v20200616/UpdateRulesAttributeRequest.py | 102 ++++++++--------- .../UpdateServerGroupAttributeRequest.py | 5 + 6 files changed, 118 insertions(+), 105 deletions(-) diff --git a/aliyun-python-sdk-alb/ChangeLog.txt b/aliyun-python-sdk-alb/ChangeLog.txt index 2e48434e09..79a226b572 100644 --- a/aliyun-python-sdk-alb/ChangeLog.txt +++ b/aliyun-python-sdk-alb/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-12-11 Version: 1.0.21 +- Support fromData for UpdateRulesAttribute and Createrules + 2024-11-04 Version: 1.0.20 - Support Ipv4LocalAddresses and Ipv6LocalAddresses. diff --git a/aliyun-python-sdk-alb/aliyunsdkalb/__init__.py b/aliyun-python-sdk-alb/aliyunsdkalb/__init__.py index 1869805892..e2c5205c82 100644 --- a/aliyun-python-sdk-alb/aliyunsdkalb/__init__.py +++ b/aliyun-python-sdk-alb/aliyunsdkalb/__init__.py @@ -1 +1 @@ -__version__ = '1.0.20' \ No newline at end of file +__version__ = '1.0.21' \ No newline at end of file diff --git a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateRulesRequest.py b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateRulesRequest.py index 0f3104a946..37d91fec39 100644 --- a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateRulesRequest.py +++ b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateRulesRequest.py @@ -37,7 +37,7 @@ def get_ClientToken(self): # String def set_ClientToken(self, ClientToken): # String self.add_query_param('ClientToken', ClientToken) def get_Rules(self): # Array - return self.get_query_params().get('Rules') + return self.get_body_params().get('Rules') def set_Rules(self, Rules): # Array for index1, value1 in enumerate(Rules): @@ -46,150 +46,150 @@ def set_Rules(self, Rules): # Array if value2.get('MethodConfig') is not None: if value2.get('MethodConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('MethodConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.MethodConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.MethodConfig.Values.' + str(index3 + 1), value3) if value2.get('SourceIpConfig') is not None: if value2.get('SourceIpConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('SourceIpConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.SourceIpConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.SourceIpConfig.Values.' + str(index3 + 1), value3) if value2.get('HostConfig') is not None: if value2.get('HostConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('HostConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HostConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HostConfig.Values.' + str(index3 + 1), value3) if value2.get('QueryStringConfig') is not None: if value2.get('QueryStringConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('QueryStringConfig').get('Values')): if value3.get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) if value3.get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) if value2.get('ResponseStatusCodeConfig') is not None: if value2.get('ResponseStatusCodeConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('ResponseStatusCodeConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseStatusCodeConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseStatusCodeConfig.Values.' + str(index3 + 1), value3) if value2.get('PathConfig') is not None: if value2.get('PathConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('PathConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.PathConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.PathConfig.Values.' + str(index3 + 1), value3) if value2.get('CookieConfig') is not None: if value2.get('CookieConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('CookieConfig').get('Values')): if value3.get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) if value3.get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) if value2.get('Type') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.Type', value2.get('Type')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.Type', value2.get('Type')) if value2.get('HeaderConfig') is not None: if value2.get('HeaderConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('HeaderConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Values.' + str(index3 + 1), value3) if value2.get('HeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Key', value2.get('HeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Key', value2.get('HeaderConfig').get('Key')) if value2.get('ResponseHeaderConfig') is not None: if value2.get('ResponseHeaderConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('ResponseHeaderConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Values.' + str(index3 + 1), value3) if value2.get('ResponseHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Key', value2.get('ResponseHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Key', value2.get('ResponseHeaderConfig').get('Key')) if value1.get('RuleName') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleName', value1.get('RuleName')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleName', value1.get('RuleName')) if value1.get('Tag') is not None: for index2, value2 in enumerate(value1.get('Tag')): if value2.get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.Tag.' + str(index2 + 1) + '.Value', value2.get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.Tag.' + str(index2 + 1) + '.Value', value2.get('Value')) if value2.get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.Tag.' + str(index2 + 1) + '.Key', value2.get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.Tag.' + str(index2 + 1) + '.Key', value2.get('Key')) if value1.get('Priority') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.Priority', value1.get('Priority')) + self.add_body_params('Rules.' + str(index1 + 1) + '.Priority', value1.get('Priority')) if value1.get('RuleActions') is not None: for index2, value2 in enumerate(value1.get('RuleActions')): if value2.get('FixedResponseConfig') is not None: if value2.get('FixedResponseConfig').get('HttpCode') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.HttpCode', value2.get('FixedResponseConfig').get('HttpCode')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.HttpCode', value2.get('FixedResponseConfig').get('HttpCode')) if value2.get('FixedResponseConfig').get('Content') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.Content', value2.get('FixedResponseConfig').get('Content')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.Content', value2.get('FixedResponseConfig').get('Content')) if value2.get('FixedResponseConfig').get('ContentType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.ContentType', value2.get('FixedResponseConfig').get('ContentType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.ContentType', value2.get('FixedResponseConfig').get('ContentType')) if value2.get('TrafficMirrorConfig') is not None: if value2.get('TrafficMirrorConfig').get('MirrorGroupConfig') is not None: if value2.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples') is not None: for index3, value3 in enumerate(value2.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples')): if value3.get('ServerGroupId') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) if value2.get('TrafficMirrorConfig').get('TargetType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.TargetType', value2.get('TrafficMirrorConfig').get('TargetType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.TargetType', value2.get('TrafficMirrorConfig').get('TargetType')) if value2.get('ForwardGroupConfig') is not None: if value2.get('ForwardGroupConfig').get('ServerGroupStickySession') is not None: if value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Enabled', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Enabled', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled')) if value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Timeout', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Timeout', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout')) if value2.get('ForwardGroupConfig').get('ServerGroupTuples') is not None: for index3, value3 in enumerate(value2.get('ForwardGroupConfig').get('ServerGroupTuples')): if value3.get('ServerGroupId') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) if value3.get('Weight') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.Weight', value3.get('Weight')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.Weight', value3.get('Weight')) if value2.get('RemoveHeaderConfig') is not None: if value2.get('RemoveHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RemoveHeaderConfig.Key', value2.get('RemoveHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RemoveHeaderConfig.Key', value2.get('RemoveHeaderConfig').get('Key')) if value2.get('InsertHeaderConfig') is not None: if value2.get('InsertHeaderConfig').get('ValueType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.ValueType', value2.get('InsertHeaderConfig').get('ValueType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.ValueType', value2.get('InsertHeaderConfig').get('ValueType')) if value2.get('InsertHeaderConfig').get('CoverEnabled') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.CoverEnabled', value2.get('InsertHeaderConfig').get('CoverEnabled')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.CoverEnabled', value2.get('InsertHeaderConfig').get('CoverEnabled')) if value2.get('InsertHeaderConfig').get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Value', value2.get('InsertHeaderConfig').get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Value', value2.get('InsertHeaderConfig').get('Value')) if value2.get('InsertHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Key', value2.get('InsertHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Key', value2.get('InsertHeaderConfig').get('Key')) if value2.get('TrafficLimitConfig') is not None: if value2.get('TrafficLimitConfig').get('QPS') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.QPS', value2.get('TrafficLimitConfig').get('QPS')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.QPS', value2.get('TrafficLimitConfig').get('QPS')) if value2.get('TrafficLimitConfig').get('PerIpQps') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.PerIpQps', value2.get('TrafficLimitConfig').get('PerIpQps')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.PerIpQps', value2.get('TrafficLimitConfig').get('PerIpQps')) if value2.get('CorsConfig') is not None: if value2.get('CorsConfig').get('AllowCredentials') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowCredentials', value2.get('CorsConfig').get('AllowCredentials')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowCredentials', value2.get('CorsConfig').get('AllowCredentials')) if value2.get('CorsConfig').get('AllowOrigin') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowOrigin')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowOrigin.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowOrigin.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('MaxAge') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.MaxAge', value2.get('CorsConfig').get('MaxAge')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.MaxAge', value2.get('CorsConfig').get('MaxAge')) if value2.get('CorsConfig').get('AllowMethods') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowMethods')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowMethods.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowMethods.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('AllowHeaders') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowHeaders')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowHeaders.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowHeaders.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('ExposeHeaders') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('ExposeHeaders')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.ExposeHeaders.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.ExposeHeaders.' + str(index3 + 1), value3) if value2.get('RedirectConfig') is not None: if value2.get('RedirectConfig').get('Path') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Path', value2.get('RedirectConfig').get('Path')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Path', value2.get('RedirectConfig').get('Path')) if value2.get('RedirectConfig').get('Protocol') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Protocol', value2.get('RedirectConfig').get('Protocol')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Protocol', value2.get('RedirectConfig').get('Protocol')) if value2.get('RedirectConfig').get('Port') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Port', value2.get('RedirectConfig').get('Port')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Port', value2.get('RedirectConfig').get('Port')) if value2.get('RedirectConfig').get('Query') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Query', value2.get('RedirectConfig').get('Query')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Query', value2.get('RedirectConfig').get('Query')) if value2.get('RedirectConfig').get('Host') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Host', value2.get('RedirectConfig').get('Host')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Host', value2.get('RedirectConfig').get('Host')) if value2.get('RedirectConfig').get('HttpCode') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.HttpCode', value2.get('RedirectConfig').get('HttpCode')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.HttpCode', value2.get('RedirectConfig').get('HttpCode')) if value2.get('Type') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Type', value2.get('Type')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Type', value2.get('Type')) if value2.get('Order') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Order', value2.get('Order')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Order', value2.get('Order')) if value2.get('RewriteConfig') is not None: if value2.get('RewriteConfig').get('Path') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Path', value2.get('RewriteConfig').get('Path')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Path', value2.get('RewriteConfig').get('Path')) if value2.get('RewriteConfig').get('Query') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Query', value2.get('RewriteConfig').get('Query')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Query', value2.get('RewriteConfig').get('Query')) if value2.get('RewriteConfig').get('Host') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Host', value2.get('RewriteConfig').get('Host')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Host', value2.get('RewriteConfig').get('Host')) if value1.get('Direction') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.Direction', value1.get('Direction')) + self.add_body_params('Rules.' + str(index1 + 1) + '.Direction', value1.get('Direction')) def get_ListenerId(self): # String return self.get_query_params().get('ListenerId') diff --git a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateServerGroupRequest.py b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateServerGroupRequest.py index 13d9a3c99e..457dad2477 100644 --- a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateServerGroupRequest.py +++ b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/CreateServerGroupRequest.py @@ -31,6 +31,11 @@ def __init__(self): if hasattr(self, "endpoint_regional"): setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional()) + def get_CrossZoneEnabled(self): # Boolean + return self.get_query_params().get('CrossZoneEnabled') + + def set_CrossZoneEnabled(self, CrossZoneEnabled): # Boolean + self.add_query_param('CrossZoneEnabled', CrossZoneEnabled) def get_ServerGroupName(self): # String return self.get_query_params().get('ServerGroupName') diff --git a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateRulesAttributeRequest.py b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateRulesAttributeRequest.py index 316f0458a4..45c1b8855f 100644 --- a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateRulesAttributeRequest.py +++ b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateRulesAttributeRequest.py @@ -37,7 +37,7 @@ def get_ClientToken(self): # String def set_ClientToken(self, ClientToken): # String self.add_query_param('ClientToken', ClientToken) def get_Rules(self): # Array - return self.get_query_params().get('Rules') + return self.get_body_params().get('Rules') def set_Rules(self, Rules): # Array for index1, value1 in enumerate(Rules): @@ -46,144 +46,144 @@ def set_Rules(self, Rules): # Array if value2.get('MethodConfig') is not None: if value2.get('MethodConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('MethodConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.MethodConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.MethodConfig.Values.' + str(index3 + 1), value3) if value2.get('SourceIpConfig') is not None: if value2.get('SourceIpConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('SourceIpConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.SourceIpConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.SourceIpConfig.Values.' + str(index3 + 1), value3) if value2.get('HostConfig') is not None: if value2.get('HostConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('HostConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HostConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HostConfig.Values.' + str(index3 + 1), value3) if value2.get('QueryStringConfig') is not None: if value2.get('QueryStringConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('QueryStringConfig').get('Values')): if value3.get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) if value3.get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.QueryStringConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) if value2.get('ResponseStatusCodeConfig') is not None: if value2.get('ResponseStatusCodeConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('ResponseStatusCodeConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseStatusCodeConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseStatusCodeConfig.Values.' + str(index3 + 1), value3) if value2.get('PathConfig') is not None: if value2.get('PathConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('PathConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.PathConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.PathConfig.Values.' + str(index3 + 1), value3) if value2.get('CookieConfig') is not None: if value2.get('CookieConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('CookieConfig').get('Values')): if value3.get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Value', value3.get('Value')) if value3.get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.CookieConfig.Values.' + str(index3 + 1) + '.Key', value3.get('Key')) if value2.get('Type') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.Type', value2.get('Type')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.Type', value2.get('Type')) if value2.get('HeaderConfig') is not None: if value2.get('HeaderConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('HeaderConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Values.' + str(index3 + 1), value3) if value2.get('HeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Key', value2.get('HeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.HeaderConfig.Key', value2.get('HeaderConfig').get('Key')) if value2.get('ResponseHeaderConfig') is not None: if value2.get('ResponseHeaderConfig').get('Values') is not None: for index3, value3 in enumerate(value2.get('ResponseHeaderConfig').get('Values')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Values.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Values.' + str(index3 + 1), value3) if value2.get('ResponseHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Key', value2.get('ResponseHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleConditions.' + str(index2 + 1) + '.ResponseHeaderConfig.Key', value2.get('ResponseHeaderConfig').get('Key')) if value1.get('RuleName') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleName', value1.get('RuleName')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleName', value1.get('RuleName')) if value1.get('Priority') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.Priority', value1.get('Priority')) + self.add_body_params('Rules.' + str(index1 + 1) + '.Priority', value1.get('Priority')) if value1.get('RuleId') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleId', value1.get('RuleId')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleId', value1.get('RuleId')) if value1.get('RuleActions') is not None: for index2, value2 in enumerate(value1.get('RuleActions')): if value2.get('FixedResponseConfig') is not None: if value2.get('FixedResponseConfig').get('HttpCode') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.HttpCode', value2.get('FixedResponseConfig').get('HttpCode')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.HttpCode', value2.get('FixedResponseConfig').get('HttpCode')) if value2.get('FixedResponseConfig').get('Content') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.Content', value2.get('FixedResponseConfig').get('Content')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.Content', value2.get('FixedResponseConfig').get('Content')) if value2.get('FixedResponseConfig').get('ContentType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.ContentType', value2.get('FixedResponseConfig').get('ContentType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.FixedResponseConfig.ContentType', value2.get('FixedResponseConfig').get('ContentType')) if value2.get('TrafficMirrorConfig') is not None: if value2.get('TrafficMirrorConfig').get('MirrorGroupConfig') is not None: if value2.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples') is not None: for index3, value3 in enumerate(value2.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples')): if value3.get('ServerGroupId') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) if value2.get('TrafficMirrorConfig').get('TargetType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.TargetType', value2.get('TrafficMirrorConfig').get('TargetType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficMirrorConfig.TargetType', value2.get('TrafficMirrorConfig').get('TargetType')) if value2.get('ForwardGroupConfig') is not None: if value2.get('ForwardGroupConfig').get('ServerGroupStickySession') is not None: if value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Enabled', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Enabled', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled')) if value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Timeout', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Timeout', value2.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout')) if value2.get('ForwardGroupConfig').get('ServerGroupTuples') is not None: for index3, value3 in enumerate(value2.get('ForwardGroupConfig').get('ServerGroupTuples')): if value3.get('ServerGroupId') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.ServerGroupId', value3.get('ServerGroupId')) if value3.get('Weight') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.Weight', value3.get('Weight')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index3 + 1) + '.Weight', value3.get('Weight')) if value2.get('RemoveHeaderConfig') is not None: if value2.get('RemoveHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RemoveHeaderConfig.Key', value2.get('RemoveHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RemoveHeaderConfig.Key', value2.get('RemoveHeaderConfig').get('Key')) if value2.get('InsertHeaderConfig') is not None: if value2.get('InsertHeaderConfig').get('ValueType') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.ValueType', value2.get('InsertHeaderConfig').get('ValueType')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.ValueType', value2.get('InsertHeaderConfig').get('ValueType')) if value2.get('InsertHeaderConfig').get('CoverEnabled') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.CoverEnabled', value2.get('InsertHeaderConfig').get('CoverEnabled')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.CoverEnabled', value2.get('InsertHeaderConfig').get('CoverEnabled')) if value2.get('InsertHeaderConfig').get('Value') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Value', value2.get('InsertHeaderConfig').get('Value')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Value', value2.get('InsertHeaderConfig').get('Value')) if value2.get('InsertHeaderConfig').get('Key') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Key', value2.get('InsertHeaderConfig').get('Key')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.InsertHeaderConfig.Key', value2.get('InsertHeaderConfig').get('Key')) if value2.get('TrafficLimitConfig') is not None: if value2.get('TrafficLimitConfig').get('QPS') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.QPS', value2.get('TrafficLimitConfig').get('QPS')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.QPS', value2.get('TrafficLimitConfig').get('QPS')) if value2.get('TrafficLimitConfig').get('PerIpQps') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.PerIpQps', value2.get('TrafficLimitConfig').get('PerIpQps')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.TrafficLimitConfig.PerIpQps', value2.get('TrafficLimitConfig').get('PerIpQps')) if value2.get('CorsConfig') is not None: if value2.get('CorsConfig').get('AllowCredentials') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowCredentials', value2.get('CorsConfig').get('AllowCredentials')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowCredentials', value2.get('CorsConfig').get('AllowCredentials')) if value2.get('CorsConfig').get('AllowOrigin') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowOrigin')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowOrigin.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowOrigin.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('MaxAge') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.MaxAge', value2.get('CorsConfig').get('MaxAge')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.MaxAge', value2.get('CorsConfig').get('MaxAge')) if value2.get('CorsConfig').get('AllowMethods') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowMethods')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowMethods.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowMethods.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('AllowHeaders') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('AllowHeaders')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowHeaders.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.AllowHeaders.' + str(index3 + 1), value3) if value2.get('CorsConfig').get('ExposeHeaders') is not None: for index3, value3 in enumerate(value2.get('CorsConfig').get('ExposeHeaders')): - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.ExposeHeaders.' + str(index3 + 1), value3) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.CorsConfig.ExposeHeaders.' + str(index3 + 1), value3) if value2.get('RedirectConfig') is not None: if value2.get('RedirectConfig').get('Path') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Path', value2.get('RedirectConfig').get('Path')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Path', value2.get('RedirectConfig').get('Path')) if value2.get('RedirectConfig').get('Protocol') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Protocol', value2.get('RedirectConfig').get('Protocol')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Protocol', value2.get('RedirectConfig').get('Protocol')) if value2.get('RedirectConfig').get('Port') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Port', value2.get('RedirectConfig').get('Port')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Port', value2.get('RedirectConfig').get('Port')) if value2.get('RedirectConfig').get('Query') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Query', value2.get('RedirectConfig').get('Query')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Query', value2.get('RedirectConfig').get('Query')) if value2.get('RedirectConfig').get('Host') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Host', value2.get('RedirectConfig').get('Host')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.Host', value2.get('RedirectConfig').get('Host')) if value2.get('RedirectConfig').get('HttpCode') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.HttpCode', value2.get('RedirectConfig').get('HttpCode')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RedirectConfig.HttpCode', value2.get('RedirectConfig').get('HttpCode')) if value2.get('Type') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Type', value2.get('Type')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Type', value2.get('Type')) if value2.get('Order') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Order', value2.get('Order')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.Order', value2.get('Order')) if value2.get('RewriteConfig') is not None: if value2.get('RewriteConfig').get('Path') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Path', value2.get('RewriteConfig').get('Path')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Path', value2.get('RewriteConfig').get('Path')) if value2.get('RewriteConfig').get('Query') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Query', value2.get('RewriteConfig').get('Query')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Query', value2.get('RewriteConfig').get('Query')) if value2.get('RewriteConfig').get('Host') is not None: - self.add_query_param('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Host', value2.get('RewriteConfig').get('Host')) + self.add_body_params('Rules.' + str(index1 + 1) + '.RuleActions.' + str(index2 + 1) + '.RewriteConfig.Host', value2.get('RewriteConfig').get('Host')) def get_DryRun(self): # Boolean return self.get_query_params().get('DryRun') diff --git a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateServerGroupAttributeRequest.py b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateServerGroupAttributeRequest.py index f619b3bcc0..75db002617 100644 --- a/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateServerGroupAttributeRequest.py +++ b/aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateServerGroupAttributeRequest.py @@ -31,6 +31,11 @@ def __init__(self): if hasattr(self, "endpoint_regional"): setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional()) + def get_CrossZoneEnabled(self): # Boolean + return self.get_query_params().get('CrossZoneEnabled') + + def set_CrossZoneEnabled(self, CrossZoneEnabled): # Boolean + self.add_query_param('CrossZoneEnabled', CrossZoneEnabled) def get_ServerGroupName(self): # String return self.get_query_params().get('ServerGroupName')