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

NameDatatypeDescription
idtextfield from the properties object
nametextfield from the properties object
descriptiontextfield from the properties object
contentTypeIdtextfield from the properties object
resourceGroupNametextfield from the properties object
schematextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcontentTypeId, resourceGroupName, serviceName, 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_updateINSERTcontentTypeId, resourceGroupName, serviceName, subscriptionIdCreates 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.
deleteDELETEIf-Match, contentTypeId, resourceGroupName, serviceName, 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.

SELECT examples

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

SELECT
id,
name,
description,
contentTypeId,
resourceGroupName,
schema,
serviceName,
subscriptionId,
version
FROM azure.api_management.vw_content_types
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new content_types resource.

/*+ create */
INSERT INTO azure.api_management.content_types (
contentTypeId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ contentTypeId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified content_types resource.

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