Entity.RemoveLabelsByUniqueAttribute 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
RemoveLabelsByUniqueAttribute(String, RequestContent, String, RequestContext) |
[Protocol Method] Delete given labels to a given entity identified by its type and unique attribute. If labels is null/empty, no labels will be removed. If any labels in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
|
RemoveLabelsByUniqueAttribute(String, IEnumerable<String>, String, CancellationToken) |
Delete given labels to a given entity identified by its type and unique attribute. If labels is null/empty, no labels will be removed. If any labels in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. |
RemoveLabelsByUniqueAttribute(String, RequestContent, String, RequestContext)
- Source:
- Entity.cs
[Protocol Method] Delete given labels to a given entity identified by its type and unique attribute.
If labels is null/empty, no labels will be removed.
If any labels in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler RemoveLabelsByUniqueAttribute(String, IEnumerable<String>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response RemoveLabelsByUniqueAttribute (string typeName, Azure.Core.RequestContent content, string attribute = default, Azure.RequestContext context = default);
abstract member RemoveLabelsByUniqueAttribute : string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
override this.RemoveLabelsByUniqueAttribute : string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
Public Overridable Function RemoveLabelsByUniqueAttribute (typeName As String, content As RequestContent, Optional attribute As String = Nothing, Optional context As RequestContext = Nothing) As Response
Parameters
- typeName
- String
The name of the type.
- content
- RequestContent
The content to send as the body of the request.
- attribute
- String
The qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes)
- 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
typeName
is null.
typeName
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 RemoveLabelsByUniqueAttribute.
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.RemoveLabelsByUniqueAttribute("<typeName>", content);
Console.WriteLine(response.Status);
This sample shows how to call RemoveLabelsByUniqueAttribute 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.RemoveLabelsByUniqueAttribute("<typeName>", content, attribute: "<attribute>");
Console.WriteLine(response.Status);
Applies to
RemoveLabelsByUniqueAttribute(String, IEnumerable<String>, String, CancellationToken)
- Source:
- Entity.cs
Delete given labels to a given entity identified by its type and unique attribute.
If labels is null/empty, no labels will be removed.
If any labels in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
public virtual Azure.Response RemoveLabelsByUniqueAttribute (string typeName, System.Collections.Generic.IEnumerable<string> body = default, string attribute = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveLabelsByUniqueAttribute : string * seq<string> * string * System.Threading.CancellationToken -> Azure.Response
override this.RemoveLabelsByUniqueAttribute : string * seq<string> * string * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function RemoveLabelsByUniqueAttribute (typeName As String, Optional body As IEnumerable(Of String) = Nothing, Optional attribute As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response
Parameters
- typeName
- String
The name of the type.
- body
- IEnumerable<String>
set of labels to be deleted.
- attribute
- String
The qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes)
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
typeName
is null.
typeName
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call RemoveLabelsByUniqueAttribute.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();
Response response = client.RemoveLabelsByUniqueAttribute("<typeName>");
This sample shows how to call RemoveLabelsByUniqueAttribute 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.RemoveLabelsByUniqueAttribute("<typeName>", body: new string[] { "<body>" }, attribute: "<attribute>");
Applies to
Azure SDK for .NET