Updates information about a private device instance.
Parameters:
-
arn
(AmazonResourceName)
–
The Amazon Resource Name (ARN) of the device instance.
-
profile_arn
(Optional[AmazonResourceName], default:
None
)
–
The ARN of the profile that you want to associate with the device instance.
-
labels
(Optional[InstanceLabels], default:
None
)
–
An array of strings that you want to associate with the device instance.
Raises:
Source code in docs_src/capo_device_farm/_services/async_device_farm.py
| async def update_device_instance(
self,
arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
*,
config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
profile_arn: Optional[
"capo_device_farm.types.amazon_resource_name.AmazonResourceName"
] = None,
labels: Optional[
"capo_device_farm.types.instance_labels.InstanceLabels"
] = None,
) -> "capo_device_farm.types.update_device_instance_result.UpdateDeviceInstanceResult":
"""<p>Updates information about a private device instance.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the device instance.</p>
profile_arn: <p>The ARN of the profile that you want to associate with the device instance.</p>
labels: <p>An array of strings that you want to associate with the device instance.</p>
Raises:
capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_device_farm.types.update_device_instance_request.UpdateDeviceInstanceRequest]",
) -> AsyncOperationResponse[
"capo_device_farm.types.update_device_instance_result.UpdateDeviceInstanceResult"
]:
import capo_device_farm._operations.device_farm_20150623.update_device_instance
(
output,
http_response,
) = await capo_device_farm._operations.device_farm_20150623.update_device_instance.async_update_device_instance(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDeviceInstance")
)
input_: capo_device_farm.types.update_device_instance_request.UpdateDeviceInstanceRequest = {
"arn": arn
}
if profile_arn is not None:
input_["profile_arn"] = profile_arn
if labels is not None:
input_["labels"] = labels
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|