products
Creates, updates, deletes, gets or lists a products
resource.
Overview
Name | products |
Type | Resource |
Id | azure.api_management.products |
Fields
- vw_products
- products
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
approval_required | text | field from the properties object |
display_name | text | field from the properties object |
productId | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
subscription_required | text | field from the properties object |
subscriptions_limit | text | field from the properties object |
terms | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Product profile. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | productId, resourceGroupName, serviceName, subscriptionId | Gets the details of the product specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of products in the specified service instance. |
list_by_tags | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of products associated with tags. |
create_or_update | INSERT | productId, resourceGroupName, serviceName, subscriptionId | Creates or Updates a product. |
delete | DELETE | If-Match, productId, resourceGroupName, serviceName, subscriptionId | Delete product. |
update | UPDATE | If-Match, productId, resourceGroupName, serviceName, subscriptionId | Update existing product details. |
SELECT
examples
Lists a collection of products in the specified service instance.
- vw_products
- products
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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.products (
productId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ productId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: displayName
value: string
- name: description
value: string
- name: terms
value: string
- name: subscriptionRequired
value: boolean
- name: approvalRequired
value: boolean
- name: subscriptionsLimit
value: integer
- name: state
value: string
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 }}';