Managed Instance Vulnerability Assessments - Create Or Update

Membuat atau memperbarui penilaian kerentanan instans terkelola. Pelajari selengkapnya tentang mengatur penilaian kerentanan SQL dengan identitas terkelola - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/default?api-version=2022-02-01-preview

Parameter URI

Name In Required Type Description
managedInstanceName
path True
  • string

Nama instans terkelola yang penilaian kerentanannya ditentukan.

resourceGroupName
path True
  • string

Nama grup sumber daya yang berisi sumber daya. Anda dapat memperoleh nilai ini dari Azure Resource Manager API atau portal.

subscriptionId
path True
  • string

ID langganan yang mengidentifikasi langganan Azure.

vulnerabilityAssessmentName
path True

Nama penilaian kerentanan.

api-version
query True
  • string

Versi API yang digunakan untuk permintaan.

Isi Permintaan

Name Required Type Description
properties.storageContainerPath True
  • string

Jalur kontainer penyimpanan blob untuk menyimpan hasil pemindaian (misalnya https://myStorage.blob.core.windows.net/VaScans/).

properties.recurringScans

Pengaturan pemindaian berulang

properties.storageAccountAccessKey
  • string

Menentukan kunci pengidentifikasi akun penyimpanan untuk hasil pemindaian penilaian kerentanan. Jika 'StorageContainerSasKey' tidak ditentukan, storageAccountAccessKey diperlukan. Hanya berlaku jika akun penyimpanan tidak berada di belakang Vnet atau firewall

properties.storageContainerSasKey
  • string

Tanda tangan akses bersama (Kunci SAS) yang memiliki akses tulis ke kontainer blob yang ditentukan dalam parameter 'storageContainerPath'. Jika 'storageAccountAccessKey' tidak ditentukan, StorageContainerSasKey diperlukan. Hanya berlaku jika akun penyimpanan tidak berada di belakang Vnet atau firewall

Respons

Name Type Description
200 OK

Berhasil mengatur penilaian kerentanan.

201 Created

Berhasil membuat penilaian kerentanan.

Other Status Codes

Respons Kesalahan: ***

  • 400 InvalidStorageAccountName - Akun penyimpanan yang disediakan tidak valid atau tidak ada.

  • 400 InvalidStorageAccountCredentials - Tanda tangan akses bersama akun penyimpanan yang disediakan atau kunci penyimpanan akun tidak valid.

  • 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security harus diaktifkan untuk menggunakan Penilaian Kerentanan.

  • 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - Akun penyimpanan tidak ada dalam daftar Aturan Firewall Keluar.

  • 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Izin tidak cukup pada akun penyimpanan yang disediakan.

  • 400 VulnerabilityAssessmentStorageAccountIsDisabled - Akun penyimpanan yang disediakan dinonaktifkan.

  • 400 InvalidVulnerabilityAssessmentOperationRequest - Permintaan operasi penilaian kerentanan tidak ada atau tidak memiliki objek properti.

  • 400 DataSecurityInvalidUserSuppliedParameter - Nilai parameter yang tidak valid disediakan oleh klien.

  • 404 SubscriptionDoesNotHaveServer - Server yang diminta tidak ditemukan

Contoh

Create a managed instance's vulnerability assessment with all parameters
Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified
Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified

Create a managed instance's vulnerability assessment with all parameters

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default?api-version=2022-02-01-preview

{
  "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/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": true,
      "emails": [
        "email1@mail.com",
        "email2@mail.com"
      ]
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": true,
      "emails": [
        "email1@mail.com",
        "email2@mail.com"
      ]
    }
  }
}

Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default?api-version=2022-02-01-preview

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

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}

Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default?api-version=2022-02-01-preview

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

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default",
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments",
  "properties": {
    "recurringScans": {
      "isEnabled": true,
      "emailSubscriptionAdmins": false,
      "emails": []
    }
  }
}

Definisi

ManagedInstanceVulnerabilityAssessment

Penilaian kerentanan instans terkelola.

VulnerabilityAssessmentName

Nama penilaian kerentanan.

VulnerabilityAssessmentRecurringScansProperties

Properti pemindaian berulang Penilaian Kerentanan.

ManagedInstanceVulnerabilityAssessment

Penilaian kerentanan instans terkelola.

Name Type Description
id
  • string

ID Sumber Daya.

name
  • string

Nama sumber daya.

properties.recurringScans

Pengaturan pemindaian berulang

properties.storageAccountAccessKey
  • string

Menentukan kunci pengidentifikasi akun penyimpanan untuk hasil pemindaian penilaian kerentanan. Jika 'StorageContainerSasKey' tidak ditentukan, storageAccountAccessKey diperlukan. Hanya berlaku jika akun penyimpanan tidak berada di belakang Vnet atau firewall

properties.storageContainerPath
  • string

Jalur kontainer penyimpanan blob untuk menyimpan hasil pemindaian (misalnya https://myStorage.blob.core.windows.net/VaScans/).

properties.storageContainerSasKey
  • string

Tanda tangan akses bersama (Kunci SAS) yang memiliki akses tulis ke kontainer blob yang ditentukan dalam parameter 'storageContainerPath'. Jika 'storageAccountAccessKey' tidak ditentukan, StorageContainerSasKey diperlukan. Hanya berlaku jika akun penyimpanan tidak berada di belakang Vnet atau firewall

type
  • string

Jenis sumber daya

VulnerabilityAssessmentName

Nama penilaian kerentanan.

Name Type Description
default
  • string

VulnerabilityAssessmentRecurringScansProperties

Properti pemindaian berulang Penilaian Kerentanan.

Name Type Default Value Description
emailSubscriptionAdmins
  • boolean
True

Menentukan bahwa pemberitahuan pemindaian jadwal akan dikirim ke administrator langganan.

emails
  • string[]

Menentukan array alamat email tempat pemberitahuan pemindaian dikirim.

isEnabled
  • boolean

Status pemindaian berulang.