Reference documentation and code samples for the Private Catalog V1beta1 API class Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.
Client for the PrivateCatalog service.
PrivateCatalog
allows catalog consumers to retrieve Catalog
, Product
and Version
resources under a target resource context.
Catalog
is computed based on the [Association][]s linked to the target
resource and its ancestors. Each association's
[google.cloud.privatecatalogproducer.v1beta.Catalog][] is transformed into a
Catalog
. If multiple associations have the same parent
[google.cloud.privatecatalogproducer.v1beta.Catalog][], they are
de-duplicated into one Catalog
. Users must have
cloudprivatecatalog.catalogTargets.get
IAM permission on the resource
context in order to access catalogs. Catalog
contains the resource name and
a subset of data of the original
[google.cloud.privatecatalogproducer.v1beta.Catalog][].
Product
is child resource of the catalog. A Product
contains the resource
name and a subset of the data of the original
[google.cloud.privatecatalogproducer.v1beta.Product][].
Version
is child resource of the product. A Version
contains the resource
name and a subset of the data of the original
[google.cloud.privatecatalogproducer.v1beta.Version][].
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the PrivateCatalog Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all PrivateCatalog clients ::Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the PrivateCatalog Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#initialize
def initialize() { |config| ... } -> Client
Create a new PrivateCatalog client object.
- (config) — Configure the PrivateCatalog client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.new # Create a client using a custom configuration client = ::Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.new do |config| config.timeout = 10.0 end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#search_catalogs
def search_catalogs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>
def search_catalogs(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>
Search Catalog resources that consumers have access to, within the scope of the consumer cloud resource hierarchy context.
def search_catalogs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>
search_catalogs
via a request object, either of type
SearchCatalogsRequest or an equivalent Hash.
- request (::Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_catalogs(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>
search_catalogs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
resource (::String) —
Required. The name of the resource context. It can be in following formats:
projects/{project}
folders/{folder}
organizations/{organization}
-
query (::String) —
The query to filter the catalogs. The supported queries are:
- Get a single catalog:
name=catalogs/{catalog}
- Get a single catalog:
- page_size (::Integer) — The maximum number of entries that are requested.
- page_token (::String) — A pagination token returned from a previous call to SearchCatalogs that indicates where this listing should continue from.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/private_catalog/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest.new # Call the search_catalogs method. result = client.search_catalogs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::PrivateCatalog::V1beta1::Catalog. p item end
#search_products
def search_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>
def search_products(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>
Search Product resources that consumers have access to, within the scope of the consumer cloud resource hierarchy context.
def search_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>
search_products
via a request object, either of type
SearchProductsRequest or an equivalent Hash.
- request (::Google::Cloud::PrivateCatalog::V1beta1::SearchProductsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_products(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>
search_products
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- resource (::String) — Required. The name of the resource context. See SearchCatalogsRequest.resource for details.
-
query (::String) —
The query to filter the products.
The supported queries are:
- List products of all catalogs: empty
- List products under a catalog:
parent=catalogs/{catalog}
- Get a product by name:
name=catalogs/{catalog}/products/{product}
- page_size (::Integer) — The maximum number of entries that are requested.
- page_token (::String) — A pagination token returned from a previous call to SearchProducts that indicates where this listing should continue from.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/private_catalog/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PrivateCatalog::V1beta1::SearchProductsRequest.new # Call the search_products method. result = client.search_products request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::PrivateCatalog::V1beta1::Product. p item end
#search_versions
def search_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>
def search_versions(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>
Search Version resources that consumers have access to, within the scope of the consumer cloud resource hierarchy context.
def search_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>
search_versions
via a request object, either of type
SearchVersionsRequest or an equivalent Hash.
- request (::Google::Cloud::PrivateCatalog::V1beta1::SearchVersionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_versions(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>
search_versions
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- resource (::String) — Required. The name of the resource context. See SearchCatalogsRequest.resource for details.
-
query (::String) —
Required. The query to filter the versions.
The supported queries are:
- List versions under a product:
parent=catalogs/{catalog}/products/{product}
- Get a version by name:
name=catalogs/{catalog}/products/{product}/versions/{version}
- List versions under a product:
- page_size (::Integer) — The maximum number of entries that are requested.
- page_token (::String) — A pagination token returned from a previous call to SearchVersions that indicates where this listing should continue from.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/private_catalog/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PrivateCatalog::V1beta1::SearchVersionsRequest.new # Call the search_versions method. result = client.search_versions request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::PrivateCatalog::V1beta1::Version. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)