Partilhar via


Glossary.DeleteTermAssignmentFromEntities Method

Definition

Overloads

DeleteTermAssignmentFromEntities(String, RequestContent, RequestContext)

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

DeleteTermAssignmentFromEntities(String, IEnumerable<AtlasRelatedObjectId>, CancellationToken)

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

DeleteTermAssignmentFromEntities(String, RequestContent, RequestContext)

Source:
Glossary.cs

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

public virtual Azure.Response DeleteTermAssignmentFromEntities (string termId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member DeleteTermAssignmentFromEntities : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.DeleteTermAssignmentFromEntities : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function DeleteTermAssignmentFromEntities (termId As String, content As RequestContent, Optional context As RequestContext = Nothing) As 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 DeleteTermAssignmentFromEntities.

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 = client.DeleteTermAssignmentFromEntities("<termId>", content);

Console.WriteLine(response.Status);

This sample shows how to call DeleteTermAssignmentFromEntities 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 = client.DeleteTermAssignmentFromEntities("<termId>", content);

Console.WriteLine(response.Status);

Applies to

DeleteTermAssignmentFromEntities(String, IEnumerable<AtlasRelatedObjectId>, CancellationToken)

Source:
Glossary.cs

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

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

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

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

This sample shows how to call DeleteTermAssignmentFromEntities 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 = client.DeleteTermAssignmentFromEntities("<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