Share via


Entity.BatchSetClassifications Method

Definition

Overloads

Name Description
BatchSetClassifications(RequestContent, RequestContext)

[Protocol Method] Set classifications on entities in bulk.

BatchSetClassifications(AtlasEntityHeaders, CancellationToken)

Set classifications on entities in bulk.

BatchSetClassifications(RequestContent, RequestContext)

Source:
Entity.cs

[Protocol Method] Set classifications on entities in bulk.

public virtual Azure.Response BatchSetClassifications(Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member BatchSetClassifications : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.BatchSetClassifications : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function BatchSetClassifications (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 BatchSetClassifications and parse the result.

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

using RequestContent content = RequestContent.Create(new
{
    guidHeaderMap = new Dictionary<string, object>
    {
        ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new
        {
            attributes = new
            {
                qualifiedName = "https://exampleaccount1.core.windows.net",
            },
            typeName = "azure_storage_account",
            classifications = new object[]
            {
                new
                {
                    typeName = "MICROSOFT.PERSONAL.EMAIL",
                }
            },
        },
        ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new
        {
            attributes = new
            {
                qualifiedName = "https://exampleaccount2.core.windows.net",
            },
            typeName = "azure_storage_account",
            classifications = new object[]
            {
                new
                {
                    typeName = "MICROSOFT.PERSONAL.IPADDRESS",
                }
            },
        }
    },
});
Response response = client.BatchSetClassifications(content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].ToString());

Applies to

BatchSetClassifications(AtlasEntityHeaders, CancellationToken)

Source:
Entity.cs

Set classifications on entities in bulk.

public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<string>> BatchSetClassifications(Azure.Analytics.Purview.DataMap.AtlasEntityHeaders body, System.Threading.CancellationToken cancellationToken = default);
abstract member BatchSetClassifications : Azure.Analytics.Purview.DataMap.AtlasEntityHeaders * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<string>>
override this.BatchSetClassifications : Azure.Analytics.Purview.DataMap.AtlasEntityHeaders * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<string>>
Public Overridable Function BatchSetClassifications (body As AtlasEntityHeaders, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of String))

Parameters

body
AtlasEntityHeaders

Body parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

body is null.

Examples

This sample shows how to call BatchSetClassifications.

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

AtlasEntityHeaders body = new AtlasEntityHeaders
{
    GuidHeaderMap =
    {
        ["9fb74c11-ac48-4650-95bc-760665c5bd92"] = new AtlasEntityHeader
        {
            Attributes =
            {
                ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount1.core.windows.net")
            },
            TypeName = "azure_storage_account",
            Classifications = {new AtlasClassification
            {
                TypeName = "MICROSOFT.PERSONAL.EMAIL",
            }},
        },
        ["7fcc43ab-55ea-45d4-9971-ce0443cb10bb"] = new AtlasEntityHeader
        {
            Attributes =
            {
                ["qualifiedName"] = BinaryData.FromObjectAsJson("https://exampleaccount2.core.windows.net")
            },
            TypeName = "azure_storage_account",
            Classifications = {new AtlasClassification
            {
                TypeName = "MICROSOFT.PERSONAL.IPADDRESS",
            }},
        }
    },
};
Response<IReadOnlyList<string>> response = client.BatchSetClassifications(body);

Applies to