Skip to main content

security_contacts

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

Overview

Namesecurity_contacts
TypeResource
Idazure.security.security_contacts

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.
emailsstringList of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
isEnabledbooleanIndicates whether the security contact is enabled.
notificationsByRoleobjectDefines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
notificationsSourcesarrayA collection of sources types which evaluate the email notification.
phonestringThe security contact's phone number.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsecurity_contact_name, subscription_idGet Default Security contact configurations for the subscription.
listselectsubscription_idList all security contact configurations for the subscription.
createinsertsecurity_contact_name, subscription_idCreate security contact configurations for the subscription.
deletedeletesecurity_contact_name, subscription_idDelete security contact configurations for the subscription.

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
security_contact_namestringName of the security contact object. "default" Required.
subscription_idstring

SELECT examples

Get Default Security contact configurations for the subscription.

SELECT
id,
name,
emails,
isEnabled,
notificationsByRole,
notificationsSources,
phone,
systemData,
type
FROM azure.security.security_contacts
WHERE security_contact_name = '{{ security_contact_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create security contact configurations for the subscription.

INSERT INTO azure.security.security_contacts (
properties,
security_contact_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ security_contact_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete security contact configurations for the subscription.

DELETE FROM azure.security.security_contacts
WHERE security_contact_name = '{{ security_contact_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;