---
title: "POST /v1/{+service}:alterLocation"
method: POST
path: "/v1/{+service}:alterLocation"
tags: ["projects"]
---

# POST /v1/{+service}:alterLocation

`POST /v1/{+service}:alterLocation`

Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.

## Path parameters

- `service` string, required

## Request body

- AlterMetadataResourceLocationRequest — Request message for DataprocMetastore.AlterMetadataResourceLocation.
  - `resourceName` string — Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}
  - `locationUri` string — Required. The new location URI for the metadata resource.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/metastore.md) · [All operations](https://skmtc.net/google/apis/metastore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/metastore/versions/303a0939d73e/schema)
