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
                           [--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

--alert-notifications

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

--emails

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

--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.

--phone

The security contact's phone number.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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]
                           [--subscription]
                           [--yes]

Examples

Deletes a security contact.

az security contact delete -n "default"

Optional Parameters

--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.

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

Name of the security contact object.

--subscription

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

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--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.

--next-token

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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]
                         [--subscription]

Examples

Get a security contact.

az security contact show -n "default1"

Optional Parameters

--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.

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

Name of the security contact object.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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]
                           [--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

--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>.

--alert-notifications

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

--emails

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

--force-string

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

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.

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

Name of the security contact object.

--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.

--phone

The security contact's phone number.

--remove

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

--set

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.