Data Catalog v1 API - Class PolicyTagManagerClient (2.3.0)

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

GoogleCloudGoogle.Cloud.DataCatalogV1

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
IReadOnlyListstring
Remarks

The default PolicyTagManager scopes are:

GrpcClient

public virtual PolicyTagManager.PolicyTagManagerClient GrpcClient { get; }

The underlying gRPC PolicyTagManager client

Property Value
TypeDescription
PolicyTagManagerPolicyTagManagerClient

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)

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
TaskPolicyTagManagerClient

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskTaxonomy

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
TaskTaxonomy

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
TaskTaxonomy

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
TaskTaxonomy

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
TaskTaxonomy

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
TaskTaxonomy

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
TaskPolicy

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
TaskPolicy

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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
TaskPolicyTag

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);

GetTaxonomy(GetTaxonomyRequest, CallSettings)

public virtual Taxonomy GetTaxonomy(GetTaxonomyRequest request, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
requestGetTaxonomyRequest

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)
GetTaxonomyRequest request = new GetTaxonomyRequest
{
    TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
};
// Make the request
Taxonomy response = policyTagManagerClient.GetTaxonomy(request);

GetTaxonomy(TaxonomyName, CallSettings)

public virtual Taxonomy GetTaxonomy(TaxonomyName name, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to get.

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)
TaxonomyName name = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
Taxonomy response = policyTagManagerClient.GetTaxonomy(name);

GetTaxonomy(string, CallSettings)

