Skip to main content

content_item

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

Overview

Namecontent_item
TypeResource
Idazure.api_management.content_item

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
propertiesobjectProperties of the content item.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, service_name, content_type_id, content_item_id, subscription_idReturns the developer portal's content item specified by its identifier.
list_by_serviceselectresource_group_name, service_name, content_type_id, subscription_idLists developer portal's content items specified by the provided content type.
create_or_updateinsertresource_group_name, service_name, content_type_id, content_item_id, subscription_idCreates a new developer portal's content item specified by the provided content type.
create_or_updatereplaceresource_group_name, service_name, content_type_id, content_item_id, subscription_idCreates a new developer portal's content item specified by the provided content type.
deletedeleteresource_group_name, service_name, content_type_id, content_item_id, subscription_idRemoves the specified developer portal's content item.
get_entity_tagexecresource_group_name, service_name, content_type_id, content_item_id, subscription_idReturns the entity state (ETag) version of the developer portal's content item specified by its identifier.

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
content_item_idstringContent item identifier. Required.
content_type_idstringContent type identifier. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring

SELECT examples

Returns the developer portal's content item specified by its identifier.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.api_management.content_item
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND content_type_id = '{{ content_type_id }}' -- required
AND content_item_id = '{{ content_item_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.api_management.content_item (
properties,
resource_group_name,
service_name,
content_type_id,
content_item_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ content_type_id }}',
'{{ content_item_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

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

REPLACE azure.api_management.content_item
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND content_type_id = '{{ content_type_id }}' --required
AND content_item_id = '{{ content_item_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Removes the specified developer portal's content item.

DELETE FROM azure.api_management.content_item
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND content_type_id = '{{ content_type_id }}' --required
AND content_item_id = '{{ content_item_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Returns the entity state (ETag) version of the developer portal's content item specified by its identifier.

EXEC azure.api_management.content_item.get_entity_tag 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@content_type_id='{{ content_type_id }}' --required,
@content_item_id='{{ content_item_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;