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.
-
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
5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 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 | |