workspace_products
Creates, updates, deletes, gets or lists a workspace_products
resource.
Overview
Name | workspace_products |
Type | Resource |
Id | azure.api_management.workspace_products |
Fields
- vw_workspace_products
- workspace_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 |
workspaceId | 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, workspaceId | Gets the details of the product specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId, workspaceId | Lists a collection of products in the specified workspace in a service instance. |
create_or_update | INSERT | productId, resourceGroupName, serviceName, subscriptionId, workspaceId | Creates or Updates a product. |
delete | DELETE | If-Match, productId, resourceGroupName, serviceName, subscriptionId, workspaceId | Delete product. |
update | UPDATE | If-Match, productId, resourceGroupName, serviceName, subscriptionId, workspaceId | Update existing product details. |
SELECT
examples
Lists a collection of products in the specified workspace in a service instance.
- vw_workspace_products
- workspace_products
SELECT
description,
approval_required,
display_name,
productId,
resourceGroupName,
serviceName,
state,
subscriptionId,
subscription_required,
subscriptions_limit,
terms,
workspaceId
FROM azure.api_management.vw_workspace_products
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
SELECT
properties
FROM azure.api_management.workspace_products
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workspace_products
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.workspace_products (
productId,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ productId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ 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 workspace_products
resource.
/*+ update */
UPDATE azure.api_management.workspace_products
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND productId = '{{ productId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
DELETE
example
Deletes the specified workspace_products
resource.
/*+ delete */
DELETE FROM azure.api_management.workspace_products
WHERE If-Match = '{{ If-Match }}'
AND productId = '{{ productId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';