vania-janet/multiturn-rag-retrieval-data huggingface dataset:
The path to the CCDT file can be set in one of two ways:
<-- <ol> -->

1. Set the environment variable MQCCDTURL, this is file path from the system root to the ccdt file to which you added the cipherSpecification earlier.

<-- <ul> -->

* For Windows, run set MQCCDTURL=c:mydefinitionsconnection_info_ccdt.json
* For Mac or Linux, run export MQCCDTURL=file:///Users/you/definitions/connection_info_ccdt.json

<-- </ul> -->

2. Set the environment variables MQCHLLIB and MQCHLTAB. MQCHLLIB is the full path to the directory of your ccdt file and MQCHLTAB is the filename of the ccdt file to which you added the cipherSpecification earlier.

<-- <ul> -->

* For Windows, run set MQCHLLIB=c:mydefinitions and set MQCHLTAB=connection_info_ccdt.json
* For Mac or Linux, run export MQCHLLIB=/Users/you/definitions and export MQCHLTAB=connection_info_ccdt.json

<-- </ul> -->

<-- </ol> -->

4. Set the MQSAMP_USER_ID environment variable, this is the user id you would like to connect as. For applications this is the application credential name which you downloaded earlier
<-- <ul> -->

* For Windows, run set MQSAMP_USER_ID=<yourusername>
* For Mac or Linux, export MQSAMP_USER_ID=<yourusername>

<-- </ul> -->

5. Ensure the MQSERVER environment variable is not set by running unset MQSERVER6. Run the sample amqsputc, specifying queue name and queue manager name, for example:
Configure the V2 account settings using the API 

Complete the following steps:



1. Check the account settings. Run the following command:

curl -X GET <ENDPOINT>/api/v2/settings -H "Authorization: $ACCESS_TOKEN"

Where:

<ENDPOINT>
: Is the API endpoint in the region where you plan to configure or manage a target. For more information, see [Endpoints](https://cloud.ibm.com/docs/atracker?topic=atracker-endpointsendpoints_api).

You will get a response similar to the following one where no settings have been configured and only some values are displayed to indicate default values. The account settings is new in V2.

{
"default_targets": [],
"permitted_target_regions": [],
"metadata_region_primary": [],
"private_api_endpoint_only": false,
"api_version": 1
}
2. Configure the V2 account settings. Run the following command:

curl -X PUT <ENDPOINT>/api/v2/settings
-H "Authorization: $ACCESS_TOKEN"
-H "content-type: application/json"
-d '{
"default_targets": ["IDs"],
"permitted_target_regions": ["REGIONS"],
"metadata_region_primary": "REGION",
"private_api_endpoint_only": false
}'

Where:

ENDPOINT
: Is the API endpoint in the region where you plan to configure or manage a target. For more information, see [Endpoints](https://cloud.ibm.com/docs/atracker?topic=atracker-endpointsendpoints_api).

default_targets
: Is a list of target IDs. If no routing rules cause events to be sent to other targets, these targets will received the events.

permitted_target_regions
5
OK
<-- </section "id="section-kp-region-set-example-1" "> --><-- <section "id="section-kp-region-set-example-2" "> --> Example 2 Set the region explicitly. set the region endpoint to "us-south"
$ ibmcloud kp region-set us-south

OK
The REGION must be a valid regional endpoint. this should fail (not a valid regional endpoint)
$ ibmcloud kp region-set not-a-region

FAILED
<-- </section "id="section-kp-region-set-example-2" "> --><-- <section "id="section-kp-region-set-example-3" "> --> Example 3 Unset (remove) the regional endpoint. remove the regional endpoint
$ ibmcloud kp region-set -u

OK
<-- </section "id="section-kp-region-set-example-3" "> --><-- </section "id="section-kp-region-set-examples" "> --><-- <section "id="section-kp-region-set-required" "> --> Required parameters -i, --instance-id: The IBM Cloud instance ID that identifies your Key Protect instance.
You can set an environment variable instead of specifying -i with the following command.

$ export KP_INSTANCE_ID=INSTANCE_ID
<-- </section "id="section-kp-region-set-required" "> --><-- <section "id="section-kp-region-set-optional" "> --> Optional parameters REGION: Specify a regional endpoint.
"permitted_target_regions": ["us-south", "us-east"],
"metadata_region_primary": "us-south",
"metadata_region_backup": "eu-de",
"private_api_endpoint_only": false
}

Where:

