Skip to main content

notification_channels

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

Overview

Namenotification_channels
TypeResource
Idazure.dev_test_labs.notification_channels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the resource.
namestringThe name of the resource.
locationstringThe location of the resource.
propertiesobjectThe properties of the resource.
tagsobjectThe tags of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, labName, name$expand, api-versionGet notification channel.
listselectsubscriptionId, resourceGroupName, labName$expand, $filter, $top, $orderby, api-versionList notification channels in a given lab.
create_or_updateinsertsubscriptionId, resourceGroupName, labName, name, data__propertiesapi-versionCreate or replace an existing notification channel.
updateupdatesubscriptionId, resourceGroupName, labName, nameapi-versionAllows modifying tags of notification channels. All other properties will be ignored.
deletedeletesubscriptionId, resourceGroupName, labName, nameapi-versionDelete notification channel.
notifyexecsubscriptionId, resourceGroupName, labName, nameapi-versionSend notification to provided channel.

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
labNamestringThe name of the lab.
namestringThe name of the notification channel.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringThe subscription ID.
$expandstringSpecify the $expand query. Example: 'properties($select=webHookUrl)'
$filterstringThe filter to apply to the operation. Example: '$filter=contains(name,'myName')
$orderbystringThe ordering expression for the results, using OData notation. Example: '$orderby=name desc'
$topinteger (int32)The maximum number of resources to return from the operation. Example: '$top=10'
api-versionstringClient API version.

SELECT examples

Get notification channel.

SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.notification_channels
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND labName = '{{ labName }}' -- required
AND name = '{{ name }}' -- required
AND $expand = '{{ $expand }}'
AND api-version = '{{ api-version }}'
;

INSERT examples

Create or replace an existing notification channel.

INSERT INTO azure.dev_test_labs.notification_channels (
data__location,
data__tags,
data__properties,
subscriptionId,
resourceGroupName,
labName,
name,
api-version
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ labName }}',
'{{ name }}',
'{{ api-version }}'
RETURNING
id,
name,
location,
properties,
tags,
type
;

UPDATE examples

Allows modifying tags of notification channels. All other properties will be ignored.

UPDATE azure.dev_test_labs.notification_channels
SET
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND labName = '{{ labName }}' --required
AND name = '{{ name }}' --required
AND api-version = '{{ api-version}}'
RETURNING
id,
name,
location,
properties,
tags,
type;

DELETE examples

Delete notification channel.

DELETE FROM azure.dev_test_labs.notification_channels
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND labName = '{{ labName }}' --required
AND name = '{{ name }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

Send notification to provided channel.

EXEC azure.dev_test_labs.notification_channels.notify 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@labName='{{ labName }}' --required,
@name='{{ name }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"eventName": "{{ eventName }}",
"jsonPayload": "{{ jsonPayload }}"
}'
;