public abstract class PolicyTagManagerSerializationClient
PolicyTagManagerSerialization client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DataCatalog.V1Assembly
Google.Cloud.DataCatalog.V1.dll
Remarks
Policy Tag Manager serialization API service allows clients to manipulate their policy tags and taxonomies in serialized format, where taxonomy is a hierarchical group of policy tags.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the PolicyTagManagerSerialization service, which is a host of "datacatalog.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default PolicyTagManagerSerialization scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default PolicyTagManagerSerialization scopes are:
GrpcClient
public virtual PolicyTagManagerSerialization.PolicyTagManagerSerializationClient GrpcClient { get; }
The underlying gRPC PolicyTagManagerSerialization client
Property Value | |
---|---|
Type | Description |
PolicyTagManagerSerialization.PolicyTagManagerSerializationClient |
Methods
Create()
public static PolicyTagManagerSerializationClient Create()
Synchronously creates a PolicyTagManagerSerializationClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PolicyTagManagerSerializationClientBuilder.
Returns | |
---|---|
Type | Description |
PolicyTagManagerSerializationClient | The created PolicyTagManagerSerializationClient. |
CreateAsync(CancellationToken)
public static Task<PolicyTagManagerSerializationClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a PolicyTagManagerSerializationClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PolicyTagManagerSerializationClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<PolicyTagManagerSerializationClient> | The task representing the created PolicyTagManagerSerializationClient. |
ExportTaxonomies(ExportTaxonomiesRequest, CallSettings)
public virtual ExportTaxonomiesResponse ExportTaxonomies(ExportTaxonomiesRequest request, CallSettings callSettings = null)
Exports taxonomies as the requested type and returns the taxonomies including their policy tags. The requested taxonomies must belong to one project.
SerializedTaxonomy protos with nested policy tags that are generated by this method can be used as input for future ImportTaxonomies calls.
Parameters | |
---|---|
Name | Description |
request | ExportTaxonomiesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ExportTaxonomiesResponse | The RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = PolicyTagManagerSerializationClient.Create();
// Initialize request argument(s)
ExportTaxonomiesRequest request = new ExportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TaxonomiesAsTaxonomyNames =
{
TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
},
SerializedTaxonomies = false,
};
// Make the request
ExportTaxonomiesResponse response = policyTagManagerSerializationClient.ExportTaxonomies(request);
ExportTaxonomiesAsync(ExportTaxonomiesRequest, CallSettings)
public virtual Task<ExportTaxonomiesResponse> ExportTaxonomiesAsync(ExportTaxonomiesRequest request, CallSettings callSettings = null)
Exports taxonomies as the requested type and returns the taxonomies including their policy tags. The requested taxonomies must belong to one project.
SerializedTaxonomy protos with nested policy tags that are generated by this method can be used as input for future ImportTaxonomies calls.
Parameters | |
---|---|
Name | Description |
request | ExportTaxonomiesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ExportTaxonomiesResponse> | A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ExportTaxonomiesRequest request = new ExportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TaxonomiesAsTaxonomyNames =
{
TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
},
SerializedTaxonomies = false,
};
// Make the request
ExportTaxonomiesResponse response = await policyTagManagerSerializationClient.ExportTaxonomiesAsync(request);
ExportTaxonomiesAsync(ExportTaxonomiesRequest, CancellationToken)
public virtual Task<ExportTaxonomiesResponse> ExportTaxonomiesAsync(ExportTaxonomiesRequest request, CancellationToken cancellationToken)
Exports taxonomies as the requested type and returns the taxonomies including their policy tags. The requested taxonomies must belong to one project.
SerializedTaxonomy protos with nested policy tags that are generated by this method can be used as input for future ImportTaxonomies calls.
Parameters | |
---|---|
Name | Description |
request | ExportTaxonomiesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ExportTaxonomiesResponse> | A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ExportTaxonomiesRequest request = new ExportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TaxonomiesAsTaxonomyNames =
{
TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
},
SerializedTaxonomies = false,
};
// Make the request
ExportTaxonomiesResponse response = await policyTagManagerSerializationClient.ExportTaxonomiesAsync(request);
ImportTaxonomies(ImportTaxonomiesRequest, CallSettings)
public virtual ImportTaxonomiesResponse ImportTaxonomies(ImportTaxonomiesRequest request, CallSettings callSettings = null)
Creates new taxonomies (including their policy tags) by importing from inlined source or cross-regional source. New taxonomies will be created in a given parent project.
If using the cross-regional source, a new taxonomy is created by copying from a source in another region.
If using the inlined source, this method provides a way to bulk create taxonomies and policy tags using nested proto structure.
Parameters | |
---|---|
Name | Description |
request | ImportTaxonomiesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ImportTaxonomiesResponse | The RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = PolicyTagManagerSerializationClient.Create();
// Initialize request argument(s)
ImportTaxonomiesRequest request = new ImportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InlineSource = new InlineSource(),
};
// Make the request
ImportTaxonomiesResponse response = policyTagManagerSerializationClient.ImportTaxonomies(request);
ImportTaxonomiesAsync(ImportTaxonomiesRequest, CallSettings)
public virtual Task<ImportTaxonomiesResponse> ImportTaxonomiesAsync(ImportTaxonomiesRequest request, CallSettings callSettings = null)
Creates new taxonomies (including their policy tags) by importing from inlined source or cross-regional source. New taxonomies will be created in a given parent project.
If using the cross-regional source, a new taxonomy is created by copying from a source in another region.
If using the inlined source, this method provides a way to bulk create taxonomies and policy tags using nested proto structure.
Parameters | |
---|---|
Name | Description |
request | ImportTaxonomiesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ImportTaxonomiesResponse> | A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ImportTaxonomiesRequest request = new ImportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InlineSource = new InlineSource(),
};
// Make the request
ImportTaxonomiesResponse response = await policyTagManagerSerializationClient.ImportTaxonomiesAsync(request);
ImportTaxonomiesAsync(ImportTaxonomiesRequest, CancellationToken)
public virtual Task<ImportTaxonomiesResponse> ImportTaxonomiesAsync(ImportTaxonomiesRequest request, CancellationToken cancellationToken)
Creates new taxonomies (including their policy tags) by importing from inlined source or cross-regional source. New taxonomies will be created in a given parent project.
If using the cross-regional source, a new taxonomy is created by copying from a source in another region.
If using the inlined source, this method provides a way to bulk create taxonomies and policy tags using nested proto structure.
Parameters | |
---|---|
Name | Description |
request | ImportTaxonomiesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ImportTaxonomiesResponse> | A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ImportTaxonomiesRequest request = new ImportTaxonomiesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
InlineSource = new InlineSource(),
};
// Make the request
ImportTaxonomiesResponse response = await policyTagManagerSerializationClient.ImportTaxonomiesAsync(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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.