- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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
UpdateDevicePoolCommand Input
Parameter | Type | Description |
---|
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 If you use this parameter in your request, you cannot use the |
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 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 |
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 |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
devicePool | DevicePool | undefined | The device pool you just updated. |
Throws
Name | Fault | Details |
---|
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. |