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
Skip to main content

Extends

  • KeplerTurboModule

Properties

getConstants()?

readonly optional getConstants: () => object

Returns

object

Inherited from

KeplerTurboModule.getConstants

getMajorVersion()

getMajorVersion: () => number

Returns

number The major version number.

Brief

Get the major version number.

Overrides

KeplerTurboModule.getMajorVersion

getMinorVersion()

getMinorVersion: () => number

Returns

number The minor version number.

Brief

Get the minor version number.

Overrides

KeplerTurboModule.getMinorVersion

getPatchVersion()

getPatchVersion: () => number

Returns

number The patch version number.

Brief

Get the patch version number.

Overrides

KeplerTurboModule.getPatchVersion

setPrivilegeState()

setPrivilegeState: (packageId, privilege, state) => Promise<string> Sets the run-time privilege to a certain state for a specified package.

Parameters

packageId
string The packageId value of the specified package.
privilege
string The run-time privilege to modify.
state
PrivilegeState State to set the run-time privilege to.

Returns

Promise<string> On success, the promise is resolved. On error, the promise is rejected with an error message.

Privilege

The “com.amazon.security.privilege.set-privilege-state” is required.

Methods

getCurrentContextCredential()

getCurrentContextCredential(): ICredential

Returns

ICredential

getPrivilegeState()

getPrivilegeState(privilege, packageId): Promise<string> Get the state of a run-time privilege for the specified package.

Parameters

privilege
string The run-time privilege to modify.
packageId
string The package ID for the package to get the privilege state for. If this parameter is not specified, it will default to the calling package.

Returns

Promise<string> On success, the promise is resolved with the current state of the privilege for the specified package. On error, the promise is rejected with an error message.

Privilege

The “com.amazon.privilege.package.query” is required.

getRuntimePrivilegeStates()

getRuntimePrivilegeStates(credential): Promise<IRuntimePrivilege[]>

Parameters

credential
ICredential

Returns

Promise<IRuntimePrivilege[]>

getSelfPrivilegeState()

getSelfPrivilegeState(privilege): Promise<string> Get the state of a run-time privilege for the calling package.

Parameters

privilege
string The run-time privilege to modify.

Returns

Promise<string> On success, the promise is resolved with the current state of the privilege for the calling package. On error, the promise is rejected with an error message.

requestPrivilege()

requestPrivilege(privilege): Promise<string> Request permission to use a run-time privilege

Parameters

privilege
string The run-time privilege to request access to.

Returns

Promise<string> On success, the promise is resolved with the new state of the privilege for the calling package. On error, the promise is rejected with an error message.

setRuntimePrivilegeStates()

setRuntimePrivilegeStates(credential, states): Promise<void>

Parameters

credential
ICredential
states
IRuntimePrivilege[]

Returns

Promise<void>
Last modified on October 2, 2025