product_group
Creates, updates, deletes, gets or lists a product_group resource.
Overview
| Name | product_group |
| Type | Resource |
| Id | azure.api_management.product_group |
Fields
The following fields are returned by SELECT queries:
- list_by_product
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
builtIn | boolean | true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. |
description | string | Group description. Can contain HTML formatting tags. |
displayName | string | Group name. Required. |
externalId | string | For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_product | select | resource_group_name, service_name, product_id, subscription_id | $filter, $top, $skip | Lists the collection of developer groups associated with the specified product. |
create_or_update | insert | resource_group_name, service_name, product_id, group_id, subscription_id | Adds the association between the specified developer group with the specified product. | |
create_or_update | replace | resource_group_name, service_name, product_id, group_id, subscription_id | Adds the association between the specified developer group with the specified product. | |
delete | delete | resource_group_name, service_name, product_id, group_id, subscription_id | Deletes the association between the specified group and product. | |
check_entity_exists | exec | resource_group_name, service_name, product_id, group_id, subscription_id | Checks that Group entity specified by identifier is associated with the Product entity. |
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.
| Name | Datatype | Description |
|---|---|---|
group_id | string | Group identifier. Must be unique in the current API Management service instance. Required. |
product_id | string | Product identifier. Must be unique in the current API Management service instance. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | || displayName | filter | eq, ne | || description | filter | eq, ne | |. Default value is None. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
SELECT examples
- list_by_product
Lists the collection of developer groups associated with the specified product.
SELECT
id,
name,
builtIn,
description,
displayName,
externalId,
systemData,
type
FROM azure.api_management.product_group
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND product_id = '{{ product_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT examples
- create_or_update
- Manifest
Adds the association between the specified developer group with the specified product.
INSERT INTO azure.api_management.product_group (
resource_group_name,
service_name,
product_id,
group_id,
subscription_id
)
SELECT
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ product_id }}',
'{{ group_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: product_group
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the product_group resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the product_group resource.
- name: product_id
value: "{{ product_id }}"
description: Required parameter for the product_group resource.
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the product_group resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the product_group resource.
REPLACE examples
- create_or_update
Adds the association between the specified developer group with the specified product.
REPLACE azure.api_management.product_group
SET
-- No updatable properties
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND product_id = '{{ product_id }}' --required
AND group_id = '{{ group_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes the association between the specified group and product.
DELETE FROM azure.api_management.product_group
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND product_id = '{{ product_id }}' --required
AND group_id = '{{ group_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- check_entity_exists
Checks that Group entity specified by identifier is associated with the Product entity.
EXEC azure.api_management.product_group.check_entity_exists
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@product_id='{{ product_id }}' --required,
@group_id='{{ group_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;