|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: 'ListingSubscription' |
| 16 | +description: A Bigquery Analytics Hub listing subscription |
| 17 | +references: |
| 18 | + guides: |
| 19 | + 'Official Documentation': 'https://cloud.google.com/bigquery/docs/analytics-hub-introduction' |
| 20 | + api: 'https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions' |
| 21 | +base_url: 'projects/{{project}}/locations/{{location}}/subscriptions' |
| 22 | +self_link: 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' |
| 23 | +create_url: 'projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}:subscribe' |
| 24 | +immutable: true |
| 25 | +import_format: |
| 26 | + - 'projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}' |
| 27 | +custom_code: |
| 28 | + post_create: templates/terraform/post_create/analytics_hub_subscription.go.tmpl |
| 29 | + post_import: templates/terraform/post_import/analytics_hub_subscription.go.tmpl |
| 30 | +examples: |
| 31 | + - name: 'bigquery_analyticshub_listing_subscription_basic' |
| 32 | + primary_resource_id: 'subscription' |
| 33 | + primary_resource_name: 'fmt.Sprintf(\"tf_test_my_data_exchange%s\", |
| 34 | + context[\"\ |
| 35 | + random_suffix\"]), fmt.Sprintf(\"tf_test_my_listing%s\", |
| 36 | + context[\"random_suffix\"\ |
| 37 | + ])' |
| 38 | + region_override: 'US' |
| 39 | + vars: |
| 40 | + data_exchange_id: 'my_data_exchange' |
| 41 | + listing_id: 'my_listing' |
| 42 | + destination_dataset_id: 'destination_dataset' |
| 43 | + description: 'example data exchange' |
| 44 | +parameters: |
| 45 | + - name: 'dataExchangeId' |
| 46 | + type: String |
| 47 | + description: |- |
| 48 | + The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. |
| 49 | + url_param_only: true |
| 50 | + required: true |
| 51 | + - name: 'listingId' |
| 52 | + type: String |
| 53 | + description: |- |
| 54 | + The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. |
| 55 | + url_param_only: true |
| 56 | + required: true |
| 57 | + - name: 'location' |
| 58 | + type: String |
| 59 | + description: | |
| 60 | + The name of the location for this subscription. |
| 61 | + url_param_only: true |
| 62 | + required: true |
| 63 | + custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' |
| 64 | + diff_suppress_func: 'tpgresource.CaseDiffSuppress' |
| 65 | +properties: |
| 66 | + - name: 'destinationDataset' |
| 67 | + type: NestedObject |
| 68 | + required: true |
| 69 | + ignore_read: true |
| 70 | + description: |
| 71 | + The destination dataset for this subscription. |
| 72 | + properties: |
| 73 | + - name: 'location' |
| 74 | + type: String |
| 75 | + description: | |
| 76 | + The geographic location where the dataset should reside. |
| 77 | + See https://cloud.google.com/bigquery/docs/locations for supported locations. |
| 78 | + required: true |
| 79 | + custom_flatten: 'templates/terraform/custom_flatten/bigquery_dataset_location.go.tmpl' |
| 80 | + diff_suppress_func: 'tpgresource.CaseDiffSuppress' |
| 81 | + - name: 'datasetReference' |
| 82 | + type: NestedObject |
| 83 | + required: true |
| 84 | + description: A reference that identifies the destination dataset. |
| 85 | + properties: |
| 86 | + - name: 'datasetId' |
| 87 | + type: String |
| 88 | + description: A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
| 89 | + required: true |
| 90 | + - name: 'projectId' |
| 91 | + type: String |
| 92 | + description: The ID of the project containing this dataset. |
| 93 | + required: true |
| 94 | + - name: 'friendlyName' |
| 95 | + type: String |
| 96 | + description: A descriptive name for the dataset. |
| 97 | + - name: 'description' |
| 98 | + type: String |
| 99 | + description: A user-friendly description of the dataset. |
| 100 | + - name: 'labels' |
| 101 | + type: KeyValuePairs |
| 102 | + description: | |
| 103 | + The labels associated with this dataset. You can use these to |
| 104 | + organize and group your datasets. |
| 105 | + - name: 'name' |
| 106 | + type: String |
| 107 | + description: |- |
| 108 | + The resource name of the subscription. e.g. "projects/myproject/locations/US/subscriptions/123" |
| 109 | + output: true |
| 110 | + - name: 'subscriptionId' |
| 111 | + type: String |
| 112 | + description: |- |
| 113 | + The subscription id used to reference the subscription. |
| 114 | + output: true |
| 115 | + ignore_read: true |
| 116 | + - name: 'creationTime' |
| 117 | + type: Time |
| 118 | + description: |- |
| 119 | + Timestamp when the subscription was created. |
| 120 | + output: true |
| 121 | + - name: 'lastModifyTime' |
| 122 | + type: Time |
| 123 | + description: |- |
| 124 | + Timestamp when the subscription was last modified. |
| 125 | + output: true |
| 126 | + - name: 'organizationId' |
| 127 | + type: String |
| 128 | + description: |- |
| 129 | + Organization of the project this subscription belongs to. |
| 130 | + output: true |
| 131 | + - name: 'organizationDisplayName' |
| 132 | + type: String |
| 133 | + description: |- |
| 134 | + Display name of the project of this subscription. |
| 135 | + output: true |
| 136 | + - name: 'state' |
| 137 | + type: String |
| 138 | + description: |- |
| 139 | + Current state of the subscription. |
| 140 | + output: true |
| 141 | + - name: 'subscriberContact' |
| 142 | + type: String |
| 143 | + description: |- |
| 144 | + Email of the subscriber. |
| 145 | + output: true |
| 146 | + - name: 'resourceType' |
| 147 | + type: String |
| 148 | + description: |- |
| 149 | + Listing shared asset type. |
| 150 | + output: true |
| 151 | + - name: 'linkedDatasetMap' |
| 152 | + output: true |
| 153 | + type: Map |
| 154 | + description: |- |
| 155 | + Output only. Map of listing resource names to associated linked resource, |
| 156 | + e.g. projects/123/locations/US/dataExchanges/456/listings/789 -> projects/123/datasets/my_dataset |
| 157 | + key_name: resource_name |
| 158 | + key_description: The associated linked resource |
| 159 | + value_type: |
| 160 | + name: linked_resource |
| 161 | + type: NestedObject |
| 162 | + properties: |
| 163 | + - name: listing |
| 164 | + type: string |
| 165 | + description: Output only. Listing for which linked resource is created. |
| 166 | + output: true |
| 167 | + - name: linkedDataset |
| 168 | + type: string |
| 169 | + description: Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linkedDataset |
| 170 | + output: true |
| 171 | + - name: linkedResources |
| 172 | + type: Array |
| 173 | + description: | |
| 174 | + Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. |
| 175 | + output: true |
| 176 | + item_type: |
| 177 | + type: NestedObject |
| 178 | + properties: |
| 179 | + - name: listing |
| 180 | + type: string |
| 181 | + description: Output only. Listing for which linked resource is created. |
| 182 | + output: true |
| 183 | + - name: linkedDataset |
| 184 | + type: string |
| 185 | + description: Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linkedDataset |
| 186 | + output: true |
0 commit comments