Edit

Share via


Update-AzSynapseSqlVulnerabilityAssessmentSetting

Updates the vulnerability assessment settings of a workspace.

Syntax

UpdateByStorageAccountNameAndNameParameterSet (Default)

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -WorkspaceName <String>
    [-ResourceGroupName <String>]
    [-StorageAccountName <String>]
    [-ScanResultsContainerName <String>]
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateByBlobStorageSasUriAndNameParameterSet

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -WorkspaceName <String>
    -BlobStorageSasUri <Uri>
    [-ResourceGroupName <String>]
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateByStorageAccountNameAndInputObjectParameterSet

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -InputObject <PSSynapseWorkspace>
    [-StorageAccountName <String>]
    [-ScanResultsContainerName <String>]
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateByBlobStorageSasUriAndInputObjectParameterSet

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -InputObject <PSSynapseWorkspace>
    -BlobStorageSasUri <Uri>
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateByStorageAccountNameAndResourceIdParameterSet

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -ResourceId <String>
    [-StorageAccountName <String>]
    [-ScanResultsContainerName <String>]
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateByBlobStorageSasUriAndResourceIdParameterSet

Update-AzSynapseSqlVulnerabilityAssessmentSetting
    -ResourceId <String>
    -BlobStorageSasUri <Uri>
    [-RecurringScansInterval <RecurringScansInterval>]
    [-EmailAdmin <Boolean>]
    [-NotificationEmail <String[]>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Update-AzSynapseSqlVulnerabilityAssessmentSetting cmdlet updates the vulnerability assessment settings of an Azure Synapse Analytics workspace. Before updates the settings, you need to enable the Azure defender for SQL.

Important

If the virtual networks and the firewall enabled for the storage account, "-BlobStorageSasUri" parameter is required to update the vulnerability assessment settings.

Examples

Example 1

Update-AzSynapseSqlVulnerabilityAssessmentSetting `
            -WorkspaceName "ContosoWorkspace"`
            -StorageAccountName "mystorage" `
            -ScanResultsContainerName "vulnerability-assessment" `
            -RecurringScansInterval Weekly `
            -EmailAdmins $true `
            -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

This command updates Vulnerability Assessment settings with storage account name.

Example 2

Update-AzSynapseSqlVulnerabilityAssessmentSetting `
            -WorkspaceName "ContosoWorkspace"`
            -BlobStorageSasUri "https://mystorage.blob.core.windows.net/vulnerability-assessment?st=XXXXXX" `
            -RecurringScansInterval Weekly `
            -EmailAdmins $true `
            -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

This command updates Vulnerability Assessment settings with blob storage SAS URI.

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
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

-BlobStorageSasUri

A SAS URI to a storage container that will hold the scan results.

Parameter properties

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

Parameter sets

UpdateByBlobStorageSasUriAndNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByBlobStorageSasUriAndInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByBlobStorageSasUriAndResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

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 credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, 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

-EmailAdmin

A value indicating whether to email service and co-administrators on recurring scan completion.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EmailAdmins

Parameter sets

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

-InputObject

workspace input object, usually passed through the pipeline.

Parameter properties

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

Parameter sets

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

-NotificationEmail

A list of mail addresses to send on recurring scan completion.

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

-RecurringScansInterval

The recurring scans interval.

Parameter properties

Type:RecurringScansInterval
Default value:None
Accepted values:None, Weekly
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

-ResourceGroupName

Resource group name.

Parameter properties

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

Parameter sets

UpdateByStorageAccountNameAndNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByBlobStorageSasUriAndNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

Resource identifier of Synapse workspace.

Parameter properties

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

Parameter sets

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

-ScanResultsContainerName

The name of the storage container that will hold the scan results.

Parameter properties

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

Parameter sets

UpdateByStorageAccountNameAndNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByStorageAccountNameAndInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByStorageAccountNameAndResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageAccountName

The name of the storage account that will hold the scan results.

Parameter properties

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

Parameter sets

UpdateByStorageAccountNameAndNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByStorageAccountNameAndInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByStorageAccountNameAndResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

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

-WorkspaceName

Name of Synapse workspace.

Parameter properties

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

Parameter sets

UpdateByStorageAccountNameAndNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateByBlobStorageSasUriAndNameParameterSet
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

PSSynapseWorkspace

Outputs

VulnerabilityAssessmentSettingsModel