PUT
/
cloud
/
v1
/
l7policies
/
{project_id}
/
{region_id}
/
{l7policy_id}
/
rules
/
{l7rule_id}
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
)
task_id_list = client.cloud.load_balancers.l7_policies.rules.replace(
    l7rule_id="l7rule_id",
    project_id=0,
    region_id=0,
    l7policy_id="l7policy_id",
)
print(task_id_list.tasks)
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

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

project_id
integer
required

Project ID

region_id
integer
required

Region ID

l7policy_id
string
required

L7 policy ID

l7rule_id
string
required

L7 rule ID

Body

application/json
compare_type
enum<string>

The comparison type for the L7 rule

Available options:
CONTAINS,
ENDS_WITH,
EQUAL_TO,
REGEX,
STARTS_WITH
invert
boolean

When true the logic of the rule is inverted. For example, with invert true, 'equal to' would become 'not equal to'. Default is false.

key
string

The key to use for the comparison. For example, the name of the cookie to evaluate.

tags
string[]

A list of simple strings assigned to the l7 rule

type
enum<string>

The L7 rule type

Available options:
COOKIE,
FILE_TYPE,
HEADER,
HOST_NAME,
PATH,
SSL_CONN_HAS_CERT,
SSL_DN_FIELD,
SSL_VERIFY_RESULT
value
string

The value to use for the comparison. For example, the file type to compare

Response

List of created tasks

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]