default_targets
: Is a list of target IDs. If no routing rules cause events to be sent to other targets, these targets will received the events.

permitted_target_regions
: Is the list of regions that can be used to define a target. A maximum of two permitted target regions are allowed.

metadata_region_primary
: Is the region where the metadata associated with route and target definitions is stored.

metadata_region_backup
: Is the region where the metadata associated with route and target definitions is stored as a backup location.

private_api_endpoint_only
: Specifies whether nor not a private endpoint can be used. If true only a private endpoint can be used.





 Updating settings using the API 

When you update settings, you must include the settings information in the data section of the request.



* You must pass all fields.
* Update the fields that need changing.



You can use the following cURL command to update settings:

curl -X PUT <ENDPOINT>/api/v2/settings
-H "Authorization: $ACCESS_TOKEN"
-H "content-type: application/json"
-d '{
"default_targets": ["IDs"],
"permitted_target_regions": ["REGIONS"],
"metadata_region_primary": "REGION",
"metadata_region_backup": "REGION",
"private_api_endpoint_only": false
}'

Where:

ENDPOINT
: Is the API endpoint in the region where you plan to configure or manage a target. For more information, see [Endpoints](https://cloud.ibm.com/docs/atracker?topic=atracker-endpointsendpoints_api).

default_targets
curl -X PATCH https://config.cloud-object-storage.cloud.ibm.com/v1/b/my-bucket -H 'authorization: bearer $IAM_TOKEN' -d '{"hard_quota": 10000000000}'

To disable the quota, set it to zero:

curl -X PATCH https://config.cloud-object-storage.cloud.ibm.com/v1/b/my-bucket -H 'authorization: bearer $IAM_TOKEN' -d '{"hard_quota": 0}'

To temporarily disable writing new data to the bucket, set the quota to a very small integer:

curl -X PATCH https://config.cloud-object-storage.cloud.ibm.com/v1/b/my-bucket -H 'authorization: bearer $IAM_TOKEN' -d '{"hard_quota": 1}'

To check the quota on a bucket, send a GET request to view the hard_quota field in the bucket's metadata:

curl https://config.cloud-object-storage.cloud.ibm.com/v1/b/my-bucket -H 'authorization: bearer $IAM_TOKEN'
For more information, see [Retrieving IAM access tokens](https://cloud.ibm.com/docs/atracker?topic=atracker-retrieve-iam-token).
2. Identify the API endpoint in the region where you plan to configure or manage settings. For more information, see [Endpoints](https://cloud.ibm.com/docs/atracker?topic=atracker-endpointsendpoints_api).







 Getting settings using the API 

You can use the following cURL command to get existing settings information:

curl -X GET ENDPOINT/api/v2/settings -H "Authorization: $ACCESS_TOKEN"

Where:

ENDPOINT
: Is the API endpoint in the region where you plan to configure or manage a target. For more information, see [Endpoints](https://cloud.ibm.com/docs/atracker?topic=atracker-endpointsendpoints_api).

For example, you can use the following cURL request settings information the US South region:

curl -X GET https://private.us-south.atracker.cloud.ibm.com/api/v2/settings -H "Authorization: $ACCESS_TOKEN"

A response similar to the following is returned:

{
"default_targets": ["50375218-0000-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-0000-8542f60955cd"],
"permitted_target_regions": ["us-south", "us-east"],
"metadata_region_primary": "us-south",
"metadata_region_backup": "eu-de",
"private_api_endpoint_only": false
}

Where:

default_targets
: Is a list of target IDs. If no routing rules cause events to be sent to other targets, these targets will received the events.

permitted_target_regions
This ensures that every key that is created has the rotation policy unless the policy is overridden at key-creation time by a Manager.
* [Set a rotation policy at key creation time](https://cloud.ibm.com/docs/key-protect?topic=key-protect-set-rotation-policymanage-policies-creation-time). This allows for the adjustment of the rotation policy for a particular key to be applied during the creation of a key.
* [Set a rotation policy after the key has been created](https://cloud.ibm.com/docs/key-protect?topic=key-protect-set-rotation-policymanage-policies-gui). A rotation policy can be changed on a key at any time, even if a key is carrying a disabled rotation policy or if one was never applied to the key at all.



You can create a rotation policy only for root keys that are generated in Key Protect. If you imported the root key initially, you must provide new base64 encoded key material to rotate the key. For more information, see [Manually rotating keys](https://cloud.ibm.com/docs/key-protect?topic=key-protect-rotate-keys).



 Setting a rotation policy on your instance 

If a rotation policy is set on your instance, every root key that is created in that instance carries that policy (unless it is overridden at key-creation time). This is particularly useful in cases where users with the Writer role (who cannot by default assign a rotation policy) create most of the keys on an instance but it is desired that root keys carry a rotation policy. Instance policies allow a user with the Manager role to set a policy which is then applied to all of the keys created by Writers or other Managers, unless those Managers overwrite the policy.



 Setting or editing a rotation policy on your instance using the console 

To set an instance policy, navigate to the Instance policies page in the left navigation and locate the Key rotation policy card. If no policy has been set, the button should be Disabled. To set a policy:



1. Click the button to enable the policy.
2. Then, set a rotation interval.
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"crn": "crn:v1:bluemix:public:metrics-router:au-syd:a/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa::target:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "default-au-syd-south-target",
"target_type": "sysdig_monitor"
}
],
"permitted_target_regions": [
"us-south",
"us-east"
],
"primary_metadata_region": "us-south",
"private_api_endpoint_only": false
}

Where:

default_targets
: Is a list of target IDs. If no routing rules cause metrics to be sent to other targets, these targets will received the metrics.

permitted_target_regions
: Is the list of regions that can be used to define a target. A maximum of two permitted target regions are allowed.

primary_metadata_region
: Is the region where the metadata associated with route and target definitions is stored.

backup_metadata_region
: Is the region where the metadata associated with route and target definitions is stored as a backup.

private_api_endpoint_only
: Specifies whether nor not a private endpoint can be used. If true only a private endpoint can be used.





 Updating settings using the API 

When you update settings, consider the following information:



* You must include the settings information in the data section of the request.
* You must pass the data that is configured for each setting.

Data that is configured and not included in an update request is deleted.
* Update the data for the fields that need changing.



You can use the following cURL command to update settings:

curl -X PATCH https://<ENDPOINT>/api/v3/settings
-H "Authorization: Bearer <IAM_TOKEN>"
'key': ET_ENCRYPTION_KEY,
'window_seconds': DEFAULT_WINDOW_SECONDS})

acl_path = ["/private/"] The path(s) you want to protect
token = et.generate_acl_token(acl_path)

print('token: ', token)
Show more

This code generates a token that is a string, and looks like the following:

exp=1598342003acl=/private/hmac=73cbcba0137b4875b10a3264d4c24189a91825e51f2764af0891a854d015dd08

You can set the token string as cookie to the client.
3. Set token authentication in CDN.

You can refer to this [example to create a token authentication](https://cloud.ibm.com/docs/CDN?topic=CDN-code-examples-using-the-cdn-apicreate-token-auth-example) by [token authentication API](https://cloud.ibm.com/docs/CDN?topic=CDN-cdn-api-referenceapi-for-token-authentication).

You need to replace the parameter values in the example to the correct ones you're using, and ensure the token authentication values (encryption key(s), token name, ...) match the values in the token generation code in [step 2](https://cloud.ibm.com/docs/CDN?topic=CDN-working-with-token-authenticationgenerate-the-token).
4. Verify the token authentication function.

First, access the contents without the token.

curl -i "http://www.cdn-domain.com/private/test.txt"
HTTP/1.1 403 Forbidden
...

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
maxmemory-samples Tunes the LRU algorithm, default value 5. [Approximated LRU algorithm](https://redis.io/topics/lru-cacheapproximated-lru-algorithm) 









 Setting an Example Cache 

To adjust the configuration of your deployment, send a JSON object with the settings that you want to change and their new values.

You are able to use CONFIG SET directly from a Redis cli-client, but changes made there are not permanent. Use the Cloud Databases [cli-plugin](https://cloud.ibm.com/docs/databases-cli-plugin?topic=databases-cli-plugin-cdb-referencedeployment-configuration) or [API](https://cloud.ibm.com/apidocs/cloud-databases-apichange-your-database-configuration) to change your deployment's configuration file. More information is in [Changing Your Redis Configuration](https://cloud.ibm.com/docs/databases-for-redis?topic=databases-for-redis-redis-cache).

For example, the Redis documentation recommends the allkeys-lru setting as a good starting place for a general-use cache. It's also fine to leave the maxmemory and maxmemory-samples at their default values. So to configure the cache from the CLI, you can use

ibmcloud cdb deployment-configuration '<deployment name or CRN>' '{"configuration":{"maxmemory-policy":"allkeys-lru", "appendonly":"no", "stop-writes-on-bgsave-error":"no"}}'

To set up the same configuration through the API, you can use

curl -X PATCH 'https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/configuration/schema' -H "Authorization: Bearer $APIKEY" -H "Content-Type: application/json" -d '{"configuration":{
To change the output format to JSON, use --output json.

Setting the output to JSON (--output json) includes the cloud resource name (CRN) in the output.
* -r, --key-ring

A unique, human readable name for the key-ring. Required if the user doesn't have permissions on the default key ring.
* -s, --starting-offset

Retrieves keys starting at the offset specified. The offset is zero-based, meaning offset 0 (zero) is the first key.
* -t, --key-type

The type of keys to be retrieved. If set to standard-key, standard keys will be retrieved. If set to root-key, root keys will be retrieved.









 kp region-set 

Target a different Key Protect regional endpoint.

ibmcloud kp region-set REGION
-i, --instance-id INSTANCE_ID
[-u, --unset]



 Examples 

These are examples of kp region-set.



 Example 1 

If the REGION parameter is not specified, you are prompted to select a region.

 set the region endpoint
$ ibmcloud kp region-set

Select a Region:
1. au-syd
2. ca-tor
3. eu-de
4. eu-gb
5. jp-osa
6. jp-tok
7. us-east
8. us-south
9. br-sao
10. staging (us-south)
Enter a number:
5
OK





 Example 2 

Set the region explicitly.

 set the region endpoint to "us-south"
$ ibmcloud kp region-set us-south

OK

The REGION must be a valid regional endpoint.

 this should fail (not a valid regional endpoint)
$ ibmcloud kp region-set not-a-region

FAILED





 Example 3 

Unset (remove) the regional endpoint.
To ensure that new catalogs have access to gateways, you can assign default gateways that are automatically added to every new catalog.



1. On the administration console's home page, click Settings.
2. On the "Default gateways" page, click Edit.
3. In the "Specify default gateways" page, select all of the gateways that you want to be available to new catalogs.
4. Click Save to apply the new setting.



Existing catalogs are not affected when you change this setting. You can update a catalog later in API Manager to remove unwanted gateways or add new gateways. For information on working with catalog settings, see [Creating and configuring catalogs](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/create_env.html) in the extended V10 Reserved documentation.
PUT /v1/{crn}/zones/{domain_id}/setting/browser_cache_ttl internet-svcs.performance.update internet-svcs.browser-cache-ttl-setting.update 
 Get always online (serve stale content) settings. GET /v1/{crn}/zones/{domain_id}/setting/always_online internet-svcs.performance.read internet-svcs.always-online-setting.read 
 Update always online (serve stale content) settings. PUT /v1/{crn}/zones/{domain_id}/setting/always_online internet-svcs.performance.update internet-svcs.always-online-setting.update 
 Get development mode settings. GET /v1/{crn}/zones/{domain_id}/setting/development_mode internet-svcs.performance.read internet-svcs.development-mode-setting.read 
 Update development mode settings. PUT /v1/{crn}/zones/{domain_id}/setting/development_mode internet-svcs.performance.update internet-svcs.development-mode-setting.update 
 Get sort query string for cache settings. GET /v1/{crn}/zones/{domain_id}/setting/sort_query_string_for_cache internet-svcs.performance.read internet-svcs.sort-query-string-for-cache-setting.read 
 Update sort query string for cache settings. PUT /v1/{crn}/zones/{domain_id}/setting/sort_query_string_for_cache internet-svcs.performance.update internet-svcs.sort-query-string-for-cache-setting.update 
 Get SSL settings. GET /v1/{crn}/zones/{domain_id}/setting/ssl internet-svcs.security.read internet-svcs.ssl-setting.read 
 Update SSL settings. PUT /v1/{crn}/zones/{domain_id}/setting/ssl internet-svcs.security.update internet-svcs.ssl-setting.update 
 Get security level settings.
The value for the JBP_CONFIG_OPENJDK variable is the index.yml file location and the JRE version to choose from the index.yml file.

'{repository_root: "https://locationToIndexYml", version: version-value}'

Issue the ibmcloud cf se myAPP command to set the JBP_CONFIG_OPENJDK variable, for example:

ibmcloud cf se myApp JBP_CONFIG_OPENJDK '{repository_root: "https://myHostingApp.ng.bluemix.net", version: 1.8.+}'

The repository_root URL does not include index.yml in the URL. The repository_root URL points to the directory level that contains the index.yml file, not the file itself.

To set the JVM environment variable, issue the following command:

ibmcloud cf se myApp JVM 'openjdk'

Note: Restage your app after setting the environment variables for the changes to take effect.





 Confirm 

To confirm that Liberty is using the expected JRE, check the staging log. Look for a message that indicates the server downloaded the buildpack from the location indicated in the index.yml file. See the following snippet for an example of the log output when Liberty successfully uses the expected JRE.

-----> Downloading OpenJdk 1.8.0_91 from
https://myHostingApp.ng.bluemix.net/jre-8u91-fcs-bin-b14-linux-x64-01_apr_2016.tar.gz (6.2s)
[Bucket modification](https://cloud.ibm.com/docs-content/v1/content/63322f2f3a72050206eb05ba7f590fdcb741105c/cloud-object-storage/images/SysDig-COS-UI-bucket-modification.png)

Note that in each case the region for your new instance of Monitoring is automatically tied to the region of the bucket.

Note that if the Monitoring instance is created by COS, Platform metrics must be set on the Monitoring instance.

To set Platform metrics on the instance:



1. Go to your [dashboard](https://cloud.ibm.com/observe/monitoring).
2. Click on "Configure platform metrics."
3. Select the region where the Monitoring instance was created.
4. Click "Configure."
5. Your Monitoring instance is now set for Platform metrics.



We will use cURL to connect to the Resource Configuration API and modify our bucket's configuration.

curl -X PATCH -k -H "authorization: Bearer $TOKEN" https://config.cloud-object-storage.cloud.ibm.com/v1/b/$1 -H 'cache-control: no-cache' -d '{"metrics_monitoring": {
"usage_metrics_enabled": true,
"request_metrics_enabled": true,
"metrics_monitoring_crn": "crn:v1:bluemix:public:sysdig-monitor:us-east:a/9xxxxxxxxxb1xxxc7fdxxxxxxxxxx5:7xxxxxxxx0-xx7x-xdx8-9fxx-123456789012::"
}
}'

In the code sample, replace the placeholders with the appropriate values.



 Value Description 

 $TOKEN The token for authentication created previously 
 $1 The name of your bucket 







 Launch your instance of Monitoring
ibmcloud cdb deployment-configuration '<deployment name or CRN>' '{"configuration":{"maxmemory-policy":"allkeys-lru", "appendonly":"no", "stop-writes-on-bgsave-error":"no"}}'

To set up the same configuration through the API, you can use

curl -X PATCH 'https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/configuration/schema' -H "Authorization: Bearer $APIKEY" -H "Content-Type: application/json" -d '{"configuration":{
"maxmemory-policy":"allkeys-lru",
"appendonly":"no",
"stop-writes-on-bgsave-error":"no"
}
}'
type Data type; one of string, long, boolean, list of strings, or enum 
 name The name of the setting 
 initial-value The initial value of the setting 
 enum-value A list of enum values separated by vertical bars ( ) 
 required Indicates that the setting is required 
 hidden Indicates whether to hide the setting from the UI. Specify a value of true to hide the setting. 



In the current release, the required and hidden attributes are not applied in the Discovery product user interface.





 Declaration setting examples 

To declare an enum type, use code similar to the following snippet:

<declare type="enum" name="type" enum-values="PROXY|BASIC|NTLM" initial-value="BASIC"/>

To declare a hidden string with an initial value, use code similar to the following snippet:

<declare type="string" name="custom_config_class" hidden="true" initial-value="com.example.ExampleCrawlerConfig" />

To declare a required long, use code similar to the following snippet:

<declare type="long" name="port" required="required" initial-value="22"/>





 Conditional settings 

Conditional settings are represented by the <condition /> element. A conditional setting is displayed only if the condition is satisfied. The element has the following attributes:



Condition element attributes

 Attribute name Description 

 name The name of the setting 
 enable Enable the setting if the value of the name attribute equals the value of the enable attribute 
 in Enable the setting if the value of the name attribute is included in a specified list of values 



In the current release, conditional settings are not applied in the Discovery product user interface.





 Conditional setting examples 

To enable a section by using a boolean condition, use code similar to the following snippet:

<declare type="boolean" name="use_key" initial-value="true" />

<condition name="use_key" enabled="true">
<declare type="string" name="key" hidden="false" />
</condition>