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.replace(
id=0,
fields=[{
"base_field": 1
}],
profile_template=1,
)
print(client_profile.id)
Update profile. Protection policies are updated at the same time as profile updated
PUT
/
security
/
iaas
/
v2
/
profiles
/
{id}
Python
Copy
Ask AI
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.replace(
id=0,
fields=[{
"base_field": 1
}],
profile_template=1,
)
print(client_profile.id)