Data Catalog v1 API - Class PolicyTagManagerClient (2.2.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class PolicyTagManagerClient

Reference documentation and code samples for the Data Catalog v1 API class PolicyTagManagerClient.

PolicyTagManager client wrapper, for convenient use.

Inheritance

Object > PolicyTagManagerClient

Namespace

Google.Cloud.DataCatalog.V1

Assembly

Google.Cloud.DataCatalog.V1.dll

Remarks

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.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the PolicyTagManager service, which is a host of "datacatalog.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default PolicyTagManager scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default PolicyTagManager scopes are:

GrpcClient

public virtual PolicyTagManager.PolicyTagManagerClient GrpcClient { get; }

The underlying gRPC PolicyTagManager client

Property Value
TypeDescription
PolicyTagManager.PolicyTagManagerClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static PolicyTagManagerClient Create()

Synchronously creates a PolicyTagManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PolicyTagManagerClientBuilder.

Returns
TypeDescription
PolicyTagManagerClient

The created PolicyTagManagerClient.

CreateAsync(CancellationToken)

public static Task<PolicyTagManagerClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a PolicyTagManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PolicyTagManagerClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<PolicyTagManagerClient>

The task representing the created PolicyTagManagerClient.

CreatePolicyTag(CreatePolicyTagRequest, CallSettings)

public virtual PolicyTag CreatePolicyTag(CreatePolicyTagRequest request, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
requestCreatePolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
CreatePolicyTagRequest request = new CreatePolicyTagRequest
{
    ParentAsTaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
    PolicyTag = new PolicyTag(),
};
// Make the request
PolicyTag response = policyTagManagerClient.CreatePolicyTag(request);

CreatePolicyTag(TaxonomyName, PolicyTag, CallSettings)

public virtual PolicyTag CreatePolicyTag(TaxonomyName parent, PolicyTag policyTag, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentTaxonomyName

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
TaxonomyName parent = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = policyTagManagerClient.CreatePolicyTag(parent, policyTag);

CreatePolicyTag(String, PolicyTag, CallSettings)

public virtual PolicyTag CreatePolicyTag(string parent, PolicyTag policyTag, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentString

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = policyTagManagerClient.CreatePolicyTag(parent, policyTag);

CreatePolicyTagAsync(CreatePolicyTagRequest, CallSettings)

public virtual Task<PolicyTag> CreatePolicyTagAsync(CreatePolicyTagRequest request, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
requestCreatePolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
CreatePolicyTagRequest request = new CreatePolicyTagRequest
{
    ParentAsTaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
    PolicyTag = new PolicyTag(),
};
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(request);

CreatePolicyTagAsync(CreatePolicyTagRequest, CancellationToken)

public virtual Task<PolicyTag> CreatePolicyTagAsync(CreatePolicyTagRequest request, CancellationToken cancellationToken)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
requestCreatePolicyTagRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
CreatePolicyTagRequest request = new CreatePolicyTagRequest
{
    ParentAsTaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
    PolicyTag = new PolicyTag(),
};
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(request);

CreatePolicyTagAsync(TaxonomyName, PolicyTag, CallSettings)

public virtual Task<PolicyTag> CreatePolicyTagAsync(TaxonomyName parent, PolicyTag policyTag, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentTaxonomyName

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TaxonomyName parent = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(parent, policyTag);

CreatePolicyTagAsync(TaxonomyName, PolicyTag, CancellationToken)

public virtual Task<PolicyTag> CreatePolicyTagAsync(TaxonomyName parent, PolicyTag policyTag, CancellationToken cancellationToken)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentTaxonomyName

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TaxonomyName parent = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(parent, policyTag);

CreatePolicyTagAsync(String, PolicyTag, CallSettings)

public virtual Task<PolicyTag> CreatePolicyTagAsync(string parent, PolicyTag policyTag, CallSettings callSettings = null)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentString

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(parent, policyTag);

CreatePolicyTagAsync(String, PolicyTag, CancellationToken)

public virtual Task<PolicyTag> CreatePolicyTagAsync(string parent, PolicyTag policyTag, CancellationToken cancellationToken)

Creates a policy tag in a taxonomy.

Parameters
NameDescription
parentString

Required. Resource name of the taxonomy that the policy tag will belong to.

policyTagPolicyTag

The policy tag to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.CreatePolicyTagAsync(parent, policyTag);

CreateTaxonomy(LocationName, Taxonomy, CallSettings)

public virtual Taxonomy CreateTaxonomy(LocationName parent, Taxonomy taxonomy, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentLocationName

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Taxonomy

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = policyTagManagerClient.CreateTaxonomy(parent, taxonomy);

CreateTaxonomy(CreateTaxonomyRequest, CallSettings)

public virtual Taxonomy CreateTaxonomy(CreateTaxonomyRequest request, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
requestCreateTaxonomyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Taxonomy

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
CreateTaxonomyRequest request = new CreateTaxonomyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Taxonomy = new Taxonomy(),
};
// Make the request
Taxonomy response = policyTagManagerClient.CreateTaxonomy(request);

CreateTaxonomy(String, Taxonomy, CallSettings)

public virtual Taxonomy CreateTaxonomy(string parent, Taxonomy taxonomy, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentString

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Taxonomy

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = policyTagManagerClient.CreateTaxonomy(parent, taxonomy);

CreateTaxonomyAsync(LocationName, Taxonomy, CallSettings)

public virtual Task<Taxonomy> CreateTaxonomyAsync(LocationName parent, Taxonomy taxonomy, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentLocationName

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(parent, taxonomy);

CreateTaxonomyAsync(LocationName, Taxonomy, CancellationToken)

public virtual Task<Taxonomy> CreateTaxonomyAsync(LocationName parent, Taxonomy taxonomy, CancellationToken cancellationToken)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentLocationName

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(parent, taxonomy);

CreateTaxonomyAsync(CreateTaxonomyRequest, CallSettings)

public virtual Task<Taxonomy> CreateTaxonomyAsync(CreateTaxonomyRequest request, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
requestCreateTaxonomyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
CreateTaxonomyRequest request = new CreateTaxonomyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Taxonomy = new Taxonomy(),
};
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(request);

CreateTaxonomyAsync(CreateTaxonomyRequest, CancellationToken)

public virtual Task<Taxonomy> CreateTaxonomyAsync(CreateTaxonomyRequest request, CancellationToken cancellationToken)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
requestCreateTaxonomyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
CreateTaxonomyRequest request = new CreateTaxonomyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Taxonomy = new Taxonomy(),
};
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(request);

CreateTaxonomyAsync(String, Taxonomy, CallSettings)

public virtual Task<Taxonomy> CreateTaxonomyAsync(string parent, Taxonomy taxonomy, CallSettings callSettings = null)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentString

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(parent, taxonomy);

CreateTaxonomyAsync(String, Taxonomy, CancellationToken)

public virtual Task<Taxonomy> CreateTaxonomyAsync(string parent, Taxonomy taxonomy, CancellationToken cancellationToken)

Creates a taxonomy in a specified project.

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

Parameters
NameDescription
parentString

Required. Resource name of the project that the taxonomy will belong to.

taxonomyTaxonomy

The taxonomy to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Taxonomy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.CreateTaxonomyAsync(parent, taxonomy);

DeletePolicyTag(DeletePolicyTagRequest, CallSettings)

public virtual void DeletePolicyTag(DeletePolicyTagRequest request, CallSettings callSettings = null)

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
requestDeletePolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
DeletePolicyTagRequest request = new DeletePolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
policyTagManagerClient.DeletePolicyTag(request);

DeletePolicyTag(PolicyTagName, CallSettings)

public virtual void DeletePolicyTag(PolicyTagName name, CallSettings callSettings = null)

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
namePolicyTagName

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
policyTagManagerClient.DeletePolicyTag(name);

DeletePolicyTag(String, CallSettings)

public virtual void DeletePolicyTag(string name, CallSettings callSettings = null)

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
nameString

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLICY_TAG]";
// Make the request
policyTagManagerClient.DeletePolicyTag(name);

DeletePolicyTagAsync(DeletePolicyTagRequest, CallSettings)

public virtual Task DeletePolicyTagAsync(DeletePolicyTagRequest request, CallSettings callSettings = null)

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
requestDeletePolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
DeletePolicyTagRequest request = new DeletePolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(request);

DeletePolicyTagAsync(DeletePolicyTagRequest, CancellationToken)

public virtual Task DeletePolicyTagAsync(DeletePolicyTagRequest request, CancellationToken cancellationToken)

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
requestDeletePolicyTagRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
DeletePolicyTagRequest request = new DeletePolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(request);

DeletePolicyTagAsync(PolicyTagName, CallSettings)

public virtual Task DeletePolicyTagAsync(PolicyTagName name, CallSettings callSettings = null)

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
namePolicyTagName

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(name);

DeletePolicyTagAsync(PolicyTagName, CancellationToken)

public virtual Task DeletePolicyTagAsync(PolicyTagName name, CancellationToken cancellationToken)

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
namePolicyTagName

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(name);

DeletePolicyTagAsync(String, CallSettings)

public virtual Task DeletePolicyTagAsync(string name, CallSettings callSettings = null)

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
nameString

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLICY_TAG]";
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(name);

DeletePolicyTagAsync(String, CancellationToken)

public virtual Task DeletePolicyTagAsync(string name, CancellationToken cancellationToken)

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
nameString

Required. Resource name of the policy tag to delete.

Note: All of its descendant policy tags are also deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLICY_TAG]";
// Make the request
await policyTagManagerClient.DeletePolicyTagAsync(name);

DeleteTaxonomy(DeleteTaxonomyRequest, CallSettings)

public virtual void DeleteTaxonomy(DeleteTaxonomyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteTaxonomyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
DeleteTaxonomyRequest request = new DeleteTaxonomyRequest
{
    TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
};
// Make the request
policyTagManagerClient.DeleteTaxonomy(request);

DeleteTaxonomy(TaxonomyName, CallSettings)

public virtual void DeleteTaxonomy(TaxonomyName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
TaxonomyName name = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
policyTagManagerClient.DeleteTaxonomy(name);

DeleteTaxonomy(String, CallSettings)

public virtual void DeleteTaxonomy(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
// Make the request
policyTagManagerClient.DeleteTaxonomy(name);

DeleteTaxonomyAsync(DeleteTaxonomyRequest, CallSettings)

public virtual Task DeleteTaxonomyAsync(DeleteTaxonomyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteTaxonomyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteTaxonomyRequest request = new DeleteTaxonomyRequest
{
    TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
};
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(request);

DeleteTaxonomyAsync(DeleteTaxonomyRequest, CancellationToken)

public virtual Task DeleteTaxonomyAsync(DeleteTaxonomyRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestDeleteTaxonomyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteTaxonomyRequest request = new DeleteTaxonomyRequest
{
    TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
};
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(request);

DeleteTaxonomyAsync(TaxonomyName, CallSettings)

public virtual Task DeleteTaxonomyAsync(TaxonomyName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TaxonomyName name = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(name);

DeleteTaxonomyAsync(TaxonomyName, CancellationToken)

public virtual Task DeleteTaxonomyAsync(TaxonomyName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TaxonomyName name = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(name);

DeleteTaxonomyAsync(String, CallSettings)

public virtual Task DeleteTaxonomyAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(name);

DeleteTaxonomyAsync(String, CancellationToken)

public virtual Task DeleteTaxonomyAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameString

Required. Resource name of the taxonomy to delete.

Note: All policy tags in this taxonomy are also deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
// Make the request
await policyTagManagerClient.DeleteTaxonomyAsync(name);

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = policyTagManagerClient.GetIamPolicy(request);

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await policyTagManagerClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await policyTagManagerClient.GetIamPolicyAsync(request);

GetPolicyTag(GetPolicyTagRequest, CallSettings)

public virtual PolicyTag GetPolicyTag(GetPolicyTagRequest request, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
requestGetPolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
GetPolicyTagRequest request = new GetPolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
PolicyTag response = policyTagManagerClient.GetPolicyTag(request);

GetPolicyTag(PolicyTagName, CallSettings)

public virtual PolicyTag GetPolicyTag(PolicyTagName name, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
namePolicyTagName

Required. Resource name of the policy tag.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
PolicyTag response = policyTagManagerClient.GetPolicyTag(name);

GetPolicyTag(String, CallSettings)

public virtual PolicyTag GetPolicyTag(string name, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
nameString

Required. Resource name of the policy tag.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PolicyTag

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLICY_TAG]";
// Make the request
PolicyTag response = policyTagManagerClient.GetPolicyTag(name);

GetPolicyTagAsync(GetPolicyTagRequest, CallSettings)

public virtual Task<PolicyTag> GetPolicyTagAsync(GetPolicyTagRequest request, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
requestGetPolicyTagRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
GetPolicyTagRequest request = new GetPolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
PolicyTag response = await policyTagManagerClient.GetPolicyTagAsync(request);

GetPolicyTagAsync(GetPolicyTagRequest, CancellationToken)

public virtual Task<PolicyTag> GetPolicyTagAsync(GetPolicyTagRequest request, CancellationToken cancellationToken)

Gets a policy tag.

Parameters
NameDescription
requestGetPolicyTagRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
GetPolicyTagRequest request = new GetPolicyTagRequest
{
    PolicyTagName = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"),
};
// Make the request
PolicyTag response = await policyTagManagerClient.GetPolicyTagAsync(request);

GetPolicyTagAsync(PolicyTagName, CallSettings)

public virtual Task<PolicyTag> GetPolicyTagAsync(PolicyTagName name, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
namePolicyTagName

Required. Resource name of the policy tag.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
PolicyTag response = await policyTagManagerClient.GetPolicyTagAsync(name);

GetPolicyTagAsync(PolicyTagName, CancellationToken)

public virtual Task<PolicyTag> GetPolicyTagAsync(PolicyTagName name, CancellationToken cancellationToken)

Gets a policy tag.

Parameters
NameDescription
namePolicyTagName

Required. Resource name of the policy tag.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTagName name = PolicyTagName.FromProjectLocationTaxonomyPolicyTag("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
// Make the request
PolicyTag response = await policyTagManagerClient.GetPolicyTagAsync(name);

GetPolicyTagAsync(String, CallSettings)

public virtual Task<PolicyTag> GetPolicyTagAsync(string name, CallSettings callSettings = null)

Gets a policy tag.

Parameters
NameDescription
nameString

Required. Resource name of the policy tag.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLICY_TAG]";
// Make the request
PolicyTag response = await policyTagManagerClient.GetPolicyTagAsync(name);

GetPolicyTagAsync(String, CancellationToken)

public virtual Task<PolicyTag> GetPolicyTagAsync(string name, CancellationToken cancellationToken)

Gets a policy tag.

Parameters
NameDescription
nameString

Required. Resource name of the policy tag.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PolicyTag>

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]/policyTags/[POLI