projects

POST /v1/projects/{projectsId}/locations/{locationsId}/semanticGovernancePolicies

Creates a SemanticGovernancePolicy.

Request

  • Base URL
    https://aiplatform.googleapis.com
  • 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

Path parameters

projectsIdstring required
locationsIdstring required

Query parameters

semanticGovernancePolicyIdstring

Required. The ID to use for the SemanticGovernancePolicy, which will become the final component of the SemanticGovernancePolicy's resource name. This value may be up to 63 characters, and valid characters are [a-z0-9-]. The first character cannot be a number or hyphen. The last character must be a letter or a number.

Request body

agentstring

Required. The name of the agent in Agent Registry that is affected by this policy. Format: projects/{project}/locations/{location}/agents/{agent}

agentIdentitystring

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

createTimestring google-datetime

Output only. Timestamp when this SemanticGovernancePolicy was created.

descriptionstring

Optional. The description of the SemanticGovernancePolicy.

displayNamestring

Optional. The user-defined name of the SemanticGovernancePolicy.

dryRunboolean

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.

etagstring

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.

namestring

Identifier. Resource name of the SemanticGovernancePolicy.

naturalLanguageConstraintstring

Required. The natural language constraint of the SemanticGovernancePolicy.

updateTimestring google-datetime

Output only. Timestamp when this SemanticGovernancePolicy was last updated.

Response

Successful response

doneboolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadataobject

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

namestring

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

responseobject

The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

Changes

No recorded changes to this operation across all 8 revisions of this API.