subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | google.analyticshub.subscriptions |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_subscriptions_get
- projects_locations_subscriptions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the subscription. e.g. projects/myproject/locations/us/subscriptions/123 . |
commercialInfo | object | Output only. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. (id: GoogleCloudBigqueryAnalyticshubV1SubscriptionCommercialInfo) |
creationTime | string (google-datetime) | Output only. Timestamp when the subscription was created. |
dataExchange | string | Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456 |
destinationDataset | object | Optional. BigQuery destination dataset to create for the subscriber. (id: DestinationDataset) |
lastModifyTime | string (google-datetime) | Output only. Timestamp when the subscription was last modified. |
linkedDatasetMap | object | Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/us/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE. |
linkedResources | array | Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. |
listing | string | Output only. Resource name of the source Listing. e.g. projects/123/locations/us/dataExchanges/456/listings/789 |
logLinkedDatasetQueryUserEmail | boolean | Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing. |
organizationDisplayName | string | Output only. Display name of the project of this subscription. |
organizationId | string | Output only. Organization of the project this subscription belongs to. |
resourceType | string | Output only. Listing shared asset type. |
state | string | Output only. Current state of the subscription. |
subscriberContact | string | Output only. Email of the subscriber. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the subscription. e.g. projects/myproject/locations/us/subscriptions/123 . |
commercialInfo | object | Output only. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. (id: GoogleCloudBigqueryAnalyticshubV1SubscriptionCommercialInfo) |
creationTime | string (google-datetime) | Output only. Timestamp when the subscription was created. |
dataExchange | string | Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456 |
destinationDataset | object | Optional. BigQuery destination dataset to create for the subscriber. (id: DestinationDataset) |
lastModifyTime | string (google-datetime) | Output only. Timestamp when the subscription was last modified. |
linkedDatasetMap | object | Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/us/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE. |
linkedResources | array | Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. |
listing | string | Output only. Resource name of the source Listing. e.g. projects/123/locations/us/dataExchanges/456/listings/789 |
logLinkedDatasetQueryUserEmail | boolean | Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing. |
organizationDisplayName | string | Output only. Display name of the project of this subscription. |
organizationId | string | Output only. Organization of the project this subscription belongs to. |
resourceType | string | Output only. Listing shared asset type. |
state | string | Output only. Current state of the subscription. |
subscriberContact | string | Output only. Email of the subscriber. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_subscriptions_get | select | projectsId , locationsId , subscriptionsId | Gets the details of a Subscription. | |
projects_locations_subscriptions_list | select | projectsId , locationsId | filter , pageSize , pageToken | Lists all subscriptions in a given project and location. |
projects_locations_subscriptions_delete | delete | projectsId , locationsId , subscriptionsId | Deletes a subscription. | |
projects_locations_subscriptions_refresh | exec | projectsId , locationsId , subscriptionsId | Refreshes a Subscription to a Data Exchange. A Data Exchange can become stale when a publisher adds or removes data. This is a long-running operation as it may create many linked datasets. | |
projects_locations_subscriptions_revoke | exec | projectsId , locationsId , subscriptionsId | Revokes a given subscription. |
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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
subscriptionsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_locations_subscriptions_get
- projects_locations_subscriptions_list
Gets the details of a Subscription.
SELECT
name,
commercialInfo,
creationTime,
dataExchange,
destinationDataset,
lastModifyTime,
linkedDatasetMap,
linkedResources,
listing,
logLinkedDatasetQueryUserEmail,
organizationDisplayName,
organizationId,
resourceType,
state,
subscriberContact
FROM google.analyticshub.subscriptions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND subscriptionsId = '{{ subscriptionsId }}' -- required;
Lists all subscriptions in a given project and location.
SELECT
name,
commercialInfo,
creationTime,
dataExchange,
destinationDataset,
lastModifyTime,
linkedDatasetMap,
linkedResources,
listing,
logLinkedDatasetQueryUserEmail,
organizationDisplayName,
organizationId,
resourceType,
state,
subscriberContact
FROM google.analyticshub.subscriptions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
DELETE
examples
- projects_locations_subscriptions_delete
Deletes a subscription.
DELETE FROM google.analyticshub.subscriptions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND subscriptionsId = '{{ subscriptionsId }}' --required;
Lifecycle Methods
- projects_locations_subscriptions_refresh
- projects_locations_subscriptions_revoke
Refreshes a Subscription to a Data Exchange. A Data Exchange can become stale when a publisher adds or removes data. This is a long-running operation as it may create many linked datasets.
EXEC google.analyticshub.subscriptions.projects_locations_subscriptions_refresh
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@subscriptionsId='{{ subscriptionsId }}' --required;
Revokes a given subscription.
EXEC google.analyticshub.subscriptions.projects_locations_subscriptions_revoke
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@subscriptionsId='{{ subscriptionsId }}' --required
@@json=
'{
"revokeCommercial": {{ revokeCommercial }}
}';