vania-janet/multiturn-rag-retrieval-data huggingface dataset:
ibmcloud cbr rule-update 30fd58c9b75f40e854b89c432318b4a2 --description 'Example rule description' --service-name kms --context-attributes endpointType=private --zone-id 93de8d3f588ab2c457ff576c364d1145





 Updating rules by using the API 

To update restrictions to your cloud resources by creating rules, call the [Context-based restrictions API](https://cloud.ibm.com/apidocs/context-based-restrictions?code=nodereplace-rule). The following example replaces a rule with an updated version.



* Curl
* Java
* Python
* Go
* Node



curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" --header "If-Match: {if_match}" --header "Content-Type: application/json" --data '{ "description": "this is an example of rule", "resources": [ { "attributes": { "name": "accountId", "value": "12ab34cd56ef78ab90cd12ef34ab56cd" }, { "name": "serviceName", "value": "kms" } ] } ], "contexts": [ { "attributes": { "name": "networkZoneId", "value": "76921bd873115033bd2a0909fe081b45" } ] } ], "enforcement_mode": "disabled" }' "{base_url}/v1/rules/{rule_id}"

RuleContextAttribute ruleContextAttributeModel = new RuleContextAttribute.Builder()
.name("networkZoneId")
.value("76921bd873115033bd2a0909fe081b45")
.build();
Upgrade by [configuring a read-only replica](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-read-only-replicas). Provision a read-only replica with the same database version as your deployment and wait while it replicates all of your data. Once your deployment and its replica are synced, promote and upgrade the read-only replica to a full, stand-alone deployment running the new version of the database. To perform the upgrade and promotion step, use a POST request to the [/deployments/{id}/remotes/promotion](https://cloud.ibm.com/apidocs/cloud-databases-apipromote-read-only-replica-to-a-full-deployment) endpoint with the version that you want to upgrade to in the body of the request.

This request looks like:

curl -X POST https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/remotes/promotion -H 'Authorization: Bearer <>' -H 'Content-Type: application/json' -d '{
"promotion": {
"version": "14",
"skip_initial_backup": false
}
}'

skip_initial_backup is optional. If set to true, the new deployment does not take an initial backup when the promotion completes. Your new deployment is available in a shorter amount of time, at the expense of not being backed up until the next automatic backup is run, or you take an on-demand backup.





 Back up and Restore Upgrade 

You can upgrade your database version by [restoring a backup](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-dashboard-backups&interface=uirestore-backup) of your data into a new deployment that is running the new database version.



 Upgrading in the UI
[job update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-job-update) [app update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update) 
 Removing a fully referenced configmap --env-from-configmap-rm NAME where NAME is the name of the configmap. [job update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-job-update) [app update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update) 
 Removing referenced keys in a secret --env-rm KEY_A --env-rm KEY_B where KEY_A,KEY_B are the keys of a key-value pair. [jobf update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-job-update) [app update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update) 
 Removing referenced keys in a configmap --env-rm KEY_A --env-rm KEY_B where KEY_A,KEY_B are the keys of a key-value pair. [job update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-job-update) [app update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update) 



Working with secrets as environment variables is similar to working with configmaps as environment variables. When you work with secrets, the data is encoded.

Consider the following information when you update an app or job that has an environment variable that references configmaps or secrets.
curl -X GET -u "apikey:{apikey}" "{url}/v1/models/classifications/cb3755ad-d226-4587-b956-43a4a7202202?version=2021-03-23"

To get information for all classifications models deployed to your instance, use the List classifications models method.

curl -X GET -u "apikey:{apikey}" "{url}/v1/models/classifications?version=2021-03-23"

When the status is available, the classification is ready to use.





 Analyzing text with a custom classifications model 

To use your classifications model, specify the model that you deployed in the [classifications](https://cloud.ibm.com/apidocs/natural-language-understandingclassifications) options of your API request:



* Example parameters.json file:

{
"url": "www.url.example",
"features": {
"classifications": {
"model": "your-model-id-here"
}
}
}
* Example cURL request:

curl --request POST --header "Content-Type: application/json" --user "apikey":"{apikey}" "{url}/v1/analyze?version=2021-03-23" --data @parameters.json







 Deleting a custom classifications model 

To delete a classifications model from your service instance, use the Delete classifications model method. Replace {url} and {apikey} with your service URL and API key, and replace {model_id} with the model ID of the classifications model you want to delete.



* The following example deletes a classification model.

curl --user "apikey":"{apikey}" "{url}/v1/models/classifications/{model_id}?version=2021-03-23" --request DELETE







 Migrating from Natural Language Classifier to Natural Language Understanding 

On 9 August 2021, IBM announced the deprecation of the IBM Watson® Natural Language Classifier service.
You can upgrade to a new version when [restoring a backup](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-dashboard-backups&interface=clirestore-backup-cli) from the Backups menu of your Deployment dashboard. Clicking Restore on a backup brings up a dialog box where you can change some options for the new deployment. One of them is the database version, which is auto-populated with the versions available for you to upgrade to. Select a version and click Restore to start the provision and restore process.





 Upgrading through the CLI 

To upgrade and restore from backup through the IBM Cloud CLI, use the [provisioning command](https://cloud.ibm.com/docs/account?topic=account-manage_resource&interface=cli) from the Resource Controller.

ibmcloud resource service-instance-create <service-name> <service-id> <service-plan-id> <region>

The parameters service-name, service-id, service-plan-id, and region are all required. You also supply the -p with the version and backup_ID parameters in a JSON object. The new deployment is automatically sized with the same disk and memory as the source deployment at the time of the backup.

ibmcloud resource service-instance-create example-upgrade databases-for-mysql standard us-south -p '{
"backup_id": "crn:v1:bluemix:public:databases-for-mysql:us-south:a/54e8ffe85dcedf470db5b5ee6ac4a8d8:1b8f53db-fc2d-4e24-8470-f82b15c71717:backup:06392e97-df90-46d8-98e8-cb67e9e0a8e6",
"version":8
}'





 Upgrading through the API
Advanced replication 

You can learn about advanced replication concepts and tasks, such as the ones in the following list and more:



* Maintaining your replication database
* Scheduling and monitoring replications
* Authenticating during replication



You might also find it helpful to review details of the underlying [replication protocol](https://docs.couchdb.org/en/stable/replication/protocol.html), and review the [API reference](https://cloud.ibm.com/apidocs/cloudantintroduction) documentation.



 Replication database maintenance 

A replication database must be monitored like any other database. Without regular database maintenance, you might accumulate invalid documents that were caused by interruptions to the replication process. Having many invalid documents can result in an excess load on your cluster when the replicator process is restarted by IBM® Cloudant® for IBM Cloud® operations.

To maintain a replication database, remove old documents. You can remove old documents by determining their age and [deleting them](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-documentsdelete-a-document) if they're no longer needed.





 The replication scheduler 

The new IBM Cloudant Replication Scheduler provides a number of improvements and enhancements when compared with the previous IBM Cloudant replication mechanism.

In particular, network usage during replication is more efficient. The scheduler accounts for the current load for individual database nodes within a cluster when it determines the allocation of replication tasks.

Finally, the state of a replication is now more detailed, and consists of seven distinct states:



1. initializing - The replication was added to the scheduler, but isn't yet initialized or scheduled to run. The status occurs when a new or updated replication document is stored within the [_replicator database](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-replication-apithe-replicator-database).
2. error - The replication can't be turned into a job. This error might be caused in several different ways.
ibmcloud is load-balancer-pool-member-update r134-99b5ab45-6357-42db-8b32-5d2c8aa62776 r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 r134-61f8b000-a90d-4abe-909e-c507dffec565 --port 6060

Sample output:

Updating member r134-61f8b000-a90d-4abe-909e-c507dffec565 of load balancer pool r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 under account IBM Cloud Network Services as user test@ibm.com...

ID r134-61f8b000-a90d-4abe-909e-c507dffec565
Port 6060
Target 0716_6acdd058-4607-4463-af08-d4999d983945
Weight 70
Health unknown
Created 2020-08-27T14:59:55.446-05:00
Provision status update_pending





 Updating an application load balancer with the API 

The following example illustrates how to use the API to update the front-end listener port of an application load balancer. For example, if the front-end listener port was set to 80 and you want to update the port value to 90.

To update an application load balancer by using the API, perform the following procedure:



1. Set up your [API environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environmentapi-prerequisites-setup).
2. Use the following example to get the listener ID that you need for the update:

Save the ID of the load balancer

export lbid="0738-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"
The second [blueprint apply](https://cloud.ibm.com/docs/schematics?topic=schematics-apply-blueprint&interface=cli) step runs the automation module code to deploy the changes in the blueprint configuration.

Updating a blueprint environment uses the capabilities of Terraform to update deployed cloud resources. The Terraform config and inputs for a module are updated by the blueprint update operation. From the updated configuration, Terraform determines the changes that must be run against the existing deployed resources and runs the needed resource updates, deletions, or creates.

Update supports modification of:



* Blueprint template YAML file
* Blueprint input file
* Dynamic (override) inputs



Record the blueprint ID that needs to be updated. To list the blueprint IDs, run [listing blueprints](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-reference&interface=clischematics-blueprint-list) command.





 Updating a blueprint through CLI 

Run the [ibmcloud schematics blueprint update](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-blueprint-update) command to refresh the blueprint configuration with the changes. It updates the blueprint and workspaces with the updated input values.

For all the blueprint commands, syntax, and option flag details, see [blueprints commands](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceblueprints-cmd).

Syntax

ibmcloud schematics blueprint update --id BLUEPRINT_ID [--file CONFIG_FILE_PATH] [--input INPUT_VARIABLES_LIST] [--github-token GITHUB_TOKEN]

Example
For more information, see [Upgrading Watson Discovery to a newer 4.0 refresh](https://www.ibm.com/docs/SSQNUZ_4.0/svc-discovery/discovery-upgrade-v4.html).



 Process overview 

At a high level, the process includes the following steps:



1. Back up your Discovery data by using the backup script.
2. Install the latest version of IBM Cloud Pak for Data.
3. Install the latest version of the Discovery service on the cluster.
4. Restore the backed-up Discovery data by using the restore script.







 Back up and restore limitations 

You cannot migrate the following data:



* Dictionary suggestions models. These models are created when you build a dictionary. The dictionary is included in the backup, but the term suggestions model is not. Reprocess the migrated collections to enable dictionary term suggestions.
* You cannot back up and restore curations or migrate them because curations are a beta feature.



You can back up and restore some data by using the backup and restore scripts, but you must back up and restore other data manually. The following data must be backed up manually:



* Local file system folders and documents that you can crawl by using the Local file system data source.



The following updates are made when your collections are restored:



* Any collection that contains documents that were created by uploading data are automatically recrawled and reindexed when restored. These documents are assigned new document ID numbers in the restored collections.
* Collections that were used in Content Mining projects are automatically recrawled and reindexed when restored. Only documents that are added by uploading data are assigned new document ID numbers in the restored collections.







 Back up and restore methods 

You can back up and restore your instance of Discovery manually or by using scripts.



* [Using the backup scripts](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-backup-restorewddata-backup)
* [Using the restore scripts](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-backup-restorewddata-restore)
ibmcloud is load-balancer-pool-member-update r134-99b5ab45-6357-42db-8b32-5d2c8aa62776 r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 r134-61f8b000-a90d-4abe-909e-c507dffec565 --port 6060

Sample output:

Updating member r134-61f8b000-a90d-4abe-909e-c507dffec565 of load balancer pool r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 under account IBM Cloud Network Services as user test@ibm.com...

ID r134-61f8b000-a90d-4abe-909e-c507dffec565
Port 6060
Target 0716_6acdd058-4607-4463-af08-d4999d983945
Weight 70
Health unknown
Created 2020-08-27T14:59:55.446-05:00
Provision status update_pending





 Updating a network load balancer with the API 

The following example illustrates how to use the API to update the front-end listener port of a Network Load Balancer for VPC (NLB). For example, if the front-end listener port was set to 80 and you want to update the port value to 90.

To update an NLB by with the API, perform the following procedure:



1. Set up your [API environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environmentapi-prerequisites-setup).
2. Use the following example to get the listener ID that you need for the update:

Save the ID of the load balancer
* UI
* CLI
* API







 Upgrading to a new Major Version 

Once a major version of a database is at its End Of Life (EOL), it is a good idea to upgrade to a current major version.

Find the available versions of PostgreSQL on the [IBM Cloud® Databases for PostgreSQL catalog](https://cloud.ibm.com/catalog/databases-for-postgresql) page, from the Cloud Databases CLI plug-in command [ibmcloud cdb deployables-show](https://cloud.ibm.com/docs/databases-cli-plugin?topic=databases-cli-plugin-cdb-referencedeployables-show), or from the Cloud Databases API [/deployables](https://cloud.ibm.com/apidocs/cloud-databases-apiget-all-deployable-databases) endpoint.



 Requirements for upgrading to PostgreSQL (v 13, 14) from PostgreSQL (v10, 11, 12) 



* If you have pg_repack installed, you need to remove it before performing the upgrade. This can be done with a command like:



DROP EXTENSION pg_repack;

After upgrading, reinstall pg_repack. This can be done with a command like:

If you are using PostGIS, you must upgrade to PostGIS 3.3 before upgrading. This can by done by running the following against a database with PostGIS installed.

SELECT * FROM update_to_postgis_33();





 Upgrading from a Read-only Replica 

Upgrade by [configuring a read-only replica](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-read-only-replicas). Provision a read-only replica with the same database version as your deployment and wait while it replicates all of your data. Once your deployment and its replica are synced, promote and upgrade the read-only replica to a full, stand-alone deployment running the new version of the database.
Save the listener ID that you want to update from the previous step. For example, save it in the variable listenerid.

export listenerid="r018-3811d7ad-3bbe-4cb4-82de-8608f767866a"
4. Update the listener port of the load balancer:

curl -H "Authorization: $iam_token" -X PATCH
"$vpc_api_endpoint/v1/load_balancers/$lbid/listeners/$listenerid?version=$api_version&generation=2" -d '{"port": 200}'

Sample output:

{
"created_at": "2020-08-24T23:36:23.723008Z",
"default_pool": {
"href": "https://eu-gb.iaas.cloud.ibm.com/v1/load_balancers/r018-808fedde-2650-46cc-9cd1-4b828b92970a/pools/r018-df11657f-63cf-49b5-af0f-6eeab32b3559",
"id": "r018-df11657f-63cf-49b5-af0f-6eeab32b3559",
"name": "pool1"
},
"href": "https://eu-gb.iaas.cloud.ibm.com/v1/load_balancers/r018-808fedde-2650-46cc-9cd1-4b828b92970a/listeners/r018-3811d7ad-3bbe-4cb4-82de-8608f767866a",
"id": "r018-3811d7ad-3bbe-4cb4-82de-8608f767866a",
"port": 200,
"protocol": "tcp",
* UI
* CLI
* API







 Updating a linked zone 

Update the properties of a linked zone by using the UI, CLI, or API.



 Updating a linked zone using the UI 

To update the properties of a linked zone using the UI, take the following steps:



1. Navigate to the Zones section of your DNS Services instance, then select the Linked zones tab.
2. Click the link in the Zone name column of the linked zone you want to update.
3. Click Edit icon ![Edit icon](https://cloud.ibm.com/docs-content/v1/content/d56dbd8ab7d14086029681ee71679e14aea53723/icons/edit-tagging.svg) of the linked zone you want to update.
4. Enter your changes and click Save.







 Updating a linked zone using the CLI 

To update a linked zone using the CLI, run the following command:

ibmcloud dns cross-account linked-zone-update LINKED_ZONE_ID [--label LABEL] [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Where:



* LINKED_ZONE_ID is the ID of linked zone.
* --label value is the label of linked zone.
* --description value is the description of the linked zone.
* -i, --instance value is the instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
* --output value specifies the output format. Currently, json is the only supported format.







 Updating a linked zone using the API 

To update the properties of a linked zone using the API, follow these steps:



1. Set up your API environment with the correct variables.
2. Store the following values in variables to be used in the API command:



* INSTANCE_ID, which is the unique identifier of a service instance.
* LINKED_DNSZONE_ID which is the unique identifier of a linked zone.
Generate an API key, then request a refresh token. For more information, see [Generating an IBM Cloud IAM token by using an API key](https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey).
2. Copy one of the following example requests and replace the variables that you want to use.

Example request to create a version 4.9 configuration.

curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createStorageConfigurationByController" -H "accept: application/json" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{ "config-name": "string", "controller": "string", "storage-class-parameters": [ { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } ], "storage-template-name": "odf-remote", "storage-template-version": "4.9", "update-assignments": true, "user-config-parameters": { "entry.name": "OSD-SIZE", { "entry.name": "OSD-STORAGE-CLASS", { "entry.name": "NUM-OF-OSD", { "entry.name": "WORKER-NODES", { "entry.name": "ODF-UPGRADE", { "entry.name": "BILLING-TYPE", { "entry.name": "IBM-COS-ENDPOINT", { "entry.name": "IBM-COS-LOCATION", { "entry.name": "CLUSTER-ENCRYPTION", { "entry.name": "PERFORM-CLEANUP","user-secret-parameters": { "entry.name": "IBM-COS-ACCESS-KEY",{ "entry.name": "IBM-COS-SECRET-KEY",{ "entry.name": "IAM-API-KEY",}

Example request to create a version 4.10 configuration.
Generate an API key, then request a refresh token. For more information, see [Generating an IBM Cloud IAM token by using an API key](https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey).
2. Copy one of the following example requests and replace the variables that you want to use.

Example request to create a version 4.9 configuration.

curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createStorageConfigurationByController" -H "accept: application/json" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{ "config-name": "string", "controller": "string", "storage-class-parameters": [ { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } ], "storage-template-name": "odf-local", "storage-template-version": "4.9", "update-assignments": true, "user-config-parameters": { "entry.name": "AUTO-DISCOVER-DEVICES", { "entry.name": "OSD-DEVICE-PATH", { "entry.name": "NUM-OF-OSD", { "entry.name": "WORKER-NODES", { "entry.name": "ODF-UPGRADE", { "entry.name": "BILLING-TYPE", { "entry.name": "IBM-COS-ENDPOINT", { "entry.name": "IBM-COS-LOCATION", { "entry.name": "CLUSTER-ENCRYPTION", { "entry.name": "PERFORM-CLEANUP","user-secret-parameters": { "entry.name": "IBM-COS-ACCESS-KEY",{ "entry.name": "IBM-COS-SECRET-KEY",{ "entry.name": "IAM-API-KEY",}

Example request to create a version 4.10 configuration.
"id": "e4f44e8b-abe0-9267-88da-199e754f974a",
"serial_number": "fc:22:29:7e:57:25:8a:05",
"validity": {
"not_after": "2021-06-04T15:25:44Z",
"not_before": "2021-06-03T15:25:44Z"
}
}
]
},
"wrap_info": null,
"warnings": null,
"auth": null
}







 List secrets 

Retrieve a list of secrets that are available in a Secrets Manager secrets engine.



 Example requests 

List arbitrary secrets.

curl -X GET "https://{instance_id}.{region}.secrets-manager.appdomain.cloud/v1/ibmcloud/arbitrary/secrets" -H 'Accept: application/json' -H 'X-Vault-Token: {Vault-Token}'

List arbitrary secrets in an existing secret group:

curl -X GET "https://{instance_id}.{region}.secrets-manager.appdomain.cloud/v1/ibmcloud/arbitrary/secrets/groups/{group_id}" -H 'Accept: application/json' -H 'X-Vault-Token: {Vault-Token}'





 Example responses 

A request to list all arbitrary secrets returns the following response:

{
"request_id": "d8eb84fd-c0bd-08ae-c3ad-cff87606953c",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"secrets": [
{
"created_by": "iam-ServiceId-c0c7cfa4-b24e-4917-ad74-278f2fee5ba0",