Skip to main content

products

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

Overview

Nameproducts
TypeResource
Idazure.api_management.products

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
approval_requiredtextfield from the properties object
display_nametextfield from the properties object
productIdtextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
subscription_requiredtextfield from the properties object
subscriptions_limittextfield from the properties object
termstextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTproductId, resourceGroupName, serviceName, subscriptionIdGets the details of the product specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of products in the specified service instance.
list_by_tagsSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of products associated with tags.
create_or_updateINSERTproductId, resourceGroupName, serviceName, subscriptionIdCreates or Updates a product.
deleteDELETEIf-Match, productId, resourceGroupName, serviceName, subscriptionIdDelete product.
updateUPDATEIf-Match, productId, resourceGroupName, serviceName, subscriptionIdUpdate existing product details.

SELECT examples

Lists a collection of products in the specified service instance.

SELECT
description,
approval_required,
display_name,
productId,
resourceGroupName,
serviceName,
state,
subscriptionId,
subscription_required,
subscriptions_limit,
terms
FROM azure.api_management.vw_products
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a products resource.

/*+ update */
UPDATE azure.api_management.products
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND productId = '{{ productId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified products resource.

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