AnalyticsHubServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.transports.base.AnalyticsHubServiceTransport, typing.Callable[[...], google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.transports.base.AnalyticsHubServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
The AnalyticsHubService
API facilitates data sharing within and
across organizations. It allows data providers to publish listings
that reference shared datasets. With Analytics Hub, users can
discover and search for listings that they have access to.
Subscribers can view and subscribe to listings. When you subscribe
to a listing, Analytics Hub creates a linked dataset in your
project.
Properties
api_endpoint
Return the API endpoint used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
AnalyticsHubServiceTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The universe domain used by the client instance. |
Methods
AnalyticsHubServiceClient
AnalyticsHubServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.transports.base.AnalyticsHubServiceTransport, typing.Callable[[...], google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.transports.base.AnalyticsHubServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the analytics hub service client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,AnalyticsHubServiceTransport,Callable[..., AnalyticsHubServiceTransport]]]
The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the AnalyticsHubServiceTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_data_exchange
create_data_exchange(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.CreateDataExchangeRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
data_exchange: typing.Optional[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DataExchange
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DataExchange
Creates a new data exchange.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_create_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
data_exchange.display_name = "display_name_value"
request = bigquery_data_exchange_v1beta1.CreateDataExchangeRequest(
parent="parent_value",
data_exchange_id="data_exchange_id_value",
data_exchange=data_exchange,
)
# Make the request
response = client.create_data_exchange(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.CreateDataExchangeRequest, dict]
The request object. Message for creating a data exchange. |
parent |
str
Required. The parent resource path of the data exchange. e.g. |
data_exchange |
google.cloud.bigquery_data_exchange_v1beta1.types.DataExchange
Required. The data exchange to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.DataExchange |
A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets. |
create_listing
create_listing(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.CreateListingRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
listing: typing.Optional[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.Listing
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.Listing
Creates a new listing.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_create_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
listing = bigquery_data_exchange_v1beta1.Listing()
listing.display_name = "display_name_value"
request = bigquery_data_exchange_v1beta1.CreateListingRequest(
parent="parent_value",
listing_id="listing_id_value",
listing=listing,
)
# Make the request
response = client.create_listing(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.CreateListingRequest, dict]
The request object. Message for creating a listing. |
parent |
str
Required. The parent resource path of the listing. e.g. |
listing |
google.cloud.bigquery_data_exchange_v1beta1.types.Listing
Required. The listing to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.Listing |
A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data. |
data_exchange_path
data_exchange_path(project: str, location: str, data_exchange: str) -> str
Returns a fully-qualified data_exchange string.
dataset_path
dataset_path(project: str, dataset: str) -> str
Returns a fully-qualified dataset string.
delete_data_exchange
delete_data_exchange(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DeleteDataExchangeRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes an existing data exchange.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_delete_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.DeleteDataExchangeRequest(
name="name_value",
)
# Make the request
client.delete_data_exchange(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.DeleteDataExchangeRequest, dict]
The request object. Message for deleting a data exchange. |
name |
str
Required. The full name of the data exchange resource that you want to delete. For example, |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_listing
delete_listing(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DeleteListingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a listing.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_delete_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.DeleteListingRequest(
name="name_value",
)
# Make the request
client.delete_listing(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.DeleteListingRequest, dict]
The request object. Message for deleting a listing. |
name |
str
Required. Resource name of the listing to delete. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
AnalyticsHubServiceClient |
The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
AnalyticsHubServiceClient |
The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
AnalyticsHubServiceClient |
The constructed client. |
get_data_exchange
get_data_exchange(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.GetDataExchangeRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DataExchange
Gets the details of a data exchange.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_get_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.GetDataExchangeRequest(
name="name_value",
)
# Make the request
response = client.get_data_exchange(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.GetDataExchangeRequest, dict]
The request object. Message for getting a data exchange. |
name |
str
Required. The resource name of the data exchange. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.DataExchange |
A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets. |
get_iam_policy
get_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy
Gets the IAM policy.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.get_iam_policy(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
get_listing
get_listing(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.GetListingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.Listing
Gets the details of a listing.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_get_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.GetListingRequest(
name="name_value",
)
# Make the request
response = client.get_listing(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.GetListingRequest, dict]
The request object. Message for getting a listing. |
name |
str
Required. The resource name of the listing. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.Listing |
A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data. |
get_location
get_location(
request: typing.Optional[
google.cloud.location.locations_pb2.GetLocationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
|
Location object. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)
Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
list_data_exchanges
list_data_exchanges(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.ListDataExchangesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListDataExchangesPager
)
Lists all data exchanges in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_list_data_exchanges():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.ListDataExchangesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_data_exchanges(request=request)
# Handle the response
for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.ListDataExchangesRequest, dict]
The request object. Message for requesting the list of data exchanges. |
parent |
str
Required. The parent resource path of the data exchanges. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListDataExchangesPager |
Message for response to the list of data exchanges. Iterating over this object will yield results and resolve additional pages automatically. |
list_listings
list_listings(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.ListListingsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListListingsPager
)
Lists all listings in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_list_listings():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.ListListingsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_listings(request=request)
# Handle the response
for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.ListListingsRequest, dict]
The request object. Message for requesting the list of listings. |
parent |
str
Required. The parent resource path of the listing. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListListingsPager |
Message for response to the list of Listings. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
google.cloud.location.locations_pb2.ListLocationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse
Lists information about the supported locations for this service.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
|
Response message for ListLocations method. |
list_org_data_exchanges
list_org_data_exchanges(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.ListOrgDataExchangesRequest,
dict,
]
] = None,
*,
organization: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListOrgDataExchangesPager
)
Lists all data exchanges from projects in a given organization and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_list_org_data_exchanges():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.ListOrgDataExchangesRequest(
organization="organization_value",
)
# Make the request
page_result = client.list_org_data_exchanges(request=request)
# Handle the response
for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.ListOrgDataExchangesRequest, dict]
The request object. Message for requesting the list of data exchanges from projects in an organization and location. |
organization |
str
Required. The organization resource path of the projects containing DataExchanges. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.services.analytics_hub_service.pagers.ListOrgDataExchangesPager |
Message for response to listing data exchanges in an organization and location. Iterating over this object will yield results and resolve additional pages automatically. |
listing_path
listing_path(project: str, location: str, data_exchange: str, listing: str) -> str
Returns a fully-qualified listing string.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]
Parse a project path into its component segments.
parse_data_exchange_path
parse_data_exchange_path(path: str) -> typing.Dict[str, str]
Parses a data_exchange path into its component segments.
parse_dataset_path
parse_dataset_path(path: str) -> typing.Dict[str, str]
Parses a dataset path into its component segments.
parse_listing_path
parse_listing_path(path: str) -> typing.Dict[str, str]
Parses a listing path into its component segments.
set_iam_policy
set_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy
Sets the IAM policy.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = client.set_iam_policy(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
subscribe_listing
subscribe_listing(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.SubscribeListingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.SubscribeListingResponse
)
Subscribes to a listing.
Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_subscribe_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
destination_dataset = bigquery_data_exchange_v1beta1.DestinationDataset()
destination_dataset.dataset_reference.dataset_id = "dataset_id_value"
destination_dataset.dataset_reference.project_id = "project_id_value"
destination_dataset.location = "location_value"
request = bigquery_data_exchange_v1beta1.SubscribeListingRequest(
destination_dataset=destination_dataset,
name="name_value",
)
# Make the request
response = client.subscribe_listing(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.SubscribeListingRequest, dict]
The request object. Message for subscribing to a listing. |
name |
str
Required. Resource name of the listing that you want to subscribe to. e.g. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.SubscribeListingResponse |
Message for response when you subscribe to a listing. |
test_iam_permissions
test_iam_permissions(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse
Returns the permissions that a caller has.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value1', 'permissions_value2'],
)
# Make the request
response = client.test_iam_permissions(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse |
Response message for TestIamPermissions method. |
update_data_exchange
update_data_exchange(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.UpdateDataExchangeRequest,
dict,
]
] = None,
*,
data_exchange: typing.Optional[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DataExchange
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.DataExchange
Updates an existing data exchange.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_update_data_exchange():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
data_exchange = bigquery_data_exchange_v1beta1.DataExchange()
data_exchange.display_name = "display_name_value"
request = bigquery_data_exchange_v1beta1.UpdateDataExchangeRequest(
data_exchange=data_exchange,
)
# Make the request
response = client.update_data_exchange(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.UpdateDataExchangeRequest, dict]
The request object. Message for updating a data exchange. |
data_exchange |
google.cloud.bigquery_data_exchange_v1beta1.types.DataExchange
Required. The data exchange to update. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Field mask specifies the fields to update in the data exchange resource. The fields specified in the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.DataExchange |
A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets. |
update_listing
update_listing(
request: typing.Optional[
typing.Union[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.UpdateListingRequest,
dict,
]
] = None,
*,
listing: typing.Optional[
google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.Listing
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.bigquery_data_exchange_v1beta1.types.dataexchange.Listing
Updates an existing listing.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import bigquery_data_exchange_v1beta1
def sample_update_listing():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
listing = bigquery_data_exchange_v1beta1.Listing()
listing.display_name = "display_name_value"
request = bigquery_data_exchange_v1beta1.UpdateListingRequest(
listing=listing,
)
# Make the request
response = client.update_listing(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.bigquery_data_exchange_v1beta1.types.UpdateListingRequest, dict]
The request object. Message for updating a Listing. |
listing |
google.cloud.bigquery_data_exchange_v1beta1.types.Listing
Required. The listing to update. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Field mask specifies the fields to update in the listing resource. The fields specified in the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.bigquery_data_exchange_v1beta1.types.Listing |
A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data. |