Entity.AddClassification Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler AddClassification(ClassificationAssociateConfig, CancellationToken) convenience overload with strongly typed models first.
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);