Dela via


Glossary.DeleteTermAssignmentFromEntitiesAsync Method

Definition

Overloads

DeleteTermAssignmentFromEntitiesAsync(String, RequestContent, RequestContext)

[Protocol Method] Delete the term assignment for the given list of related objects.

DeleteTermAssignmentFromEntitiesAsync(String, IEnumerable<AtlasRelatedObjectId>, CancellationToken)

Delete the term assignment for the given list of related objects.

DeleteTermAssignmentFromEntitiesAsync(String, RequestContent, RequestContext)

Source:
Glossary.cs

[Protocol Method] Delete the term assignment for the given list of related objects.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTermAssignmentFromEntitiesAsync (string termId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member DeleteTermAssignmentFromEntitiesAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTermAssignmentFromEntitiesAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTermAssignmentFromEntitiesAsync (termId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

termId
String

The globally unique identifier for glossary term.

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

termId or content is null.

termId 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 DeleteTermAssignmentFromEntitiesAsync.

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[]
{
    new object()
});
Response response = await client.DeleteTermAssignmentFromEntitiesAsync("<termId>", content);

Console.WriteLine(response.Status);

This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters and request content.

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[]
{
    new
    {
        guid = "<guid>",
        typeName = "<typeName>",
        uniqueAttributes = new
        {
            key = new object(),
        },
        displayText = "<displayText>",
        entityStatus = "ACTIVE",
        relationshipType = "<relationshipType>",
        relationshipAttributes = new
        {
            attributes = new
            {
                key = new object(),
            },
            typeName = "<typeName>",
            lastModifiedTS = "<lastModifiedTS>",
        },
        relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a",
        relationshipStatus = "ACTIVE",
    }
});
Response response = await client.DeleteTermAssignmentFromEntitiesAsync("<termId>", content);

Console.WriteLine(response.Status);

Applies to

DeleteTermAssignmentFromEntitiesAsync(String, IEnumerable<AtlasRelatedObjectId>, CancellationToken)

Source:
Glossary.cs

Delete the term assignment for the given list of related objects.

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTermAssignmentFromEntitiesAsync (string termId, System.Collections.Generic.IEnumerable<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId> body, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteTermAssignmentFromEntitiesAsync : string * seq<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTermAssignmentFromEntitiesAsync : string * seq<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteTermAssignmentFromEntitiesAsync (termId As String, body As IEnumerable(Of AtlasRelatedObjectId), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

termId
String

The globally unique identifier for glossary term.

body
IEnumerable<AtlasRelatedObjectId>

An array of related object IDs from which the term has to be dissociated.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

termId or body is null.

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

Examples

This sample shows how to call DeleteTermAssignmentFromEntitiesAsync.

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

Response response = await client.DeleteTermAssignmentFromEntitiesAsync("<termId>", new AtlasRelatedObjectId[]
{
    new AtlasRelatedObjectId()
});

This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters.

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

Response response = await client.DeleteTermAssignmentFromEntitiesAsync("<termId>", new AtlasRelatedObjectId[]
{
    new AtlasRelatedObjectId
    {
        Guid = "<guid>",
        TypeName = "<typeName>",
        UniqueAttributes =
        {
            ["key"] = BinaryData.FromObjectAsJson(new object())
        },
        DisplayText = "<displayText>",
        EntityStatus = EntityStatus.Active,
        RelationshipType = "<relationshipType>",
        RelationshipAttributes = new AtlasStruct
        {
            Attributes =
            {
                ["key"] = BinaryData.FromObjectAsJson(new object())
            },
            TypeName = "<typeName>",
            LastModifiedTS = "<lastModifiedTS>",
        },
        RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"),
        RelationshipStatus = StatusAtlasRelationship.Active,
    }
});

Applies to