Skip to content

update_device_instance

update_device_instance(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
    profile_arn: Optional[AmazonResourceName] = None,
    labels: Optional[InstanceLabels] = None,
) -> UpdateDeviceInstanceResult

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/device_farm.py
def update_device_instance(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_device_farm.types.update_device_instance_request.UpdateDeviceInstanceRequest]",
    ) -> OperationResponse[
        "capo_device_farm.types.update_device_instance_result.UpdateDeviceInstanceResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.update_device_instance

        output, http_response = (
            capo_device_farm._operations.device_farm_20150623.update_device_instance.update_device_instance(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output