az security alert

View security alerts.

Commands

az security alert list

List security alerts.

az security alert show

Shows a security alert.

az security alert update

Updates a security alert status.

az security alert list

List security alerts.

az security alert list [--location]
                       [--query-examples]
                       [--resource-group]
                       [--subscription]

Examples

Get security alerts on a subscription scope.

az security alert list

Get security alerts on a resource group scope.

az security alert list -g "myRg"

Optional Parameters

--location -l

Location of the resource.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

az security alert show

Shows a security alert.

az security alert show --location
                       --name
                       [--query-examples]
                       [--resource-group]
                       [--subscription]

Examples

Get a security alert on a subscription scope.

az security alert show --location "centralus" -n "alertName"

Get a security alert on a resource group scope.

az security alert show -g "myRg" --location "centralus" -n "alertName"

Required Parameters

--location -l

Location of the resource.

--name -n

Name of the resource to be fetched.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

az security alert update

Updates a security alert status.

az security alert update --location
                         --name
                         --status
                         [--resource-group]
                         [--subscription]

Examples

Dismiss a security alert on a subscription scope.

az security alert update --location "centralus" -n "alertName" --status "dismiss"

Dismiss a security alert on a resource group scope.

az security alert update -g "myRg" --location "centralus" -n "alertName" --status "dismiss"

Activate a security alert on a subscritpion scope.

az security alert update --location "centralus" -n "alertName" --status "activate"

Activate a security alert on a resource group scope.

az security alert update -g "myRg" --location "centralus" -n "alertName" --status "activate"

Required Parameters

--location -l

Location of the resource.

--name -n

Name of the resource to be fetched.

--status

Target status of the alert. possible values are "dismiss" and "activate".

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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