Reference documentation and code samples for the Data Catalog V1 API class Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.
Client for the PolicyTagManagerSerialization service.
Policy Tag Manager Serialization API service allows you to manipulate your policy tags and taxonomies in a serialized format.
Taxonomy is a hierarchical group of policy tags.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the PolicyTagManagerSerialization Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all PolicyTagManagerSerialization clients ::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the PolicyTagManagerSerialization 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)
#export_taxonomies
def export_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse
def export_taxonomies(parent: nil, taxonomies: nil, serialized_taxonomies: nil) -> ::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse
Exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project.
This method generates SerializedTaxonomy
protocol buffers with nested
policy tags that can be used as input for ImportTaxonomies
calls.
def export_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse
export_taxonomies
via a request object, either of type
ExportTaxonomiesRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::ExportTaxonomiesRequest, ::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 export_taxonomies(parent: nil, taxonomies: nil, serialized_taxonomies: nil) -> ::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse
export_taxonomies
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).
- parent (::String) — Required. Resource name of the project that the exported taxonomies belong to.
- taxonomies (::Array<::String>) — Required. Resource names of the taxonomies to export.
- serialized_taxonomies (::Boolean) — Serialized export taxonomies that contain all the policy tags as nested protocol buffers.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_catalog/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataCatalog::V1::ExportTaxonomiesRequest.new # Call the export_taxonomies method. result = client.export_taxonomies request # The returned object is of type Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#import_taxonomies
def import_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse
def import_taxonomies(parent: nil, inline_source: nil, cross_regional_source: nil) -> ::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse
Creates new taxonomies (including their policy tags) in a given project by importing from inlined or cross-regional sources.
For a cross-regional source, new taxonomies are created by copying from a source in another region.
For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.
def import_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse
import_taxonomies
via a request object, either of type
ImportTaxonomiesRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::ImportTaxonomiesRequest, ::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 import_taxonomies(parent: nil, inline_source: nil, cross_regional_source: nil) -> ::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse
import_taxonomies
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).
- parent (::String) — Required. Resource name of project that the imported taxonomies will belong to.
- inline_source (::Google::Cloud::DataCatalog::V1::InlineSource, ::Hash) — Inline source taxonomy to import.
- cross_regional_source (::Google::Cloud::DataCatalog::V1::CrossRegionalSource, ::Hash) — Cross-regional source taxonomy to import.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_catalog/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataCatalog::V1::ImportTaxonomiesRequest.new # Call the import_taxonomies method. result = client.import_taxonomies request # The returned object is of type Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new PolicyTagManagerSerialization client object.
- (config) — Configure the PolicyTagManagerSerialization client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.new do |config| config.timeout = 10.0 end
#replace_taxonomy
def replace_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
def replace_taxonomy(name: nil, serialized_taxonomy: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
Replaces (updates) a taxonomy and all its policy tags.
The taxonomy and its entire hierarchy of policy tags must be
represented literally by SerializedTaxonomy
and the nested
SerializedPolicyTag
messages.
This operation automatically does the following:
- Deletes the existing policy tags that are missing from the
SerializedPolicyTag
. - Creates policy tags that don't have resource names. They are considered new.
- Updates policy tags with valid resources names accordingly.
def replace_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
replace_taxonomy
via a request object, either of type
ReplaceTaxonomyRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::ReplaceTaxonomyRequest, ::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 replace_taxonomy(name: nil, serialized_taxonomy: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
replace_taxonomy
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).
- name (::String) — Required. Resource name of the taxonomy to update.
- serialized_taxonomy (::Google::Cloud::DataCatalog::V1::SerializedTaxonomy, ::Hash) — Required. Taxonomy to update along with its child policy tags.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataCatalog::V1::Taxonomy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_catalog/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataCatalog::V1::ReplaceTaxonomyRequest.new # Call the replace_taxonomy method. result = client.replace_taxonomy request # The returned object is of type Google::Cloud::DataCatalog::V1::Taxonomy. p result