osc load-balancer l7policy rule create
Creates a L7 rule.
This operation provisions a new L7 rule by using the configuration that you define in the request object. After the API validates the request and starts the provisioning process, the API returns a response object that contains a unique ID and the status of provisioning the L7 rule.
In the response, the L7 rule provisioning status is ACTIVE
, PENDING_CREATE
, or ERROR
.
If the status is PENDING_CREATE
, issue GET /v2/lbaas/l7policies/{l7policy_id}/rules/{l7rule_id}
to view the progress of the provisioning operation. When the L7 rule status changes to ACTIVE
, the L7 rule is successfully provisioned and is ready for further configuration.
If the API cannot fulfill the request due to insufficient data or data that is not valid, the service returns the HTTP Bad Request (400)
response code with information about the failure in the response body. Validation errors require that you correct the error and submit the request again.
All the rules associated with a given policy are logically ANDead together. A request must match all the policy’s rules to match the policy.
If you need to express a logical OR operation between rules, then do this by creating multiple policies with the same action.
Usage: osc load-balancer l7policy rule create [OPTIONS] --compare-type <COMPARE_TYPE> --type <TYPE> --value <VALUE> <L7POLICY_ID>
Arguments:
<L7POLICY_ID>
— l7policy_id parameter for /v2/lbaas/l7policies/{l7policy_id}/rules/{rule_id} API
Options:
-
--admin-state-up <ADMIN_STATE_UP>
— The administrative state of the resource, which is up (true
) or down (false
). Default istrue
Possible values:
true
,false
-
--compare-type <COMPARE_TYPE>
— The comparison type for the L7 rule. One ofCONTAINS
,ENDS_WITH
,EQUAL_TO
,REGEX
, orSTARTS_WITH
Possible values:
contains
,ends-with
,equal-to
,regex
,starts-with
-
--invert <INVERT>
— Whentrue
the logic of the rule is inverted. For example, with inverttrue
, equal to would become not equal to. Default isfalse
Possible values:
true
,false
-
--key <KEY>
— The key to use for the comparison. For example, the name of the cookie to evaluate -
--project-id <PROJECT_ID>
— The ID of the project owning this resource -
--tags <TAGS>
— A list of simple strings assigned to the resource.New in version 2.5
-
--tenant-id <TENANT_ID>
-
--type <TYPE>
— The L7 rule type. One ofCOOKIE
,FILE_TYPE
,HEADER
,HOST_NAME
,PATH
,SSL_CONN_HAS_CERT
,SSL_VERIFY_RESULT
, orSSL_DN_FIELD
Possible values:
cookie
,file-type
,header
,host-name
,path
,ssl-conn-has-cert
,ssl-dn-field
,ssl-verify-result
-
--value <VALUE>
— The value to use for the comparison. For example, the file type to compare