Skip to main content
PUT
/
cloud
/
v1
/
l7policies
/
{project_id}
/
{region_id}
/
{l7policy_id}
/
rules
/
{l7rule_id}
Replace load balancer L7 rule properties
curl --request PUT \
  --url https://api.gcore.com/cloud/v1/l7policies/{project_id}/{region_id}/{l7policy_id}/rules/{l7rule_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "invert": true,
  "key": "the name of the cookie or header to evaluate.",
  "tags": [
    "test_tag_1",
    "test_tag_2"
  ],
  "value": "/images*"
}
'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://gcore.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

Example:

1

region_id
integer
required

Region ID

Example:

1

l7policy_id
string
required

L7 policy ID

Example:

"023f2e34-7806-443b-bfae-16c324569a3d"

l7rule_id
string
required

L7 rule ID

Example:

"023f2e34-7806-443b-bfae-16c324569a3d"

Body

application/json
compare_type
enum<string>

The comparison type for the L7 rule

Available options:
CONTAINS,
ENDS_WITH,
EQUAL_TO,
REGEX,
STARTS_WITH
Example:

"REGEX"

invert
boolean

When true the logic of the rule is inverted.

Examples:

true

false

key
string

The key to use for the comparison. Required for COOKIE and HEADER type only.

Maximum string length: 255
Example:

"the name of the cookie or header to evaluate."

tags
string[]

A list of simple strings assigned to the l7 rule

Example:
["test_tag_1", "test_tag_2"]
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
Example:

"PATH"

value
string

The value to use for the comparison

Required string length: 1 - 255
Example:

"/images*"

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:

  • GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.
Example:
["d478ae29-dedc-4869-82f0-96104425f565"]