Skip to main content
PUT
/
security
/
iaas
/
v2
/
profiles
/
{id}
/
recreate
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
client_profile = client.security.profiles.recreate(
    id=0,
    fields=[{
        "base_field": 1
    }],
    profile_template=1,
)
print(client_profile.id)
{
  "id": 123,
  "profile_template": {
    "id": 123,
    "name": "<string>",
    "fields": [
      {
        "id": 123,
        "name": "<string>",
        "description": "<string>",
        "field_type": "int",
        "required": true,
        "default": "<string>",
        "validation_schema": {}
      }
    ],
    "version": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "base_template": 123,
    "template_sifter": "<string>"
  },
  "fields": [
    {
      "id": 123,
      "name": "<string>",
      "description": "<string>",
      "field_type": "<string>",
      "required": true,
      "default": "<string>",
      "base_field": 123,
      "validation_schema": {},
      "field_value": "<unknown>"
    }
  ],
  "site": "<string>",
  "options": {
    "bgp": true,
    "active": true,
    "price": "<string>"
  },
  "protocols": [
    {}
  ],
  "status": {},
  "plan": "<string>",
  "ip_address": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

id
integer
required

Body

profile_template
integer
required
fields
object[]
required
ip_address
string

Required for Universal template only. Optional for all others.

Maximum string length: 50
site
string

Region where the protection profiles will be deployed

Response

id
integer
required
profile_template
object
required
fields
object[]
required
site
string
required

Region where the protection profiles will be deployed

options
object
required
protocols
object[]
required
status
object
required
plan
string
required
ip_address
string
Maximum string length: 50