public virtual Taxonomy GetTaxonomy(string name, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
namestring

Required. Resource name of the taxonomy to get.

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 name = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
// Make the request
Taxonomy response = policyTagManagerClient.GetTaxonomy(name);

GetTaxonomyAsync(GetTaxonomyRequest, CallSettings)

public virtual Task<Taxonomy> GetTaxonomyAsync(GetTaxonomyRequest request, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
requestGetTaxonomyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

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

GetTaxonomyAsync(GetTaxonomyRequest, CancellationToken)

public virtual Task<Taxonomy> GetTaxonomyAsync(GetTaxonomyRequest request, CancellationToken cancellationToken)

Gets a taxonomy.

Parameters
NameDescription
requestGetTaxonomyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

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

GetTaxonomyAsync(TaxonomyName, CallSettings)

public virtual Task<Taxonomy> GetTaxonomyAsync(TaxonomyName name, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTaxonomy

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
Taxonomy response = await policyTagManagerClient.GetTaxonomyAsync(name);

GetTaxonomyAsync(TaxonomyName, CancellationToken)

public virtual Task<Taxonomy> GetTaxonomyAsync(TaxonomyName name, CancellationToken cancellationToken)

Gets a taxonomy.

Parameters
NameDescription
nameTaxonomyName

Required. Resource name of the taxonomy to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTaxonomy

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
Taxonomy response = await policyTagManagerClient.GetTaxonomyAsync(name);

GetTaxonomyAsync(string, CallSettings)

public virtual Task<Taxonomy> GetTaxonomyAsync(string name, CallSettings callSettings = null)

Gets a taxonomy.

Parameters
NameDescription
namestring

Required. Resource name of the taxonomy to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTaxonomy

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
Taxonomy response = await policyTagManagerClient.GetTaxonomyAsync(name);

GetTaxonomyAsync(string, CancellationToken)

public virtual Task<Taxonomy> GetTaxonomyAsync(string name, CancellationToken cancellationToken)

Gets a taxonomy.

Parameters
NameDescription
namestring

Required. Resource name of the taxonomy to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTaxonomy

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
Taxonomy response = await policyTagManagerClient.GetTaxonomyAsync(name);

ListPolicyTags(ListPolicyTagsRequest, CallSettings)

public virtual PagedEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTags(ListPolicyTagsRequest request, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
requestListPolicyTagsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPolicyTagsResponsePolicyTag

A pageable sequence of PolicyTag resources.

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

// Iterate over all response items, lazily performing RPCs as required
foreach (PolicyTag item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPolicyTagsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPolicyTags(TaxonomyName, string, int?, CallSettings)

public virtual PagedEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTags(TaxonomyName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
parentTaxonomyName

Required. Resource name of the taxonomy to list the policy tags of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPolicyTagsResponsePolicyTag

A pageable sequence of PolicyTag resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
TaxonomyName parent = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
PagedEnumerable<ListPolicyTagsResponse, PolicyTag> response = policyTagManagerClient.ListPolicyTags(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PolicyTag item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPolicyTagsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPolicyTags(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTags(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
parentstring

Required. Resource name of the taxonomy to list the policy tags of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPolicyTagsResponsePolicyTag

A pageable sequence of PolicyTag resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/taxonomies/[TAXONOMY]";
// Make the request
PagedEnumerable<ListPolicyTagsResponse, PolicyTag> response = policyTagManagerClient.ListPolicyTags(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PolicyTag item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPolicyTagsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPolicyTagsAsync(ListPolicyTagsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTagsAsync(ListPolicyTagsRequest request, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
requestListPolicyTagsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPolicyTagsResponsePolicyTag

A pageable asynchronous sequence of PolicyTag resources.

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

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PolicyTag item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPolicyTagsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPolicyTagsAsync(TaxonomyName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTagsAsync(TaxonomyName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
parentTaxonomyName

Required. Resource name of the taxonomy to list the policy tags of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPolicyTagsResponsePolicyTag

A pageable asynchronous sequence of PolicyTag resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TaxonomyName parent = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
// Make the request
PagedAsyncEnumerable<ListPolicyTagsResponse, PolicyTag> response = policyTagManagerClient.ListPolicyTagsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PolicyTag item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPolicyTagsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPolicyTagsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPolicyTagsResponse, PolicyTag> ListPolicyTagsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all policy tags in a taxonomy.

Parameters
NameDescription
parentstring

Required. Resource name of the taxonomy to list the policy tags of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPolicyTagsResponsePolicyTag

A pageable asynchronous sequence of PolicyTag resources.

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

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PolicyTag item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPolicyTagsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PolicyTag item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PolicyTag> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PolicyTag item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomies(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomies(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. Resource name of the project to list the taxonomies of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTaxonomiesResponseTaxonomy

A pageable sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomies(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Taxonomy item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTaxonomiesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomies(ListTaxonomiesRequest, CallSettings)

public virtual PagedEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomies(ListTaxonomiesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListTaxonomiesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTaxonomiesResponseTaxonomy

A pageable sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
ListTaxonomiesRequest request = new ListTaxonomiesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomies(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Taxonomy item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTaxonomiesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomies(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomies(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. Resource name of the project to list the taxonomies of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTaxonomiesResponseTaxonomy

A pageable sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomies(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Taxonomy item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTaxonomiesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomiesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomiesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

Required. Resource name of the project to list the taxonomies of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTaxonomiesResponseTaxonomy

A pageable asynchronous sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomiesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Taxonomy item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTaxonomiesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomiesAsync(ListTaxonomiesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomiesAsync(ListTaxonomiesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListTaxonomiesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTaxonomiesResponseTaxonomy

A pageable asynchronous sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
ListTaxonomiesRequest request = new ListTaxonomiesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomiesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Taxonomy item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTaxonomiesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTaxonomiesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> ListTaxonomiesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

Required. Resource name of the project to list the taxonomies of.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTaxonomiesResponseTaxonomy

A pageable asynchronous sequence of Taxonomy resources.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListTaxonomiesResponse, Taxonomy> response = policyTagManagerClient.ListTaxonomiesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Taxonomy item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTaxonomiesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Taxonomy item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Taxonomy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Taxonomy item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetIamPolicyRequest

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)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = policyTagManagerClient.SetIamPolicy(request);

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await policyTagManagerClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestSetIamPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await policyTagManagerClient.SetIamPolicyAsync(request);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns your permissions on a specified policy tag or taxonomy.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = policyTagManagerClient.TestIamPermissions(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns your permissions on a specified policy tag or taxonomy.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await policyTagManagerClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns your permissions on a specified policy tag or taxonomy.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await policyTagManagerClient.TestIamPermissionsAsync(request);

UpdatePolicyTag(PolicyTag, CallSettings)

public virtual PolicyTag UpdatePolicyTag(PolicyTag policyTag, CallSettings callSettings = null)

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

Parameters
NameDescription
policyTagPolicyTag

The policy tag to update. You can update only its description, display name, and parent policy tag fields.

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)
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = policyTagManagerClient.UpdatePolicyTag(policyTag);

UpdatePolicyTag(UpdatePolicyTagRequest, CallSettings)

public virtual PolicyTag UpdatePolicyTag(UpdatePolicyTagRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdatePolicyTagRequest

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)
UpdatePolicyTagRequest request = new UpdatePolicyTagRequest
{
    PolicyTag = new PolicyTag(),
    UpdateMask = new FieldMask(),
};
// Make the request
PolicyTag response = policyTagManagerClient.UpdatePolicyTag(request);

UpdatePolicyTagAsync(PolicyTag, CallSettings)

public virtual Task<PolicyTag> UpdatePolicyTagAsync(PolicyTag policyTag, CallSettings callSettings = null)

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

Parameters
NameDescription
policyTagPolicyTag

The policy tag to update. You can update only its description, display name, and parent policy tag fields.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicyTag

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.UpdatePolicyTagAsync(policyTag);

UpdatePolicyTagAsync(PolicyTag, CancellationToken)

public virtual Task<PolicyTag> UpdatePolicyTagAsync(PolicyTag policyTag, CancellationToken cancellationToken)

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

Parameters
NameDescription
policyTagPolicyTag

The policy tag to update. You can update only its description, display name, and parent policy tag fields.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicyTag

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
PolicyTag policyTag = new PolicyTag();
// Make the request
PolicyTag response = await policyTagManagerClient.UpdatePolicyTagAsync(policyTag);

UpdatePolicyTagAsync(UpdatePolicyTagRequest, CallSettings)

public virtual Task<PolicyTag> UpdatePolicyTagAsync(UpdatePolicyTagRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdatePolicyTagRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicyTag

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
UpdatePolicyTagRequest request = new UpdatePolicyTagRequest
{
    PolicyTag = new PolicyTag(),
    UpdateMask = new FieldMask(),
};
// Make the request
PolicyTag response = await policyTagManagerClient.UpdatePolicyTagAsync(request);

UpdatePolicyTagAsync(UpdatePolicyTagRequest, CancellationToken)

public virtual Task<PolicyTag> UpdatePolicyTagAsync(UpdatePolicyTagRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdatePolicyTagRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicyTag

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
UpdatePolicyTagRequest request = new UpdatePolicyTagRequest
{
    PolicyTag = new PolicyTag(),
    UpdateMask = new FieldMask(),
};
// Make the request
PolicyTag response = await policyTagManagerClient.UpdatePolicyTagAsync(request);

UpdateTaxonomy(Taxonomy, CallSettings)

public virtual Taxonomy UpdateTaxonomy(Taxonomy taxonomy, CallSettings callSettings = null)

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

Parameters
NameDescription
taxonomyTaxonomy

The taxonomy to update. You can update only its description, display name, and activated policy types.

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)
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = policyTagManagerClient.UpdateTaxonomy(taxonomy);

UpdateTaxonomy(UpdateTaxonomyRequest, CallSettings)

public virtual Taxonomy UpdateTaxonomy(UpdateTaxonomyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateTaxonomyRequest

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)
UpdateTaxonomyRequest request = new UpdateTaxonomyRequest
{
    Taxonomy = new Taxonomy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Taxonomy response = policyTagManagerClient.UpdateTaxonomy(request);

UpdateTaxonomyAsync(Taxonomy, CallSettings)

public virtual Task<Taxonomy> UpdateTaxonomyAsync(Taxonomy taxonomy, CallSettings callSettings = null)

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

Parameters
NameDescription
taxonomyTaxonomy

The taxonomy to update. You can update only its description, display name, and activated policy types.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.UpdateTaxonomyAsync(taxonomy);

UpdateTaxonomyAsync(Taxonomy, CancellationToken)

public virtual Task<Taxonomy> UpdateTaxonomyAsync(Taxonomy taxonomy, CancellationToken cancellationToken)

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

Parameters
NameDescription
taxonomyTaxonomy

The taxonomy to update. You can update only its description, display name, and activated policy types.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
Taxonomy taxonomy = new Taxonomy();
// Make the request
Taxonomy response = await policyTagManagerClient.UpdateTaxonomyAsync(taxonomy);

UpdateTaxonomyAsync(UpdateTaxonomyRequest, CallSettings)

public virtual Task<Taxonomy> UpdateTaxonomyAsync(UpdateTaxonomyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateTaxonomyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateTaxonomyRequest request = new UpdateTaxonomyRequest
{
    Taxonomy = new Taxonomy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Taxonomy response = await policyTagManagerClient.UpdateTaxonomyAsync(request);

UpdateTaxonomyAsync(UpdateTaxonomyRequest, CancellationToken)

public virtual Task<Taxonomy> UpdateTaxonomyAsync(UpdateTaxonomyRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateTaxonomyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTaxonomy

A Task containing the RPC response.

Example
// Create client
PolicyTagManagerClient policyTagManagerClient = await PolicyTagManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateTaxonomyRequest request = new UpdateTaxonomyRequest
{
    Taxonomy = new Taxonomy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Taxonomy response = await policyTagManagerClient.UpdateTaxonomyAsync(request);