vania-janet/multiturn-rag-retrieval-data huggingface dataset:
--------------------







 ibmcloud is key-update 

Update the name of a key.

ibmcloud is key-update KEY --name NEW_NAME [--output JSON] [-q, --quiet]



 Command examples 



* ibmcloud is key-update e9e7655e-0000-0000-0000-0000001a957a --name my-new-name
* ibmcloud is key-update e9e7655e-0000-0000-0000-0000001a957a --name my-new-name --output JSON







 Command options 



* KEY: ID or name of the key.
* --name: New name for the key.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is keys 

List all keys.

ibmcloud is keys [--resource-group-id RESOURCE_GROUP_ID | --resource-group-name RESOURCE_GROUP_NAME | --all-resource-groups] [--output JSON] [-q, --quiet]



 Command examples 



* ibmcloud is keys --resource-group-name Default --output JSON
* ibmcloud is keys --resource-group-id 11baaa8984beb82690daab08767et --output JSON







 Command options 



* --resource-group-id: ID of the resource group. This ID is mutually exclusive with --resource-group-name.
* --resource-group-name: Name of the resource group. This name is mutually exclusive with --resource-group-id.
* --all-resource-groups: Query all resource groups.
* --output: Specify output format, only JSON is supported. One of: JSON.
Currently only JSON file format is supported. 
 --json or -j Deprecated Prints the output in the JSON format. 



Example

ibmcloud schematics kms info -l US







 General commands 

Use these general commands to find help and version information for the IBM Cloud Schematics command-line plug-in.



 ibmcloud schematics help 

View the supported IBM Cloud Schematics command-line commands.

Syntax

ibmcloud schematics help [command]

Command options



Schematics help flags

 Flag Required / Optional Description 

 --help or -h Required Lists the supported commands. 
 command Optional Specify the name of the command to fetch the command details. 



Example

ibmcloud schematics help





 ibmcloud schematics version 

List the versions of all supported open source projects in Schematics, such as the IBM Cloud Provider Plug-in for Terraform, Ansible, Helm, and Kubernetes that are used to run Schematics Actions on IBM Cloud resources.

Syntax

ibmcloud schematics version [--output OUTPUT] [--json JSON_FILE]

Command options



Schematics version flags

 Flag Required / Optional Description 

 --json or -j Deprecated Returns the CLI output in JSON format. 
 --output or -o Optional Returns the CLI output in JSON format. Currently only JSON file format is supported. 



Example

ibmcloud schematics version --output json > "<filename.json>"







 Inventories commands 

Review the command that you want to create, update, list, delete and to work with your IBM Cloud Schematics inventory.



 ibmcloud schematics inventory create 

Create a resource inventory in IBM Cloud Schematics that you can reference in a Schematics action. A resource inventory includes all the target hosts where you want to run an Ansible playbook. You can create an inventory by using a payload file or the interactive mode.

Syntax
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>test-secrets-tutorial</Name>
<Prefix></Prefix>
<Marker></Marker>
<MaxKeys>1000</MaxKeys>
<Delimiter></Delimiter>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>sample.txt</Key>
<LastModified>2020-12-14T21:49:29.502Z</LastModified>
<ETag>"df756a3769fcab0a261880957590c768"</ETag>
<Size>42</Size>
<Owner>
<ID>cccbd89c-6eb0-4aed-8ffb-899d39bc022e</ID>
<DisplayName>cccbd89c-6eb0-4aed-8ffb-899d39bc022e</DisplayName>
</Owner>
<StorageClass>STANDARD</StorageClass>
</Contents>
</ListBucketResult>

Finally, to read the object in the bucket, you can run the following command.

curl -X GET "https://s3.us-south.cloud-object-storage.appdomain.cloud/test-secrets-tutorial/sample.txt" -H "Authorization: Bearer $IAM_TOKEN" -H "ibm-service-instance-id: $COS_INSTANCE_ID" -H "Accept: application/json"

Replace sample.txt with the name of the file that you uploaded to your bucket. The following screen shows an example response.

A quick brown fox jumps over the lazy dog.





 Step 6: (Optional) Clean up resources
Researchers need to affiliate with a regional cluster, and apps ingest, transform, and anonymize the data.



1. Syncing the anonymized data across regional clusters or shipping them to a centralized data store
2. Processing the data, by using ML like PyTorch on bare metal worker nodes that provide GPUs



