Dela via


Glossary.PartialUpdate Method

Definition

Overloads

PartialUpdate(String, RequestContent, Nullable<Boolean>, RequestContext)

[Protocol Method] Update the glossary partially. Some properties such as qualifiedName are not allowed to be updated.

So far we only supports partial updating shortDescription, longDescription, language and usage for glossary.

Recommend using 'ignoreTermsAndCategories=true' to reduce response body size.

PartialUpdate(String, IDictionary<String,String>, Nullable<Boolean>, CancellationToken)

Update the glossary partially. Some properties such as qualifiedName are not allowed to be updated.

So far we only supports partial updating shortDescription, longDescription, language and usage for glossary.

Recommend using 'ignoreTermsAndCategories=true' to reduce response body size.

PartialUpdate(String, RequestContent, Nullable<Boolean>, RequestContext)

Source:
Glossary.cs

[Protocol Method] Update the glossary partially. Some properties such as qualifiedName are not allowed to be updated.

So far we only supports partial updating shortDescription, longDescription, language and usage for glossary.

Recommend using 'ignoreTermsAndCategories=true' to reduce response body size.

public virtual Azure.Response PartialUpdate (string glossaryId, Azure.Core.RequestContent content, bool? ignoreTermsAndCategories = default, Azure.RequestContext context = default);
abstract member PartialUpdate : string * Azure.Core.RequestContent * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.PartialUpdate : string * Azure.Core.RequestContent * Nullable<bool> * Azure.RequestContext -> Azure.Response
Public Overridable Function PartialUpdate (glossaryId As String, content As RequestContent, Optional ignoreTermsAndCategories As Nullable(Of Boolean) = Nothing, Optional context As RequestContext = Nothing) As Response

Parameters

glossaryId
String

The globally unique identifier for glossary.

content
RequestContent

The content to send as the body of the request.

ignoreTermsAndCategories
Nullable<Boolean>

Whether ignore terms and categories.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

glossaryId or content is null.

glossaryId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call PartialUpdate and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();

using RequestContent content = RequestContent.Create(new
{
    key = "<body>",
});
Response response = client.PartialUpdate("<glossaryId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call PartialUpdate with all parameters and request content and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01");

using RequestContent content = RequestContent.Create(new
{
    key = "<body>",
});
Response response = client.PartialUpdate("<glossaryId>", content, ignoreTermsAndCategories: true);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString());
Console.WriteLine(result.GetProperty("longDescription").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("qualifiedName").ToString());
Console.WriteLine(result.GetProperty("shortDescription").ToString());
Console.WriteLine(result.GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("createTime").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("updateTime").ToString());
Console.WriteLine(result.GetProperty("updatedBy").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("usage").ToString());

Applies to

PartialUpdate(String, IDictionary<String,String>, Nullable<Boolean>, CancellationToken)

Source:
Glossary.cs

Update the glossary partially. Some properties such as qualifiedName are not allowed to be updated.

So far we only supports partial updating shortDescription, longDescription, language and usage for glossary.

Recommend using 'ignoreTermsAndCategories=true' to reduce response body size.

public virtual Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary> PartialUpdate (string glossaryId, System.Collections.Generic.IDictionary<string,string> body, bool? ignoreTermsAndCategories = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PartialUpdate : string * System.Collections.Generic.IDictionary<string, string> * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary>
override this.PartialUpdate : string * System.Collections.Generic.IDictionary<string, string> * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary>
Public Overridable Function PartialUpdate (glossaryId As String, body As IDictionary(Of String, String), Optional ignoreTermsAndCategories As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AtlasGlossary)

Parameters

glossaryId
String

The globally unique identifier for glossary.

body
IDictionary<String,String>

A map containing keys as attribute names and values as corresponding attribute values.

ignoreTermsAndCategories
Nullable<Boolean>

Whether ignore terms and categories.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

glossaryId or body is null.

glossaryId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call PartialUpdate.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();

Response<AtlasGlossary> response = client.PartialUpdate("<glossaryId>", new Dictionary<string, string>
{
    ["key"] = "<body>"
});

This sample shows how to call PartialUpdate with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01");

Response<AtlasGlossary> response = client.PartialUpdate("<glossaryId>", new Dictionary<string, string>
{
    ["key"] = "<body>"
}, ignoreTermsAndCategories: true);

Applies to