content_types
Creates, updates, deletes, gets or lists a content_types
resource.
Overview
Name | content_types |
Type | Resource |
Id | azure.api_management.content_types |
Fields
- vw_content_types
- content_types
Name | Datatype | Description |
---|---|---|
id | text | field from the properties object |
name | text | field from the properties object |
description | text | field from the properties object |
contentTypeId | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schema | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | contentTypeId, resourceGroupName, serviceName, subscriptionId | Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. |
create_or_update | INSERT | contentTypeId, resourceGroupName, serviceName, subscriptionId | 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 | DELETE | If-Match, contentTypeId, resourceGroupName, serviceName, subscriptionId | 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. |
SELECT
examples
Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.
- vw_content_types
- content_types
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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.content_types (
contentTypeId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ contentTypeId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: id
value: string
- name: name
value: string
- name: description
value: string
- name: schema
value: object
- name: version
value: string
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 }}';