"update"
********

* Description

* Usage

* Required Parameters

* Optional Parameters

* Global Parameters

* Examples


Description
===========

Updates the configuration for a WAAS policy. Only the fields specified
in the request body will be updated; all other properties will remain
unchanged.


Usage
=====

   oci waas policy-config update [OPTIONS]


Required Parameters
===================

--waas-policy-id [text]

The OCID of the WAAS policy.


Optional Parameters
===================

--certificate-id [text]

The OCID of the SSL certificate to use if HTTPS is supported.

--cipher-group [text]

The set cipher group for the configured TLS protocol. This sets the
configuration for the TLS connections between clients and edge nodes
only. - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2,
TLS 1.3 protocols. It has the following ciphers enabled: *ECDHE-RSA-
AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-
SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-
DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-
AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-
AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-
ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-
AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-
AES256-SHA:AES128-GCM-SHA256:AES256-GCM-
SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA
:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-
DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA*

Accepted values are:

   DEFAULT

--client-address-header [text]

Specifies an HTTP header name which is treated as the connecting
client’s IP address. Applicable only if *isBehindCdn* is enabled.

The edge node reads this header and its value and sets the client IP
address as specified. It does not create the header if the header is
not present in the request. If the header is not present, the
connecting IP address will be used as the client’s true IP address. It
uses the last IP address in the header’s value as the true IP address.

Example:

   X-Client-Ip: 11.1.1.1, 13.3.3.3

In the case of multiple headers with the same name, only the first
header will be used. It is assumed that CDN sets the correct client IP
address to prevent spoofing.

* **X_FORWARDED_FOR:** Corresponds to *X-Forwarded-For* header name.

* **X_CLIENT_IP:** Corresponds to *X-Client-Ip* header name.

* **X_REAL_IP:** Corresponds to *X-Real-Ip* header name.

* **CLIENT_IP:** Corresponds to *Client-Ip* header name.

* **TRUE_CLIENT_IP:** Corresponds to *True-Client-Ip* header name.

Accepted values are:

   CLIENT_IP, TRUE_CLIENT_IP, X_CLIENT_IP, X_FORWARDED_FOR, X_REAL_IP

--force

Perform update without prompting for confirmation.

--from-json [text]

Provide input to this command as a JSON document from a file using the
file://path-to/file syntax.

The "--generate-full-command-json-input" option can be used to
generate a sample json file to be used with this command option. The
key names are pre-populated and match the command option names
(converted to camelCase format, e.g. compartment-id –> compartmentId),
while the values of the keys need to be populated by the user before
using the sample file as an input to this command. For any command
option that accepts multiple values, the value of the key can be a
JSON array.

Options can still be provided on the command line. If an option exists
in both the JSON document and the command line then the command line
specified value will be used.

For examples on usage of this option, please see our “using CLI with
advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Conte
nt/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--health-checks [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--if-match [text]

For optimistic concurrency control. In the *PUT* or *DELETE* call for
a resource, set the *if-match* parameter to the value of the etag from
a previous *GET* or *POST* response for that resource. The resource
will be updated or deleted only if the etag provided matches the
resource’s current etag value.

--is-behind-cdn [boolean]

Enabling *isBehindCdn* allows for the collection of IP addresses from
client requests if the WAF is connected to a CDN.

--is-cache-control-respected [boolean]

Enable or disable automatic content caching based on the response
*cache-control* header. This feature enables the origin to act as a
proxy cache. Caching is usually defined using *cache-control* header.
For example *cache-control: max-age=120* means that the returned
resource is valid for 120 seconds. Caching rules will overwrite this
setting.

--is-https-enabled [boolean]

Enable or disable HTTPS support. If true, a *certificateId* is
required. If unspecified, defaults to *false*.

--is-https-forced [boolean]

Force HTTP to HTTPS redirection. If unspecified, defaults to *false*.

--is-origin-compression-enabled [boolean]

Enable or disable GZIP compression of origin responses. If enabled,
the header *Accept-Encoding: gzip* is sent to origin, otherwise, the
empty *Accept-Encoding:* header is used.

--is-response-buffering-enabled [boolean]

Enable or disable buffering of responses from the origin. Buffering
improves overall stability in case of network issues, but slightly
increases Time To First Byte.

--is-sni-enabled [boolean]

SNI stands for Server Name Indication and is an extension of the TLS
protocol. It indicates which hostname is being contacted by the
browser at the beginning of the ‘handshake’-process. This allows a
server to connect multiple SSL Certificates to one IP address and
port.

--load-balancing-method [complex type]

An object that represents a load balancing method and its properties.
This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--max-wait-seconds [integer]

The maximum time to wait for the work request to reach the state
defined by "--wait-for-state". Defaults to 1200 seconds.

--tls-protocols [text]

A list of allowed TLS protocols. Only applicable when HTTPS support is
enabled. The TLS protocol is negotiated while the request is
connecting and the most recent protocol supported by both the edge
node and client browser will be selected. If no such version exists,
the connection will be aborted. - **TLS_V1:** corresponds to TLS 1.0
specification.

* **TLS_V1_1:** corresponds to TLS 1.1 specification.

* **TLS_V1_2:** corresponds to TLS 1.2 specification.

* **TLS_V1_3:** corresponds to TLS 1.3 specification.

Enabled TLS protocols must go in a row. For example if *TLS_v1_1* and
*TLS_V1_3* are enabled, *TLS_V1_2* must be enabled too.

Accepted values are:

   TLS_V1, TLS_V1_1, TLS_V1_2, TLS_V1_3

--wait-for-state [text]

This operation asynchronously creates, modifies or deletes a resource
and uses a work request to track the progress of the operation.
Specify this option to perform the action and then wait until the work
request reaches a certain state. Multiple states can be specified,
returning on the first state. For example, "--wait-for-state"
SUCCEEDED "--wait-for-state" FAILED would return on whichever
lifecycle state is reached first. If timeout is reached, a return code
of 2 is returned. For any other error, a return code of 1 is returned.

Accepted values are:

   ACCEPTED, CANCELED, CANCELING, FAILED, IN_PROGRESS, SUCCEEDED

--wait-interval-seconds [integer]

Check every "--wait-interval-seconds" to see whether the work request
to see if it has reached the state defined by "--wait-for-state".
Defaults to 30 seconds.

--websocket-path-prefixes [complex type]

ModSecurity is not capable to inspect WebSockets. Therefore paths
specified here have WAF disabled if Connection request header from the
client has the value Upgrade (case insensitive matching) and Upgrade
request header has the value websocket (case insensitive matching).
Paths matches if the concatenation of request URL path and query
starts with the contents of the one of *websocketPathPrefixes* array
value. In All other cases challenges, like JSC, HIC and etc., remain
active. This is a complex type whose value must be valid JSON. The
value can be provided as a string on the command line or passed in as
a file using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.


Global Parameters
=================

Use "oci --help" for help on global parameters.

"--auth-purpose", "--auth", "--cert-bundle", "--cli-rc-file", "--
config-file", "--debug", "--defaults-file", "--endpoint", "--generate-
full-command-json-input", "--generate-param-json-input", "--help", "--
latest-version", "--max-retries", "--no-retry", "--opc-client-request-
id", "--opc-request-id", "--output", "--profile", "--query", "--raw-
output", "--region", "--release-info", "--request-id", "--version",
"-?", "-d", "-h", "-v"


Examples
========

Copy the following CLI commands into a file named example.sh. Run the
command by typing “bash example.sh” and replacing the example
parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-
like shell. You need to set up the OCI configuration and appropriate
security policies before trying the examples.

       export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/waas/waas-policy/create.html#cmdoption-compartment-id
       export domain=<substitute-value-of-domain> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/waas/waas-policy/create.html#cmdoption-domain

       waas_policy_id=$(oci waas waas-policy create --compartment-id $compartment_id --domain $domain --query data.id --raw-output)

       oci waas policy-config update --waas-policy-id $waas_policy_id
