Class Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client (v0.9.1)

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.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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.

Overloads
def export_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ExportTaxonomiesResponse
Pass arguments to export_taxonomies via a request object, either of type ExportTaxonomiesRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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

#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.

Overloads
def import_taxonomies(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::ImportTaxonomiesResponse
Pass arguments to import_taxonomies via a request object, either of type ImportTaxonomiesRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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.

Yields
  • (config) — Configure the PolicyTagManagerSerialization client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# 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.
Overloads
def replace_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
Pass arguments to replace_taxonomy via a request object, either of type ReplaceTaxonomyRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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