Server Security Alert Policies - Create Or Update

Tehdit algılama ilkesi oluşturur veya güncelleştirir.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/Default?api-version=2017-12-01

URI Parametreleri

Name İçinde Gerekli Tür Description
resourceGroupName
path True

string

Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.

securityAlertPolicyName
path True

SecurityAlertPolicyName

Tehdit algılama ilkesinin adı.

serverName
path True

string

Sunucunun adı.

subscriptionId
path True

string

Hedef aboneliğin kimliği.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Gerekli Tür Description
properties.state True

ServerSecurityAlertPolicyState

İlkenin etkin veya devre dışı durumunu belirtir.

properties.disabledAlerts

string[]

Devre dışı bırakılan bir uyarı dizisini belirtir. İzin verilen değerler şunlardır: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly

properties.emailAccountAdmins

boolean

Uyarının hesap yöneticilerine gönderildiğini belirtir.

properties.emailAddresses

string[]

Uyarının gönderileceği e-posta adresleri dizisini belirtir.

properties.retentionDays

integer

Tehdit Algılama denetim günlüklerinde tutulacak gün sayısını belirtir.

properties.storageAccountAccessKey

string

Tehdit Algılama denetim depolama hesabının tanımlayıcı anahtarını belirtir.

properties.storageEndpoint

string

Blob depolama uç noktasını belirtir (ör. https://MyAccount.blob.core.windows.net). Bu blob depolama tüm Tehdit Algılama denetim günlüklerini barındıracaktır.

Yanıtlar

Name Tür Description
200 OK

ServerSecurityAlertPolicy

Tehdit algılama ilkesi başarıyla güncelleştirildi.

202 Accepted

Sunucu tehdit algılama ilkesini ayarlamak için istek oluşturuldu.

Other Status Codes

Güvenlik uyarısı ilkelerini ayarlama işleminin neden başarısız olduğunu açıklayan hata yanıtı.

Örnekler

Update a server's threat detection policy with all parameters
Update a server's threat detection policy with minimal parameters

Update a server's threat detection policy with all parameters

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/Default?api-version=2017-12-01

{
  "properties": {
    "state": "Enabled",
    "emailAccountAdmins": true,
    "emailAddresses": [
      "testSecurityAlert@microsoft.com"
    ],
    "disabledAlerts": [
      "Access_Anomaly",
      "Usage_Anomaly"
    ],
    "retentionDays": 5,
    "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==",
    "storageEndpoint": "https://mystorage.blob.core.windows.net"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default",
  "name": "Default",
  "type": "Microsoft.DBforPostgreSQL/servers/securityAlertPolicies",
  "properties": {
    "state": "Enabled",
    "emailAccountAdmins": true,
    "emailAddresses": [
      "testSecurityAlert@microsoft.com"
    ],
    "disabledAlerts": [
      "Access_Anomaly",
      "Usage_Anomaly"
    ],
    "retentionDays": 5,
    "storageEndpoint": "https://mystorage.blob.core.windows.net"
  }
}

Update a server's threat detection policy with minimal parameters

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/Default?api-version=2017-12-01

{
  "properties": {
    "state": "Disabled",
    "emailAccountAdmins": true
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default",
  "name": "Default",
  "type": "Microsoft.DBforPostgreSQL/servers/securityAlertPolicies",
  "properties": {
    "state": "Enabled",
    "emailAccountAdmins": true,
    "emailAddresses": [
      ""
    ],
    "disabledAlerts": [
      ""
    ],
    "retentionDays": 0,
    "storageEndpoint": ""
  }
}

Tanımlar

Name Description
SecurityAlertPolicyName

Tehdit algılama ilkesinin adı.

ServerSecurityAlertPolicy

Sunucu güvenlik uyarısı ilkesi.

ServerSecurityAlertPolicyState

İlkenin etkin veya devre dışı durumunu belirtir.

SecurityAlertPolicyName

Tehdit algılama ilkesinin adı.

Name Tür Description
Default

string

ServerSecurityAlertPolicy

Sunucu güvenlik uyarısı ilkesi.

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Kaynağın adı

properties.disabledAlerts

string[]

Devre dışı bırakılan bir uyarı dizisini belirtir. İzin verilen değerler şunlardır: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly

properties.emailAccountAdmins

boolean

Uyarının hesap yöneticilerine gönderildiğini belirtir.

properties.emailAddresses

string[]

Uyarının gönderileceği e-posta adresleri dizisini belirtir.

properties.retentionDays

integer

Tehdit Algılama denetim günlüklerinde tutulacak gün sayısını belirtir.

properties.state

ServerSecurityAlertPolicyState

İlkenin etkin veya devre dışı durumunu belirtir.

properties.storageAccountAccessKey

string

Tehdit Algılama denetim depolama hesabının tanımlayıcı anahtarını belirtir.

properties.storageEndpoint

string

Blob depolama uç noktasını belirtir (ör. https://MyAccount.blob.core.windows.net). Bu blob depolama tüm Tehdit Algılama denetim günlüklerini barındıracaktır.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"

ServerSecurityAlertPolicyState

İlkenin etkin veya devre dışı durumunu belirtir.

Name Tür Description
Disabled

string

Enabled

string