Partilhar via


Glossary.PartialUpdateCategory Method

Definition

Overloads

PartialUpdateCategory(String, RequestContent, RequestContext)

[Protocol Method] Update the glossary category partially. So far we only supports partial updating shortDescription and longDescription for category.

PartialUpdateCategory(String, IDictionary<String,String>, CancellationToken)

Update the glossary category partially. So far we only supports partial updating shortDescription and longDescription for category.

PartialUpdateCategory(String, RequestContent, RequestContext)

Source:
Glossary.cs

[Protocol Method] Update the glossary category partially. So far we only supports partial updating shortDescription and longDescription for category.

public virtual Azure.Response PartialUpdateCategory (string categoryId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member PartialUpdateCategory : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.PartialUpdateCategory : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function PartialUpdateCategory (categoryId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

categoryId
String

The globally unique identifier of the category.

content
RequestContent

The content to send as the body of the request.

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

categoryId or content is null.

categoryId 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 PartialUpdateCategory 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.PartialUpdateCategory("<categoryId>", content);

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

This sample shows how to call PartialUpdateCategory 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();

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

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("anchor").GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString());
Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString());
Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString());
Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString());
Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString());
Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").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());

Applies to

PartialUpdateCategory(String, IDictionary<String,String>, CancellationToken)

Source:
Glossary.cs

Update the glossary category partially. So far we only supports partial updating shortDescription and longDescription for category.

public virtual Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory> PartialUpdateCategory (string categoryId, System.Collections.Generic.IDictionary<string,string> body, System.Threading.CancellationToken cancellationToken = default);
abstract member PartialUpdateCategory : string * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory>
override this.PartialUpdateCategory : string * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory>
Public Overridable Function PartialUpdateCategory (categoryId As String, body As IDictionary(Of String, String), Optional cancellationToken As CancellationToken = Nothing) As Response(Of AtlasGlossaryCategory)

Parameters

categoryId
String

The globally unique identifier of the category.

body
IDictionary<String,String>

A map containing keys as attribute names and values as corresponding attribute values for partial update.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

categoryId or body is null.

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

Examples

This sample shows how to call PartialUpdateCategory.

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

Response<AtlasGlossaryCategory> response = client.PartialUpdateCategory("<categoryId>", new Dictionary<string, string>
{
    ["key"] = "<body>"
});

This sample shows how to call PartialUpdateCategory with all parameters.

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

Response<AtlasGlossaryCategory> response = client.PartialUpdateCategory("<categoryId>", new Dictionary<string, string>
{
    ["key"] = "<body>"
});

Applies to