def set_RuleActions()

in aliyun-python-sdk-alb/aliyunsdkalb/request/v20200616/UpdateRuleAttributeRequest.py [0:0]


	def set_RuleActions(self, RuleActions):  # Array
		for index1, value1 in enumerate(RuleActions):
			if value1.get('FixedResponseConfig') is not None:
				if value1.get('FixedResponseConfig').get('HttpCode') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.FixedResponseConfig.HttpCode', value1.get('FixedResponseConfig').get('HttpCode'))
				if value1.get('FixedResponseConfig').get('Content') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.FixedResponseConfig.Content', value1.get('FixedResponseConfig').get('Content'))
				if value1.get('FixedResponseConfig').get('ContentType') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.FixedResponseConfig.ContentType', value1.get('FixedResponseConfig').get('ContentType'))
			if value1.get('TrafficMirrorConfig') is not None:
				if value1.get('TrafficMirrorConfig').get('MirrorGroupConfig') is not None:
					if value1.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples') is not None:
						for index2, value2 in enumerate(value1.get('TrafficMirrorConfig').get('MirrorGroupConfig').get('ServerGroupTuples')):
							if value2.get('ServerGroupId') is not None:
								self.add_query_param('RuleActions.' + str(index1 + 1) + '.TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples.' + str(index2 + 1) + '.ServerGroupId', value2.get('ServerGroupId'))
				if value1.get('TrafficMirrorConfig').get('TargetType') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.TrafficMirrorConfig.TargetType', value1.get('TrafficMirrorConfig').get('TargetType'))
			if value1.get('ForwardGroupConfig') is not None:
				if value1.get('ForwardGroupConfig').get('ServerGroupStickySession') is not None:
					if value1.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled') is not None:
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Enabled', value1.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Enabled'))
					if value1.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout') is not None:
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.ForwardGroupConfig.ServerGroupStickySession.Timeout', value1.get('ForwardGroupConfig').get('ServerGroupStickySession').get('Timeout'))
				if value1.get('ForwardGroupConfig').get('ServerGroupTuples') is not None:
					for index2, value2 in enumerate(value1.get('ForwardGroupConfig').get('ServerGroupTuples')):
						if value2.get('ServerGroupId') is not None:
							self.add_query_param('RuleActions.' + str(index1 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index2 + 1) + '.ServerGroupId', value2.get('ServerGroupId'))
						if value2.get('Weight') is not None:
							self.add_query_param('RuleActions.' + str(index1 + 1) + '.ForwardGroupConfig.ServerGroupTuples.' + str(index2 + 1) + '.Weight', value2.get('Weight'))
			if value1.get('RemoveHeaderConfig') is not None:
				if value1.get('RemoveHeaderConfig').get('Key') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RemoveHeaderConfig.Key', value1.get('RemoveHeaderConfig').get('Key'))
			if value1.get('InsertHeaderConfig') is not None:
				if value1.get('InsertHeaderConfig').get('ValueType') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.InsertHeaderConfig.ValueType', value1.get('InsertHeaderConfig').get('ValueType'))
				if value1.get('InsertHeaderConfig').get('CoverEnabled') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.InsertHeaderConfig.CoverEnabled', value1.get('InsertHeaderConfig').get('CoverEnabled'))
				if value1.get('InsertHeaderConfig').get('Value') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.InsertHeaderConfig.Value', value1.get('InsertHeaderConfig').get('Value'))
				if value1.get('InsertHeaderConfig').get('Key') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.InsertHeaderConfig.Key', value1.get('InsertHeaderConfig').get('Key'))
			if value1.get('TrafficLimitConfig') is not None:
				if value1.get('TrafficLimitConfig').get('QPS') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.TrafficLimitConfig.QPS', value1.get('TrafficLimitConfig').get('QPS'))
				if value1.get('TrafficLimitConfig').get('PerIpQps') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.TrafficLimitConfig.PerIpQps', value1.get('TrafficLimitConfig').get('PerIpQps'))
			if value1.get('CorsConfig') is not None:
				if value1.get('CorsConfig').get('AllowCredentials') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.AllowCredentials', value1.get('CorsConfig').get('AllowCredentials'))
				if value1.get('CorsConfig').get('AllowOrigin') is not None:
					for index2, value2 in enumerate(value1.get('CorsConfig').get('AllowOrigin')):
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.AllowOrigin.' + str(index2 + 1), value2)
				if value1.get('CorsConfig').get('MaxAge') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.MaxAge', value1.get('CorsConfig').get('MaxAge'))
				if value1.get('CorsConfig').get('AllowMethods') is not None:
					for index2, value2 in enumerate(value1.get('CorsConfig').get('AllowMethods')):
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.AllowMethods.' + str(index2 + 1), value2)
				if value1.get('CorsConfig').get('AllowHeaders') is not None:
					for index2, value2 in enumerate(value1.get('CorsConfig').get('AllowHeaders')):
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.AllowHeaders.' + str(index2 + 1), value2)
				if value1.get('CorsConfig').get('ExposeHeaders') is not None:
					for index2, value2 in enumerate(value1.get('CorsConfig').get('ExposeHeaders')):
						self.add_query_param('RuleActions.' + str(index1 + 1) + '.CorsConfig.ExposeHeaders.' + str(index2 + 1), value2)
			if value1.get('RedirectConfig') is not None:
				if value1.get('RedirectConfig').get('Path') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.Path', value1.get('RedirectConfig').get('Path'))
				if value1.get('RedirectConfig').get('Protocol') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.Protocol', value1.get('RedirectConfig').get('Protocol'))
				if value1.get('RedirectConfig').get('Port') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.Port', value1.get('RedirectConfig').get('Port'))
				if value1.get('RedirectConfig').get('Query') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.Query', value1.get('RedirectConfig').get('Query'))
				if value1.get('RedirectConfig').get('Host') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.Host', value1.get('RedirectConfig').get('Host'))
				if value1.get('RedirectConfig').get('HttpCode') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RedirectConfig.HttpCode', value1.get('RedirectConfig').get('HttpCode'))
			if value1.get('Type') is not None:
				self.add_query_param('RuleActions.' + str(index1 + 1) + '.Type', value1.get('Type'))
			if value1.get('Order') is not None:
				self.add_query_param('RuleActions.' + str(index1 + 1) + '.Order', value1.get('Order'))
			if value1.get('RewriteConfig') is not None:
				if value1.get('RewriteConfig').get('Path') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RewriteConfig.Path', value1.get('RewriteConfig').get('Path'))
				if value1.get('RewriteConfig').get('Query') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RewriteConfig.Query', value1.get('RewriteConfig').get('Query'))
				if value1.get('RewriteConfig').get('Host') is not None:
					self.add_query_param('RuleActions.' + str(index1 + 1) + '.RewriteConfig.Host', value1.get('RewriteConfig').get('Host'))