### Method

# FwupdPlugin Device build_instance_id_strv

since: 2.0.14

#### Declaration [src]

    gboolean
    fu_device_build_instance_id_strv (
      FuDevice* self,
      const gchar* subsystem,
      gchar** keys,
      GError** error
    )

#### Description [src]

Creates an instance ID from a prefix and an array of key values. If the key value cannot be found, the parent and then proxy is also queried.

If any of the key values remain unset then no instance ID is added.

fu_device_add_instance_str(dev, “VID”, “1234”); fu_device_add_instance_u16(dev, “PID”, 5678); const gchar *keys[] = {“VID”, “PID”, NULL}; if (!fu_device_build_instance_id_strv(dev, “NVME”, keys, &error)) g_warning(“failed to add ID: %s”, error->message);.

Available since: 2.0.14

#### Parameters

`subsystem`

  Type: `const gchar*`

  Subsystem, e.g. `NVME`.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`keys`

  Type: `gchar**`

  `NULL` terminated array of string keys.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if the instance ID was added.