Udostępnij przez


Entity.AddClassification Method

Definition

Overloads

Name Description
AddClassification(ClassificationAssociateConfig, CancellationToken)

Associate a classification to multiple entities in bulk.

AddClassification(RequestContent, RequestContext)

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

AddClassification(ClassificationAssociateConfig, CancellationToken)

Source:
Entity.cs

Associate a classification to multiple entities in bulk.

public virtual Azure.Response AddClassification(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig body, System.Threading.CancellationToken cancellationToken = default);
abstract member AddClassification : Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig * System.Threading.CancellationToken -> Azure.Response
override this.AddClassification : Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function AddClassification (body As ClassificationAssociateConfig, Optional cancellationToken As CancellationToken = Nothing) As 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 AddClassification.

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 = client.AddClassification(body);

Applies to

AddClassification(RequestContent, RequestContext)

Source:
Entity.cs

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

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

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 = client.AddClassification(content);

Console.WriteLine(response.Status);

Applies to