Share via


ApiManagementServiceResource.DeleteContentTypeAsync Method

Definition

Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the c- prefix) can't be removed.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}
  • Operation Id: ContentType_Delete
  • Default Api Version: 2023-03-01-preview
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteContentTypeAsync (string contentTypeId, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteContentTypeAsync : string * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteContentTypeAsync : string * Azure.ETag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteContentTypeAsync (contentTypeId As String, ifMatch As ETag, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

contentTypeId
String

Content type identifier.

ifMatch
ETag

ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

contentTypeId is null.

Applies to