import osfrom gcore import Gcoreclient = 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)
Recreate profile with another profile template (for other cases use detail API)
PUT
/
security
/
iaas
/
v2
/
profiles
/
{id}
/
recreate
Python
Copy
Ask AI
import osfrom gcore import Gcoreclient = 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)