Skip to main content

group_users

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

Overview

Namegroup_users
TypeResource
Idazure.api_management.group_users

Fields

The following fields are returned by SELECT queries:

Lists a collection of user entities associated with the group.

NameDatatypeDescription
propertiesobjectUser entity contract properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresourceGroupName, serviceName, groupId, subscriptionId$filter, $top, $skipLists a collection of user entities associated with the group.
createinsertresourceGroupName, serviceName, groupId, userId, subscriptionIdAdd existing user to existing group
deletedeleteresourceGroupName, serviceName, groupId, userId, subscriptionIdRemove existing user from existing group.

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
groupIdstringGroup identifier. Must be unique in the current API Management service instance.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
userIdstringUser identifier. Must be unique in the current API Management service instance.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.

SELECT examples

Lists a collection of user entities associated with the group.

SELECT
properties
FROM azure.api_management.group_users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND groupId = '{{ groupId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;

INSERT examples

Add existing user to existing group

INSERT INTO azure.api_management.group_users (
resourceGroupName,
serviceName,
groupId,
userId,
subscriptionId
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ groupId }}',
'{{ userId }}',
'{{ subscriptionId }}'
RETURNING
properties
;

DELETE examples

Remove existing user from existing group.

DELETE FROM azure.api_management.group_users
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND groupId = '{{ groupId }}' --required
AND userId = '{{ userId }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;