Skip to main content

users

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

Overview

Nameusers
TypeResource
Idazure.api_management.users

Fields

NameDatatypeDescription
emailtextfield from the properties object
first_nametextfield from the properties object
groupstextfield from the properties object
identitiestextfield from the properties object
last_nametextfield from the properties object
notetextfield from the properties object
registration_datetextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
userIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionId, userIdGets the details of the user specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of registered users in the specified service instance.
create_or_updateINSERTresourceGroupName, serviceName, subscriptionId, userIdCreates or Updates a user.
deleteDELETEIf-Match, resourceGroupName, serviceName, subscriptionId, userIdDeletes specific user.
updateUPDATEIf-Match, resourceGroupName, serviceName, subscriptionId, userIdUpdates the details of the user specified by its identifier.
generate_sso_urlEXECresourceGroupName, serviceName, subscriptionId, userIdRetrieves a redirection URL containing an authentication token for signing a given user into the developer portal.

SELECT examples

Lists a collection of registered users in the specified service instance.

SELECT
email,
first_name,
groups,
identities,
last_name,
note,
registration_date,
resourceGroupName,
serviceName,
state,
subscriptionId,
userId
FROM azure.api_management.vw_users
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new users resource.

/*+ create */
INSERT INTO azure.api_management.users (
resourceGroupName,
serviceName,
subscriptionId,
userId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ userId }}',
'{{ properties }}'
;

UPDATE example

Updates a users resource.

/*+ update */
UPDATE azure.api_management.users
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userId = '{{ userId }}';

DELETE example

Deletes the specified users resource.

/*+ delete */
DELETE FROM azure.api_management.users
WHERE If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userId = '{{ userId }}';