private static void createRule(IoTDAClient client) { CreateRuleRequest req = new CreateRuleRequest { Body = new Rule() { Actions = new List <RuleAction>() { new RuleAction() { Type = "IoTA_FORWARDING", Addition = new List <string>() { "88cce89f943646cfbda057aed55c4841" }, IotaForwarding = new ActionIoTAForwarding() { ProjectId = "88cce89f943646cfbda057aed55c4841", RegionName = "cn-north-7" } } }, ConditionGroup = new ConditionGroup() { Conditions = new List <RuleCondition>() { new RuleCondition() { DevicePropertyCondition = new DeviceDataCondition() { Filters = new List <PropertyFilter>() { new PropertyFilter() { Operator = ">", Path = "Meter/signalStrength", Value = "0" } } }, Type = "DEVICE_DATA" } }, TimeRange = new TimeRange() { EndTime = "12:02", StartTime = "12:00" } }, Name = "test_createRule_Success", RuleType = "DATA_FORWARDING", Status = "inactive" } }; try { var resp = client.CreateRule(req); Console.WriteLine(resp); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }