osc load-balancer l7policy set

Updates a L7 policy.

If the request is valid, the service returns the Accepted (202) response code. To confirm the update, check that the L7 policy provisioning status is ACTIVE. If the status is PENDING_UPDATE, use a GET operation to poll the L7 policy object for changes.

This operation returns the updated L7 policy object with the ACTIVE, PENDING_UPDATE, or ERROR provisioning status.

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

Usage: osc load-balancer l7policy set [OPTIONS] <ID>

Arguments:

  • <ID> — l7policy_id parameter for /v2/lbaas/l7policies/{l7policy_id} API

Options:

  • --action <ACTION> — The L7 policy action. One of REDIRECT_PREFIX, REDIRECT_TO_POOL, REDIRECT_TO_URL, or REJECT

    Possible values: redirect-prefix, redirect-to-pool, redirect-to-url, reject

  • --admin-state-up <ADMIN_STATE_UP> — The administrative state of the resource, which is up (true) or down (false). Default is true

    Possible values: true, false

  • --description <DESCRIPTION> — A human-readable description for the resource

  • --name <NAME> — Human-readable name of the resource

  • --position <POSITION> — The position of this policy on the listener. Positions start at 1

  • --redirect-http-code <REDIRECT_HTTP_CODE> — Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECT_TO_URL or REDIRECT_PREFIX. Valid options are: 301, 302, 303, 307, or 308. Default is 302.

    New in version 2.9

  • --redirect-pool-id <REDIRECT_POOL_ID> — Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL. The pool has some restrictions, See Protocol Combinations (Listener/Pool)

  • --redirect-prefix <REDIRECT_PREFIX> — Requests matching this policy will be redirected to this Prefix URL. Only valid if action is REDIRECT_PREFIX

  • --redirect-url <REDIRECT_URL> — Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL

  • --tags <TAGS> — A list of simple strings assigned to the resource.

    New in version 2.5