Share via


Entity.AddClassificationAsync Method

Definition

Overloads

Name Description
AddClassificationAsync(ClassificationAssociateConfig, CancellationToken)

Associate a classification to multiple entities in bulk.

AddClassificationAsync(RequestContent, RequestContext)

[Protocol Method] Associate a classification to multiple entities in bulk.

AddClassificationAsync(ClassificationAssociateConfig, CancellationToken)

Source:
Entity.cs

Associate a classification to multiple entities in bulk.

public virtual System.Threading.Tasks.Task<Azure.Response> AddClassificationAsync(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig body, System.Threading.CancellationToken cancellationToken = default);
abstract member AddClassificationAsync : Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.AddClassificationAsync : Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AddClassificationAsync (body As ClassificationAssociateConfig, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

body
ClassificationAssociateConfig

Body parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

body is null.

Examples

This sample shows how to call AddClassificationAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

ClassificationAssociateConfig body = new ClassificationAssociateConfig
{
    Classification = new AtlasClassification
    {
        Attributes = { },
        TypeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER",
        ValidityPeriods = { },
    },
    EntityGuids = { "784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa" },
};
Response response = await client.AddClassificationAsync(body);

Applies to

AddClassificationAsync(RequestContent, RequestContext)

Source:
Entity.cs

[Protocol Method] Associate a classification to multiple entities in bulk.

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

Parameters

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

content is null.

Service returned a non-success status code.

Examples

This sample shows how to call AddClassificationAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

using RequestContent content = RequestContent.Create(new
{
    classification = new
    {
        typeName = "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER",
        attributes = new object(),
        validityPeriods = Array.Empty<object>(),
    },
    entityGuids = new object[]
    {
        "784c0f2f-afd2-e26b-f9cb-984f6c2c5021",
        "b4ebc8be-cef4-860a-bee9-28cc34cb5caa"
    },
});
Response response = await client.AddClassificationAsync(content);

Console.WriteLine(response.Status);

Applies to