device_check_config
Creates, updates, deletes, gets or lists a device_check_config
resource.
Overview
Name | device_check_config |
Type | Resource |
Id | firebase.appcheck.device_check_config |
Fields
The following fields are returned by SELECT
queries:
- get
- batch_get
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The relative resource name of the DeviceCheck configuration object, in the format: projects/{project_number}/apps/{app_id}/deviceCheckConfig |
keyId | string | Required. The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. |
privateKey | string | Required. Input only. The contents of the private key (.p8 ) file associated with the key specified by key_id . For security reasons, this field will never be populated in any response. |
privateKeySet | boolean | Output only. Whether the private_key field was previously set. Since we will never return the private_key field, this field is the only way to find out whether it was previously set. |
tokenTtl | string (google-duration) | Specifies the duration for which App Check tokens exchanged from DeviceCheck tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
Successful response
Name | Datatype | Description |
---|---|---|
configs | array | DeviceCheckConfigs retrieved. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , appsId | Gets the DeviceCheckConfig for the specified app. For security reasons, the private_key field is never populated in the response. | |
batch_get | select | projectsId | names | Atomically gets the DeviceCheckConfigs for the specified list of apps. For security reasons, the private_key field is never populated in the response. |
patch | update | projectsId , appsId | updateMask | Updates the DeviceCheckConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange DeviceCheck tokens for App Check tokens. For security reasons, the private_key field is never populated in the response. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
appsId | string | |
projectsId | string | |
names | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- batch_get
Gets the DeviceCheckConfig for the specified app. For security reasons, the private_key
field is never populated in the response.
SELECT
name,
keyId,
privateKey,
privateKeySet,
tokenTtl
FROM firebase.appcheck.device_check_config
WHERE projectsId = '{{ projectsId }}' -- required
AND appsId = '{{ appsId }}' -- required;
Atomically gets the DeviceCheckConfigs for the specified list of apps. For security reasons, the private_key
field is never populated in the response.
SELECT
configs
FROM firebase.appcheck.device_check_config
WHERE projectsId = '{{ projectsId }}' -- required
AND names = '{{ names }}';
UPDATE
examples
- patch
Updates the DeviceCheckConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange DeviceCheck tokens for App Check tokens. For security reasons, the private_key
field is never populated in the response.
UPDATE firebase.appcheck.device_check_config
SET
data__name = '{{ name }}',
data__tokenTtl = '{{ tokenTtl }}',
data__keyId = '{{ keyId }}',
data__privateKey = '{{ privateKey }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND appsId = '{{ appsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
keyId,
privateKey,
privateKeySet,
tokenTtl;