Share via


Entity.RemoveLabels Method

Definition

Overloads

RemoveLabels(String, RequestContent, RequestContext)

[Protocol Method] Delete given labels to a given entity.

RemoveLabels(String, IEnumerable<String>, CancellationToken)

Delete given labels to a given entity.

RemoveLabels(String, RequestContent, RequestContext)

Source:
Entity.cs

[Protocol Method] Delete given labels to a given entity.

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

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

using RequestContent content = null;
Response response = client.RemoveLabels("<guid>", content);

Console.WriteLine(response.Status);

This sample shows how to call RemoveLabels 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 object[]
{
    "<body>"
});
Response response = client.RemoveLabels("<guid>", content);

Console.WriteLine(response.Status);

Applies to

RemoveLabels(String, IEnumerable<String>, CancellationToken)

Source:
Entity.cs

Delete given labels to a given entity.

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

Parameters

guid
String

The globally unique identifier of the entity.

body
IEnumerable<String>

set of labels to be deleted.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

guid is null.

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

Examples

This sample shows how to call RemoveLabels.

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

Response response = client.RemoveLabels("<guid>");

This sample shows how to call RemoveLabels 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 = client.RemoveLabels("<guid>", body: new string[] { "<body>" });

Applies to