update_device_pool
async
¶
update_device_pool(
arn: AmazonResourceName,
*,
config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
name: Optional[Name] = None,
description: Optional[Message] = None,
rules: Optional[Rules] = None,
max_devices: Optional[Integer] = None,
clear_max_devices: Optional[Boolean] = None,
) -> UpdateDevicePoolResult
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).
Parameters:
-
arn(AmazonResourceName) –The Amazon Resource Name (ARN) of the Device Farm device pool to update.
-
name(Optional[Name], default:None) –A string that represents the name of the device pool to update.
-
description(Optional[Message], default:None) –A description of the device pool to update.
-
rules(Optional[Rules], default:None) –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.
A device pool contains either physical devices or virtual devices, but not both. If you define the pool with attribute rules and those rules do not include a
DEVICE_TYPErule, the pool contains only physical devices. If you define the pool by listing device ARNs, the pool contains the devices you list. -
max_devices(Optional[Integer], default:None) –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
rulesparameter. 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
clearMaxDevicesparameter in the same request. -
clear_max_devices(Optional[Boolean], default:None) –Sets whether the
maxDevicesparameter applies to your device pool. If you set this parameter totrue, themaxDevicesparameter 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 therulesparameter.If you use this parameter in your request, you cannot use the
maxDevicesparameter in the same request.
Raises:
-
ArgumentException–An invalid argument was specified.
-
LimitExceededException–A limit was exceeded.
-
NotFoundException–The specified entity was not found.
-
ServiceAccountException–There was a problem with the service account.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a device pool The following example updates the specified device pool with a new name and description. It also enables remote access of devices in the device pool.
>>> await client.update_device_pool(arn='arn:aws:devicefarm:us-west-2::devicepool:082d10e5-d7d7-48a5-ba5c-12345EXAMPLE', name='NewName', description='NewDescription', rules=[{'attribute': 'REMOTE_ACCESS_ENABLED', 'operator': 'EQUALS', 'value': 'True'}])
Source code in docs_src/capo_device_farm/_services/async_device_farm.py
5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 | |