Share via


ApiManagementServiceResource.DeleteContentType 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 Azure.Response DeleteContentType (string contentTypeId, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteContentType : string * Azure.ETag * System.Threading.CancellationToken -> Azure.Response
override this.DeleteContentType : string * Azure.ETag * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function DeleteContentType (contentTypeId As String, ifMatch As ETag, Optional cancellationToken As CancellationToken = Nothing) As 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