Skip to main content

links

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

Overview

Namelinks
TypeResource
Idgoogle.logging.links

Fields

NameDatatypeDescription
namestringOutput 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
descriptionstringOptional. Describes this link.The maximum length of the description is 8000 characters.
bigqueryDatasetobjectDescribes a BigQuery dataset that was created by a link.
createTimestringOutput only. The creation timestamp of the link.
lifecycleStatestringOutput only. The resource lifecycle state.

Methods

NameAccessible byRequired ParamsDescription
billing_accounts_locations_buckets_links_getSELECTbillingAccountsId, bucketsId, linksId, locationsIdGets a link.
billing_accounts_locations_buckets_links_listSELECTbillingAccountsId, bucketsId, locationsIdLists links.
folders_locations_buckets_links_getSELECTbucketsId, foldersId, linksId, locationsIdGets a link.
folders_locations_buckets_links_listSELECTbucketsId, foldersId, locationsIdLists links.
locations_buckets_links_listSELECTparent, parentTypeLists links.
organizations_locations_buckets_links_getSELECTbucketsId, linksId, locationsId, organizationsIdGets a link.
organizations_locations_buckets_links_listSELECTbucketsId, locationsId, organizationsIdLists links.
projects_locations_buckets_links_getSELECTbucketsId, linksId, locationsId, projectsIdGets a link.
projects_locations_buckets_links_listSELECTbucketsId, locationsId, projectsIdLists links.
billing_accounts_locations_buckets_links_createINSERTbillingAccountsId, bucketsId, locationsIdAsynchronously 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.
folders_locations_buckets_links_createINSERTbucketsId, foldersId, locationsIdAsynchronously 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.
locations_buckets_links_createINSERTparent, parentTypeAsynchronously 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.
organizations_locations_buckets_links_createINSERTbucketsId, locationsId, organizationsIdAsynchronously 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.
projects_locations_buckets_links_createINSERTbucketsId, locationsId, projectsIdAsynchronously 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.
billing_accounts_locations_buckets_links_deleteDELETEbillingAccountsId, bucketsId, linksId, locationsIdDeletes a link. This will also delete the corresponding BigQuery linked dataset.
folders_locations_buckets_links_deleteDELETEbucketsId, foldersId, linksId, locationsIdDeletes a link. This will also delete the corresponding BigQuery linked dataset.
organizations_locations_buckets_links_deleteDELETEbucketsId, linksId, locationsId, organizationsIdDeletes a link. This will also delete the corresponding BigQuery linked dataset.
projects_locations_buckets_links_deleteDELETEbucketsId, linksId, locationsId, projectsIdDeletes a link. This will also delete the corresponding BigQuery linked dataset.

SELECT examples

Lists links.

SELECT
name,
description,
bigqueryDataset,
createTime,
lifecycleState
FROM google.logging.links
WHERE parent = '{{ parent }}'
AND parentType = '{{ parentType }}';

INSERT example

Use the following StackQL query and manifest file to create a new links resource.

/*+ create */
INSERT INTO google.logging.links (
parent,
parentType,
description,
bigqueryDataset
)
SELECT
'{{ parent }}',
'{{ parentType }}',
'{{ description }}',
'{{ bigqueryDataset }}'
;

DELETE example

Deletes the specified links resource.

/*+ delete */
DELETE FROM google.logging.links
WHERE bucketsId = '{{ bucketsId }}'
AND foldersId = '{{ foldersId }}'
AND linksId = '{{ linksId }}'
AND locationsId = '{{ locationsId }}';