Skip to main content

workspace_notification_recipient_user

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

Overview

Nameworkspace_notification_recipient_user
TypeResource
Idazure.api_management.workspace_notification_recipient_user

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userIdstringAPI Management UserId subscribed to notification.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_notificationselectresource_group_name, service_name, workspace_id, notification_name, subscription_idGets the list of the Notification Recipient User subscribed to the notification.
create_or_updateinsertresource_group_name, service_name, workspace_id, notification_name, user_id, subscription_idAdds the API Management User to the list of Recipients for the Notification.
create_or_updatereplaceresource_group_name, service_name, workspace_id, notification_name, user_id, subscription_idAdds the API Management User to the list of Recipients for the Notification.
deletedeleteresource_group_name, service_name, workspace_id, notification_name, user_id, subscription_idRemoves the API Management user from the list of Notification.
check_entity_existsexecresource_group_name, service_name, workspace_id, notification_name, user_id, subscription_idDetermine if the Notification Recipient User is subscribed to the notification.

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
notification_namestringWorkspace identifier. Must be unique in the current API Management service instance. Known values are: "RequestPublisherNotificationMessage", "PurchasePublisherNotificationMessage", "NewApplicationNotificationMessage", "BCC", "NewIssuePublisherNotificationMessage", "AccountClosedPublisher", and "QuotaLimitApproachingPublisherNotificationMessage". Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring
user_idstringUser identifier. Must be unique in the current API Management service instance. Required.
workspace_idstringWorkspace identifier. Must be unique in the current API Management service instance. Required.

SELECT examples

Gets the list of the Notification Recipient User subscribed to the notification.

SELECT
id,
name,
systemData,
type,
userId
FROM azure.api_management.workspace_notification_recipient_user
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND notification_name = '{{ notification_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Adds the API Management User to the list of Recipients for the Notification.

INSERT INTO azure.api_management.workspace_notification_recipient_user (
resource_group_name,
service_name,
workspace_id,
notification_name,
user_id,
subscription_id
)
SELECT
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_id }}',
'{{ notification_name }}',
'{{ user_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Adds the API Management User to the list of Recipients for the Notification.

REPLACE azure.api_management.workspace_notification_recipient_user
SET
-- No updatable properties
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND notification_name = '{{ notification_name }}' --required
AND user_id = '{{ user_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Removes the API Management user from the list of Notification.

DELETE FROM azure.api_management.workspace_notification_recipient_user
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND notification_name = '{{ notification_name }}' --required
AND user_id = '{{ user_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Determine if the Notification Recipient User is subscribed to the notification.

EXEC azure.api_management.workspace_notification_recipient_user.check_entity_exists 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_id='{{ workspace_id }}' --required,
@notification_name='{{ notification_name }}' --required,
@user_id='{{ user_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;