ApiManagementServiceResource.CreateOrUpdateContentTypeAsync 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: 2022-08-01
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType>> CreateOrUpdateContentTypeAsync (string contentTypeId, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateContentTypeAsync : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType>>
override this.CreateOrUpdateContentTypeAsync : string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType>>
Public Overridable Function CreateOrUpdateContentTypeAsync (contentTypeId As String, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro