vania-janet/multiturn-rag-retrieval-data huggingface dataset:
To give an existing API key permission to access a database in another account, follow these steps:



1. Retrieve the existing [security permissions](https://cloud.ibm.com/apidocs/cloudantgetsecurity) for the database.
2. [Add](https://cloud.ibm.com/apidocs/cloudantputsecurity) the details of the API key to the database security permissions, along with the roles required.



For an example of this process, see the blog article: [Using an IBM Cloudant API key with multiple IBM Cloudant databases and accounts](https://dx13.co.uk/articles/2016/04/11/using-a-cloudant-api-key-with-multiple-cloudant-databases-and-accounts/).





 Deleting API keys 

It's not possible to delete an API key. An API key is always available for use if you know the key and its password. However, the API key is only useful when you assign it to a database, and assign permissions for working with the database.

To "delete" an API key, remove it from the database. All the permissions that were previously assigned to the API key for it to work with that database are then removed.



 To remove an API key by using the Dashboard 



1. Click Databases > Permissions.
2. Hover over the API key that you would like to delete.
3. Click the "X" that appears when you hover over the API key.







 To remove an API key by using the IBM Cloudant API 

Use the [modifying permissions](https://cloud.ibm.com/apidocs/cloudantputcloudantsecurity) technique to remove the API key from the list of users with access permission.

This technique works because an API key is similar to a user, and is granted access permissions. By removing the API key from the list of users that have access permissions, you remove the API key from the list of users that have access to the database.
Delete the old ingestion key. Click the X next to the ingestion key to be deleted.







 Step 2: Remove any configuration in the cluster that uses the old ingestion key 

Complete the following steps:



1. Open a terminal. Then, log in to the IBM Cloud. Run the following command and follow the prompts:

ibmcloud login -a cloud.ibm.com

Select the account where you have provisioned the IBM Log Analysis instance.
2. Set up the cluster environment. Run the following commands:

First, get the command to set the environment variable and download the Kubernetes configuration files.

ibmcloud ks cluster config --cluster <cluster_name_or_ID>

Note: Every time you log in to the IBM Cloud® Kubernetes Service CLI to work with clusters, you must run these commands to set the path to the cluster's configuration file as a session variable. The Kubernetes CLI uses this variable to find a local configuration file and certificates that are necessary to connect with the cluster in IBM Cloud.
3. Remove the secret from your Kubernetes cluster. The Kubernetes secret contains the logging ingestion key. Run the following command:

kubectl delete secret logdna-agent-key -n ibm-observe
4. Remove the logging agent on every worker(node) of your Kubernetes cluster. The logging agent is responsible for collecting and forwarding your logs. Run the following command:

kubectl delete daemonset logdna-agent -n ibm-observe
5. Verify that the logging agent is deleted successfully. Run the following command:

kubectl get pods -n ibm-observe

You should not see any logging pods.







 Step 3: Configure your Kubernetes cluster with the new ingestion key 

To configure your Kubernetes cluster in the us-south region to forward logs to your logging instance, complete the following steps from the command line:



1. Open a terminal. Then, log in to the IBM Cloud.
[Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > Delete.



If you didn't create the service ID, but you are the account owner or an administrator for the IAM Identity service, you can delete API keys for any service ID in the account. Go to the API keys page, and select the All service ID API keys option in the View menu to find the API key that you want to work with.





 Deleting an API key for a service ID using the CLI 

You can delete an API key that is associated with a service ID. However, deleting an API key that is used by an application removes the ability for that application to authenticate with your services. To delete an API key for a service ID by using the CLI, you can use the [ibmcloud iam service-api-key-delete](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_iamibmcloud_iam_service_api_key_delete) command.

ibmcloud iam service-api-key-delete NAME SERVICE_ID [-f, --force]





 Creating an API key for a service ID using the API 

To create a service ID API key, call the [IAM Identity Service API](https://cloud.ibm.com/apidocs/iam-identity-token-api?code=gocreate-api-key) as shown in the following example.



* Curl
* Java
* Python
* Go
* Node



curl -X POST 'https://iam.cloud.ibm.com/v1/apikeys' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json' -d '{
"name": "Service-apikey",
"description": "my service key",
"iam_id": "IBMid-123WEREW",
* [getObject](https://ibm.github.io/ibm-cos-sdk-js/AWS/S3.htmlgetObject-property)







 Delete an item from a bucket 

function deleteItem(bucketName, itemName) {
console.log(Deleting item: ${itemName});
return cos.deleteObject({
Bucket: bucketName,
Key: itemName
}).promise()
.then(() =>{
console.log(Item: ${itemName} deleted!);
})
.catch((e) => {
console.error(ERROR: ${e.code} - ${e.message}n);
});
}

SDK References



* [deleteObject](https://ibm.github.io/ibm-cos-sdk-js/AWS/S3.htmldeleteObject-property)







 Delete multiple items from a bucket 

The delete request can contain a maximum of 1000 keys that you want to delete. While deleting objects in batches is very useful in reducing the per-request overhead, be mindful when deleting many keys that the request may take some time to complete. Also, take into account the sizes of the objects to ensure suitable performance.

function deleteItems(bucketName) {
var deleteRequest = {
"Objects": [
{ "Key": "deletetest/testfile1.txt" },
{ "Key": "deletetest/testfile2.txt" },
{ "Key": "deletetest/testfile3.txt" },
{ "Key": "deletetest/testfile4.txt" },
{ "Key": "deletetest/testfile5.txt" }
]
}
return cos.deleteObjects({
Bucket: bucketName,
Delete: deleteRequest
For more information about deleting an API key, see [Deleting an API key for a service ID](https://cloud.ibm.com/docs/account?topic=account-serviceidapikeysdelete_service_key).







 Deleting a Delivery Pipeline Private Worker 

Complete the following steps to delete a private worker:



1. Delete the private worker from the pool of workers.
2. Delete the private worker from your Kubernetes cluster.





 Deleting a Delivery Pipeline Private Worker from the pool of workers 

Complete the following steps to delete the private worker from the pool of workers:



1. From the IBM Cloud console, click the menu icon ![hamburger icon](https://cloud.ibm.com/docs-content/v1/content/562806c0b18119f4d21cb66f5ae6d051634b4a16/ContinuousDelivery/images/icon_hamburger.svg) and select DevOps. On the Toolchains page, click a toolchain to open its Overview page. Alternatively, on your app's Overview page, on the Continuous delivery card, click View toolchain.
2. On the Delivery pipelines card, click the Delivery Pipeline Private Worker tool integration that you want to configure.
3. Click Overview.
4. Click the menu for the private worker that you want to delete to access the configuration options.
5. Click Remove and then click Confirm.



If you delete all of the private workers from a pool of workers, subsequent Classic pipelines stage runs fail and the No workers currently registered message is displayed in the Stage History. For Tekton pipelines, subsequent stage run requests are placed in a queue and do not start to run until a worker is available in the selected worker pool.

Although deleting a private worker tool integration from a toolchain prevents that toolchain from using the pool of workers, other toolchains might still use the worker pool. You can delete a pool of workers from all toolchains by deleting the service ID that is associated with the Delivery Pipeline Private Worker tool integration.
[Settings icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/images/admin.png).
3. Select Organization.
4. Select API keys.

If you have the correct permissions, the available service keys are displayed in the Ingestion keys section.
5. Click Generate Ingestion Key. A new key is added to the list.







 Deleting a service key by using the UI 

You must have the manager role for the IBM Cloud Activity Tracker service to complete this step.

For more information, see [service roles](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-iamservice).

Complete the following steps to delete an ingestion key:



1. [Launch the Activity Tracker web UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch).
2. Click the Settings icon ![Settings icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/images/admin.png).
3. Select Organization.
4. Select API keys.

If you have the correct permissions, the available service keys are displayed in the Ingestion Keys section.
5. Delete the key by clicking the X next to the key to be deleted.







 Rotating an ingestion key through the UI 

If the ingestion key is compromised or you have a policy to renew it after a number of days, you can generate a new key and delete the old one.

To renew the ingestion key for an IBM Cloud Activity Tracker instance by using the IBM Cloud Activity Tracker Web UI, complete the following steps:



1.
* UI
* CLI
* API







 Managing service keys 

In an IBM® Log Analysis instance you can create, delete, and view service keys by using the UI. You can also create and view service keys by using the CLI and API.

A service key is a unique code that is passed in an API request to identify the calling application or user.

You must use a logging service key to complete any of the following tasks:



* Export data programmatically
* Manage views and alerts programmatically by using the Configuration API or Terraform.
* Configure resources such as groups, archiving, keys by using the Configuration API or Terraform.



You can enable a maximum of 20 service keys for each instance.



 Prereqs. Check your IAM permissions to manage service keys 

To generate a new service key or get an existing service key, you need the following roles on the IBM Log Analysis:



* Platform role operator, editor or administrator
* Service role Manager



To restrict access to a service key, you need the following role on the IAM Identity Service service:



* Platform role Administrator







 Managing service keys by using the UI 

You can create, delete, and view service keys through the UI.



 Creating a service key by using the logging UI 

You must have the manager role for the Log Analysis service to complete this step.

For more information, see [service roles](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-iamservice).

Complete the following steps to create a service key:



1. [Launch the Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-launch).
2. Click the Settings icon ![Settings icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png).
3. Select Organization.
4.
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 





 Deleting a category 

The following sample deletes a category.

curl DELETE https://api.us-south.logging.cloud.ibm.com/v1/config/categories/views/xxxxxxxxxx 
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 





 Changing the name of a category 

The following sample gets information about a category.

curl GET https://api.us-south.logging.cloud.ibm.com/v1/config/categories/views/xxxxxxxxxx 
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 
-d '{"name": "My new category name"}





 Getting details about a category 

The following sample gets information about a category.

curl GET https://api.us-south.logging.cloud.ibm.com/v1/config/categories/views/xxxxxxxxxx 
-H 'content-type: application/json' 
-H 'servicekey: <SERVICE_KEY>'
To get the details of a classic infrastructure API key after you create it, click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > View details. You can copy the API key value.

To get the details of a classic infrastructure API key after you create it, go to Manage > Access (IAM) > Users in the IBM Cloud console, then select the user's name. From the API keys section, click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > View details in the row for the classic infrastructure API key row. You can copy the API key value.

In most cases, the username of your classic infrastructure API key will be your <account_ID>_<email_address>. It is the same as your VPN username displayed on your User details page in the VPN password section.

To delete a classic infrastructure API key, click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > Delete on the row for the API key in the API keys section.





 Managing other user's classic infrastructure API keys 

If you are an ancestor in the classic infrastructure hierarchy for a user, you can view and delete classic infrastructure API keys for users, including VPN only users.

Only users who create the API key can retrieve the API key value after it's created.

In the IBM Cloud console, go to Manage > Access (IAM) > API keys, and select Classic infrastructure API keys.
Critical hs-crypto.target-keystores.delete<br><br>hs-crypto.managed-keys.delete<br><br>hs-crypto.vaults.delete<br><br>hs-crypto.registrations.delete<br><br>hs-crypto.tke-cryptounit-admin.add<br><br>hs-crypto.tke-cryptounit-admin.remove<br><br>hs-crypto.tke-cryptounit-current-master-key-register.clear<br><br>hs-crypto.tke-cryptounit-new-master-key-register.clear<br><br>hs-crypto.tke-cryptounit-master-key-register.add<br><br>hs-crypto.tke-cryptounit-master-key-register.commit<br><br>hs-crypto.tke-cryptounit-master-key-register.activate<br><br>hs-crypto.tke-cryptounit-threshold.set<br><br>hs-crypto.tke-cryptounit.reset<br><br>hs-crypto.mtlscert-admin-key.create<br><br>hs-crypto.mtlscert-admin-key.update<br><br>hs-crypto.mtlscert-admin-key.delete<br><br>hs-crypto.mtlscert-cert.set<br><br>hs-crypto.mtlscert-cert.set<br><br>hs-crypto.keystore.deletekey<br><br>hs-crypto.keystore.deletekeystore<br><br>hs-crypto.keystore.updatekey 
 Warning hs-crypto.managed-keys.write<br><br>Note that when this event is triggered to change the key state to destroyed, the severity level is Critical instead of Warning.
* UI
* API







 Disconnecting from external keystores 

You can disconnect from keystores that are external to your service instance on IBM Cloud®, or from other cloud providers such as Microsoft Azure Key Vault, Amazon Web Services (AWS) Key Management Service (KMS), and Google Cloud KMS. After you disconnect from an external keystore, all the managed keys in this keystore are detached and resources that are managed are not accessible.

If you want to disconnect from an external keystore, delete all active keys in this keystore first. In other words, all keys with this keystore as a target are in Pre-active or Destroyed state. For more information about deleting keys, see [Deleting managed keys](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-delete-managed-keys).



 Disconnecting from external keystores with the IBM Cloud console 

To disconnect from an external keystore by using the console, complete the following steps:



1. [Log in to the Hyper Protect Crypto Services instance](https://cloud.ibm.com/login).
2. Click Target keystores from the navigation to view all the available keystores.
3. Click the keystore that you want to disconnect. The Details side panel is displayed.
4. Click Disconnect to disconnect the keystore and remove it from the keystore list.
5. Click Disconnect keystore to confirm.



The external keystore has been disconnected with all the managed keys in this keystore detached and resources that are managed inaccessible.

After you disconnect from an external keystore, you can reconnect to the keystores at any time. For more instructions, see [Connecting to external keystores](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-connect-external-keystores).





 Disconnecting from external keystores with the API 

To disconnect from an external keystore through the API, follow these steps:



1.
* Java
* Python
* Go
* Node



curl -X DELETE 'https://iam.cloud.ibm.com/v1/serviceids/SERVICE_ID_UNIQUE_ID/lock' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json'

UnlockServiceIdOptions unlockServiceIdOptions = new UnlockServiceIdOptions.Builder()
.id(svcId)
.build();

service.unlockServiceId(unlockServiceIdOptions).execute();

response = iam_identity_service.unlock_service_id(id=svc_id)

print(response)

unlockServiceIDOptions := iamIdentityService.NewUnlockServiceIDOptions(svcID)

response, err := iamIdentityService.UnlockServiceID(unlockServiceIDOptions)
if err != nil {
panic(err)
}

const params = {
id: svcId,
};

iamIdentityService.unlockServiceId(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err);
done(err);
});







 Deleting an API key for a service ID using the API 

To delete an API key by for a service ID using the API, call the [IAM Identity Service API](https://cloud.ibm.com/apidocs/iam-identity-token-apidelete-api-key) as shown in the following example:



* Curl
* Java
* Python
* Go
* Node
* log-analysis-es
* log-analysis-sql
* log-analysis-cos
* log-analysis-iae

<-- </ul> -->

2. Before deleting the log-analysis-kp service, delete the root key.3. Navigate to Manage > Access (IAM) > Service IDs]Manage _gt_ Access _IAM_ _gt_ Service IDs] ! in the IBM Cloud console and Remove the log-stream-landing-service-id serviceID.<-- </ol> -->Depending on the resource it might not be deleted immediately, but retained (by default for 7 days). You can reclaim the resource by deleting it permanently or restore it within the retention period. See this document on how to use resource reclamation]] ! ! ! .<-- </section "id="section-big-data-log-analytics-removal" "> --><-- <section "id="section-big-data-log-analytics-8" "> --> Related content <-- <ul> --> * Apache Kafka]] ! ! ! ! !
Key: aws.String("<OBJECT_KEY>"),
}

d, _ := client.DeleteObject(input)
fmt.Println(d)
}
Show more





 Delete multiple objects from a bucket 

func main() {

// Create client
sess := session.Must(session.NewSession())
client := s3.New(sess, conf)

// Bucket Name
bucket := "<BUCKET_NAME>"

input := &s3.DeleteObjectsInput{
Bucket: aws.String(bucket),
Delete: &s3.Delete{
Objects: []s3.ObjectIdentifier{
{
Key: aws.String("<OBJECT_KEY1>"),
},
{
Key: aws.String("<OBJECT_KEY2>"),
},
{
Key: aws.String("<OBJECT_KEY3>"),
},
},
Quiet: aws.Bool(false),
},
}

d, _ := client.DeleteObjects(input)
fmt.Println(d)
}
Show more





 Delete a bucket 

func main() {

// Bucket Name
bucket := "<BUCKET_NAME>"

// Create client
sess := session.Must(session.NewSession())
client := s3.New(sess, conf)

input := &s3.DeleteBucketInput{
Bucket: aws.String(bucket),
}
d, _ := client.DeleteBucket(input)
fmt.Println(d)
}





 Run a manual multi-part upload 

func main() {

// Variables
bucket := "<BUCKET_NAME>"
key := "<OBJECT_KEY>"
* Do not store an API key in files inside your application's source code control system. If you store API keys in files, keep the files outside of your application's source code. This practice is important if you use a public source-code management system such as GitHub.
* Regenerate your API keys periodically. You can create new credentials at any time.



1. From the resource list, select a service instance.
2. In the navigation list, click Service credentials.



When you migrate your application to the new credentials, don't forget to delete the old credentials by using the trashcan icon for the credentials that you want to delete.
Getting started with SSH keys 

You can add, manage, and delete SSH keys on the IBM Cloud® Classic infrastructure by using the IBM Cloud® console.



  Before you begin 



1.  Learn more about [SSH keys](https://cloud.ibm.com/docs/infrastructure/ssh-keys?topic=ssh-keys-about-ssh-keys).
2.  Makre sure that you have the necessary account permissions and device access so you can view and manage SSH keys. Only the account owner, or a user with the Manage Users classic infrastructure permission, can adjust the permissions. For more information about permissions, see [Classic infrastructure permissions](https://cloud.ibm.com/docs/iam?topic=iam-infrapermissioninfrapermission) and [Managing device access](https://cloud.ibm.com/docs/vsi?topic=virtual-servers-managing-device-access).







  Next steps 

After you make sure that you have the right access to view and manage SSH keys, you can [add SSH keys](https://cloud.ibm.com/docs/infrastructure/ssh-keys?topic=ssh-keys-adding-an-ssh-keyadding-an-ssh-key), [edit labels and notes](https://cloud.ibm.com/docs/infrastructure/ssh-keys?topic=ssh-keys-editing-details-for-an-ssh-keyediting-details-for-an-ssh-key), and [remove SSH keys](https://cloud.ibm.com/docs/infrastructure/ssh-keys?topic=ssh-keys-removing-an-ssh-keyremoving-an-ssh-key). No more than 100 SSH keys can be associated with an account at any time.
2. Click the Settings icon ![Settings icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png).
3. Select Organization.
4. Select API keys.

If you have the correct permissions, the available service keys are displayed in the Service Keys section.
5. Click Generate Service Key. A new key is added to the list.







 Deleting a service key by using the UI 

You must have the manager role for the IBM Log Analysis service to complete this step.

For more information, see [service roles](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-iamservice).

Complete the following steps to delete a service key:



1. [Launch the IBM Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-launch).
2. Click the Settings icon ![Settings icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png).
3. Select Organization.
4. Select API keys.

If you have the correct permissions, the available service keys are displayed in the Service Keys section.
5. Delete the key by clicking the X next to the key to be deleted.







 Viewing a service key by using the UI 

You must have the manager role for the IBM Log Analysis service to complete this step.

For more information, see [service roles](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-iamservice).

Complete the following steps to view a service key: