ApiManagementServiceResource.CreateOrUpdateContentItemAsync Method

Definition

Creates a new developer portal's content item specified by the provided content type.

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

Parameters

contentTypeId
String

Content type identifier.

contentItemId
String

Content item identifier.

ifMatch
Nullable<ETag>

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 or contentItemId is an empty string, and was expected to be non-empty.

contentTypeId or contentItemId is null.

Applies to