rule_sets
Creates, updates, deletes, gets or lists a rule_sets
resource.
Overview
Name | rule_sets |
Type | Resource |
Id | google.contentwarehouse.rule_sets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the rule set. Managed internally. Format: projects/{project_number}/locations/{location}/ruleSet/{rule_set_id}. The name is ignored when creating a rule set. |
description | string | Short description of the rule-set. |
rules | array | List of rules given by the customer. |
source | string | Source of the rules i.e., customer name. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, ruleSetsId | Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist. |
list | SELECT | locationsId, projectsId | Lists rulesets. |
create | INSERT | locationsId, projectsId | Creates a ruleset. |
delete | DELETE | locationsId, projectsId, ruleSetsId | Deletes a ruleset. Returns NOT_FOUND if the document does not exist. |
patch | UPDATE | locationsId, projectsId, ruleSetsId | Updates a ruleset. Returns INVALID_ARGUMENT if the name of the ruleset is non-empty and does not equal the existing name. |
SELECT
examples
Lists rulesets.
SELECT
name,
description,
rules,
source
FROM google.contentwarehouse.rule_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new rule_sets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.contentwarehouse.rule_sets (
locationsId,
projectsId,
source,
description,
name,
rules
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ source }}',
'{{ description }}',
'{{ name }}',
'{{ rules }}'
;
- name: your_resource_model_name
props:
- name: source
value: string
- name: description
value: string
- name: name
value: string
- name: rules
value:
- - name: description
value: string
- name: ruleId
value: string
- name: triggerType
value: string
- name: condition
value: string
- name: actions
value:
- - name: actionId
value: string
- name: publishToPubSub
value:
- name: messages
value:
- string
- name: topicId
value: string
- name: accessControl
value:
- name: policy
value:
- name: etag
value: string
- name: bindings
value:
- - name: members
value:
- string
- name: role
value: string
- name: condition
value:
- name: location
value: string
- name: expression
value: string
- name: title
value: string
- name: description
value: string
- name: auditConfigs
value:
- - name: service
value: string
- name: auditLogConfigs
value:
- - name: exemptedMembers
value:
- string
- name: logType
value: string
- name: version
value: integer
- name: operationType
value: string
- name: deleteDocumentAction
value:
- name: enableHardDelete
value: boolean
- name: removeFromFolderAction
value:
- name: condition
value: string
- name: folder
value: string
- name: dataValidation
value:
- name: conditions
value: object
- name: dataUpdate
value:
- name: entries
value: object
- name: addToFolder
value:
- name: folders
value:
- string
UPDATE
example
Updates a rule_sets
resource.
/*+ update */
UPDATE google.contentwarehouse.rule_sets
SET
ruleSet = '{{ ruleSet }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND ruleSetsId = '{{ ruleSetsId }}';
DELETE
example
Deletes the specified rule_sets
resource.
/*+ delete */
DELETE FROM google.contentwarehouse.rule_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND ruleSetsId = '{{ ruleSetsId }}';