vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Alternatively, if you are using an SDK, [obtain an IAM API key](https://cloud.ibm.com/iam/apikeys) and set the client options by using environment variables.

export RESOURCE_CONTROLLER_APIKEY={iam_api_key}
2. Delete the instance of the Continuous Delivery service instance that you want to remove.



* Curl
* Java
* Node
* Python
* Go



curl -X DELETE https://resource-controller.cloud.ibm.com/v2/resource_instances/{instance_id} -H 'Authorization: Bearer {token}'

import com.ibm.cloud.platform_services.resource_controller.v2.ResourceController;
import com.ibm.cloud.platform_services.resource_controller.v2.model.;
...
ResourceController resourceControllerService = ResourceController.newInstance();
DeleteResourceInstanceOptions deleteCdInstanceOptions = new DeleteResourceInstanceOptions.Builder()
.id({instance_id})
.recursive(false)
.build();
Response<Void> response = resourceControllerService.deleteResourceInstance(deleteCdInstanceOptions).execute();

const ResourceControllerV2 = require('@ibm-cloud/platform-services/resource-controller/v2');
const resourceControllerService = ResourceControllerV2.newInstance({});
...
(async() => {
const params = {
id: {instance_id},
recursive: false,
};
await resourceControllerService.deleteResourceInstance(params);
})();

from ibm_platform_services import ResourceControllerV2
...
resource_controller_service = ResourceControllerV2.new_instance()
"expirationDate": "'$EXPIRE'",
"extractable": false
}
]
}'
Show more



 JSON response 

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key+json",
"collectionTotal": 1
},
"resources": [
{
"type": "application/vnd.ibm.kms.key+json",
"id": "aa713df1-857c-4c46-be80-3051756280c9",
"name": "Root-key-1",
"description": "example-key",
"state": 1,
"expirationDate": "2020-08-14T19:33:47Z",
"extractable": false,
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:a192d603-0b8d-452f-aac3-f9e1f95e7411:key:aa713df1-857c-4c46-be80-3051756280c9",
"imported": true,
"deleted": false
}
]
}

 step 3 - capture the key id
$ KEY_ID=aa713df1-857c-4c46-be80-3051756280c9

 step 4 - allow the expiration date to pass by sleeping for 1 (one) minute
$ sleep 60

 step 5 - delete the key
$ ibmcloud kp key delete $KEY_ID
[Guestbook Screenshot](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution64-serverless-webapp/Guestbook.png)

Guestbook Screenshot





 Step 4: Remove resources 

To delete the created bucket and Object Storage service:



1. Navigate to the Object Storage bucket objects
2. Check the box in the title row to select all objects in the bucket
3. Click Delete objects
4. In the upper right of the bucket object page Actions menu select Delete bucket
5. In the upper right of the Object Storage instance Actions menu select Delete Instance



To delete the created IBM Cloudant service,



