Skip to content

Commit

Permalink
new service - analytics hub - data exchange resource (GoogleCloudPlat…
Browse files Browse the repository at this point in the history
…form#6421)

Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
  • Loading branch information
2 people authored and renescheepers committed Sep 7, 2022
1 parent 98a94f1 commit 5dbd30a
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
94 changes: 94 additions & 0 deletions mmv1/products/bigqueryanalyticshub/api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 2022 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
!ruby/object:Api::Product
name: BigqueryAnalyticsHub
display_name: Bigquery Analytics Hub
scopes:
- https://www.googleapis.com/auth/cloud-platform
versions:
- !ruby/object:Api::Product::Version
name: beta
base_url: https://analyticshub.googleapis.com/v1beta1/
apis_required:
- !ruby/object:Api::Product::ApiReference
name: Bigquery Analytics Hub API
url: https://console.cloud.google.com/apis/library/analyticshub.googleapis.com/
objects:
- !ruby/object:Api::Resource
name: "DataExchange"
min_version: beta
base_url: projects/{{project}}/locations/{{location}}/dataExchanges
create_url: projects/{{project}}/locations/{{location}}/dataExchanges?data_exchange_id={{data_exchange_id}}
self_link: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}
update_verb: :PATCH
update_mask: true
description: A Bigquery Analytics Hub data exchange
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
"Official Documentation": "https://cloud.google.com/bigquery/docs/analytics-hub-introduction"
api: "https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1beta1/projects.locations.dataExchanges"
iam_policy: !ruby/object:Api::Resource::IamPolicy
exclude: false
method_name_separator: ':'
fetch_iam_policy_verb: :POST
parent_resource_attribute: 'data_exchange_id'
import_format: ["projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}", "{{data_exchange_id}}"]
properties:
- !ruby/object:Api::Type::String
name: name
description: |-
The resource name of the data exchange, for example:
"projects/myproject/locations/US/dataExchanges/123"
output: true
- !ruby/object:Api::Type::String
name: data_exchange_id
description: |-
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.
required: true
input: true
url_param_only: true
- !ruby/object:Api::Type::String
name: "location"
description: |
The name of the location this data exchange.
required: true
input: true
url_param_only: true
- !ruby/object:Api::Type::String
name: displayName
description: |-
Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces.
required: true
- !ruby/object:Api::Type::String
name: description
description: |-
Description of the data exchange.
- !ruby/object:Api::Type::String
name: primaryContact
description: |-
Email or URL of the primary point of contact of the data exchange.
- !ruby/object:Api::Type::String
name: documentation
description: |-
Documentation describing the data exchange.
- !ruby/object:Api::Type::Integer
name: listingCount
description: |-
Number of listings contained in the data exchange.
output: true
- !ruby/object:Api::Type::String
name: icon
description: |-
Base64 encoded image representing the data exchange.
28 changes: 28 additions & 0 deletions mmv1/products/bigqueryanalyticshub/terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2022 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
DataExchange: !ruby/object:Overrides::Terraform::ResourceOverride
id_format: projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}
import_format: ["projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}", "{{data_exchange_id}}"]
examples:
- !ruby/object:Provider::Terraform::Examples
name: "bigquery_analyticshub_data_exchange_basic"
min_version: beta
primary_resource_id: "data_exchange"
primary_resource_name: "fmt.Sprintf(\"tf_test_my_data_exchange%s\", context[\"random_suffix\"])"
vars:
data_exchange_id: "my_data_exchange"
description: "example data exchange"

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "google_bigquery_analytics_hub_data_exchange" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
location = "US"
data_exchange_id = "<%= ctx[:vars]['data_exchange_id'] %>"
display_name = "<%= ctx[:vars]['data_exchange_id'] %>"
description = "<%= ctx[:vars]['description'] %>"
}

0 comments on commit 5dbd30a

Please sign in to comment.