UpdateDevicePoolCommand

Modifies the name, description, and rules in a device pool given the attributes and the pool ARN. Rule updates are all-or-nothing, meaning they can only be updated as a whole (or not at all).

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DeviceFarmClient, UpdateDevicePoolCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, UpdateDevicePoolCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // UpdateDevicePoolRequest
  arn: "STRING_VALUE", // required
  name: "STRING_VALUE",
  description: "STRING_VALUE",
  rules: [ // Rules
    { // Rule
      attribute: "ARN" || "PLATFORM" || "FORM_FACTOR" || "MANUFACTURER" || "REMOTE_ACCESS_ENABLED" || "REMOTE_DEBUG_ENABLED" || "APPIUM_VERSION" || "INSTANCE_ARN" || "INSTANCE_LABELS" || "FLEET_TYPE" || "OS_VERSION" || "MODEL" || "AVAILABILITY",
      operator: "EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "IN" || "NOT_IN" || "CONTAINS",
      value: "STRING_VALUE",
    },
  ],
  maxDevices: Number("int"),
  clearMaxDevices: true || false,
};
const command = new UpdateDevicePoolCommand(input);
const response = await client.send(command);
// { // UpdateDevicePoolResult
//   devicePool: { // DevicePool
//     arn: "STRING_VALUE",
//     name: "STRING_VALUE",
//     description: "STRING_VALUE",
//     type: "CURATED" || "PRIVATE",
//     rules: [ // Rules
//       { // Rule
//         attribute: "ARN" || "PLATFORM" || "FORM_FACTOR" || "MANUFACTURER" || "REMOTE_ACCESS_ENABLED" || "REMOTE_DEBUG_ENABLED" || "APPIUM_VERSION" || "INSTANCE_ARN" || "INSTANCE_LABELS" || "FLEET_TYPE" || "OS_VERSION" || "MODEL" || "AVAILABILITY",
//         operator: "EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "IN" || "NOT_IN" || "CONTAINS",
//         value: "STRING_VALUE",
//       },
//     ],
//     maxDevices: Number("int"),
//   },
// };

Example Usage

 Loading code editor

UpdateDevicePoolCommand Input

See UpdateDevicePoolCommandInput for more details

Parameter
Type
Description
arn
Required
string | undefined

The Amazon Resource Name (ARN) of the Device Farm device pool to update.

clearMaxDevices
boolean | undefined

Sets whether the maxDevices parameter applies to your device pool. If you set this parameter to true, the maxDevices parameter does not apply, and Device Farm does not limit the number of devices that it adds to your device pool. In this case, Device Farm adds all available devices that meet the criteria specified in the rules parameter.

If you use this parameter in your request, you cannot use the maxDevices parameter in the same request.

description
string | undefined

A description of the device pool to update.

maxDevices
number | undefined

The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and that meet the criteria that you assign for the rules parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.

By specifying the maximum number of devices, you can control the costs that you incur by running tests.

If you use this parameter in your request, you cannot use the clearMaxDevices parameter in the same request.

name
string | undefined

A string that represents the name of the device pool to update.

rules
Rule[] | undefined

Represents the rules to modify for the device pool. Updating rules is optional. If you update rules for your request, the update replaces the existing rules.

UpdateDevicePoolCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
devicePool
DevicePool | undefined

The device pool you just updated.

Throws

Name
Fault
Details
ArgumentException
client

An invalid argument was specified.

LimitExceededException
client

A limit was exceeded.

NotFoundException
client

The specified entity was not found.

ServiceAccountException
client

There was a problem with the service account.

DeviceFarmServiceException
Base exception class for all service exceptions from DeviceFarm service.