0

I am trying to create device pool for a project using AWS DeviceFarm sdk in C#. I use the following command:

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"
                }
            }
        });

It thinks for about a minute then I receive the following exception:

Error making request with Error Code InternalFailure and Http Status Code InternalServerError. No further error information was returned by the service.

ProjectArn is valid. I also tried different rules and get the same error every time.

Chebz
  • 1,375
  • 3
  • 14
  • 27

1 Answers1

0

Figured it out. Value needs to be surrounded with square brackets like so

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\"]"
                    }
                }
            });
Chebz
  • 1,375
  • 3
  • 14
  • 27