Share via


Entity.RemoveBusinessMetadataAsync Method

Definition

Overloads

RemoveBusinessMetadataAsync(String, RequestContent, RequestContext)

[Protocol Method] Remove business metadata from an entity.

RemoveBusinessMetadataAsync(String, IDictionary<String,IDictionary<String,BinaryData>>, CancellationToken)

Remove business metadata from an entity.

RemoveBusinessMetadataAsync(String, RequestContent, RequestContext)

Source:
Entity.cs

[Protocol Method] Remove business metadata from an entity.

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

Parameters

guid
String

The globally unique identifier of the entity.

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

guid or content is null.

guid is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call RemoveBusinessMetadataAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

using RequestContent content = RequestContent.Create(new
{
    key = new
    {
        key = new object(),
    },
});
Response response = await client.RemoveBusinessMetadataAsync("<guid>", content);

Console.WriteLine(response.Status);

This sample shows how to call RemoveBusinessMetadataAsync with all parameters and request content.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

using RequestContent content = RequestContent.Create(new
{
    key = new
    {
        key = new object(),
    },
});
Response response = await client.RemoveBusinessMetadataAsync("<guid>", content);

Console.WriteLine(response.Status);

Applies to

RemoveBusinessMetadataAsync(String, IDictionary<String,IDictionary<String,BinaryData>>, CancellationToken)

Source:
Entity.cs

Remove business metadata from an entity.

public virtual System.Threading.Tasks.Task<Azure.Response> RemoveBusinessMetadataAsync (string guid, System.Collections.Generic.IDictionary<string,System.Collections.Generic.IDictionary<string,BinaryData>> body, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveBusinessMetadataAsync : string * System.Collections.Generic.IDictionary<string, System.Collections.Generic.IDictionary<string, BinaryData>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.RemoveBusinessMetadataAsync : string * System.Collections.Generic.IDictionary<string, System.Collections.Generic.IDictionary<string, BinaryData>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function RemoveBusinessMetadataAsync (guid As String, body As IDictionary(Of String, IDictionary(Of String, BinaryData)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

guid
String

The globally unique identifier of the entity.

body
IDictionary<String,IDictionary<String,BinaryData>>

Business metadata payload.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

guid or body is null.

guid is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call RemoveBusinessMetadataAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response response = await client.RemoveBusinessMetadataAsync("<guid>", new Dictionary<string, IDictionary<string, BinaryData>>
{
    ["key"] = new Dictionary<string, BinaryData>
    {
        ["key"] = BinaryData.FromObjectAsJson(new object())
    }
});

This sample shows how to call RemoveBusinessMetadataAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response response = await client.RemoveBusinessMetadataAsync("<guid>", new Dictionary<string, IDictionary<string, BinaryData>>
{
    ["key"] = new Dictionary<string, BinaryData>
    {
        ["key"] = BinaryData.FromObjectAsJson(new object())
    }
});

Applies to