你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Workspace Managed Sql Server Vulnerability Assessments - Create Or Update

创建或更新服务器的漏洞评估。
创建或更新工作区托管 SQL Server 的漏洞评估。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/default?api-version=2021-06-01

URI 参数

Name In Required Type Description
resourceGroupName
path True
  • string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True
  • string

目标订阅的 ID。

vulnerabilityAssessmentName
path True

漏洞评估的名称。

workspaceName
path True
  • string

工作区的名称。

api-version
query True
  • string

要用于此操作的 API 版本。

请求正文

Name Required Type Description
properties.storageContainerPath True
  • string

用于保存扫描结果的 blob 存储容器路径 (,例如 https://myStorage.blob.core.windows.net/VaScans/) 。

properties.recurringScans

定期扫描设置

properties.storageAccountAccessKey
  • string

为漏洞评估扫描结果指定存储帐户的标识符密钥。 如果未指定“StorageContainerSasKey”,则需要 storageAccountAccessKey。

properties.storageContainerSasKey
  • string

对“storageContainerPath”参数中指定的 blob 容器具有读取和写入访问权限的 SAS 密钥) (共享访问签名。 如果未指定“storageAccountAccessKey”,则需要 StorageContainerSasKey。

响应

Name Type Description
200 OK

已成功创建漏洞评估。

201 Created

已成功创建漏洞评估。

Other Status Codes

错误响应: ***

  • 400 InvalidStorageAccountName - 提供的存储帐户无效或不存在。

  • 400 InvalidStorageAccountCredentials - 提供的存储帐户共享访问签名或帐户存储帐户密钥无效。

  • 400 InvalidVulnerabilityAssessmentOperationRequest - 漏洞评估操作请求不存在或没有属性对象。

  • 400 DataSecurityInvalidUserSuppliedParameter - 客户端提供了无效的参数值。

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 409 UnsupportedWorkspaceType - 工作区类型的不受支持的操作。

  • 500 InternalServerError - 出现问题。

示例

Create or Update a workspace managed sql server's vulnerability assessment with all parameters
Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified
Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified

Create or Update a workspace managed sql server's vulnerability assessment with all parameters

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default?api-version=2021-06-01

{
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": true,
      "emails": [
        "email1@mail.com",
        "email2@mail.com"
      ]
    }
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": true,
      "emails": [
        "email1@mail.com",
        "email2@mail.com"
      ]
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": true,
      "emails": [
        "email1@mail.com",
        "email2@mail.com"
      ]
    }
  }
}

Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default?api-version=2021-06-01

{
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}

Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default?api-version=2021-06-01

{
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/wsg-7398/providers/Microsoft.Synapse/workspaces/testWorkspace/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Synapse/workspaces/vulnerabilityAssessments",
  "properties": {
    "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}

定义

ServerVulnerabilityAssessment

服务器漏洞评估。

VulnerabilityAssessmentName

漏洞评估的名称。

VulnerabilityAssessmentRecurringScansProperties

漏洞评估定期扫描的属性。

ServerVulnerabilityAssessment

服务器漏洞评估。

Name Type Description
id
  • string

资源的完全限定的资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name
  • string

资源的名称

properties.recurringScans

定期扫描设置

properties.storageAccountAccessKey
  • string

为漏洞评估扫描结果指定存储帐户的标识符密钥。 如果未指定“StorageContainerSasKey”,则需要 storageAccountAccessKey。

properties.storageContainerPath
  • string

用于保存扫描结果的 blob 存储容器路径 (,例如 https://myStorage.blob.core.windows.net/VaScans/) 。

properties.storageContainerSasKey
  • string

对“storageContainerPath”参数中指定的 blob 容器具有读取和写入访问权限的 SAS 密钥) (共享访问签名。 如果未指定“storageAccountAccessKey”,则需要 StorageContainerSasKey。

type
  • string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft”。存储/storageAccounts”

VulnerabilityAssessmentName

漏洞评估的名称。

Name Type Description
default
  • string

VulnerabilityAssessmentRecurringScansProperties

漏洞评估定期扫描的属性。

Name Type Default Value Description
emailSubscriptionAdmins
  • boolean
True

指定计划扫描通知将发送到订阅管理员。

emails
  • string[]

指定扫描通知发送到的电子邮件地址数组。

isEnabled
  • boolean

定期扫描状态。