AWS Device Farm CreateDevicePool内部错误

时间:2016-03-01 23:12:43

标签: amazon-web-services aws-device-farm

我正在尝试使用C#中的AWS DeviceFarm sdk为项目创建设备池。我使用以下命令:

var createDevicePoolResponse = client.CreateDevicePool (new CreateDevicePoolRequest {
            Name = "CustomDevicePool",
            ProjectArn = projectArn,
            Rules = new List<Rule> { 
                new Rule { 
                    Attribute = DeviceAttribute.ARN,
                    Operator = RuleOperator.EQUALS_TO,
                    Value = "arn:aws:devicefarm:us-west-2::device:577DC08D6B964346B86610CFF090CD59"
                }
            }
        });

它认为大约一分钟然后我收到以下例外:

  

使用错误代码InternalFailure和Http状态发出请求时出错   代码InternalServerError。没有返回进一步的错误信息   服务。

ProjectArn有效。我也尝试了不同的规则,每次都会得到同样的错误。

1 个答案:

答案 0 :(得分:0)

想出来。值必须用方括号括起来

var createDevicePoolResponse = client.CreateDevicePool (new CreateDevicePoolRequest {
                Name = "CustomDevicePool",
                ProjectArn = projectArn,
                Rules = new List<Rule> { 
                    new Rule { 
                        Attribute = DeviceAttribute.ARN,
                        Operator = RuleOperator.IN,
                        Value = "[\"arn:aws:devicefarm:us-west-2::device:D45C750161314335924CE0B9B7D2558E\"]"
                    }
                }
            });