Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IDeviceConfig

interface IDeviceConfig
Extends com.amazon.apmf.IStandard Interface for getting and setting device-wide configuration values.

Methods

get()

string get(string config)
Gets value of the requested device configuration. This method is access-controlled and require the privilege respective to the configuration key and group. For retrieving the configuration in the format com.amazon.devconf/system/{group}/{key}, the method caller MUST have the privilege com.amazon.devconf.privilege.{group}.{key}. The privilege com.amazon.devconf.privilege.{group} MAY also be used to retrieve the values of all the device configurations which belongs to the group {group}.

Parameters

config
string — Required The device configuration.

Returns

string The device configuration value.

Throws


getArray()

DeviceConfigResult[] getArray(string[] configs)
Gets values of the requested list of device configurations. If querying any device configurations fails, the method populates the right error for that device configuration. This method is access-controlled and require the privilege respective to the configuration key and group. For retrieving the configuration in the format com.amazon.devconf/system/{group}/{key}, the method caller MUST have the privilege com.amazon.devconf.privilege.{group}.{key}. The privilege com.amazon.devconf.privilege.{group} MAY also be used to retrieve the values of all the device configurations which belongs to the group {group}.

Parameters

configs
string[] — Required An array of device configurations.

Returns

DeviceConfigResult[] An array of device configuration structs containing the original config queried and either a value or Error. This array is in the same order as configurations that appear in the configs parameter. If querying the configuration succeeds then the value is populated; otherwise, one of the following errors will be populated: com.amazon.apmf.InvalidArgumentError On invalid input; com.amazon.apmf.SecurityError On access-control errors; com.amazon.kepler.device_config.DeviceConfigNotFoundError if the device configuration being queried is not found, this is a non-fatal exception.

Throws


set()

void set(string config, string value)
Persistently sets the device configuration config parameter with the value parameter. This method is access-controlled and require the privilege respective to the configuration key and group. For modifying the configuration in the format com.amazon.devconf/system/{group}/{key}, the method caller MUST have the privilege com.amazon.devconf.privilege.{group}.{key}.write. The privilege com.amazon.devconf.privilege.{group}.write MAY also be used to modify the values of all the device configurations which belongs to the group {group}.

Parameters

config
string — Required The device configuration string.
value
string — Required The device configuration value string.

Throws


remove()

void remove(string config)
Persistently removes a config from the device configuration system. This method is access-controlled and require the privilege respective to the configuration key and group. For modifying the configuration in the format com.amazon.devconf/system/{group}/{key}, the method caller MUST have the privilege com.amazon.devconf.privilege.{group}.{key}.write. Subsequent get() calls to this device configuration throw a ‘DeviceConfigNotFoundError’ error.

Parameters

config
string — Required The device configuration string.

Throws


Last modified on October 29, 2026