---
title: "POST /v2/{+parent}/links"
method: POST
path: "/v2/{+parent}/links"
tags: ["locations"]
---

# POST /v2/{+parent}/links

`POST /v2/{+parent}/links`

Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link.

## Path parameters

- `parent` string, required

## Query parameters

- `linkId` string

## Request body

- Link — Describes a link connected to an analytics enabled bucket.
  - `lifecycleState` 'LIFECYCLE_STATE_UNSPECIFIED' | 'ACTIVE' | 'DELETE_REQUESTED' | 'UPDATING' | 'CREATING' | 'FAILED' — Output only. The resource lifecycle state.
  - `bigqueryDataset` BigQueryDataset — Describes a BigQuery dataset that was created by a link.
    - `datasetId` string — Output only. The full resource name of the BigQuery dataset. The DATASET_ID will match the ID of the link, so the link must match the naming restrictions of BigQuery datasets (alphanumeric characters and underscores only).The dataset will have a resource path of "bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID"
  - `name` string — Output only. The resource name of the link. The name can have up to 100 characters. A valid link id (at the end of the link name) must only have alphanumeric characters and underscores within it. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" For example:`projects/my-project/locations/global/buckets/my-bucket/links/my_link
  - `description` string — Optional. Describes this link.The maximum length of the description is 8000 characters.
  - `createTime` string, google-datetime — Output only. The creation timestamp of the link.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/logging.md) · [All operations](https://skmtc.dev/google/apis/logging/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/logging/revisions/820c4b0f7358/schema)
