Policy tag manager serialization API service allows clients to manipulate their taxonomies and policy tags data with serialized format. v1beta1
Package
@google-cloud/datacatalogConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of PolicyTagManagerSerializationClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
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;
};
policyTagManagerSerializationStub
policyTagManagerSerializationStub?: 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. |
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. |
exportTaxonomies(request, options)
exportTaxonomies(request?: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, options?: CallOptions): Promise<[
protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse,
(protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | undefined),
{} | undefined
]>;
Exports all taxonomies and their policy tags in a project.
This method generates SerializedTaxonomy protos with nested policy tags that can be used as an input for future ImportTaxonomies calls.
Parameters | |
---|---|
Name | Description |
request |
IExportTaxonomiesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse,
(protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ExportTaxonomiesResponse. Please see the documentation for more details and examples. |
/**
* 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 taxonomies to be exported
* will share.
*/
// const parent = 'abc123'
/**
* Required. Resource names of the taxonomies to be exported.
*/
// const taxonomies = ['abc','def']
/**
* Export taxonomies as serialized taxonomies.
*/
// const serializedTaxonomies = true
// Imports the Datacatalog library
const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1beta1;
// Instantiates a client
const datacatalogClient = new PolicyTagManagerSerializationClient();
async function callExportTaxonomies() {
// Construct request
const request = {
parent,
taxonomies,
};
// Run request
const response = await datacatalogClient.exportTaxonomies(request);
console.log(response);
}
callExportTaxonomies();
exportTaxonomies(request, options, callback)
exportTaxonomies(request: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportTaxonomiesRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
exportTaxonomies(request, callback)
exportTaxonomies(request: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, callback: Callback<protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportTaxonomiesRequest
|
callback |
Callback<protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest | 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 |
importTaxonomies(request, options)
importTaxonomies(request?: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, options?: CallOptions): Promise<[
protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse,
(protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | undefined),
{} | undefined
]>;
Imports all taxonomies and their policy tags to a project as new taxonomies.
This method provides a bulk taxonomy / policy tag creation using nested proto structure.
Parameters | |
---|---|
Name | Description |
request |
IImportTaxonomiesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse,
(protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | undefined),
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ImportTaxonomiesResponse. Please see the documentation for more details and examples. |
/**
* 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 project that the imported taxonomies will belong
* to.
*/
// const parent = 'abc123'
/**
* Inline source used for taxonomies to be imported.
*/
// const inlineSource = {}
// Imports the Datacatalog library
const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1beta1;
// Instantiates a client
const datacatalogClient = new PolicyTagManagerSerializationClient();
async function callImportTaxonomies() {
// Construct request
const request = {
parent,
};
// Run request
const response = await datacatalogClient.importTaxonomies(request);
console.log(response);
}
callImportTaxonomies();
importTaxonomies(request, options, callback)
importTaxonomies(request: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, options: CallOptions, callback: Callback<protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IImportTaxonomiesRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importTaxonomies(request, callback)
importTaxonomies(request: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, callback: Callback<protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IImportTaxonomiesRequest
|
callback |
Callback<protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest | 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. |
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. |
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. |