INGEST
: IBM Cloudant is used at each regional cluster that stores researchers’ rich data documents and can be queried and processed as needed. IBM Cloudant encrypts data at rest and in transit, which complies with regional data-privacy laws.
: IBM Cloud® Functions is used to create processing functions that ingest research data and store them as structured data documents in IBM Cloudant. IBM® Secure Gateway for IBM Cloud® provides an easy way for IBM Cloud® Functions to access on-premises data in a safe and secure manner.
: Web apps in the regional clusters are developed in nodeJS for manual data entry of results, schema definition, and research organizations affiliation. IBM Key Protect helps to secure access to IBM Cloudant data, and IBM Vulnerability Advisor scans app containers and images for security exploits.

ANONYMIZE
: Anytime new data document is stored in IBM Cloudant, an event is triggered, and a Cloud Function anonymizes the data and removes SPI from the data document. These anonymized data documents are stored separate from the "raw" data that is ingested and are the only documents that are shared across regions for analysis.

ANALYZE
: Machine learning frameworks are highly compute-intensive, and thus the nonprofit set up a global processing cluster of bare-metal worker nodes. Associated with this global processing cluster is an aggregated IBM Cloudant database of the anonymized data. A cron job periodically triggers a Cloud Function to push anonymized data documents from the regional centers to the global processing cluster's IBM Cloudant instance.
: The compute cluster runs the PyTorch ML framework, and machine learning apps are written in Python to analyze the aggregated data. In addition to ML apps, researchers in the collective group also develop their own apps that can be published and run on the global cluster.
: The nonprofit also provides apps that run on non-bare metal nodes of the global cluster.
For more information, see the [IAM guide](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-managing-access-for-cloudant) and [legacy authentication](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-accountauthentication) document for details about using either style of authentication.

The IBM Cloudant team recommends you use IAM access controls for authentication whenever possible. If you're using IBM Cloudant legacy authentication, you must use [API keys](https://cloud.ibm.com/apidocs/cloudantintroduction) rather than account-level credentials for programmatic access and replication jobs.





 IBM Cloudant Dashboard 

You can open the IBM Cloudant Dashboard for your instance by going to the Manage tab of the IBM Cloud Dashboard instance details page. You can use either Launch or Launch Cloudant Dashboard to open the dashboard in a new browser tab. You can do the following tasks by using the IBM Cloudant Dashboard:



* Monitor your current consumption of the instance.
* Perform create, retrieve, update, delete on IBM Cloudant databases, documents, and indexes.
* Set up and view replication jobs.
* View active tasks.
* View and update account information like provisioned throughput capacity, announcements, CORS, and settings.







 Programmatic access 



 Command line (curl) 

You can leverage the curl command-line utility to access the IBM Cloudant HTTPS API.

For more information, see [Working with curl](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-working-with-curl). Working with curl provides details on supplying a username and password to access the IBM Cloudant API with curl.

If you use IBM Cloud IAM authentication, you must first get an IBM Cloud IAM token by using an API key. You pass the IAM token to the IBM Cloudant instance to authenticate.
{ "id": "4eee973603bf77f30b1f880ed83df76a" ....},
{ "id": "4eee973603bf77f30b1f880ed83f469a" ....},
{ "id": "65fa623a384648740ec1f39b495d591c" ....},
{ "id": "d7404903579d6d5880514c22ad983529" ....},
{ "id": "example" ....} // <-- append u0000 to this to get the startkey of the next request
]
}
See the following example of a second request: curl -H "Authorization: Bearer $API_BEARER_TOKEN" "$SERVICE_URL/orders/_all_docs?limit=5&startkey="exampleu0000""
See the following example of a second response: {
"total_rows": 11,
"offset": 5,
"rows":
{ "id": "mydoc" ....},
{ "id": "order00057" ....},
...
{ "id": "order00067" ....} <-- append u0000 to this to get the startkey of the next request
]
}
The previous Go example requires the following import block: import (
"encoding/json"
"fmt"
"github.com/IBM/cloudant-go-sdk/cloudantv1"
"github.com/IBM/go-sdk-core/core"
)
All Go examples require the service object to be initialized. For more information, see the API documentation's Authentication section]] ! ! ! ! ! ! !
Using Postman 

Here's a basic Postman setup for the IBM Cloud® Object Storage REST API. More detail can be found in the API reference for [buckets](https://cloud.ibm.com/docs/services/cloud-object-storage/api-reference?topic=cloud-object-storage-compatibility-api-bucket-operations) or [objects](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-object-storage-object-operations).

