group_user
Creates, updates, deletes, gets or lists a group_user resource.
Overview
| Name | group_user |
| Type | Resource |
| Id | azure.api_management.group_user |
Fields
The following fields are returned by SELECT queries:
- list
| 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. |
email | string | Email address. |
firstName | string | First name. |
groups | array | Collection of groups user is part of. |
identities | array | Collection of user identities. |
lastName | string | Last name. |
note | string | Optional note about a user set by the administrator. |
registrationDate | string (date-time) | Date of user registration. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. |
state | string | Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Known values are: "active", "blocked", "pending", and "deleted". (active, blocked, pending, deleted) |
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 | select | resource_group_name, service_name, group_id, subscription_id | $filter, $top, $skip | Lists a collection of user entities associated with the group. |
create | insert | resource_group_name, service_name, group_id, user_id, subscription_id | Add existing user to existing group. | |
delete | delete | resource_group_name, service_name, group_id, user_id, subscription_id | Remove existing user from existing group. | |
check_entity_exists | exec | resource_group_name, service_name, group_id, user_id, subscription_id | Checks that user entity specified by identifier is associated with the group 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. |
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 | |
user_id | string | User identifier. Must be unique in the current API Management service instance. Required. |
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || registrationDate | filter | ge, le, eq, ne, gt, lt | || note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. 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
Lists a collection of user entities associated with the group.
SELECT
id,
name,
email,
firstName,
groups,
identities,
lastName,
note,
registrationDate,
state,
systemData,
type
FROM azure.api_management.group_user
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND group_id = '{{ group_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT examples
- create
- Manifest
Add existing user to existing group.
INSERT INTO azure.api_management.group_user (
resource_group_name,
service_name,
group_id,
user_id,
subscription_id
)
SELECT
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ group_id }}',
'{{ user_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: group_user
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the group_user resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the group_user resource.
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the group_user resource.
- name: user_id
value: "{{ user_id }}"
description: Required parameter for the group_user resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the group_user resource.
DELETE examples
- delete
Remove existing user from existing group.
DELETE FROM azure.api_management.group_user
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND group_id = '{{ group_id }}' --required
AND user_id = '{{ user_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- check_entity_exists
Checks that user entity specified by identifier is associated with the group entity.
EXEC azure.api_management.group_user.check_entity_exists
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@group_id='{{ group_id }}' --required,
@user_id='{{ user_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;