resource_policies
Creates, updates, deletes, gets or lists a resource_policies
resource.
Overview
Name | resource_policies |
Type | Resource |
Id | firebase.appcheck.resource_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Identifier. The relative name of the resource policy object, in the format: projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} Note that the service_id element must be a supported service ID. Currently, the following service IDs are supported: * oauth2.googleapis.com (Google Identity for iOS) resource_policy_id is a system-generated UID. |
enforcementMode | string | Required. The App Check enforcement mode for this resource. This will override the EnforcementMode setting on the service. |
etag | string | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
targetResource | string | Required. Service specific name of the resource object to which this policy applies, in the format: * iOS OAuth clients (Google Identity for iOS): //oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id} Note that the resource must belong to the service specified in the name and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |
updateTime | string (google-datetime) | Output only. Timestamp when this resource policy configuration object was most recently updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Identifier. The relative name of the resource policy object, in the format: projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} Note that the service_id element must be a supported service ID. Currently, the following service IDs are supported: * oauth2.googleapis.com (Google Identity for iOS) resource_policy_id is a system-generated UID. |
enforcementMode | string | Required. The App Check enforcement mode for this resource. This will override the EnforcementMode setting on the service. |
etag | string | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
targetResource | string | Required. Service specific name of the resource object to which this policy applies, in the format: * iOS OAuth clients (Google Identity for iOS): //oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id} Note that the resource must belong to the service specified in the name and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |
updateTime | string (google-datetime) | Output only. Timestamp when this resource policy configuration object was most recently updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , servicesId , resourcePoliciesId | Gets the requested ResourcePolicy configuration. | |
list | select | projectsId , servicesId | pageSize , pageToken , filter | Lists all ResourcePolicy configurations for the specified project and service. |
create | insert | projectsId , servicesId | Creates the specified ResourcePolicy configuration. | |
patch | update | projectsId , servicesId , resourcePoliciesId | updateMask | Updates the specified ResourcePolicy configuration. |
batch_update | update | projectsId , servicesId | Atomically updates the specified ResourcePolicy configurations. | |
delete | delete | projectsId , servicesId , resourcePoliciesId | etag | Deletes the specified ResourcePolicy configuration. |
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 |
---|---|---|
projectsId | string | |
resourcePoliciesId | string | |
servicesId | string | |
etag | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the requested ResourcePolicy configuration.
SELECT
name,
enforcementMode,
etag,
targetResource,
updateTime
FROM firebase.appcheck.resource_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND resourcePoliciesId = '{{ resourcePoliciesId }}' -- required;
Lists all ResourcePolicy configurations for the specified project and service.
SELECT
name,
enforcementMode,
etag,
targetResource,
updateTime
FROM firebase.appcheck.resource_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Creates the specified ResourcePolicy configuration.
INSERT INTO firebase.appcheck.resource_policies (
data__name,
data__targetResource,
data__enforcementMode,
data__etag,
projectsId,
servicesId
)
SELECT
'{{ name }}',
'{{ targetResource }}',
'{{ enforcementMode }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ servicesId }}'
RETURNING
name,
enforcementMode,
etag,
targetResource,
updateTime
;
# Description fields are for documentation purposes
- name: resource_policies
props:
- name: projectsId
value: string
description: Required parameter for the resource_policies resource.
- name: servicesId
value: string
description: Required parameter for the resource_policies resource.
- name: name
value: string
description: >
Required. Identifier. The relative name of the resource policy object, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID.
- name: targetResource
value: string
description: >
Required. Service specific name of the resource object to which this policy applies, in the format: * **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created.
- name: enforcementMode
value: string
description: >
Required. The App Check enforcement mode for this resource. This will override the EnforcementMode setting on the service.
valid_values: ['OFF', 'UNENFORCED', 'ENFORCED']
- name: etag
value: string
description: >
This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232.
UPDATE
examples
- patch
- batch_update
Updates the specified ResourcePolicy configuration.
UPDATE firebase.appcheck.resource_policies
SET
data__name = '{{ name }}',
data__targetResource = '{{ targetResource }}',
data__enforcementMode = '{{ enforcementMode }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND servicesId = '{{ servicesId }}' --required
AND resourcePoliciesId = '{{ resourcePoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
enforcementMode,
etag,
targetResource,
updateTime;
Atomically updates the specified ResourcePolicy configurations.
UPDATE firebase.appcheck.resource_policies
SET
data__updateMask = '{{ updateMask }}',
data__requests = '{{ requests }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND servicesId = '{{ servicesId }}' --required
RETURNING
resourcePolicies;
DELETE
examples
- delete
Deletes the specified ResourcePolicy configuration.
DELETE FROM firebase.appcheck.resource_policies
WHERE projectsId = '{{ projectsId }}' --required
AND servicesId = '{{ servicesId }}' --required
AND resourcePoliciesId = '{{ resourcePoliciesId }}' --required
AND etag = '{{ etag }}';