Share via


az security contact

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

View your security contacts.

Commands

Name Description Type Status
az security contact create

Creates a security contact.

Core Preview
az security contact delete

Delete security contact configurations for the subscription.

Core Preview
az security contact list

List all security contact configurations for the subscription.

Core Preview
az security contact show

Get Default Security contact configurations for the subscription.

Core Preview
az security contact update

Update security contact configurations for the subscription.

Core Preview

az security contact create

Preview

Command group 'az security contact' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates a security contact.

az security contact create --name --security-contact-name
                           [--alert-notifications]
                           [--emails]
                           [--notifications-by-role]
                           [--phone]

Examples

Creates a security contact.

az security contact create -n 'default' --emails 'john@contoso.com;jane@contoso.com' --phone '214-275-4038' --notifications-by-role '{"state":"On","roles":["Owner"]}' --alert-notifications '{"state":"On","minimalSeverity":"Low"}'

Required Parameters

--name --security-contact-name -n

Name of the security contact object.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--alert-notifications

Defines whether to send email notifications about new security alerts Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--emails

List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.

Property Value
Parameter group: Properties Arguments
--notifications-by-role

Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--phone

The security contact's phone number.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az security contact delete

Preview

Command group 'az security contact' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete security contact configurations for the subscription.

az security contact delete [--ids]
                           [--name --security-contact-name]
                           [--subscription]
                           [--yes]

Examples

Deletes a security contact.

az security contact delete -n "default"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --security-contact-name -n

Name of the security contact object.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az security contact list

Preview

Command group 'az security contact' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all security contact configurations for the subscription.

az security contact list [--max-items]
                         [--next-token]

Examples

Gets all security contacts.

az security contact list

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az security contact show

Preview

Command group 'az security contact' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get Default Security contact configurations for the subscription.

az security contact show [--ids]
                         [--name --security-contact-name]
                         [--subscription]

Examples

Get a security contact.

az security contact show -n "default1"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --security-contact-name -n

Name of the security contact object.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az security contact update

Preview

Command group 'az security contact' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update security contact configurations for the subscription.

az security contact update [--add]
                           [--alert-notifications]
                           [--emails]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--ids]
                           [--name --security-contact-name]
                           [--notifications-by-role]
                           [--phone]
                           [--remove]
                           [--set]
                           [--subscription]

Examples

Updates a security contact.

az security contact update -n 'default' --emails 'john1@contoso.com;jane@contoso.com' --phone '214-275-4038' --notifications-by-role '{"state":"On","roles":["Owner"]}' --alert-notifications '{"state":"On","minimalSeverity":"Low"}'

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
--alert-notifications

Defines whether to send email notifications about new security alerts Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--emails

List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.

Property Value
Parameter group: Properties Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --security-contact-name -n

Name of the security contact object.

Property Value
Parameter group: Resource Id Arguments
--notifications-by-role

Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--phone

The security contact's phone number.

Property Value
Parameter group: Properties Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False