security_contacts
Creates, updates, deletes, gets or lists a security_contacts resource.
Overview
| Name | security_contacts |
| Type | Resource |
| Id | azure.security.security_contacts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
emails | string | List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact. |
isEnabled | boolean | Indicates whether the security contact is enabled. |
notificationsByRole | object | Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription. |
notificationsSources | array | A collection of sources types which evaluate the email notification. |
phone | string | The security contact's phone number. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
emails | string | List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact. |
isEnabled | boolean | Indicates whether the security contact is enabled. |
notificationsByRole | object | Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription. |
notificationsSources | array | A collection of sources types which evaluate the email notification. |
phone | string | The security contact's phone number. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | security_contact_name, subscription_id | Get Default Security contact configurations for the subscription. | |
list | select | subscription_id | List all security contact configurations for the subscription. | |
create | insert | security_contact_name, subscription_id | Create security contact configurations for the subscription. | |
delete | delete | security_contact_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
security_contact_name | string | Name of the security contact object. "default" Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
List all security contact configurations for the subscription.
SELECT
id,
name,
emails,
isEnabled,
notificationsByRole,
notificationsSources,
phone,
systemData,
type
FROM azure.security.security_contacts
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: security_contacts
props:
- name: security_contact_name
value: "{{ security_contact_name }}"
description: Required parameter for the security_contacts resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the security_contacts resource.
- name: properties
description: |
Security contact data.
value:
emails: "{{ emails }}"
phone: "{{ phone }}"
isEnabled: {{ isEnabled }}
notificationsSources:
- sourceType: "{{ sourceType }}"
notificationsByRole:
state: "{{ state }}"
roles:
- "{{ roles }}"
DELETE examples
- delete
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
;