ApiManagementServiceResource.CreateOrUpdateContentType 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.
Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the c-
prefix. Built-in content types can't be modified.
- Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}
- Operation Id: ContentType_CreateOrUpdate
- Default Api Version: 2023-03-01-preview
public virtual Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType> CreateOrUpdateContentType (string contentTypeId, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateContentType : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType>
override this.CreateOrUpdateContentType : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType>
Public Overridable Function CreateOrUpdateContentType (contentTypeId As String, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ApiManagementContentType)
Parameters
- contentTypeId
- String
Content type identifier.
ETag of the Entity. Not required when creating an entity, but required when updating an entity.
- 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
Azure SDK for .NET