vania-janet/multiturn-rag-retrieval-data huggingface dataset:
The metadata that is associated with the registration, such as its creation date, is also returned in the response body.

By default, GET api/v2/keys/registrations returns the first 200 registrations, but you can adjust this limit by using the limit parameter at query time.



 Filter registrations for a specific root key 

You can filter for a set of registrations that are associated with a root key by specifying the preventKeyDeletion and urlEncodedResourceCRNQuery parameters at query time.

For example, you might have 25 total registrations that are stored in your Key Protect instance, but you only want to retrieve registrations that have a retention policy that is associated with a specific Cloud Resource Name (CRN).

You can use the following example request to retrieve a filtered set of registrations.

$ curl -X GET "https://<region>.kms.cloud.ibm.com/api/v2/keys/<keyID_or_alias>/registrations?preventKeyDeletion=<true|false>&urlEncodedResourceCRNQuery=<url_encoded_CRN>" -H "accept: application/vnd.ibm.collection+json" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>"

Replace the preventKeyDeletion and urlEncodedResourceCRNQuery variables in your request according to the following table.



Table 4. Describes the preventKeyDeletion and urlEncodedResourceCRNQuery variables.

 Variable Description 

 preventKeyDeletion A boolean that filters registrations based on if a registered resource has a retention policy. <br> <br>For example, if you have multiple registrations in your instance, and you want to list only registrations where preventKeyDeletion is true, use ../registrations?preventKeyDeletion=true. <br> <br>You can also pair preventKeyDeletion with offest, limit, and urlEncodedResourceCRNQuery to search through your available resources.
Segment By Service instance name, IBM Event Streams consumer groups, IBM Event Streams Kafka topic, IBM Event Streams Kafka partitions 



An increasing lag might highlight that the consumers in the group are not keeping pace with the rate that messages are being produced. This might require you to scale the number of consumers that process messages for the group.

It is normal for this metric to fluctuate when viewed over short time periods because of sampling and batch processing effects.





 Message rate per partition 

The rate of change of this metric gives the message per seccond that is incoming in to a partition of a Event Streams instance topic.



Table 36. Message rate per partition metric metadata

 Metadata Description 

 Metric Name ibm_eventstreams_instance_message_rate_per_partition 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance name, IBM Event Streams Kafka topic, IBM Event Streams Kafka partitions 







 Maximum partition retention percentage 

Maximum percentage of the retention size used for partitions of a topic.



Table 37. Maximum partition retention percentage metric metadata

 Metadata Description 

 Metric Name ibm_eventstreams_instance_max_partition_retention_percent 
 Metric Type gauge 
 Value Type percent 
 Segment By Service instance, IBM Event Streams Kafka topic, Service instance name 







 Topic size 

Total disk size of all partitions of a topic.



Table 38. Topic size metric metadata

 Metadata Description 

 Metric Name ibm_eventstreams_instance_topic_size 
 Metric Type gauge 
 Value Type byte 
 Segment By Service instance, IBM Event Streams Kafka topic, Service instance name 









 Attributes for segmentation 



 Global attributes 

The following attributes are available for segmenting all of the listed metrics.



Table 39. Global attributes

 Attribute Attribute name Attribute description 

 Cloud Type ibm_ctype The Cloud type is a value of public, dedicated, or local. 
 Location ibm_location The location of the monitored resource - this might be a region, data center or global. 
 Scope ibm_scope The scope is the account, organization, or space GUID associated with this metric. 
 Service name ibm_service_name Name of the service that generates this metric.
For more information about Retention Schemes, see the [FAQ](https://cloud.ibm.com/docs/Backup?topic=Backup-faqsfaqs).

Archiving is not supported. When you create a retention scheme or modify an existing scheme, make sure that the Archiving option is not selected.





 Step 5: Running your first backup job 



1. The new job is displayed on the Computers tab. To start the job, click Select Actions, and click Run Job.
2. Verify that the destination and retention scheme appear correctly and click Start Backup. The Progress Detail page shows the job progress. This window can be closed if needed, the backup job keeps running in background.
3. When the backup job is complete, the Process ID Status shows "Finished". You can view the job history and logs of existing backup jobs on the Computer tab. Select the job that you want to view, click Select Action, and choose History/Logs.







 Step 6: Accessing and viewing IBM Cloud Backup for Classic storage details in the Console 

The storage details of your service can be viewed in the [IBM Cloud console](https://cloud.ibm.com/cloud-storage/backup) at any time. Details that can be viewed include the password, storage address, and usage that is associated with the selected IBM Cloud Backup for Classic service.



1. Log in to the [IBM Cloud console](https://cloud.ibm.com/login). From the menu ![Menu icon](https://cloud.ibm.com/docs-content/v1/content/921d024aca5ff45536208840a52f864567eb4068/icons/icon_hamburger.svg), select Classic Infrastructure![Classic icon](https://cloud.ibm.com/docs-content/v1/content/921d024aca5ff45536208840a52f864567eb4068/icons/classic.svg).
2. Click Storage, and select Backup from the list.
3.
See [Encryption at rest](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-shared-encryption-at-rest) for more information.

Activity Tracker Event Routing event routing is only available in some regions (see [Locations for Activity Tracker Event Routing event routing](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-regionsregions-atracker) for more details). For regions where it's not available, you must use Activity Tracker Event Routing hosted event search until Activity Tracker Event Routing event routing is available. After event routing becomes available in those regions, you must switch to use event routing. See [Use only services that are IBM Cloud for Financial Services Validated](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-best-practicesbest-practices-financial-services-validated-services) for more information and possible exceptions.

You must also:



* Configure storage capacity for audit log storage to support retention requirements. Your configuration should allow for retention of 90 days of online records and one (1) years’ worth of records offline to support archival Online retention refers to security audit logs that are available for analysis within one (1) hour or less, and offline retention refers to security audit logs that are available for analysis within two (2) business days or less. This provides you the ability to support after-the-fact investigations when potential incidents are detected.
* Monitor to ensure that more audit storage is allocated if needed.
* Ensure that audit events are collected from your Cloud Object Storage instance and added to your [security information and event management (SIEM)](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-shared-logging-audit-provider)





 Setup Activity Tracker Event Routing 



* Set up Activity Tracker Event Routing by following the instructions in [Getting started with Activity Tracker Event Routing event routing](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-getting-started-routing&interface=cli).
If a job is scheduled to run at the same time by multiple schedules, the job runs once at the scheduled time. If the schedules have different retention types, the job runs with the retention type of the schedule that is highest in the priority list.
10. Click Save.







 Protecting SQL databases in AlwaysOn Availability Groups 

You can protect SQL Server databases in AlwaysOn Availability Groups by using the Windows® IBM Cloud Backup for Classic Agent and SQL Server plug-in. If you back up a database in a secondary replica, a copy-only backup of the database is performed. Copy-only backups do not affect the sequence of conventional SQL Server backups. Microsoft® supports only copy-only backups of secondary databases. For more information, see [offload-supported backups to secondary replicas of an availability group](http://msdn.microsoft.com/en-us/library/hh245119.aspx).

If a backup job includes secondary databases and databases that are not in a secondary replica, a copy-only backup is performed for all databases in the job. Do not include a secondary database in the same job as a stand-alone database.

To protect SQL Server databases in AlwaysOn Availability Groups, you can choose one from the following options.



* Install the Windows® IBM Cloud Backup for Classic Agent and plug-in on the server where the primary replica is hosted. You can run a full backup of the primary databases, followed by full or transaction log backups. If the primary replica becomes a secondary replica after a failover, the IBM Cloud Backup for Classic Agent automatically runs copy-only database backups instead of full backups. Transaction log backups remain the same.
* Install the Windows® IBM Cloud Backup for Classic Agent and plug-in on a server where a secondary replica is hosted. This backup strategy offloads backup processing to a nonprimary server. You can run a copy-only backup of the secondary database, followed by copy-only or transaction log backups. If the secondary replica becomes the primary replica after a failover, the IBM Cloud Backup for Classic Agent automatically runs full backups instead of copy-only backups. Transaction log backups remain the same.
<br> <br>For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/key-protect?topic=key-protect-retrieve-instance-ID). 





 Filter registrations for any root key 

You can filter for a set of registrations that are associated with any root key managed in your provisioned instance of Key Protect by specifying the preventKeyDeletion and urlEncodedResourceCRNQuery parameters at query time.

For example, you might have 25 total registrations that are stored in your Key Protect instance, but you only want to retrieve registrations that have a retention policy this is associated with a specific Cloud Resource Name (CRN).

You can use the following example request to retrieve a specific set of registrations.

$ curl -X GET "https://<region>.kms.cloud.ibm.com/api/v2/keys/registrations?preventKeyDeletion=<true|false>&urlEncodedResourceCRNQuery=<url_encoded_CRN>" -H "accept: application/vnd.ibm.collection+json" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>"

Replace the preventKeyDeletion and urlEncodedResourceCRNQuery variables in your request according to the following table.



Table 7. Describes the preventKeyDeletion and urlEncodedResourceCRNQuery variables.

 Variable Description 

 preventKeyDeletion A boolean that filters registrations based on if a registered resource has a retention policy. <br> <br>For example, if you have multiple registrations in your instance, and you want to list only registrations where preventKeyDeletion is true, use ../registrations?preventKeyDeletion=true. <br> <br>You can also pair preventKeyDeletion with offest, limit, and urlEncodedResourceCRNQuery to search through your available resources. 
 urlEncodedResourceCRNQuery The resource CRN that you want to filter registrations by.
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) 
 Back up data immediately. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) 
 Data is copied at a specific point in time. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) 
 Set retention period for automatic deletion. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/checkmark-icon.svg) 
 Take up to 750 snapshots per volume. !
