Skip to main content

locations

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

Overview​

Namelocations
TypeResource
Idgoogle.aiplatform.locations

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringResource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"
displayNamestringThe friendly name for this location, typically a nearby city name. For example, "Tokyo".
labelsobjectCross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}
locationIdstringThe canonical id for this location. For example: "us-east1".
metadataobjectService-specific metadata. For example the available capacity at the given location.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsIdGets information about a location.
listselectprojectsIdextraLocationTypes, filter, pageSize, pageTokenLists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
ask_contextsexecprojectsId, locationsIdAgentic Retrieval Ask API for RAG.
async_retrieve_contextsexecprojectsId, locationsIdAsynchronous API to retrieves relevant contexts for a query.
augment_promptexecprojectsId, locationsIdGiven an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.
corroborate_contentexecprojectsId, locationsIdGiven an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.
deployexecprojectsId, locationsIdDeploys a model to a new endpoint.
evaluate_datasetexecprojectsId, locationsIdEvaluates a dataset based on a set of given metrics.
evaluate_instancesexecprojectsId, locationsIdEvaluates instances based on a given metric.
generate_instance_rubricsexecprojectsId, locationsIdGenerates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations.
generate_loss_clustersexecprojectsId, locationsIdGenerates loss clusters from evaluation results. This is a statelss API method that would not modify the EvaluationSet resource.
generate_synthetic_dataexecprojectsId, locationsIdGenerates synthetic (artificial) data based on a description
generate_user_scenariosexecprojectsId, locationsIdGenerates user scenarios for agent evaluation.

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
extraLocationTypesstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Gets information about a location.

SELECT
name,
displayName,
labels,
locationId,
metadata
FROM google.aiplatform.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
;

Lifecycle Methods​

Agentic Retrieval Ask API for RAG.

EXEC google.aiplatform.locations.ask_contexts
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"query": "{{ query }}",
"tools": "{{ tools }}"
}'
;