Glossary.Update Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Update(String, AtlasGlossary, Nullable<Boolean>, CancellationToken) |
Update the given glossary. |
Update(String, RequestContent, Nullable<Boolean>, RequestContext) |
[Protocol Method] Update the given glossary.
|
Update(String, AtlasGlossary, Nullable<Boolean>, CancellationToken)
- Source:
- Glossary.cs
Update the given glossary.
public virtual Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary> Update (string glossaryId, Azure.Analytics.Purview.DataMap.AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Update : string * Azure.Analytics.Purview.DataMap.AtlasGlossary * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary>
override this.Update : string * Azure.Analytics.Purview.DataMap.AtlasGlossary * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossary>
Public Overridable Function Update (glossaryId As String, atlasGlossary As AtlasGlossary, 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.
- atlasGlossary
- AtlasGlossary
The glossary object.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
glossaryId
or atlasGlossary
is null.
glossaryId
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call Update.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();
AtlasGlossary atlasGlossary = new AtlasGlossary();
Response<AtlasGlossary> response = client.Update("<glossaryId>", atlasGlossary);
This sample shows how to call Update 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");
AtlasGlossary atlasGlossary = new AtlasGlossary
{
Guid = "<guid>",
Classifications = {new AtlasClassification
{
Attributes =
{
["key"] = BinaryData.FromObjectAsJson(new object())
},
TypeName = "<typeName>",
LastModifiedTS = "<lastModifiedTS>",
EntityGuid = "<entityGuid>",
EntityStatus = EntityStatus.Active,
RemovePropagationsOnEntityDelete = true,
ValidityPeriods = {new TimeBoundary
{
EndTime = "<endTime>",
StartTime = "<startTime>",
TimeZone = "<timeZone>",
}},
}},
LongDescription = "<longDescription>",
Name = "<name>",
QualifiedName = "<qualifiedName>",
ShortDescription = "<shortDescription>",
LastModifiedTS = "<lastModifiedTS>",
CreateTime = 1234L,
CreatedBy = "<createdBy>",
UpdateTime = 1234L,
UpdatedBy = "<updatedBy>",
Categories = {new AtlasRelatedCategoryHeader
{
CategoryGuid = "<categoryGuid>",
Description = "<description>",
DisplayText = "<displayText>",
ParentCategoryGuid = "<parentCategoryGuid>",
RelationGuid = "<relationGuid>",
}},
Language = "<language>",
Terms = {new AtlasRelatedTermHeader
{
Description = "<description>",
DisplayText = "<displayText>",
Expression = "<expression>",
RelationGuid = "<relationGuid>",
Status = AtlasTermRelationshipStatus.Draft,
Steward = "<steward>",
TermGuid = "<termGuid>",
}},
Usage = "<usage>",
};
Response<AtlasGlossary> response = client.Update("<glossaryId>", atlasGlossary, ignoreTermsAndCategories: true);
Applies to
Update(String, RequestContent, Nullable<Boolean>, RequestContext)
- Source:
- Glossary.cs
[Protocol Method] Update the given glossary.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler Update(String, AtlasGlossary, Nullable<Boolean>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response Update (string glossaryId, Azure.Core.RequestContent content, bool? ignoreTermsAndCategories = default, Azure.RequestContext context = default);
abstract member Update : string * Azure.Core.RequestContent * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.Update : string * Azure.Core.RequestContent * Nullable<bool> * Azure.RequestContext -> Azure.Response
Public Overridable Function Update (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.
- 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 Update 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 object());
Response response = client.Update("<glossaryId>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call Update 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
{
guid = "<guid>",
classifications = new object[]
{
new
{
attributes = new
{
key = new object(),
},
typeName = "<typeName>",
lastModifiedTS = "<lastModifiedTS>",
entityGuid = "<entityGuid>",
entityStatus = "ACTIVE",
removePropagationsOnEntityDelete = true,
validityPeriods = new object[]
{
new
{
endTime = "<endTime>",
startTime = "<startTime>",
timeZone = "<timeZone>",
}
},
}
},
longDescription = "<longDescription>",
name = "<name>",
qualifiedName = "<qualifiedName>",
shortDescription = "<shortDescription>",
lastModifiedTS = "<lastModifiedTS>",
createTime = 1234L,
createdBy = "<createdBy>",
updateTime = 1234L,
updatedBy = "<updatedBy>",
categories = new object[]
{
new
{
categoryGuid = "<categoryGuid>",
description = "<description>",
displayText = "<displayText>",
parentCategoryGuid = "<parentCategoryGuid>",
relationGuid = "<relationGuid>",
}
},
language = "<language>",
terms = new object[]
{
new
{
description = "<description>",
displayText = "<displayText>",
expression = "<expression>",
relationGuid = "<relationGuid>",
status = "DRAFT",
steward = "<steward>",
termGuid = "<termGuid>",
}
},
usage = "<usage>",
});
Response response = client.Update("<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
Azure SDK for .NET