Using Postman assumes a certain amount of familiarity with Object Storage and the necessary information from a [service credential](https://cloud.ibm.com/docs/services/cloud-object-storage/iam?topic=cloud-object-storage-service-credentials) or the console as shown in the [getting started with IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage). If any terms or variables are unfamiliar, they can be found in the [FAQ](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-faq).

Personally Identifiable Information (PII): When naming buckets or objects, do not use any information that can identify any user (natural person) by name, location, or any other means.



 REST API client overview 

Interacting with a REST API isn't as simple as using a standard internet browser. Simple browsers do not allow any manipulation of the URL request. A REST API client can help quickly put together both simple and complex HTTP requests.





 Prerequisites 



* IBM Cloud account
* [Cloud Storage resource created](https://cloud.ibm.com/catalog/) (lite plan works fine)
* [IBM Cloud COS CLI installed and configured](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-cli-plugin-ic-cos-cli)
For more information, see [Passing an IBM Cloud IAM token to authenticate with a service's API](https://cloud.ibm.com/docs/account?topic=account-iamapikeysforservicestoken_auth) tutorial.

You can't use an IAM API key directly to authenticate against IBM Cloudant.





 Client libraries 

IBM Cloudant has official client libraries for Java™, Node.js, Python, Swift, and Mobile. For more information, see the [client libraries documentation](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-client-librariesclient-libraries) to access the libraries, and see examples for connecting to an IBM Cloudant instance from each.
* [Download and install jq](https://stedolan.github.io/jq/).

jq helps you slice and filter JSON data. You use jq in this tutorial to grab and use stored environment variables.







 Step 1: Set up your environment 

To work with Secrets Manager and Kubernetes Service, you need to create a cluster and a Secrets Manager instance in your IBM Cloud account. You also need to configure permissions so that you can run operations against both services.

In this step, you set up an access environment by creating a service ID and an IBM Cloud API key. At the end of the tutorial, you can easily remove your resources if you no longer need them. Alternatively, you can use a [trusted profile](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-tutorial-kubernetes-secretstutorial-kubernetes-secrets-trusted-profile) to authorize the External Secrets operator.



 Create a service ID and API key 

Start by creating the account credentials that you need to be able to run operations against Secrets Manager and Kubernetes Service.



1. From the command line, log in to IBM Cloud through the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli).

ibmcloud login

If the login fails, run the ibmcloud login --sso command to try again. The --sso parameter is required when you log in with a federated ID. If this option is used, go to the link listed in the CLI output to generate a one-time passcode.
2. Create a service ID and set it as an environment variable.

export SERVICE_ID=ibmcloud iam service-id-create kubernetes-secrets-tutorial --description "A service ID for testing Secrets Manager and Kubernetes Service." --output json | jq -r ".id"; echo $SERVICE_ID
3. Assign the service ID permissions to read secrets from Secrets Manager.
postPartitionAllDocsOptions := service.NewPostPartitionAllDocsOptions(
"readings",
"bridge-9876",
)
postPartitionAllDocsOptions.SetIncludeDocs(true)

allDocsResult, response, err := service.PostPartitionAllDocs(postPartitionAllDocsOptions)
if err != nil {
panic(err)
}

b, _ := json.MarshalIndent(allDocsResult, "", " ")
fmt.Println(string(b))

The previous Go example requires the following import block:

import (
"encoding/json"
"fmt"
"github.com/IBM/cloudant-go-sdk/cloudantv1"
)

All Go examples require the service object to be initialized. For more information, see the API documentation's [Authentication section](https://cloud.ibm.com/apidocs/cloudant?code=goauthentication-with-external-configuration) for examples.





 Finding recent readings for a piece of infrastructure 

This query needs to use [the partitioned timestamped-readings index](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioningcreating-a-paritioned-ibm-cloudant-query-index). You can issue a query to the partition to get the readings for today, assuming today is 13 December 2018.

The partition is embedded in the HTTP path when you issue the request to IBM Cloudant:



* Curl
* Java
* Node
* Python
* Go



curl -X POST "$SERVICE_URL/readings/_partition/bridge-9876/_find" -H 'Content-Type:
application/json' --data '{
"selector": {
"ts": { "$gte": "20181213"}
}
}'
crn:v1:bluemix:public:cloud-object-storage:global:a/94400e98c553415c9599db39b9be9219:3b7d66c8-9fdf-4f81-b7e6-08d187f07288:: 8f275e7b-c076-49e2-b9c5-f985704cf678

Set the CRN with the ibmcloud cos config crn command. It may warn you about overwriting. If you don't want to provide the CRN interactively, you can provide it on the same command with the --crn flag.

$ ibmcloud cos config crn
Resource Instance ID CRN: ()> 8f275e7b-c076-49e2-b9c5-f985704cf678
Saving new Service Instance ID...
OK
Successfully stored your service instance ID.

Verify the configuration:

$ ibmcloud cos config crn --list
Key Value
CRN 8f275e7b-c076-49e2-b9c5-f985704cf678

Alternatively, you might open the web-based console, select Service credentials in the sidebar, and create a new set of credentials (or view an existing credential file that you already created).





 HMAC Credentials 

If preferred, a [Service ID's HMAC credentials](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-uhc-hmac-credentials-main) can be used instead of your API key. Run ibmcloud cos config hmac to input the HMAC credentials, and then switch the authorization method by using ibmcloud cos config auth.

If you choose to use token authentication with your own API key, you don't need to provide any credentials as the program authenticates you automatically.
"key": "token",
"value": "{{iamtoken}}",
"type": "string"
}
]
},
"method": "PUT",
"header":
{
"key": "ibm-service-instance-id",
"value": "{{serviceid}}"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://{{endpoint-region}}cloud-object-storage.appdomain.cloud/{{bucket}}",
"protocol": "https",
"host":
"{{endpoint-region}}",
"objectstorage",
"softlayer",
"net"
],
"path":
"{{bucket}}"
]
},
"description": "Create new bucket"
},
"response": ]
},
{
"name": "Create new text file",
"event":
{
"listen": "test",
"script": {
"id": "0a54c09b-0032-4933-ae99-81911935cb4d",
"type": "text/javascript",
"exec":
"pm.test("Request was successful", function() {",
" pm.response.to.be.success; ",
"});",
"",
"pm.test("Response contains expected header", function() {",
" pm.response.to.have.header("ETag");",
"});"
]
}
}
],
"request": {
"auth": {
"type": "bearer",
A file contains input JSON data.

-i, --instance
: Instance name or ID. If not set, the context instance specified by ibmcloud cis instance-set is used.

--output
: Specify output format, only JSON is supported.





 Examples 

Update a dns record in domain 31984fea73a15b45779fa0df4ef62f9b.

ibmcloud cis dns-record-update 31984fea73a15b45779fa0df4ef62f9b 77335b17ce1853d0d76e08a8379a0376 --json '{"name": "testCNAME", "type": "CNAME", "content": "example.com"}' -i "cis-demo"
ibmcloud cis dns-record-update 31984fea73a15b45779fa0df4ef62f9b 417e8605a72d3e085020b82c93cd7f82 --type A --name testA --content "127.0.0.1" -i "cis-demo"







 ibmcloud cis dns-record 

Get a DNS record details for a given domain under a service instance.

ibmcloud cis dns-record DNS_DOMAIN_ID DNS_RECORD_ID [-i, --instance INSTANCE] [--output FORMAT]



 Command options 

DNS_DOMAIN_ID
: The ID of DNS domain. Required.

DNS_RECORD_ID
: The ID of DNS record. Required.

-i, --instance
: Instance name or ID. If not set, the context instance specified by ibmcloud cis instance-set INSTANCE is used.

--output
: Specify output format, only JSON is supported.





 Examples 

Get a dns record details in domain 31984fea73a15b45779fa0df4ef62f9b.
How to use attachments 

Another way to store data is to use attachments. Attachments are Binary Large OBject ([BLOB](https://en.wikipedia.org/wiki/Binary_large_object)) files that are included within documents.

It's a good idea to keep attachments small in size and number because attachments can impact performance.

The BLOB is stored in the _attachments component of the document. The BLOB holds data that includes the following information:



* The attachment name
* The type of the attachment
* The actual content



Examples of BLOBs would be images and multimedia.

If you include the attachment as an [inline](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-how-to-use-attachmentsinline) component of the overall JSON, the attachment content is represented by using BASE64 form.

The content type corresponds to a [MIME type](https://en.wikipedia.org/wiki/Internet_media_typeList_of_common_media_types). For example, if you want to attach a .jpg image file to a document, you specify the attachment MIME type as image/jpeg.

Attachments aren't permitted on documents in [_replicator](https://cloud.ibm.com/apidocs/cloudantpostreplicate) or [_users](https://cloud.ibm.com/apidocs/cloudantputsecurity) databases.



 Create or update 

To create a new attachment at the same time as creating a new document, include the attachment as an [inline](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-how-to-use-attachmentsinline) component of the JSON content.

To create a new attachment on an existing document, or to update an attachment on a document, make a PUT request with the document's most recent _rev to https://$ACCOUNT.cloudant.com/$DATABASE/$DOCUMENT_ID/$ATTACHMENT.
The content must be provided by using [BASE64](https://en.wikipedia.org/wiki/Base64) representation, as shown in the example.

A full list of media types is available in the [media types](https://en.wikipedia.org/wiki/Internet_media_typeList_of_common_media_types) article.

See the following example JSON document that includes an inline attachment of a jpeg image:

{
"_id":"document_with_attachment",
"_attachments":
{
"name_of_attachment": {
"content_type":"image/jpeg",
"data": "iVBORw0KGgoAA... ...AASUVORK5CYII="
}
}
}





 Performance considerations 

While document attachments are useful, they do have implications for application performance. In particular, having too many attachments can have an adverse performance impact during replication.

For example, if your application requires storage for multiple images as attachments or includes large images, you must use an alternative [BLOB](https://en.wikipedia.org/wiki/Binary_large_object) storage mechanism to store the images. You might then use IBM Cloudant to keep the image metadata, such as URLs to the BLOB store.

You might find it helpful to do performance testing for your specific application to determine which approach works best for your circumstances.
For more information, see [Work with an image template that was created from a cloud-init provisioned virtual server](https://cloud.ibm.com/docs/image-templates?topic=image-templates-provisioning-with-a-cloud-init-enabled-imagework-with-an-image-template-created-from-a-cloud-init-provisioned-virtual-server). You can also use an existing VHD image. Make sure that the image meets [encrypted image requirements](https://cloud.ibm.com/docs/image-templates?topic=image-templates-encrypted-image-reqsencrypted-image-reqs).
2. If you're using an image template from IBM Cloud infrastructure customer portal, [export the unencrypted image](https://cloud.ibm.com/docs/image-templates?topic=image-templates-exporting-an-image-to-ibm-cloud-object-storage) to IBM Cloud Object Storage.
3. Download the image file from IBM Cloud Object Storage to a secure local machine to encrypt the image. In your service dashboard, select the Download action to retrieve your object from storage. You can use the Aspera high-speed transfer plug-in to download images larger than 200 MB.
4. Use the vhd-util tool to [encrypt your VHD image](https://cloud.ibm.com/docs/image-templates?topic=image-templates-create-encrypted-image).
5. In IBM Cloud Object Storage, navigate to your bucket and click Add Objects to [upload](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-upload) the encrypted image. You can use the Aspera high-speed transfer plug-in to upload images larger than 200 MB.
The IBM Cloudant team advises that you use the [couchbackup](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloudant-backup-and-recoveryibm-cloudant-backup-and-recovery) utility to export data to disk. Or use [IBM Cloud Object Storage](https://www.ibm.com/cloud/object-storage), which is an inexpensive, scalable solution for storing the exported files.





No, it's not possible to keep your domain. You must plan to update your applications to use the new account URL and credentials that are generated for the IBM Cloudant instances.





Go to the [IBM Cloud Support portal](https://www.ibm.com/cloud/support), or open a ticket from within the IBM Cloudant Dashboard if you have any questions about migration. IBM Cloudant support is happy to provide more details.



* Which plans can I migrate?

You can migrate to a Lite or Standard plan from one of the following plans:



* IBM Cloudant Enterprise
* Apache CouchDB



For more information, see [Migrating an Enterprise plan to a Lite or Standard plan](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-migrating-an-enterprise-plan-to-a-lite-or-standard-plan).

Or you can migrate from the Lite plan to a Standard plan, which is just upgrading from the Lite plan to the Standard plan. For more information, see [Migrating from a Lite plan to a Standard plan](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-migrating-from-a-lite-plan-to-a-standard-plan).
* Can I back up my data before I migrate?

The IBM Cloudant team advises that you use the [couchbackup](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloudant-backup-and-recoveryibm-cloudant-backup-and-recovery) utility to export data to disk.