ByCloud Docs
GuidesCLIAPISDK
patch/v1/load-balancers/{load_balancer_id}/l7-policies/{l7_policy_id}/rules/{l7_rule_id}

Update L7 rule

Update an L7 rule

Path Parameters

load_balancer_id

string<uuid>required

path

Load Balancer ID

Example: "550e8400-e29b-41d4-a716-446655440000"

l7_policy_id

string<uuid>required

path

L7 Policy ID

Example: "550e8400-e29b-41d4-a716-446655440000"

l7_rule_id

string<uuid>required

path

L7 Rule ID

Example: "550e8400-e29b-41d4-a716-446655440000"

Header Parameters

X-Region

stringrequired

header

Region code to query resources from. Required for all resource operations.

Example: "sao1"

Request Body

required

Content-Type: application/json

type

stringoptional

Enum: "HOST_NAME", "PATH", "FILE_TYPE", "HEADER", "COOKIE", "SSL_CONN_HAS_CERT", "SSL_VERIFY_RESULT", "SSL_DN_FIELD"

compare_type

stringoptional

Enum: "REGEX", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "EQUAL_TO"

key

stringoptional

nullable

value

stringoptional

invert

booleanoptional

tags

arrayoptional

Responses

200

L7 rule updated

Content-Type: application/json

rule

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Resource not found

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X PATCH "https://api.spo1.mycloud.com/v1/load-balancers/550e8400-e29b-41d4-a716-446655440000/l7-policies/550e8400-e29b-41d4-a716-446655440000/rules/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "PATH",
"compare_type": "STARTS_WITH",
"key": "string",
"value": "string",
"invert": true,
"tags": [
"web",
"frontend"
]
}'

Response

L7 rule updated

{
"rule": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"crn": "crn:spo1:loadbalancer:l7-rule:550e8400-e29b-41d4-a716-446655440000",
"provisioning_status": "ACTIVE",
"operating_status": "ONLINE",
"type": "PATH",
"compare_type": "STARTS_WITH",
"key": "string",
"value": "string",
"invert": false,
"l7_policy_id": "550e8400-e29b-41d4-a716-446655440000",
"tags": [
"web",
"frontend"
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}