sha
Creates, updates, deletes, gets or lists a sha
resource.
Overview
Name | sha |
Type | Resource |
Id | firebase.firebase.sha |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
certificates | array | The list of each ShaCertificate associated with the AndroidApp . |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | projectsId , androidAppsId | Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp. | |
create | insert | projectsId , androidAppsId | Adds a ShaCertificate to the specified AndroidApp. | |
delete | delete | projectsId , androidAppsId , shaId | Removes a ShaCertificate from the specified AndroidApp. |
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 |
---|---|---|
androidAppsId | string | |
projectsId | string | |
shaId | string |
SELECT
examples
- list
Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp.
SELECT
certificates
FROM firebase.firebase.sha
WHERE projectsId = '{{ projectsId }}' -- required
AND androidAppsId = '{{ androidAppsId }}' -- required;
INSERT
examples
- create
- Manifest
Adds a ShaCertificate to the specified AndroidApp.
INSERT INTO firebase.firebase.sha (
data__name,
data__shaHash,
data__certType,
projectsId,
androidAppsId
)
SELECT
'{{ name }}',
'{{ shaHash }}',
'{{ certType }}',
'{{ projectsId }}',
'{{ androidAppsId }}'
RETURNING
name,
certType,
shaHash
;
# Description fields are for documentation purposes
- name: sha
props:
- name: projectsId
value: string
description: Required parameter for the sha resource.
- name: androidAppsId
value: string
description: Required parameter for the sha resource.
- name: name
value: string
description: >
The resource name of the ShaCertificate for the AndroidApp, in the format: projects/PROJECT_IDENTIFIER/androidApps/APP_ID/sha/SHA_HASH * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.androidApps#AndroidApp.FIELDS.app_id)). * SHA_HASH: the certificate hash for the App (see [`shaHash`](../projects.androidApps.sha#ShaCertificate.FIELDS.sha_hash)).
- name: shaHash
value: string
description: >
The certificate hash for the `AndroidApp`.
- name: certType
value: string
description: >
The type of SHA certificate encoded in the hash.
valid_values: ['SHA_CERTIFICATE_TYPE_UNSPECIFIED', 'SHA_1', 'SHA_256']
DELETE
examples
- delete
Removes a ShaCertificate from the specified AndroidApp.
DELETE FROM firebase.firebase.sha
WHERE projectsId = '{{ projectsId }}' --required
AND androidAppsId = '{{ androidAppsId }}' --required
AND shaId = '{{ shaId }}' --required;