Skip to main content

content_types

Creates, updates, deletes, gets or lists a content_types resource.

Overview

Namecontent_types
TypeResource
Idazure.api_management.content_types

Fields

The following fields are returned by SELECT queries:

Returns the details of the specified content type.

NameDatatypeDescription
propertiesobjectProperties of the content type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, contentTypeId, subscriptionIdGets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.
list_by_serviceselectresourceGroupName, serviceName, subscriptionIdLists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.
create_or_updateinsertresourceGroupName, serviceName, contentTypeId, subscriptionIdIf-MatchCreates 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.
deletedeleteresourceGroupName, serviceName, contentTypeId, If-Match, subscriptionIdRemoves 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
If-MatchstringETag 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.
contentTypeIdstringContent type identifier.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.

SELECT examples

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

SELECT
properties
FROM azure.api_management.content_types
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND contentTypeId = '{{ contentTypeId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

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.

INSERT INTO azure.api_management.content_types (
data__properties,
resourceGroupName,
serviceName,
contentTypeId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ contentTypeId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

DELETE examples

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.

DELETE FROM azure.api_management.content_types
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND contentTypeId = '{{ contentTypeId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;