Skip to main content

device_check_config

Creates, updates, deletes, gets or lists a device_check_config resource.

Overview

Namedevice_check_config
TypeResource
Idfirebase.appcheck.device_check_config

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. The relative resource name of the DeviceCheck configuration object, in the format: projects/{project_number}/apps/{app_id}/deviceCheckConfig
keyIdstringRequired. The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account.
privateKeystringRequired. 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.
privateKeySetbooleanOutput 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.
tokenTtlstring (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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, appsIdGets the DeviceCheckConfig for the specified app. For security reasons, the private_key field is never populated in the response.
batch_getselectprojectsIdnamesAtomically gets the DeviceCheckConfigs for the specified list of apps. For security reasons, the private_key field is never populated in the response.
patchupdateprojectsId, appsIdupdateMaskUpdates 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.

NameDatatypeDescription
appsIdstring
projectsIdstring
namesstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

UPDATE examples

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;