IBM Cloud® Kubernetes Service provides pre-defined storage classes for File Storage for Classic that you can use to provision File Storage for Classic with a specific configuration.

Every storage class specifies the type of File Storage for Classic that you provision, including available size, IOPS, file system, and the retention policy.

After you provision a specific type of storage by using a storage class, you can't change the type, or retention policy for the storage device. However, you can [change the size and the IOPS](https://cloud.ibm.com/docs/containers?topic=containers-file_storagefile_change_storage_configuration) if you want to increase your storage capacity and performance. To change the type and retention policy for your storage, you must create a new storage instance and copy the data from the old storage instance to your new one.

Before you begin: [Log in to your account. If applicable, target the appropriate resource group. Set the context for your cluster.](https://cloud.ibm.com/docs/containers?topic=containers-access_cluster)

To decide on a storage configuration:



1. List available storage classes in IBM Cloud® Kubernetes Service.

kubectl get storageclasses | grep file

Example output

NAME TYPE
ibmc-file-bronze (default) ibm.io/ibmc-file
ibmc-file-custom ibm.io/ibmc-file
ibmc-file-gold ibm.io/ibmc-file
ibmc-file-retain-bronze ibm.io/ibmc-file
ibmc-file-retain-custom ibm.io/ibmc-file
ibmc-file-retain-gold ibm.io/ibmc-file
ibmc-file-retain-silver ibm.io/ibmc-file
ibmc-file-silver ibm.io/ibmc-file
2. Review the configuration of a storage class.

kubectl describe storageclass <storageclass_name>
The job is now created, and the View/Add Schedule dialog box appears. Next, you can create a schedule for running the backup. Click Cancel if you don't want to create a schedule now.







 Scheduling the backup job 



1. In the View/Add Schedule dialog box, click Add Schedule.
2. In the new schedule row, in the Retention list, click a retention type.
3. In the Schedule box, click the arrow.
4. In the Configure Job Schedule dialog box, choose one of the following options.



* To run the backup on specific days each week, in the Schedule View list, click Days of Week. Select the days when you want to run the job. Then, use the At field to specify the time when you want to run the job.
* To run the backup on specific dates each month, click Days of Month in the Schedule View list. On the calendar, select the dates when you want to run the job. Then, use the At field to specify the time when you want to run the job.
* To create a custom schedule, click Custom in the Schedule View list. In the Custom Cycle dialog box, enter a custom schedule. Be sure to follow the format and notation as described.



5. Click Okay. The schedule appears in the Schedule box.
6. In the Compression list, click a compression level for the backup data. Compression levels optimize the volume of data sent against the speed of processing.
7. For Deferring, select one of the following options.



* To allow the backup job to run without a time limit, click None in the Deferring list.
* To specify a maximum amount of time that the backup job can run, click Minutes or Hours in the Deferring list. In the adjacent box, type the maximum number of minutes or hours that the job can run.



When you use the deferring option, the backup job doesn't back up any new data after the specified amount of time, even if some data is not backed up. Changes to data that was previously backed up are still backed up, regardless of the amount of time specified.
8.
* [Custom storage classes](https://cloud.ibm.com/docs/openshift?topic=openshift-file_storagefile_custom_storageclass).







 Deciding on the File Storage for Classic configuration 

IBM Cloud® Kubernetes Service provides pre-defined storage classes for File Storage for Classic that you can use to provision File Storage for Classic with a specific configuration.

Every storage class specifies the type of File Storage for Classic that you provision, including available size, IOPS, file system, and the retention policy.

After you provision a specific type of storage by using a storage class, you can't change the type, or retention policy for the storage device. However, you can [change the size and the IOPS](https://cloud.ibm.com/docs/openshift?topic=openshift-file_storagefile_change_storage_configuration) if you want to increase your storage capacity and performance. To change the type and retention policy for your storage, you must create a new storage instance and copy the data from the old storage instance to your new one.

Before you begin: [Access your Red Hat OpenShift cluster](https://cloud.ibm.com/docs/openshift?topic=openshift-access_cluster).

To decide on a storage configuration:



1. List available storage classes in IBM Cloud® Kubernetes Service.

oc get storageclasses | grep file

Example output

NAME TYPE
ibmc-file-bronze (default) ibm.io/ibmc-file
ibmc-file-custom ibm.io/ibmc-file
ibmc-file-gold ibm.io/ibmc-file
ibmc-file-retain-bronze ibm.io/ibmc-file
ibmc-file-retain-custom ibm.io/ibmc-file
ibmc-file-retain-gold ibm.io/ibmc-file
ibmc-file-retain-silver ibm.io/ibmc-file
ibmc-file-silver ibm.io/ibmc-file
2. Review the configuration of a storage class.

oc describe storageclass <storageclass_name>
See [HCX troubleshooting](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-hcxclient-troubleshooting) and [VMware HCX troubleshooting](https://docs.vmware.com/en/VMware-HCX/services/user-guide/GUID-B6CF4054-9C8C-43DE-AC67-01AE0679B190.html). 
 HCX Interconnect tunnel status Configure to send email one time for a critical tunnel status is down event. See [Network (WAN) connectivity](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-hcxclient-troubleshootinghcxclient-troubleshooting-wan-connect). 







 Events and alarms procedures 

The following table describes a number of procedures for events and alarms.



Table 4. Events and alarms procedures

 Title Description 

 View events To view events, navigate to vCenter and select an inventory object. Click the Monitor tab, Task & Events, and Events. Select an event to see the details. You can use the filter and select a column heading to sort the list. 
 Export events You might need to export events to use tools in MS Excel to assist. Select the required inventory object. Click the Monitor tab, Events, and the Export icon. In the Export Events window, specify what types of event information you want to export. Select Generate CSV Report and click Save. Specify a file name and location and save the file. 
 Event retention By default, the event retention is set to 30 days. You need to change this setting in the VMware vSphere Web Client. Click the Configure tab, Settings, and General. Click Edit, change the Event Retention to the required number of days, and click OK. 
 View Triggered Alarms To view the triggered alarms, navigate to vCenter and select either All or New in the Alarms pane. This list refreshes every 120 seconds.
System.out.printf("Minimum Retention (Days): %sn", config.getMinimumRetentionInDays());
System.out.printf("Default Retention (Days): %sn", config.getDefaultRetentionInDays());
System.out.printf("Maximum Retention (Days): %sn", config.getMaximumRetentionInDays());
}
}

def get_protection_configuration_on_bucket(bucket_name):
try:
response = cos.get_bucket_protection_configuration(Bucket=bucket_name)
protection_config = response.get("ProtectionConfiguration")

print("Bucket protection config for {0}n".format(bucket_name))
print(protection_config)
print("n")
except ClientError as be:
print("CLIENT ERROR: {0}n".format(be))
except Exception as e:
print("Unable to get bucket protection config: {0}".format(e))

function getProtectionConfigurationOnBucket(bucketName) {
console.log(Retrieve the protection on bucket ${bucketName});
return cos.getBucketProtectionConfiguration({
Bucket: bucketName
}).promise()
.then((data) => {
console.log(Configuration on bucket ${bucketName}:);
console.log(data);
}
.catch((e) => {
console.log(ERROR: ${e.code} - ${e.message}n);
});
}





 Upload an object to a bucket with retention policy 

This enhancement of the PUT operation adds three new request headers: two for specifying the retention period in different ways, and one for adding a single legal hold to the new object.
Backing up and restoring data 

Back up and restore your Watson Assistant data by downloading, and then uploading the data.

You can download the following data from a Watson Assistant service instance:



* Actions



You cannot download the following data:



* Search
* Assistant, including any configured integrations





 Retaining logs 

If you want to store logs of conversations that users have had with your assistant, you can use the /logs API to export your log data. See [API reference](https://cloud.ibm.com/apidocs/assistant/assistant-v1listlogs) for details.

Logs are stored for a different amount of time depending on your service plan. For example, Lite plans provide logs from the past 7 days only. See [Log limits](https://cloud.ibm.com/docs/assistant?topic=assistant-logslogs-limits) for more information.





 Downloading 

To back up actions, download a JSON file and store it.



1. On the Actions page, click Global settings![Gear icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/gear-icon-black.png).
2. On the Upload/Download tab, click the Download button.







 Uploading 

To reinstate a backup copy of actions that you exported from another service instance or environment, import the JSON file of the actions you exported.

If the Watson Assistant service changes between the time you export the actions and import it, due to functional updates that are regularly applied to instances in cloud-hosted continuous delivery environments, your imported actions might function differently than before.



1. On the Actions page, click Global settings![Gear icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/gear-icon-black.png).
2.
* last_activity_time: Shows the time when the streaming job was last active, with or without processing rows.







 Permissions 

The following permissions are needed for creating a stream landing job:



* Permission to create service-to-service authentication.
* Permission to write to IBM Cloud® Secrets Manager or IBM® Key Protect (to store the API key).
* Permission to create service IDs and API keys. The service ID needs to have following permissions:



* Writer role for the Cloud Object Storage bucket.
* Reader access role for the cluster, topic, and group resources within the Event Streams service instance.









 Limitations 



* With a stream landing job, you can process up to 1 MB event data per second. The final reached data throughput depends on parameters, such as topic partitions and size and format of the events.
* For one Data Engine instance, a maximum of five concurrent stream landing jobs are possible. The limit can be raised upon request by opening a support ticket.
* Ensure that the data retention time on Event Streams is set to at least one day, to avoid loss of data. If data gets lost, the streaming job does not stop or fail.