Reference documentation and code samples for the Data Catalog V1 API class Google::Cloud::DataCatalog::V1::PolicyTagManager::Rest::Client.
REST client for the PolicyTagManager service.
Policy Tag Manager API service allows you to manage your policy tags and taxonomies.
Policy tags are used to tag BigQuery columns and apply additional access control policies. A taxonomy is a hierarchical grouping of policy tags that classify data along a common axis.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the PolicyTagManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all PolicyTagManager clients ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the PolicyTagManager 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)
#create_policy_tag
def create_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
def create_policy_tag(parent: nil, policy_tag: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
Creates a policy tag in a taxonomy.
def create_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
create_policy_tag
via a request object, either of type
CreatePolicyTagRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::CreatePolicyTagRequest, ::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 create_policy_tag(parent: nil, policy_tag: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
create_policy_tag
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 taxonomy that the policy tag will belong to.
- policy_tag (::Google::Cloud::DataCatalog::V1::PolicyTag, ::Hash) — The policy tag to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::PolicyTag)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#create_taxonomy
def create_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
def create_taxonomy(parent: nil, taxonomy: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
Creates a taxonomy in a specified project.
The taxonomy is initially empty, that is, it doesn't contain policy tags.
def create_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
create_taxonomy
via a request object, either of type
CreateTaxonomyRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::CreateTaxonomyRequest, ::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 create_taxonomy(parent: nil, taxonomy: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
create_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).
- parent (::String) — Required. Resource name of the project that the taxonomy will belong to.
- taxonomy (::Google::Cloud::DataCatalog::V1::Taxonomy, ::Hash) — The taxonomy to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::Taxonomy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_policy_tag
def delete_policy_tag(request, options = nil) -> ::Google::Protobuf::Empty
def delete_policy_tag(name: nil) -> ::Google::Protobuf::Empty
Deletes a policy tag together with the following:
- All of its descendant policy tags, if any
- Policies associated with the policy tag and its descendants
- References from BigQuery table schema of the policy tag and its descendants
def delete_policy_tag(request, options = nil) -> ::Google::Protobuf::Empty
delete_policy_tag
via a request object, either of type
DeletePolicyTagRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::DeletePolicyTagRequest, ::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 delete_policy_tag(name: nil) -> ::Google::Protobuf::Empty
delete_policy_tag
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 policy tag to delete.
Note: All of its descendant policy tags are also deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_taxonomy
def delete_taxonomy(request, options = nil) -> ::Google::Protobuf::Empty
def delete_taxonomy(name: nil) -> ::Google::Protobuf::Empty
Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.
def delete_taxonomy(request, options = nil) -> ::Google::Protobuf::Empty
delete_taxonomy
via a request object, either of type
DeleteTaxonomyRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::DeleteTaxonomyRequest, ::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 delete_taxonomy(name: nil) -> ::Google::Protobuf::Empty
delete_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 delete.
Note: All policy tags in this taxonomy are also deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_iam_policy
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
Gets the IAM policy for a policy tag or a taxonomy.
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
get_iam_policy
via a request object, either of type
Iam::V1::GetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::GetIamPolicyRequest, ::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 get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
get_iam_policy
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 resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
-
options (::Google::Iam::V1::GetPolicyOptions, ::Hash) — OPTIONAL: A
GetPolicyOptions
object for specifying options toGetIamPolicy
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::Policy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::Policy)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_policy_tag
def get_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
def get_policy_tag(name: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
Gets a policy tag.
def get_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
get_policy_tag
via a request object, either of type
GetPolicyTagRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::GetPolicyTagRequest, ::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 get_policy_tag(name: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
get_policy_tag
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 policy tag.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::PolicyTag)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_taxonomy
def get_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
def get_taxonomy(name: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
Gets a taxonomy.
def get_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
get_taxonomy
via a request object, either of type
GetTaxonomyRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::GetTaxonomyRequest, ::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 get_taxonomy(name: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
get_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 get.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::Taxonomy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new PolicyTagManager REST client object.
- (config) — Configure the PolicyTagManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Rest::Client.new do |config| config.timeout = 10.0 end
#list_policy_tags
def list_policy_tags(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>
def list_policy_tags(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>
Lists all policy tags in a taxonomy.
def list_policy_tags(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>
list_policy_tags
via a request object, either of type
ListPolicyTagsRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::ListPolicyTagsRequest, ::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 list_policy_tags(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>
list_policy_tags
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 taxonomy to list the policy tags of.
- page_size (::Integer) — The maximum number of items to return. Must be a value between 1 and 1000 inclusively. If not set, defaults to 50.
-
page_token (::String) — The pagination token of the next results page. If not set, returns the
first page.
The token is returned in the response to a previous list request.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#list_taxonomies
def list_taxonomies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>
def list_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>
Lists all taxonomies in a project in a particular location that you have a permission to view.
def list_taxonomies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>
list_taxonomies
via a request object, either of type
ListTaxonomiesRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::ListTaxonomiesRequest, ::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 list_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>
list_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 to list the taxonomies of.
- page_size (::Integer) — The maximum number of items to return. Must be a value between 1 and 1000 inclusively. If not set, defaults to 50.
-
page_token (::String) — The pagination token of the next results page. If not set,
the first page is returned.
The token is returned in the response to a previous list request.
- filter (::String) — Supported field for filter is 'service' and value is 'dataplex'. Eg: service=dataplex.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#set_iam_policy
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
Sets the IAM policy for a policy tag or a taxonomy.
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
set_iam_policy
via a request object, either of type
Iam::V1::SetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
set_iam_policy
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 resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
-
policy (::Google::Iam::V1::Policy, ::Hash) — REQUIRED: The complete policy to be applied to the
resource
. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. -
update_mask (::Google::Protobuf::FieldMask, ::Hash) — OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
the fields in the mask will be modified. If no mask is provided, the
following default mask is used:
paths: "bindings, etag"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::Policy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::Policy)
- (::Google::Cloud::Error) — if the REST call is aborted.
#test_iam_permissions
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Returns your permissions on a specified policy tag or taxonomy.
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
test_iam_permissions
via a request object, either of type
Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
- request (::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
test_iam_permissions
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 resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
-
permissions (::Array<::String>) — The set of permissions to check for the
resource
. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::TestIamPermissionsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::TestIamPermissionsResponse)
- (::Google::Cloud::Error) — if the REST call is aborted.
#update_policy_tag
def update_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
def update_policy_tag(policy_tag: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
Updates a policy tag, including its display name, description, and parent policy tag.
def update_policy_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
update_policy_tag
via a request object, either of type
UpdatePolicyTagRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::UpdatePolicyTagRequest, ::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 update_policy_tag(policy_tag: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1::PolicyTag
update_policy_tag
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).
- policy_tag (::Google::Cloud::DataCatalog::V1::PolicyTag, ::Hash) — The policy tag to update. You can update only its description, display name, and parent policy tag fields.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Specifies the fields to update.
You can update only display name, description, and parent policy tag. If not set, defaults to all updatable fields. For more information, see FieldMask.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::PolicyTag)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#update_taxonomy
def update_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
def update_taxonomy(taxonomy: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
Updates a taxonomy, including its display name, description, and activated policy types.
def update_taxonomy(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
update_taxonomy
via a request object, either of type
UpdateTaxonomyRequest or an equivalent Hash.
- request (::Google::Cloud::DataCatalog::V1::UpdateTaxonomyRequest, ::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 update_taxonomy(taxonomy: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1::Taxonomy
update_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).
- taxonomy (::Google::Cloud::DataCatalog::V1::Taxonomy, ::Hash) — The taxonomy to update. You can update only its description, display name, and activated policy types.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Specifies fields to update. If not set, defaults to all fields you can
update.
For more information, see FieldMask.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DataCatalog::V1::Taxonomy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.