Class v1.PolicyTagManagerClient (2.5.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)

constructor(opts?: ClientOptions);

Construct an instance of PolicyTagManagerClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

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.

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
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 [Taxonomy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

entryGroupPath(project, location, entryGroup)

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

Return a fully-qualified entryGroup resource name string.

Parameters
NameDescription
project string
location string
entryGroup string
Returns
TypeDescription
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
NameDescription
project string
location string
entryGroup string
entry string
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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`. This field is only used by Cloud IAM.
   */
  // 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
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 [Taxonomy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.datacatalog.v1.IPolicyTag>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 = await 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
NameDescription
request protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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
NameDescription
request protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 [Taxonomy]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.datacatalog.v1.ITaxonomy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Taxonomy]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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'

  // 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 = await 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
NameDescription
request protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Taxonomy] 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchEntryFromEntryName(entryName)

matchEntryFromEntryName(entryName: string): string | number;

Parse the entry from Entry resource.

Parameter
NameDescription
entryName string

A fully-qualified path representing Entry resource.

Returns
TypeDescription
string | number

{string} A string representing the entry.

matchEntryFromTagName(tagName)

matchEntryFromTagName(tagName: string): string | number;

Parse the entry from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the entry.

matchEntryGroupFromEntryGroupName(entryGroupName)

matchEntryGroupFromEntryGroupName(entryGroupName: string): string | number;

Parse the entry_group from EntryGroup resource.

Parameter
NameDescription
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the entry_group.

matchEntryGroupFromEntryName(entryName)

matchEntryGroupFromEntryName(entryName: string): string | number;

Parse the entry_group from Entry resource.

Parameter
NameDescription
entryName string

A fully-qualified path representing Entry resource.

Returns
TypeDescription
string | number

{string} A string representing the entry_group.

matchEntryGroupFromTagName(tagName)

matchEntryGroupFromTagName(tagName: string): string | number;

Parse the entry_group from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the entry_group.

matchFieldFromTagTemplateFieldName(tagTemplateFieldName)

matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the field from TagTemplateField resource.

Parameter
NameDescription
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
TypeDescription
string | number

{string} A string representing the field.

matchLocationFromEntryGroupName(entryGroupName)

matchLocationFromEntryGroupName(entryGroupName: string): string | number;

Parse the location from EntryGroup resource.

Parameter
NameDescription
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromEntryName(entryName)

matchLocationFromEntryName(entryName: string): string | number;

Parse the location from Entry resource.

Parameter
NameDescription
entryName string

A fully-qualified path representing Entry resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromPolicyTagName(policyTagName)

matchLocationFromPolicyTagName(policyTagName: string): string | number;

Parse the location from PolicyTag resource.

Parameter
NameDescription
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTagName(tagName)

matchLocationFromTagName(tagName: string): string | number;

Parse the location from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTagTemplateFieldName(tagTemplateFieldName)

matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the location from TagTemplateField resource.

Parameter
NameDescription
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTagTemplateName(tagTemplateName)

matchLocationFromTagTemplateName(tagTemplateName: string): string | number;

Parse the location from TagTemplate resource.

Parameter
NameDescription
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTaxonomyName(taxonomyName)

matchLocationFromTaxonomyName(taxonomyName: string): string | number;

Parse the location from Taxonomy resource.

Parameter
NameDescription
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchPolicyTagFromPolicyTagName(policyTagName)

matchPolicyTagFromPolicyTagName(policyTagName: string): string | number;

Parse the policy_tag from PolicyTag resource.

Parameter
NameDescription
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
TypeDescription
string | number

{string} A string representing the policy_tag.

matchProjectFromEntryGroupName(entryGroupName)

matchProjectFromEntryGroupName(entryGroupName: string): string | number;

Parse the project from EntryGroup resource.

Parameter
NameDescription
entryGroupName string

A fully-qualified path representing EntryGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromEntryName(entryName)

matchProjectFromEntryName(entryName: string): string | number;

Parse the project from Entry resource.

Parameter
NameDescription
entryName string

A fully-qualified path representing Entry resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromPolicyTagName(policyTagName)

matchProjectFromPolicyTagName(policyTagName: string): string | number;

Parse the project from PolicyTag resource.

Parameter
NameDescription
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTagName(tagName)

matchProjectFromTagName(tagName: string): string | number;

Parse the project from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTagTemplateFieldName(tagTemplateFieldName)

matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the project from TagTemplateField resource.

Parameter
NameDescription
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTagTemplateName(tagTemplateName)

matchProjectFromTagTemplateName(tagTemplateName: string): string | number;

Parse the project from TagTemplate resource.

Parameter
NameDescription
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTaxonomyName(taxonomyName)

matchProjectFromTaxonomyName(taxonomyName: string): string | number;

Parse the project from Taxonomy resource.

Parameter
NameDescription
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchTagFromTagName(tagName)

matchTagFromTagName(tagName: string): string | number;

Parse the tag from Tag resource.

Parameter
NameDescription
tagName string

A fully-qualified path representing Tag resource.

Returns
TypeDescription
string | number

{string} A string representing the tag.

matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName)

matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string): string | number;

Parse the tag_template from TagTemplateField resource.

Parameter
NameDescription
tagTemplateFieldName string

A fully-qualified path representing TagTemplateField resource.

Returns
TypeDescription
string | number

{string} A string representing the tag_template.

matchTagTemplateFromTagTemplateName(tagTemplateName)

matchTagTemplateFromTagTemplateName(tagTemplateName: string): string | number;

Parse the tag_template from TagTemplate resource.

Parameter
NameDescription
tagTemplateName string

A fully-qualified path representing TagTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the tag_template.

matchTaxonomyFromPolicyTagName(policyTagName)

matchTaxonomyFromPolicyTagName(policyTagName: string): string | number;

Parse the taxonomy from PolicyTag resource.

Parameter
NameDescription
policyTagName string

A fully-qualified path representing PolicyTag resource.

Returns
TypeDescription
string | number

{string} A string representing the taxonomy.

matchTaxonomyFromTaxonomyName(taxonomyName)

matchTaxonomyFromTaxonomyName(taxonomyName: string): string | number;

Parse the taxonomy from Taxonomy resource.

Parameter
NameDescription
taxonomyName string

A fully-qualified path representing Taxonomy resource.

Returns
TypeDescription
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
NameDescription
project string
location string
taxonomy string
policyTag string
Returns
TypeDescription
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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 = {}

  // 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
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
project string
location string
entryGroup string
entry string
tag string
Returns
TypeDescription
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
NameDescription
project string
location string
tagTemplate string
field string
Returns
TypeDescription
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
NameDescription
project string
location string
tagTemplate string
Returns
TypeDescription
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
NameDescription
project string
location string
taxonomy string
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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 = 'abc123'

  // 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
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
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>
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 [Taxonomy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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
NameDescription
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>
Returns
TypeDescription
void

updateTaxonomy(request, callback)

updateTaxonomy(request: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, callback: Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest
callback Callback<protos.google.cloud.datacatalog.v1.ITaxonomy, protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void