---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies

`GET /v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies`

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Lists SemanticGovernancePolicies in a given location.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- GoogleCloudAiplatformV1ListSemanticGovernancePoliciesResponse: Response message for SemanticGovernancePolicyService.ListSemanticGovernancePolicies.
  - `nextPageToken` string: A token to retrieve the next page of results. Pass to ListSemanticGovernancePoliciesRequest.page_token to obtain that page.
  - `semanticGovernancePolicies` GoogleCloudAiplatformV1SemanticGovernancePolicy[]: The list of SemanticGovernancePolicies.
    - `agent` string: Required. The name of the agent in Agent Registry that is affected by this policy. Format: `projects/{project}/locations/{location}/agents/{agent}`
    - `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`
    - `agentResponseCustomization` GoogleCloudAiplatformV1AgentResponseCustomization: Customizes the agent's response to the end user when a `SemanticGovernancePolicy` is evaluated (for example, with a custom message shown on denial).
      - `denialMessage` string: Optional. Custom message shown to the end user when the policy check results in a denial. Use this to explain the rationale to the user. Max 1000 characters.
    - `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.
    - `dryRun` boolean: Optional. If true, this policy is evaluated and its result is reported, but the policy is not enforced: a violation does not block the agent's action. Use this to validate a policy against real traffic before turning enforcement on. Defaults to `false`, meaning the policy is enforced. This setting applies only to this policy. If the SemanticGovernancePolicyEngine for the project is itself in dry run, every policy behaves as dry run regardless of this field.
    - `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` GoogleCloudAiplatformV1SemanticGovernancePolicyMcpTool[]: Optional. The McpTools that are affected by this policy.
      - `mcpServer` string: Required. The resource name of the McpServer in Agent Registry that is affected by this policy. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
      - `tools` string[]: Required. The resource names of the tools used by the Agent that is affected by this policy. Currently, exactly one tool must be specified.
    - `name` string: Identifier. Resource name of the SemanticGovernancePolicy.
    - `naturalLanguageConstraint` string: Required. The natural language constraint of the SemanticGovernancePolicy.
    - `updateTime` string, google-datetime: Output only. Timestamp when this SemanticGovernancePolicy was last updated.

---

[API](https://skmtc.dev/google/apis/aiplatform.md) - [All operations](https://skmtc.dev/google/apis/aiplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/aiplatform/revisions/3aca3b348f0c?raw)
