Skip to main content

workspace_product

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

Overview

Nameworkspace_product
TypeResource
Idazure.api_management.workspace_product

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.
applicationobjectSpecifies identity provider settings needed to authorize applications API calls.
approvalRequiredbooleanwhether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.
authenticationTypearrayType of supported authentication for the product. The application configuration is required for application-token authentication type. The subscription-key authentication type is used by default. If the property is omitted, the subscription-key authentication type is used.
descriptionstringProduct description. May include HTML formatting tags.
displayNamestringProduct name. Required.
statestringwhether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Known values are: "notPublished" and "published". (notPublished, published)
subscriptionRequiredbooleanWhether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
subscriptionsLimitintegerWhether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
termsstringProduct terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
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, workspace_id, product_id, subscription_idGets the details of the product specified by its identifier.
list_by_serviceselectresource_group_name, service_name, workspace_id, subscription_id$filter, $top, $skip, expandGroups, tagsLists a collection of products in the specified workspace in a service instance.
create_or_updateinsertresource_group_name, service_name, workspace_id, product_id, subscription_idCreates or Updates a product.
updateupdateresource_group_name, service_name, workspace_id, product_id, subscription_idUpdate existing product details.
create_or_updatereplaceresource_group_name, service_name, workspace_id, product_id, subscription_idCreates or Updates a product.
deletedeleteresource_group_name, service_name, workspace_id, product_id, subscription_iddeleteSubscriptionsDelete product.
get_entity_tagexecresource_group_name, service_name, workspace_id, product_id, subscription_idGets the entity state (Etag) version of the product 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
product_idstringProduct identifier. Must be unique in the current API Management service instance. 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
workspace_idstringWorkspace identifier. Must be unique in the current API Management service instance. Required.
$filterstring| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || state | filter | eq | || groups | expand | | |. Default value is None.
$skipintegerNumber of records to skip. Default value is None.
$topintegerNumber of records to return. Default value is None.
deleteSubscriptionsbooleanDelete existing subscriptions associated with the product or not. Default value is None.
expandGroupsbooleanWhen set to true, the response contains an array of groups that have visibility to the product. The default is false. Default value is None.
tagsstringProducts which are part of a specific tag. Default value is None.

SELECT examples

Gets the details of the product specified by its identifier.

SELECT
id,
name,
application,
approvalRequired,
authenticationType,
description,
displayName,
state,
subscriptionRequired,
subscriptionsLimit,
systemData,
terms,
type
FROM azure.api_management.workspace_product
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND product_id = '{{ product_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or Updates a product.

INSERT INTO azure.api_management.workspace_product (
properties,
resource_group_name,
service_name,
workspace_id,
product_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_id }}',
'{{ product_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Update existing product details.

UPDATE azure.api_management.workspace_product
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND product_id = '{{ product_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Creates or Updates a product.

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

DELETE examples

Delete product.

DELETE FROM azure.api_management.workspace_product
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND product_id = '{{ product_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND deleteSubscriptions = '{{ deleteSubscriptions }}'
;

Lifecycle Methods

Gets the entity state (Etag) version of the product specified by its identifier.

EXEC azure.api_management.workspace_product.get_entity_tag 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_id='{{ workspace_id }}' --required,
@product_id='{{ product_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;