Skip to main content

semantic_governance_policies

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

Overview

Namesemantic_governance_policies
TypeResource
Idgoogle.aiplatform.semantic_governance_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name of the SemanticGovernancePolicy.
agentstringRequired. The name of the agent in Agent Registry that is affected by this policy.
agentIdentitystringOutput 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
createTimestring (google-datetime)Output only. Timestamp when this SemanticGovernancePolicy was created.
descriptionstringOptional. The description of the SemanticGovernancePolicy.
displayNamestringOptional. The user-defined name of the SemanticGovernancePolicy.
etagstringOptional. 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.
mcpToolsarrayOptional. The McpTools that are affected by this policy.
naturalLanguageConstraintstringRequired. The natural language constraint of the SemanticGovernancePolicy.
updateTimestring (google-datetime)Output only. Timestamp when this SemanticGovernancePolicy was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, semanticGovernancePoliciesIdGets a SemanticGovernancePolicy.
listselectprojectsId, locationsIdpageSize, pageTokenLists SemanticGovernancePolicies in a given location.
createinsertprojectsId, locationsIdsemanticGovernancePolicyIdCreates a SemanticGovernancePolicy.
patchupdateprojectsId, locationsId, semanticGovernancePoliciesIdupdateMaskUpdates a SemanticGovernancePolicy.
deletedeleteprojectsId, locationsId, semanticGovernancePoliciesIdetagDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
semanticGovernancePoliciesIdstring
etagstring
pageSizeinteger (int32)
pageTokenstring
semanticGovernancePolicyIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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 }}'
;