Skip to main content

workspace_products

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

Overview

Nameworkspace_products
TypeResource
Idazure.api_management.workspace_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
workspaceIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTproductId, resourceGroupName, serviceName, subscriptionId, workspaceIdGets the details of the product specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionId, workspaceIdLists a collection of products in the specified workspace in a service instance.
create_or_updateINSERTproductId, resourceGroupName, serviceName, subscriptionId, workspaceIdCreates or Updates a product.
deleteDELETEIf-Match, productId, resourceGroupName, serviceName, subscriptionId, workspaceIdDelete product.
updateUPDATEIf-Match, productId, resourceGroupName, serviceName, subscriptionId, workspaceIdUpdate existing product details.

SELECT examples

Lists a collection of products in the specified workspace in a service instance.

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 }}';

INSERT example

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

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

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 }}';