semantic_governance_policies
Creates, updates, deletes, gets or lists a semantic_governance_policies resource.
Overview
| Name | semantic_governance_policies |
| Type | Resource |
| Id | google.aiplatform.semantic_governance_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the SemanticGovernancePolicy. |
agent | string | Required. The name of the agent in Agent Registry that is affected by this policy. |
agentIdentity | string | Output only. Represents the principal of the agent, used by the Policy Decision Point (PDP) for governance checks. For more information, see https://docs.cloud.google.com/agent-builder/agent-engine/agent-identity Format: principal://TRUST_DOMAIN/NAMESPACE/AGENT_NAME Example: principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/aiplatform/projects/PROJECT_NUMBER/locations/LOCATION/reasoningEngines/AGENT_ENGINE_ID |
createTime | string (google-datetime) | Output only. Timestamp when this SemanticGovernancePolicy was created. |
description | string | Optional. The description of the SemanticGovernancePolicy. |
displayName | string | Optional. The user-defined name of the SemanticGovernancePolicy. |
etag | string | Optional. Used to perform consistent read-modify-write transactions. If provided, the request will only succeed if the etag matches the current value. Otherwise, an ABORTED error will be returned. |
mcpTools | array | Optional. The McpTools that are affected by this policy. |
naturalLanguageConstraint | string | Required. The natural language constraint of the SemanticGovernancePolicy. |
updateTime | string (google-datetime) | Output only. Timestamp when this SemanticGovernancePolicy was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the SemanticGovernancePolicy. |
agent | string | Required. The name of the agent in Agent Registry that is affected by this policy. |
agentIdentity | string | Output only. Represents the principal of the agent, used by the Policy Decision Point (PDP) for governance checks. For more information, see https://docs.cloud.google.com/agent-builder/agent-engine/agent-identity Format: principal://TRUST_DOMAIN/NAMESPACE/AGENT_NAME Example: principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/aiplatform/projects/PROJECT_NUMBER/locations/LOCATION/reasoningEngines/AGENT_ENGINE_ID |
createTime | string (google-datetime) | Output only. Timestamp when this SemanticGovernancePolicy was created. |
description | string | Optional. The description of the SemanticGovernancePolicy. |
displayName | string | Optional. The user-defined name of the SemanticGovernancePolicy. |
etag | string | Optional. Used to perform consistent read-modify-write transactions. If provided, the request will only succeed if the etag matches the current value. Otherwise, an ABORTED error will be returned. |
mcpTools | array | Optional. The McpTools that are affected by this policy. |
naturalLanguageConstraint | string | Required. The natural language constraint of the SemanticGovernancePolicy. |
updateTime | string (google-datetime) | Output only. Timestamp when this SemanticGovernancePolicy was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, semanticGovernancePoliciesId | Gets a SemanticGovernancePolicy. | |
list | select | projectsId, locationsId | pageSize, pageToken | Lists SemanticGovernancePolicies in a given location. |
create | insert | projectsId, locationsId | semanticGovernancePolicyId | Creates a SemanticGovernancePolicy. |
patch | update | projectsId, locationsId, semanticGovernancePoliciesId | updateMask | Updates a SemanticGovernancePolicy. |
delete | delete | projectsId, locationsId, semanticGovernancePoliciesId | etag | Deletes a SemanticGovernancePolicy. |
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 |
|---|---|---|
locationsId | string | |
projectsId | string | |
semanticGovernancePoliciesId | string | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
semanticGovernancePolicyId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets a SemanticGovernancePolicy.
SELECT
name,
agent,
agentIdentity,
createTime,
description,
displayName,
etag,
mcpTools,
naturalLanguageConstraint,
updateTime
FROM google.aiplatform.semantic_governance_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND semanticGovernancePoliciesId = '{{ semanticGovernancePoliciesId }}' -- required
;
Lists SemanticGovernancePolicies in a given location.
SELECT
name,
agent,
agentIdentity,
createTime,
description,
displayName,
etag,
mcpTools,
naturalLanguageConstraint,
updateTime
FROM google.aiplatform.semantic_governance_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a SemanticGovernancePolicy.
INSERT INTO google.aiplatform.semantic_governance_policies (
data__mcpTools,
data__description,
data__name,
data__etag,
data__displayName,
data__agent,
data__naturalLanguageConstraint,
projectsId,
locationsId,
semanticGovernancePolicyId
)
SELECT
'{{ mcpTools }}',
'{{ description }}',
'{{ name }}',
'{{ etag }}',
'{{ displayName }}',
'{{ agent }}',
'{{ naturalLanguageConstraint }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ semanticGovernancePolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: semantic_governance_policies
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the semantic_governance_policies resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the semantic_governance_policies resource.
- name: mcpTools
description: |
Optional. The McpTools that are affected by this policy.
value:
- mcpServer: "{{ mcpServer }}"
tools: "{{ tools }}"
- name: description
value: "{{ description }}"
description: |
Optional. The description of the SemanticGovernancePolicy.
- name: name
value: "{{ name }}"
description: |
Identifier. Resource name of the SemanticGovernancePolicy.
- name: etag
value: "{{ etag }}"
description: |
Optional. Used to perform consistent read-modify-write transactions. If provided, the request will only succeed if the etag matches the current value. Otherwise, an ABORTED error will be returned.
- name: displayName
value: "{{ displayName }}"
description: |
Optional. The user-defined name of the SemanticGovernancePolicy.
- name: agent
value: "{{ agent }}"
description: |
Required. The name of the agent in Agent Registry that is affected by this policy.
- name: naturalLanguageConstraint
value: "{{ naturalLanguageConstraint }}"
description: |
Required. The natural language constraint of the SemanticGovernancePolicy.
- name: semanticGovernancePolicyId
value: "{{ semanticGovernancePolicyId }}"
UPDATE examples
- patch
Updates a SemanticGovernancePolicy.
UPDATE google.aiplatform.semantic_governance_policies
SET
data__mcpTools = '{{ mcpTools }}',
data__description = '{{ description }}',
data__name = '{{ name }}',
data__etag = '{{ etag }}',
data__displayName = '{{ displayName }}',
data__agent = '{{ agent }}',
data__naturalLanguageConstraint = '{{ naturalLanguageConstraint }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND semanticGovernancePoliciesId = '{{ semanticGovernancePoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a SemanticGovernancePolicy.
DELETE FROM google.aiplatform.semantic_governance_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND semanticGovernancePoliciesId = '{{ semanticGovernancePoliciesId }}' --required
AND etag = '{{ etag }}'
;