contacts
Creates, updates, deletes, gets or lists a contacts
resource.
Overview
Name | contacts |
Type | Resource |
Id | azure.security.contacts |
Fields
- vw_contacts
- contacts
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
emails | text | field from the properties object |
is_enabled | text | field from the properties object |
notifications_by_role | text | field from the properties object |
notifications_sources | text | field from the properties object |
phone | text | field from the properties object |
securityContactName | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
properties | object | Describes security contact properties |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | securityContactName, subscriptionId | Get Default Security contact configurations for the subscription |
list | SELECT | subscriptionId | List all security contact configurations for the subscription |
create | INSERT | securityContactName, subscriptionId | Create security contact configurations for the subscription |
delete | DELETE | securityContactName, subscriptionId | Delete security contact configurations for the subscription |
SELECT
examples
List all security contact configurations for the subscription
- vw_contacts
- contacts
SELECT
id,
name,
emails,
is_enabled,
notifications_by_role,
notifications_sources,
phone,
securityContactName,
subscriptionId,
type
FROM azure.security.vw_contacts
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
properties,
type
FROM azure.security.contacts
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new contacts
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.security.contacts (
securityContactName,
subscriptionId,
properties
)
SELECT
'{{ securityContactName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: emails
value: string
- name: phone
value: string
- name: isEnabled
value: boolean
- name: notificationsSources
value:
- - name: sourceType
value: string
- name: notificationsByRole
value:
- name: state
value: string
- name: roles
value:
- []
- name: id
value: string
- name: name
value: string
- name: type
value: string
DELETE
example
Deletes the specified contacts
resource.
/*+ delete */
DELETE FROM azure.security.contacts
WHERE securityContactName = '{{ securityContactName }}'
AND subscriptionId = '{{ subscriptionId }}';