Class v1.PolicyTagManagerClient (4.7.0)

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

Package

@google-cloud/datacatalog

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of PolicyTagManagerClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new PolicyTagManagerClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

policyTagManagerStub

policyTagManagerStub?: Promise<{
        [name: string]: Function;
    }>;

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createPolicyTag(request, options)

createPolicyTag(request?: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.IPolicyTag,
        protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | undefined,
        {} | undefined
    ]>;

Creates a policy tag in a taxonomy.

Parameters
Name Description
request ICreatePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing PolicyTag. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the taxonomy that the policy tag will belong to.
   */
  // const parent = 'abc123'
  /**
   *  The policy tag to create.
   */
  // const policyTag = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callCreatePolicyTag() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await datacatalogClient.createPolicyTag(request);
    console.log(response);
  }

  callCreatePolicyTag();

createPolicyTag(request, options, callback)

createPolicyTag(request: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePolicyTagRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPolicyTag(request, callback)

createPolicyTag(request: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePolicyTagRequest
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTaxonomy(request, options)

createTaxonomy(request?: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.ITaxonomy,
        protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | undefined,
        {} | undefined
    ]>;

Creates a taxonomy in a specified project.

The taxonomy is initially empty, that is, it doesn't contain policy tags.

Parameters
Name Description
request ICreateTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the project that the taxonomy will belong to.
   */
  // const parent = 'abc123'
  /**
   *  The taxonomy to create.
   */
  // const taxonomy = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callCreateTaxonomy() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await datacatalogClient.createTaxonomy(request);
    console.log(response);
  }

  callCreateTaxonomy();

createTaxonomy(request, options, callback)

createTaxonomy(request: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTaxonomyRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTaxonomy(request, callback)

createTaxonomy(request: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTaxonomyRequest
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePolicyTag(request, options)

deletePolicyTag(request?: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | undefined,
        {} | undefined
    ]>;

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

Parameters
Name Description
request IDeletePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the policy tag to delete.
   *  Note: All of its descendant policy tags are also deleted.
   */
  // const name = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callDeletePolicyTag() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datacatalogClient.deletePolicyTag(request);
    console.log(response);
  }

  callDeletePolicyTag();

deletePolicyTag(request, options, callback)

deletePolicyTag(request: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePolicyTagRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePolicyTag(request, callback)

deletePolicyTag(request: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePolicyTagRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTaxonomy(request, options)

deleteTaxonomy(request?: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | undefined,
        {} | undefined
    ]>;

Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.

Parameters
Name Description
request IDeleteTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the taxonomy to delete.
   *  Note: All policy tags in this taxonomy are also deleted.
   */
  // const name = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callDeleteTaxonomy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datacatalogClient.deleteTaxonomy(request);
    console.log(response);
  }

  callDeleteTaxonomy();

deleteTaxonomy(request, options, callback)

deleteTaxonomy(request: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTaxonomyRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTaxonomy(request, callback)

deleteTaxonomy(request: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTaxonomyRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

entryGroupPath(project, location, entryGroup)

entryGroupPath(project: string, location: string, entryGroup: string): string;

Return a fully-qualified entryGroup resource name string.

Parameters
Name Description
project string
location string
entryGroup string
Returns
Type Description
string

{string} Resource name string.

entryPath(project, location, entryGroup, entry)

entryPath(project: string, location: string, entryGroup: string, entry: string): string;

Return a fully-qualified entry resource name string.

Parameters
Name Description
project string
location string
entryGroup string
entry string
Returns
Type Description
string

{string} Resource name string.

getIamPolicy(request, options)

getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.IGetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets the IAM policy for a policy tag or a taxonomy.

Parameters
Name Description
request IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`.
   */
  // const options = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callGetIamPolicy() {
    // Construct request
    const request = {
      resource,
    };

    // Run request
    const response = await datacatalogClient.getIamPolicy(request);
    console.log(response);
  }

  callGetIamPolicy();

getIamPolicy(request, options, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPolicyTag(request, options)

getPolicyTag(request?: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.IPolicyTag,
        protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | undefined,
        {} | undefined
    ]>;

Gets a policy tag.

Parameters
Name Description
request IGetPolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing PolicyTag. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the policy tag.
   */
  // const name = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callGetPolicyTag() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datacatalogClient.getPolicyTag(request);
    console.log(response);
  }

  callGetPolicyTag();

getPolicyTag(request, options, callback)

getPolicyTag(request: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPolicyTagRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPolicyTag(request, callback)

getPolicyTag(request: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPolicyTagRequest
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getTaxonomy(request, options)

getTaxonomy(request?: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.ITaxonomy,
        protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | undefined,
        {} | undefined
    ]>;

Gets a taxonomy.

Parameters
Name Description
request IGetTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the taxonomy to get.
   */
  // const name = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callGetTaxonomy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datacatalogClient.getTaxonomy(request);
    console.log(response);
  }

  callGetTaxonomy();

getTaxonomy(request, options, callback)

getTaxonomy(request: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetTaxonomyRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getTaxonomy(request, callback)

getTaxonomy(request: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetTaxonomyRequest
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listPolicyTags(request, options)

listPolicyTags(request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.IPolicyTag[],
        protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest | null,
        protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse
    ]>;

Lists all policy tags in a taxonomy.

Parameters
Name Description
request IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.IPolicyTag[], protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest | null, protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of PolicyTag. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPolicyTagsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPolicyTags(request, options, callback)

listPolicyTags(request: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse | null | undefined, protos.google.cloud.datacatalog.v1.IPolicyTag>): void;
Parameters
Name Description
request IListPolicyTagsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse | null | undefined, protos.google.cloud.datacatalog.v1.IPolicyTag>
Returns
Type Description
void

listPolicyTags(request, callback)

listPolicyTags(request: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, callback: PaginationCallback<protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse | null | undefined, protos.google.cloud.datacatalog.v1.IPolicyTag>): void;
Parameters
Name Description
request IListPolicyTagsRequest
callback PaginationCallback<protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse | null | undefined, protos.google.cloud.datacatalog.v1.IPolicyTag>
Returns
Type Description
void

listPolicyTagsAsync(request, options)

listPolicyTagsAsync(request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datacatalog.v1.IPolicyTag>;

Equivalent to listPolicyTags, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.datacatalog.v1.IPolicyTag>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PolicyTag. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the taxonomy to list the policy tags of.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return. Must be a value between 1 and 1000
   *  inclusively.
   *  If not set, defaults to 50.
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callListPolicyTags() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = datacatalogClient.listPolicyTagsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPolicyTags();

listPolicyTagsStream(request, options)

listPolicyTagsStream(request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing PolicyTag on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPolicyTagsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTaxonomies(request, options)

listTaxonomies(request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.ITaxonomy[],
        protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest | null,
        protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse
    ]>;

Lists all taxonomies in a project in a particular location that you have a permission to view.

Parameters
Name Description
request IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.ITaxonomy[], protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest | null, protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTaxonomiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTaxonomies(request, options, callback)

listTaxonomies(request: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse | null | undefined, protos.google.cloud.datacatalog.v1.ITaxonomy>): void;
Parameters
Name Description
request IListTaxonomiesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse | null | undefined, protos.google.cloud.datacatalog.v1.ITaxonomy>
Returns
Type Description
void

listTaxonomies(request, callback)

listTaxonomies(request: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, callback: PaginationCallback<protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse | null | undefined, protos.google.cloud.datacatalog.v1.ITaxonomy>): void;
Parameters
Name Description
request IListTaxonomiesRequest
callback PaginationCallback<protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse | null | undefined, protos.google.cloud.datacatalog.v1.ITaxonomy>
Returns
Type Description
void

listTaxonomiesAsync(request, options)

listTaxonomiesAsync(request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datacatalog.v1.ITaxonomy>;

Equivalent to listTaxonomies, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.datacatalog.v1.ITaxonomy>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the project to list the taxonomies of.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return. Must be a value between 1 and 1000
   *  inclusively. If not set, defaults to 50.
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'
  /**
   *  Supported field for filter is 'service' and value is 'dataplex'.
   *  Eg: service=dataplex.
   */
  // const filter = 'abc123'

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callListTaxonomies() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = datacatalogClient.listTaxonomiesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTaxonomies();

listTaxonomiesStream(request, options)

listTaxonomiesStream(request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTaxonomiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchEntryFromEntryName(entryName)

matchEntryFromEntryName(entryName: string): string | number;

Parse the entry from Entry resource.

Parameter
Name Description
entryName string

A fully-qualified path representing Entry resource.

Returns
Type Description
string | number

{string} A string representing the entry.

matchEntryFromTagName(tagName)

matchEntryFromTagName(tagName: string): string | number;

Parse the entry from Tag resource.

Parameter
Name Description
tagName string

A fully-qualified path representing Tag resource.

Returns
Type Description
string | number

{string} A string representing the entry.

matchEntryGroupFromEntryGroupName(entryGroupName)

matchEntryGroupFromEntryGroupName(entryGroupName: string): string | number;

Parse the entry_group from EntryGroup resource.

Parameter
Name Description
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
Type Description
string | number

{string} A string representing the entry_group.

matchEntryGroupFromEntryName(entryName)

matchEntryGroupFromEntryName(entryName: string): string | number;

Parse the entry_group from Entry resource.

Parameter
Name Description
entryName string

A fully-qualified path representing Entry resource.

Returns
Type Description
string | number

{string} A string representing the entry_group.

matchEntryGroupFromTagName(tagName)

matchEntryGroupFromTagName(tagName: string): string | number;

Parse the entry_group from Tag resource.

Parameter
Name Description
tagName string

A fully-qualified path representing Tag resource.

Returns
Type Description
string | number

{string} A string representing the entry_group.

matchFieldFromTagTemplateFieldName(tagTemplateFieldName)

matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the field from TagTemplateField resource.

Parameter
Name Description
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
Type Description
string | number

{string} A string representing the field.

matchLocationFromEntryGroupName(entryGroupName)

matchLocationFromEntryGroupName(entryGroupName: string): string | number;

Parse the location from EntryGroup resource.

Parameter
Name Description
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromEntryName(entryName)

matchLocationFromEntryName(entryName: string): string | number;

Parse the location from Entry resource.

Parameter
Name Description
entryName string

A fully-qualified path representing Entry resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromPolicyTagName(policyTagName)

matchLocationFromPolicyTagName(policyTagName: string): string | number;

Parse the location from PolicyTag resource.

Parameter
Name Description
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromTagName(tagName)

matchLocationFromTagName(tagName: string): string | number;

Parse the location from Tag resource.

Parameter
Name Description
tagName string

A fully-qualified path representing Tag resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromTagTemplateFieldName(tagTemplateFieldName)

matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the location from TagTemplateField resource.

Parameter
Name Description
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromTagTemplateName(tagTemplateName)

matchLocationFromTagTemplateName(tagTemplateName: string): string | number;

Parse the location from TagTemplate resource.

Parameter
Name Description
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromTaxonomyName(taxonomyName)

matchLocationFromTaxonomyName(taxonomyName: string): string | number;

Parse the location from Taxonomy resource.

Parameter
Name Description
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchPolicyTagFromPolicyTagName(policyTagName)

matchPolicyTagFromPolicyTagName(policyTagName: string): string | number;

Parse the policy_tag from PolicyTag resource.

Parameter
Name Description
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
Type Description
string | number

{string} A string representing the policy_tag.

matchProjectFromEntryGroupName(entryGroupName)

matchProjectFromEntryGroupName(entryGroupName: string): string | number;

Parse the project from EntryGroup resource.

Parameter
Name Description
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromEntryName(entryName)

matchProjectFromEntryName(entryName: string): string | number;

Parse the project from Entry resource.

Parameter
Name Description
entryName string

A fully-qualified path representing Entry resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromPolicyTagName(policyTagName)

matchProjectFromPolicyTagName(policyTagName: string): string | number;

Parse the project from PolicyTag resource.

Parameter
Name Description
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTagName(tagName)

matchProjectFromTagName(tagName: string): string | number;

Parse the project from Tag resource.

Parameter
Name Description
tagName string

A fully-qualified path representing Tag resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTagTemplateFieldName(tagTemplateFieldName)

matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the project from TagTemplateField resource.

Parameter
Name Description
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTagTemplateName(tagTemplateName)

matchProjectFromTagTemplateName(tagTemplateName: string): string | number;

Parse the project from TagTemplate resource.

Parameter
Name Description
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTaxonomyName(taxonomyName)

matchProjectFromTaxonomyName(taxonomyName: string): string | number;

Parse the project from Taxonomy resource.

Parameter
Name Description
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchTagFromTagName(tagName)

matchTagFromTagName(tagName: string): string | number;

Parse the tag from Tag resource.

Parameter
Name Description
tagName string

A fully-qualified path representing Tag resource.

Returns
Type Description
string | number

{string} A string representing the tag.

matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName)

matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the tag_template from TagTemplateField resource.

Parameter
Name Description
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
Type Description
string | number

{string} A string representing the tag_template.

matchTagTemplateFromTagTemplateName(tagTemplateName)

matchTagTemplateFromTagTemplateName(tagTemplateName: string): string | number;

Parse the tag_template from TagTemplate resource.

Parameter
Name Description
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
Type Description
string | number

{string} A string representing the tag_template.

matchTaxonomyFromPolicyTagName(policyTagName)

matchTaxonomyFromPolicyTagName(policyTagName: string): string | number;

Parse the taxonomy from PolicyTag resource.

Parameter
Name Description
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
Type Description
string | number

{string} A string representing the taxonomy.

matchTaxonomyFromTaxonomyName(taxonomyName)

matchTaxonomyFromTaxonomyName(taxonomyName: string): string | number;

Parse the taxonomy from Taxonomy resource.

Parameter
Name Description
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
Type Description
string | number

{string} A string representing the taxonomy.

policyTagPath(project, location, taxonomy, policyTag)

policyTagPath(project: string, location: string, taxonomy: string, policyTag: string): string;

Return a fully-qualified policyTag resource name string.

Parameters
Name Description
project string
location string
taxonomy string
policyTag string
Returns
Type Description
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

setIamPolicy(request, options)

setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.ISetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Sets the IAM policy for a policy tag or a taxonomy.

Parameters
Name Description
request ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  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.
   */
  // const policy = {}
  /**
   *  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"`
   */
  // const updateMask = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callSetIamPolicy() {
    // Construct request
    const request = {
      resource,
      policy,
    };

    // Run request
    const response = await datacatalogClient.setIamPolicy(request);
    console.log(response);
  }

  callSetIamPolicy();

setIamPolicy(request, options, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

setIamPolicy(request, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

tagPath(project, location, entryGroup, entry, tag)

tagPath(project: string, location: string, entryGroup: string, entry: string, tag: string): string;

Return a fully-qualified tag resource name string.

Parameters
Name Description
project string
location string
entryGroup string
entry string
tag string
Returns
Type Description
string

{string} Resource name string.

tagTemplateFieldPath(project, location, tagTemplate, field)

tagTemplateFieldPath(project: string, location: string, tagTemplate: string, field: string): string;

Return a fully-qualified tagTemplateField resource name string.

Parameters
Name Description
project string
location string
tagTemplate string
field string
Returns
Type Description
string

{string} Resource name string.

tagTemplatePath(project, location, tagTemplate)

tagTemplatePath(project: string, location: string, tagTemplate: string): string;

Return a fully-qualified tagTemplate resource name string.

Parameters
Name Description
project string
location string
tagTemplate string
Returns
Type Description
string

{string} Resource name string.

taxonomyPath(project, location, taxonomy)

taxonomyPath(project: string, location: string, taxonomy: string): string;

Return a fully-qualified taxonomy resource name string.

Parameters
Name Description
project string
location string
taxonomy string
Returns
Type Description
string

{string} Resource name string.

testIamPermissions(request, options)

testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.ITestIamPermissionsResponse,
        protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
        {} | undefined
    ]>;

Returns your permissions on a specified policy tag or taxonomy.

Parameters
Name Description
request ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing TestIamPermissionsResponse. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  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 (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = ['abc','def']

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callTestIamPermissions() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

    // Run request
    const response = await datacatalogClient.testIamPermissions(request);
    console.log(response);
  }

  callTestIamPermissions();

testIamPermissions(request, options, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

testIamPermissions(request, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePolicyTag(request, options)

updatePolicyTag(request?: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.IPolicyTag,
        protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | undefined,
        {} | undefined
    ]>;

Updates a policy tag, including its display name, description, and parent policy tag.

Parameters
Name Description
request IUpdatePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing PolicyTag. Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The policy tag to update. You can update only its description, display
   *  name, and parent policy tag fields.
   */
  // const policyTag = {}
  /**
   *  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 
   *  (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).
   */
  // const updateMask = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callUpdatePolicyTag() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await datacatalogClient.updatePolicyTag(request);
    console.log(response);
  }

  callUpdatePolicyTag();

updatePolicyTag(request, options, callback)

updatePolicyTag(request: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePolicyTagRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePolicyTag(request, callback)

updatePolicyTag(request: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, callback: Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePolicyTagRequest
callback Callback<protos.google.cloud.datacatalog.v1.IPolicyTag, protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateTaxonomy(request, options)

updateTaxonomy(request?: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.datacatalog.v1.ITaxonomy,
        protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | undefined,
        {} | undefined
    ]>;

Updates a taxonomy, including its display name, description, and activated policy types.

Parameters
Name Description
request IUpdateTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * 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.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The taxonomy to update. You can update only its description, display name,
   *  and activated policy types.
   */
  // const taxonomy = {}
  /**
   *  Specifies fields to update. If not set, defaults to all fields you can
   *  update.
   *  For more information, see FieldMask 
   *  (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).
   */
  // const updateMask = {}

  // Imports the Datacatalog library
  const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1;

  // Instantiates a client
  const datacatalogClient = new PolicyTagManagerClient();

  async function callUpdateTaxonomy() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await datacatalogClient.updateTaxonomy(request);
    console.log(response);
  }

  callUpdateTaxonomy();

updateTaxonomy(request, options, callback)

updateTaxonomy(request: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateTaxonomyRequest
options CallOptions
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateTaxonomy(request, callback)

updateTaxonomy(request: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, callback: Callback<protos