Edit

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule

Gets the results for a given rule in the Baseline.

Syntax

List (Default)

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule
    -ResourceId <String>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule
    -ResourceId <String>
    -RuleId <String>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule
    -InputObject <ISecurityIdentity>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets the results for a given rule in the Baseline.

Examples

Example 1: Get a specific baseline rule for a resource

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db" -RuleId "VA1234"
Name   Result
----   ------
VA1234 {{userA, SELECT}, {userB, SELECT}}

Gets the baseline defined for rule VA1234 on the specified database.

Example 2: List all baseline rules for a resource

Get-AzSecuritySqlVulnerabilityAssessmentBaselineRule -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db"
Name   Result
----   ------
VA1234 {{userA, SELECT}, {userB, SELECT}}
VA1235 {{userA, EXECUTE}}

Lists all baseline rules defined on the specified database.

Parameters

-DatabaseName

The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:ISecurityIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

The fully qualified Azure Resource manager identifier of the resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RuleId

The rule Id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ISecurityIdentity

Outputs

IRuleResults