openstack_sdk::api::load_balancer::v2::l7policy

Module create

source
Expand description

Creates a L7 policy.

This operation provisions a new L7 policy 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 policy.

In the response, the L7 policy provisioning status is ACTIVE, PENDING_CREATE, or ERROR.

If the status is PENDING_CREATE, issue GET /v2/lbaas/l7policies/{l7policy_id} to view the progress of the provisioning operation. When the L7 policy status changes to ACTIVE, the L7 policy 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.

If a new policy is created with a position that matches that of an existing policy, then the new policy is inserted at the given position.

L7 policies with action of REDIRECT_TO_URL will return the default HTTP Found (302) response code with the redirect_url. Also, specify redirect_http_code to configure the needed HTTP response code, such as, 301, 302, 303, 307 and 308.

L7 policies with action of REJECT will return a Forbidden (403) response code to the requester.

Structs§

Enums§