public abstract class PolicyTagManagerSerializationClient
Reference documentation and code samples for the Data Catalog v1 API 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 you to manipulate your policy tags and taxonomies in a serialized format.
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 |
IReadOnlyListstring |
The default PolicyTagManagerSerialization scopes are:
GrpcClient
public virtual PolicyTagManagerSerialization.PolicyTagManagerSerializationClient GrpcClient { get; }
The underlying gRPC PolicyTagManagerSerialization client
Property Value | |
---|---|
Type | Description |
PolicyTagManagerSerializationPolicyTagManagerSerializationClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
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)
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 |
TaskPolicyTagManagerSerializationClient |
The task representing the created PolicyTagManagerSerializationClient. |
ExportTaxonomies(ExportTaxonomiesRequest, CallSettings)
public virtual ExportTaxonomiesResponse ExportTaxonomies(ExportTaxonomiesRequest request, CallSettings callSettings = null)
Exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project.
This method generates SerializedTaxonomy
protocol buffers with nested
policy tags that can be used as input for 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 in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project.
This method generates SerializedTaxonomy
protocol buffers with nested
policy tags that can be used as input for 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 |
TaskExportTaxonomiesResponse |
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 in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project.
This method generates SerializedTaxonomy
protocol buffers with nested
policy tags that can be used as input for 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 |
TaskExportTaxonomiesResponse |
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) in a given project by importing from inlined or cross-regional sources.
For a cross-regional source, new taxonomies are created by copying from a source in another region.
For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.
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) in a given project by importing from inlined or cross-regional sources.
For a cross-regional source, new taxonomies are created by copying from a source in another region.
For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.
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 |
TaskImportTaxonomiesResponse |
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) in a given project by importing from inlined or cross-regional sources.
For a cross-regional source, new taxonomies are created by copying from a source in another region.
For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.
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 |
TaskImportTaxonomiesResponse |
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);
ReplaceTaxonomy(ReplaceTaxonomyRequest, CallSettings)
public virtual Taxonomy ReplaceTaxonomy(ReplaceTaxonomyRequest request, CallSettings callSettings = null)
Replaces (updates) a taxonomy and all its policy tags.
The taxonomy and its entire hierarchy of policy tags must be
represented literally by SerializedTaxonomy
and the nested
SerializedPolicyTag
messages.
This operation automatically does the following:
- Deletes the existing policy tags that are missing from the
SerializedPolicyTag
. - Creates policy tags that don't have resource names. They are considered new.
- Updates policy tags with valid resources names accordingly.
Parameters | |
---|---|
Name | Description |
request |
ReplaceTaxonomyRequest 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 |
Taxonomy |
The RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = PolicyTagManagerSerializationClient.Create();
// Initialize request argument(s)
ReplaceTaxonomyRequest request = new ReplaceTaxonomyRequest
{
TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
SerializedTaxonomy = new SerializedTaxonomy(),
};
// Make the request
Taxonomy response = policyTagManagerSerializationClient.ReplaceTaxonomy(request);
ReplaceTaxonomyAsync(ReplaceTaxonomyRequest, CallSettings)
public virtual Task<Taxonomy> ReplaceTaxonomyAsync(ReplaceTaxonomyRequest request, CallSettings callSettings = null)
Replaces (updates) a taxonomy and all its policy tags.
The taxonomy and its entire hierarchy of policy tags must be
represented literally by SerializedTaxonomy
and the nested
SerializedPolicyTag
messages.
This operation automatically does the following:
- Deletes the existing policy tags that are missing from the
SerializedPolicyTag
. - Creates policy tags that don't have resource names. They are considered new.
- Updates policy tags with valid resources names accordingly.
Parameters | |
---|---|
Name | Description |
request |
ReplaceTaxonomyRequest 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 |
TaskTaxonomy |
A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ReplaceTaxonomyRequest request = new ReplaceTaxonomyRequest
{
TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
SerializedTaxonomy = new SerializedTaxonomy(),
};
// Make the request
Taxonomy response = await policyTagManagerSerializationClient.ReplaceTaxonomyAsync(request);
ReplaceTaxonomyAsync(ReplaceTaxonomyRequest, CancellationToken)
public virtual Task<Taxonomy> ReplaceTaxonomyAsync(ReplaceTaxonomyRequest request, CancellationToken cancellationToken)
Replaces (updates) a taxonomy and all its policy tags.
The taxonomy and its entire hierarchy of policy tags must be
represented literally by SerializedTaxonomy
and the nested
SerializedPolicyTag
messages.
This operation automatically does the following:
- Deletes the existing policy tags that are missing from the
SerializedPolicyTag
. - Creates policy tags that don't have resource names. They are considered new.
- Updates policy tags with valid resources names accordingly.
Parameters | |
---|---|
Name | Description |
request |
ReplaceTaxonomyRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTaxonomy |
A Task containing the RPC response. |
// Create client
PolicyTagManagerSerializationClient policyTagManagerSerializationClient = await PolicyTagManagerSerializationClient.CreateAsync();
// Initialize request argument(s)
ReplaceTaxonomyRequest request = new ReplaceTaxonomyRequest
{
TaxonomyName = TaxonomyName.FromProjectLocationTaxonomy("[PROJECT]", "[LOCATION]", "[TAXONOMY]"),
SerializedTaxonomy = new SerializedTaxonomy(),
};
// Make the request
Taxonomy response = await policyTagManagerSerializationClient.ReplaceTaxonomyAsync(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.