Freigeben über


Entity.MoveEntitiesToCollection Method

Definition

Overloads

Name Description
MoveEntitiesToCollection(String, MoveEntitiesConfig, CancellationToken)

Move existing entities to the target collection.

MoveEntitiesToCollection(String, RequestContent, RequestContext)

[Protocol Method] Move existing entities to the target collection.

MoveEntitiesToCollection(String, MoveEntitiesConfig, CancellationToken)

Source:
Entity.cs

Move existing entities to the target collection.

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

Parameters

collectionId
String

The collection where entities will be moved to.

body
MoveEntitiesConfig

Body parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

collectionId or body is null.

Examples

This sample shows how to call MoveEntitiesToCollection.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01");

MoveEntitiesConfig body = new MoveEntitiesConfig
{
    EntityGuids = { "321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1" },
};
Response<EntityMutationResult> response = client.MoveEntitiesToCollection("ExampleNewCollection", body);

Applies to

MoveEntitiesToCollection(String, RequestContent, RequestContext)

Source:
Entity.cs

[Protocol Method] Move existing entities to the target collection.

public virtual Azure.Response MoveEntitiesToCollection(string collectionId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member MoveEntitiesToCollection : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.MoveEntitiesToCollection : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function MoveEntitiesToCollection (collectionId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

collectionId
String

The collection where entities will be moved to.

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

collectionId or content is null.

Service returned a non-success status code.

Examples

This sample shows how to call MoveEntitiesToCollection and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01");

using RequestContent content = RequestContent.Create(new
{
    entityGuids = new object[]
    {
        "321493e3-3fb7-4b3e-9df7-3b69154174c2",
        "b2f9c306-cf65-4bb0-878e-cfaafde156b1"
    },
});
Response response = client.MoveEntitiesToCollection("ExampleNewCollection", content);

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

Applies to