users
Creates, updates, deletes, gets or lists a users
resource.
Overview
Name | users |
Type | Resource |
Id | azure.api_management.users |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_service
Gets the specified user entity.
Name | Datatype | Description |
---|---|---|
properties | object | User entity contract properties. |
Lists a collection of User entities.
Name | Datatype | Description |
---|---|---|
properties | object | User entity contract properties. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serviceName , userId , subscriptionId | Gets the details of the user specified by its identifier. | |
list_by_service | select | resourceGroupName , serviceName , subscriptionId | $filter , $top , $skip , expandGroups | Lists a collection of registered users in the specified service instance. |
create_or_update | insert | resourceGroupName , serviceName , userId , subscriptionId | notify , If-Match | Creates or Updates a user. |
update | update | resourceGroupName , serviceName , userId , If-Match , subscriptionId | Updates the details of the user specified by its identifier. | |
delete | delete | resourceGroupName , serviceName , userId , If-Match , subscriptionId | deleteSubscriptions , notify , appType | Deletes specific user. |
generate_sso_url | exec | resourceGroupName , serviceName , userId , subscriptionId | Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. |
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 |
---|---|---|
If-Match | string | ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
userId | string | User identifier. Must be unique in the current API Management service instance. |
$filter | string | | 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>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br> |
$skip | integer (int32) | Number of records to skip. |
$top | integer (int32) | Number of records to return. |
If-Match | string | ETag of the Entity. Not required when creating an entity, but required when updating an entity. |
appType | string | Determines the type of application which send the create user request. Default is legacy publisher portal. |
deleteSubscriptions | boolean | Whether to delete user's subscription or not. |
expandGroups | boolean | Detailed Group in response. |
notify | boolean | Send an Account Closed Email notification to the User. |
SELECT
examples
- get
- list_by_service
Gets the details of the user specified by its identifier.
SELECT
properties
FROM azure.api_management.users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND userId = '{{ userId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists a collection of registered users in the specified service instance.
SELECT
properties
FROM azure.api_management.users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND expandGroups = '{{ expandGroups }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or Updates a user.
INSERT INTO azure.api_management.users (
data__properties,
resourceGroupName,
serviceName,
userId,
subscriptionId,
notify,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ userId }}',
'{{ subscriptionId }}',
'{{ notify }}',
'{{ If-Match }}'
RETURNING
properties
;
# Description fields are for documentation purposes
- name: users
props:
- name: resourceGroupName
value: string
description: Required parameter for the users resource.
- name: serviceName
value: string
description: Required parameter for the users resource.
- name: userId
value: string
description: Required parameter for the users resource.
- name: subscriptionId
value: string
description: Required parameter for the users resource.
- name: properties
value: object
description: |
User entity create contract properties.
- name: notify
value: boolean
description: Send an Email notification to the User.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
UPDATE
examples
- update
Updates the details of the user specified by its identifier.
UPDATE azure.api_management.users
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND userId = '{{ userId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;
DELETE
examples
- delete
Deletes specific user.
DELETE FROM azure.api_management.users
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND userId = '{{ userId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND deleteSubscriptions = '{{ deleteSubscriptions }}'
AND notify = '{{ notify }}'
AND appType = '{{ appType }}'
;
Lifecycle Methods
- generate_sso_url
Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.
EXEC azure.api_management.users.generate_sso_url
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@userId='{{ userId }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;