الانتقال إلى المحتوى الرئيسي
PUT
/
bgp
/
policy
/
{policyId}
تحديث سياسة BGP
curl --request PUT \
  --url https://api.altostrat.io/bgp/policy/{policyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "حظر Geo-IP عالي الخطورة",
  "enabled": true,
  "lists": [
    "9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c"
  ],
  "sites": [
    "9a9d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8d"
  ]
}'
{
  "id": "9b1d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8b",
  "name": "حظر التهديدات المعروفة",
  "enabled": true,
  "default": false,
  "lists": [
    "9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c"
  ],
  "site_count": 3,
  "updated_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

policyId
string<uuid>
required

المعرّف الفريد لسياسة BGP المطلوب تحديثها.

Body

application/json
name
string
required

اسم مقروء للسياسة.

Example:

"حظر Geo-IP عالي الخطورة"

enabled
boolean
required

ما إذا كانت السياسة نشطة.

Example:

true

lists
string<uuid>[]
required

قائمة بمعرّفات قوائم سمعة IP عبر BGP لتضمينها في هذه السياسة.

Example:
["9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c"]
sites
string<uuid>[]

قائمة بمعرّفات المواقع التي يجب ربط هذه السياسة بها. سيتم فصل أي مواقع غير موجودة في هذه القائمة.

Example:
["9a9d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8d"]

Response

تم تحديث سياسة BGP بنجاح.

id
string<uuid>
Example:

"9b1d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8b"

name
string
Example:

"حظر التهديدات المعروفة"

enabled
boolean
Example:

true

default
boolean

القيمة 'true' إذا كانت هذه هي السياسة الافتراضية للحساب.

Example:

false

lists
string<uuid>[]

قائمة بمعرّفات قوائم سمعة IP عبر BGP المضمنة في هذه السياسة.

Example:
["9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c"]
site_count
integer

عدد المواقع التي تستخدم هذه السياسة حاليًا.

Example:

3

updated_at
string<date-time>
created_at
string<date-time>