ContentType interface

Interface representing a ContentType.

Methods

createOrUpdate(string, string, string, ContentTypeContract, ContentTypeCreateOrUpdateOptionalParams)

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.

delete(string, string, string, string, ContentTypeDeleteOptionalParams)

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.

get(string, string, string, ContentTypeGetOptionalParams)

Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.

listByService(string, string, ContentTypeListByServiceOptionalParams)

Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.

Method Details

createOrUpdate(string, string, string, ContentTypeContract, ContentTypeCreateOrUpdateOptionalParams)

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.

function createOrUpdate(resourceGroupName: string, serviceName: string, contentTypeId: string, parameters: ContentTypeContract, options?: ContentTypeCreateOrUpdateOptionalParams): Promise<ContentTypeCreateOrUpdateResponse>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

contentTypeId

string

Content type identifier.

parameters
ContentTypeContract

Create or update parameters.

options
ContentTypeCreateOrUpdateOptionalParams

The options parameters.

Returns

delete(string, string, string, string, ContentTypeDeleteOptionalParams)

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.

function delete(resourceGroupName: string, serviceName: string, contentTypeId: string, ifMatch: string, options?: ContentTypeDeleteOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

contentTypeId

string

Content type identifier.

ifMatch

string

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.

options
ContentTypeDeleteOptionalParams

The options parameters.

Returns

Promise<void>

get(string, string, string, ContentTypeGetOptionalParams)

Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.

function get(resourceGroupName: string, serviceName: string, contentTypeId: string, options?: ContentTypeGetOptionalParams): Promise<ContentTypeGetResponse>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

contentTypeId

string

Content type identifier.

options
ContentTypeGetOptionalParams

The options parameters.

Returns

listByService(string, string, ContentTypeListByServiceOptionalParams)

Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.

function listByService(resourceGroupName: string, serviceName: string, options?: ContentTypeListByServiceOptionalParams): PagedAsyncIterableIterator<ContentTypeContract, ContentTypeContract[], PageSettings>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

options
ContentTypeListByServiceOptionalParams

The options parameters.

Returns