1. Navigate to [resource list](https://cloud.ibm.com/resources)
2. Under Services, click on the action menu next to <yourinitials>-guestbook-db service
3. Click Delete



To delete the application and project Code Engine,



1. Navigate to [Code Engine](https://cloud.ibm.com/codeengine/) landing page.
2. On the left pane, click on Projects.
3. In the list of projects, check the guestbook project, then click Delete.



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](https://cloud.ibm.com/docs/account?topic=account-resource-reclamation).





 Related content 



* [Serverless Computing](https://www.ibm.com/cloud/learn/serverless)
* [Serverless: Code patterns](https://developer.ibm.com/depmodels/serverless/patterns/)
If the resource is not found, the state file is updated and the Terraform execution plan is changed accordingly.

Although the state file is updated before new changes to your IBM Cloud resources are applied, do not manually remove resources from the resource dashboard to avoid unexpected results. Instead, use the IBM Cloud Schematics console or command-line to remove your resources, or remove the associated infrastructure code from your Terraform template.

Are my resources removed when I remove the workspace
Removing the workspace from IBM Cloud Schematics does not remove any of your IBM Cloud resources. If you remove the workspace before you removed your resources, you must manually remove all your IBM Cloud resources from the individual resource dashboard.

Removing an IBM Cloud resource cannot be undone. Make sure that you backed up your data before you remove a resource. If you choose to remove the infrastructure code, or comment out the resource in your Terraform configuration file, make sure to thoroughly review the log file of your execution plan to verify that all your resources are included in the removal.

To remove your resources by deleting the infrastructure code from your Terraform template:



1. Open the Terraform configuration file in your source repository in GitHub or on your local machine.
2. Either remove the infrastructure code from the file, or comment out the resources that you want to remove by adding to the beginning of each line.

Example for commenting out a resource:

...
resource ibm_is_instance "vsi1" {
 name = "${local.BASENAME}-vsi2"
 vpc = ibm_is_vpc.vpc.id
 zone = "${local.ZONE}"
 keys = [data.ibm_is_ssh_key.ssh_key_id.id]
 image = data.ibm_is_image.ubuntu.id
 profile = "cc1-2x4"

 primary_network_interface {
 subnet = ibm_is_subnet.subnet1.id
 security_groups = [ibm_is_security_group.sg1.id]
 }
}
3. Commit the change to your Terraform configuration file.
4.
Response<Void> response = service.deleteResourceInstance(deleteResourceInstanceOptions).execute();

System.out.printf("deleteResourceInstance() response status code: %dn", response.getStatusCode());

response = resource_controller_service.delete_resource_instance(
id=instance_guid,
recursive=False
)

print('ndelete_resource_instance() response status code: ',
response.get_status_code())

deleteResourceInstanceOptions := resourceControllerService.NewDeleteResourceInstanceOptions(
instanceGUID,
)
deleteResourceInstanceOptions.SetRecursive(false)

response, err := resourceControllerService.DeleteResourceInstance(deleteResourceInstanceOptions)
if err != nil {
panic(err)
}
fmt.Printf("nDeleteResourceInstance() response status code: %dn", response.StatusCode)

const params = {
id: instanceGuid,
recursive: false,
};

resourceControllerService.deleteResourceInstance(params)
.then(res => {
console.log('deleteResourceInstance() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
});





 Deleting resource instances by using Terraform 

Use the following steps to delete resource instances by using Terraform.



1. You can delete a resource instance by removing the following code block from your terraform file. You must have created the resource_instance using the terraform file.

data "ibm_resource_group" "group" {
name = "test"
}

resource "ibm_resource_instance" "resource_instance" {
You can use the VPC console, API, or command-line to stop, reboot, and power on your virtual server instance. However, to remove the virtual server instance, you can use IBM Cloud Schematics.
* Are changes to Git repos refreshed in Schematics?

No, if you change the code of your Terraform template in GitHub, these changes are not available automatically when you create an execution plan in IBM Cloud Schematics. To pull the current changes from your GitHub repository, make sure that you click the Pull latest option from the workspace settings page before you create your execution plan.
* Where is the Terraform state file stored?

After you successfully provisioned IBM Cloud resources by running a Schematics apply action, the state of resources is stored in a Terraform state file (terraform.tfstate). Schematics uses this state file as the single source of truth to determine what resources exist in your account. The state file maps the resources that you specified in your Terraform configuration file to the IBM Cloud resource that you provisioned.
* Are resources removed on delete workspace?

Deleting a workspace from IBM Cloud Schematics does not remove any of your IBM Cloud resources. If you delete the workspace before you remove your resources, you must manually remove all your IBM Cloud resources from the individual resource dashboard.

Removing IBM Cloud resources cannot be undone. Make sure that you have backed up any data before you remove a resource. Resources will also be removed(deleted) if you remove the resource definition or comment out the resource in your Terraform configuration file. Review the Plan log file to verify that all your resources are included in the removal.
* Can I set environment variables for workspaces?

You can set env values for a workspace using the CLI and API. For more information, see [usage of env_values](https://cloud.ibm.com/docs/schematics?topic=schematics-set-parallelism).

Sample payload:

{
"name": "newName",
"template_data": [
{
"type": "<same_as_before>",
If this property is not provided, the root key from source volume is used.
* --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.
* --deprecate-at: The deprecation date and time to set for this image. The date and time must not be in the past, and must be earlier than "obsolete_at". Date and time must be in the ISO 8601 format: 2024-03-05T15:31:50.701Z or 2024-03-05T15:31:50.701+8:00
* --obsolete-at: The obsolescence date and time to set for this image. The date and time must not be in the past, and must be later than "deprecate_at". Date and time must be in ISO 8601 format: 2024-03-05T15:31:50.701Z or 2024-03-05T15:31:50.701+8:00.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



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







 ibmcloud is image-update 

Update an image.

ibmcloud is image-update IMAGE --name NEW_NAME [--deprecate-at DEPRECATE_AT | --reset-deprecate-at] [--obsolete-at OBSOLETE_AT | --reset-obsolete-at] [--output JSON] [-q, --quiet]



 Command examples 



* ibmcloud is image-update 72251a2e-d6c5-42b4-97b0-b5f8e8d1f479 --name my-image
Removing an instance 

You can remove an instance of the IBM Cloud Activity Tracker service from the IBM Cloud UI or through the command line.



 Considerations if you are using archiving 

If you are using [archiving](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-archiving-ov), make sure all archiving has completed and that you have stopped archiving before you remove your instance. Removing an instance while archiving is still active can result in archive records being lost.





 Removing an instance through the IBM Cloud UI 

To remove an instance of IBM Cloud Activity Tracker by using the IBM Cloud UI, complete the following steps:



1. [Log in to your IBM Cloud account](https://cloud.ibm.com/login).

After you log in with your user ID and password, the IBM Cloud UI opens.
2. Go to the menu icon ![Menu icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/icons/icon_hamburger.svg) > Observability to access the Observability Dashboard.
3. Select Activity Tracker. The list of instances is displayed.
4. Click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/icons/action-menu-icon.svg) for the instance you want to delete and select Delete.



Next, remove permissions that are granted to users to work with the instance that you deleted.





 Removing an instance through the CLI 

To remove an instance of IBM Cloud Activity Tracker through the command line, complete the following steps:



1. [Pre-requisite] Install the IBM Cloud CLI.
reclamationsList, response, err := resourceControllerService.ListReclamations(listReclamationsOptions)
if err != nil {
panic(err)
}
b, _ := json.MarshalIndent(reclamationsList, "", " ")
fmt.Printf("nListReclamations() response:n%sn", string(b))

const params = {
accountId: accountId,
};

resourceControllerService.listReclamations(params)
.then(res => {
var resources = res.result.resources;
resources.forEach(reclaim => {
if (reclaim.resource_instance_id.toString() === instanceGuid) {
reclamationId = reclaim.id;
}
});
console.log('listReclamations() response:n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
});





 Deleting a reclaimed resource by using the CLI 

To delete a reclaimed resource by using the CLI, run the following command:

ibmcloud resource reclamation-delete ID [--comment COMMENT] [--f, --force]

Enter the following command options:



* ID: The ID of the resource reclamation. This is the reclamation ID and not the resource instance ID. (Required).
* --comment: Comments about the action.
* -f, --force: Force deletion without confirmation.



The following example shows how to delete a resource reclamation with ID d9fendfwlw:

ibmcloud resource reclamation-delete "d9fendfwlw"

The following example shows how to delete a resource reclamation with ID d9fendfwlw and leave a comment of no longer needed without confirmation:

ibmcloud resource reclamation-delete "d9fendfwlw" --comment "no longer needed" -f
After you delete the service, unused DNS entries remain in Active Directory™. These entries do not cause any problems. However, in the future, they might create conflicts with reverse lookups. It is recommended that you remove the entries as soon as possible.

The following table shows the services that are affected. The table also shows the pattern for hostnames for various service offerings. The actual hostname might differ from the pattern in various ways. Use the pattern to locate all of the registered DNS hostnames associated with a service. Many services have more than one registered hostname.



Table 1. Hostname patterns and examples for affected services

 Service Hostname Pattern Example 

 Caveonix RiskForesight riskforesight riskforesight <br>inst01-riskforesight 
 F5 BIG-IP nickname-bigip1 <br>nickname-bigip2 edgefw-bigip1 
 FortigateVM nickname-fortigate edgefw-fortigate01 
 Entrust CloudControl htccnn-id htcc02-GY67239 
 Entrust DataControl htdcnn-id htcc02-GY67239 
 Entrust KeyControl htkcnn-id htcc02-GY67239 
 VMware Aria Operations vrli <br>vrops <br>vrlog vrli-master <br>vrops-data1 <br>vrlog-master 



To remove the DNS entires, complete the following steps:



1. Log in to the Active Directory appliance and open the DNS tools.
2. Go to the instance subdomain, which is the subdomain under the root domain. Its name resembles the name of the vCenter Server instance.
3. Remove the hostname entries for the specific deleted service appliances.
4. Open the associated reverse lookup table and remove the DNS entries from the table.







 Related links
The following table describes the registration details.



Table 3. Describes the properties that are associated with a resource

 Field Description 

 Created The date and time that the resource was first associated with the key. 
 Last updated The date and time that the registration was updated. 
 Description The description of the registration. 
 Key version ID The version of the root key that's protecting the cloud resource. 
 Key version date The date and time that the root key version was updated. 
 Cloud resource name Represents the cloud resource that is associated with the key, including the Cloud Resource Name (CRN), version, cname, ctype, and so on. 





You can use the search field to search for any resources that are associated with the root key either with the resource name or the key version ID.





 Viewing resources in your instance 



1. [Log in to the IBM Cloud console](https://cloud.ibm.com/).
2. Go to Menu > Resource list to view a list of your resources.
3. From your IBM Cloud resource list, select your provisioned instance of Hyper Protect Crypto Services.
4. On the KMS associated resources page, use the Key management service associated resources table to browse the registrations in your service.



Table 4. Describes the table of associated resources

 Column Description 

 Resource name The name of the cloud resource, such as a Cloud Object Storage bucket, that is associated with the key. 
 Key name The human-readable name that identifies the root key that is associated with the specified cloud resource. 
 Key ID The ID that identifies the root key that is associated with the specified cloud resource. 
 Service name The name of the IBM Cloud service instance that the resource resides in. 
 Retention policy Indicates whether the cloud resource can be erased. If the value is Enabled, the cloud resource can't be erased, and the key that is associated with the cloud resource can't be deleted. If the value is Disabled, the cloud resource can be erased. You can delete the key that is associated with the cloud resource if needed. 



5. Click the caret (^) icon under the Resource name column to view a list of details for a specific registration.

The following table describes the registration details.
* UI
* CLI
* API
* Terraform







 Deleting resources 

When you don't need a resource in your account anymore, or if a user in your account created a resource that you don't want them to use, you can delete the instance from your account.



 Deleting resources in the console 

You can delete a resource in the console by using the following steps:



1. From your dashboard, click View resources in the Resources summary widget.
2. Expand the sections to locate the service instance that you want to delete.
3. Click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > Delete for the row.







 Deleting resources by using the CLI 

You can delete a resource by using the IBM Cloud® Command Line Interface. For detailed information about managing IBM Cloud resources, see [Working with resources and resource groups](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_resource).



1. Log in, and select the account.

ibmcloud login
2. Delete a service instance by running the [ibmcloud resource service-instance-delete](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_resourceibmcloud_resource_service_instance_delete) command, where NAME is the name of the service instance, exclusive with ID, and ID is the ID of the service instance, exclusive with NAME.

ibmcloud resource service-instance-delete (NAME|ID) [-f, --force] [--recursive]

For example, the following command deletes a resource service-instance that's named my-service-instance:

ibmcloud resource service-instance-delete my-service-instance







 Deleting resource instances by using the API
You can narrow the results of the list by specifying the name of the zone.

ibmcloud cbr zones --name "Example zone"
2. Delete the network zone for the specified zone ID by using the [cbr zone-delete](https://cloud.ibm.com/docs/account?topic=cli-cbr-plugin&interface=clicbr-cli-zone-delete-command) command.

ibmcloud cbr zone-delete 65810ac762004f22ac19f8f8edf70a34







 Removing a network zone by using the API 

Removing a network zone removes the set of allowed network locations from which an access request is created. If a network zone is added to a rule, you first have to remove the zone from the rule. See [Updating context-based restrictions](https://cloud.ibm.com/docs/account?topic=account-context-restrictions-update) for more information about removing a zone from a rule. Then, complete the following steps:



1. Retrieve the rule ID for the rule that you want to delete by using the [Context-based restrictions list zones](https://cloud.ibm.com/apidocs/context-based-restrictionslist-zones) method.



* Curl
* Java
* Python
* Go
* Node



curl -X GET --location --header "Authorization: Bearer {iam_token}" --header "Accept: application/json" "{base_url}/v1/zones?account_id={account_id}"

ListZonesOptions listZonesOptions = new ListZonesOptions.Builder()
.accountId("testString")
.build();

Response<OutZonePage> response = contextBasedRestrictionsService.listZones(listZonesOptions).execute();
OutZonePage outZonePage = response.getResult();

System.out.println(outZonePage);

out_zone_page = context_based_restrictions_service.list_zones(
Click on the Actions... drop down and click Destroy resources to clean up all the resources that were provisioned via Schematics.
3. Click on the Actions... drop down and click Delete workspace to delete the workspace.



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](https://cloud.ibm.com/docs/account?topic=account-resource-reclamation).





 Related content 



* [Securely access remote instances with a bastion host](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-secure-management-bastion-server)
* [Accessing virtual server instances by using VNC or serial consoles](https://cloud.ibm.com/docs/vpc?topic=vpc-vsi_is_connecting_console)
* [Getting started with IBM Cloud Hyper Protect Crypto Services](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started)
fmt.Printf("nGetResourceAlias() response:n%sn", string(b))

const params = {
id: aliasGuid,
};

resourceControllerService.getResourceAlias(params)
.then(res => {
console.log('getResourceAlias() response:n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
});







 Deleting an alias 

The easiest way to delete the alias is to delete the IAM-managed service instance. However, you can maintain your IAM-managed service instance and instead delete the alias directly.



1. Go to the your resource list.
2. From the Application Services table, click the name of the service instance to open the service details view. If it has a Connections tab only, it's an alias.
3. Delete the instance.







 Deleting an alias by using the API 

To delete an alias directly, call the [Resource Contoller API](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=godelete-resource-alias) as shown in the following example:



* Curl
* Java
* Python
* Go
* Node



curl -X DELETE https://resource-controller.cloud.ibm.com/v2/resource_aliases/267bf377-7fa2-43f6-94ec-09103a8e89d4 -H 'Authorization: Bearer <IAM_TOKEN>'

DeleteResourceAliasOptions deleteResourceAliasOptions = new DeleteResourceAliasOptions.Builder()
.id(aliasGuid)
.build();

Response<Void> response = service.deleteResourceAlias(deleteResourceAliasOptions).execute();