vania-janet/multiturn-rag-retrieval-data huggingface dataset:
For example, for Smart Tier, the billing is based on usage across all Smart Tier buckets in a given instance - not on the individual buckets.





 How do I create a bucket with a different storage class? 

When creating a bucket in the console, there is a menu that allows for storage class selection.

When creating buckets programmatically, it is necessary to specify a LocationConstraint that corresponds with the endpoint used. Valid provisioning codes for LocationConstraint are
   US Geous-standard / us-vault / us-cold / us-smart
   US Eastus-east-standard / us-east-vault / us-east-cold / us-east-smart
   US Southus-south-standard / us-south-vault/ us-south-cold/ us-south-smart
   EU Geoeu-standard / eu-vault / eu-cold / eu-smart
   EU Great Britaineu-gb-standard / eu-gb-vault / eu-gb-cold / eu-gb-smart
   EU Germanyeu-de-standard / eu-de-vault / eu-de-cold / eu-de-smart
   AP Geoap-standard / ap-vault / ap-cold / ap-smart
   AP Tokyojp-tok-standard / jp-tok-vault / jp-tok-cold / jp-tok-smart
   AP Osakajp-osa-standard / jp-osa-vault / jp-osa-cold / jp-osa-smart
   AP Australiaau-syd-standard / au-syd-vault / au-syd-cold / au-syd-smart
   CA Torontoca-tor-standard / ca-tor-vault / ca-tor-cold / ca-tor-smart
   Amsterdamams03-standard / ams03-vault / ams03-cold / ams03-smart
   Chennaiche01-standard / che01-vault / che01-cold / che01-smart
   Mexicomex01-standard / mex01-vault / mex01-cold / mex01-smart
   Milanmil01-standard / mil01-vault / mil01-cold / mil01-smart
Navigate to the application code inside the magnetocorp directory.

cd organization/magnetocorp/application

When you are inside the directory, you can download the application dependencies by running the following command:

npm install





 Step two: Install and Propose smart contract 

You can find the commercial paper smart contract inside the contract folder of the digibank and magnetocorp directory. You need to install this smart contract on all the peers of the organizations that use the tutorial.

Smart contracts running on peers using the Fabric v1.4.x image must be packaged in [.cds format](https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.htmlpackaging). These smart contracts are installed and then instantiated on a channel. For information on using smart contracts with Fabric v1.4.x peers, check out [Deploy a smart contract using Fabric v1.4.x](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-smart-contracts-v14).

Smart contracts running on peers using a Fabric v2.x image must be packed using the [.tar.gz format](https://hyperledger-fabric.readthedocs.io/en/release-2.2/chaincode_lifecycle.htmlstep-one-packaging-the-smart-contract). These smart contracts must be installed and proposed by you, then approved by other channel members before being committed on the channel. For information on using smart contracts with Fabric v2.x peers, check out [Deploying a smart contract using Fabric 2.x](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-smart-contracts-v2).

Attention! The IBM Blockchain Platform Extension for VS Code (VS Code extension) referenced throughout the documentation is an open-source project which is no longer active, and therefore not officially supported by IBM.
For more information about migrating to redis v4, see [v3 to v4 Migration Guide](https://github.com/redis/node-redis/blob/master/docs/v3-to-v4.md). <br>If you can't migrate, consider packaging the older version of redis package with your action as described in [Packaging JavaScript code as NPM files](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_js_npm). 
 uuid The uuid package in the nodejs:16 runtime is at version v8.x. <br>Major version changes can introduce incompatibilities, which might cause your action to fail. If your action uses an earlier version of this package, consider migrating to the current version. For more information about migrating to the current version pf uuid, see [Upgrading From uuid@3.x](https://www.npmjs.com/package/uuidupgrading-from-uuid3x). <br>If you can't migrate, consider packaging the older version of redis package with your action as described in [Packaging JavaScript code as NPM files](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_js_npm). 



For more information about migrating to Node.js:12, see [(Details on GitHub)](https://github.com/ibm-functions/runtime-nodejs/blob/master/nodejs12/CHANGELOG.md).





 Migrating from Node.js 10 to Node.js 12 



Table 2. Migrating details from Node.js 10 to Node.js 12

 Package Details 

 ibm-watson The current ibm-watson SDK package in the nodejs:12 runtime is at version v6.x. <br>Major version changes can introduce incompatibilities, which might cause your action to fail. If your action uses an earlier version of this package, consider migrating to the current version.
TokenManager tokenManager = new DefaultTokenManager(new DelegateTokenProvider(API_KEY));

AsperaTransferManager asperaTransferMgr = new AsperaTransferManagerBuilder(API_KEY, s3Client)
.withAsperaConfig(asperaConfig)
.build();

For best performance in most scenarios, always make use of multiple sessions to minimize any processing associated with instantiating an Aspera high-speed transfer. If your network capacity is at least 1 Gbps you should use 10 sessions. Lower bandwidth networks should use two sessions.

Key Values



* API_KEY - An API key for a user or service ID with Writer or Manager roles



You will need to provide an IAM API Key for constructing an AsperaTransferManager. [HMAC Credentials](https://cloud.ibm.com/docs/cloud-object-storage/iam?topic=cloud-object-storage-service-credentialsservice-credentials-iam-hmac) are NOT currently supported. For more information on IAM, [click here](https://cloud.ibm.com/docs/cloud-object-storage/iam?topic=cloud-object-storage-iam-overview).





 File Upload 

String filePath = "<absolute-path-to-source-data>";
String bucketName = "<bucket-name>";
String itemName = "<item-name>";

// Load file
File inputFile = new File(filePath);

// Create AsperaTransferManager for FASP upload
AsperaTransferManager asperaTransferMgr = new AsperaTransferManagerBuilder(API_KEY, s3Client).build();

// Upload test file and report progress
Future<AsperaTransaction> asperaTransactionFuture = asperaTransferMgr.upload(bucketName, itemName, inputFile);
So, make sure that the cache file created by the SDK is always stored in persistent volume by providing the correct absolute path of the persistent directory.





 Offline options 

The SDK is also designed to serve configurations, and perform feature flag and property evaluations without being connected to App Configuration service.

ConfigurationOptions configOptions = new ConfigurationOptions();
configOptions.setBootstrapFile("saflights/flights.json");
configOptions.setLiveConfigUpdateEnabled(false);
appConfigClient.setContext(collectionId, environmentId, configOptions);

Where:



* bootstrapFile: Absolute path of the JSON file, which contains configuration details. Make sure to provide a proper JSON file. You can generate this file by using ibmcloud ac config command of the IBM Cloud App Configuration CLI.
* liveConfigUpdateEnabled: Live configuration update from the server. Set this value to false if the new configuration values must not be fetched from the server. By default, this value is set to true.







 Examples for using feature and property related APIs 

See the following examples for using the feature and property related APIs.



 Get single feature 

Feature feature = appConfigClient.getFeature("online-check-in");

if (feature != null) {
System.out.println("Feature Name : " + feature.getFeatureName());
System.out.println("Feature Id : " + feature.getFeatureId());
System.out.println("Feature Type : " + feature.getFeatureDataType());
System.out.println("Is feature enabled? : " + feature.isEnabled());
}





 Get all features 

HashMap<String, Feature> features = appConfigClient.getFeatures();





 Feature evaluation
* [Option 2: Create a five node ordering service using certificates from an external CA](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-create-five-node)



* [Configuring a node to use a Hardware Security Module (HSM)](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-cfg-hsm)



* [What capability does HSM add to my blockchain node?](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-cfg-hsm-capability)
* [Considerations when using HSM](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-cfg-hsm-considerations)
* [Before you begin](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-hsm-before)
* [Build a Docker image](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-hsm-build-docker)
* [Configuring a CA, peer, or ordering node to use the HSM](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-cfg-hsm-node)





[Advanced channel deployment and management](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-governibp-console-govern)
* [Troubleshooting your VFP Interface](https://cloud.ibm.com/docs/virtual-router-appliance?topic=virtual-router-appliance-troubleshooting-your-vfp-interface)



: If you are migrating from Vyatta 5400, the best way to upgrade to 18.x is through a full OS reload. For more information, see [Upgrading the OS](https://cloud.ibm.com/docs/virtual-router-appliance?topic=virtual-router-appliance-upgrading-the-os).
: Because there is no simple one-to-one mapping of functionality between Vyatta 5400 and the IBM Cloud® Virtual Router Appliance, creating a baseline configuration for the VRA is helpful. An IBM Partner, WanClouds, can help you with this process, and provide guidance on creating functionality similar to the Vyatta 5400 on your VRA.
: For more information about common issues encountered during this upgrade process, see [Vyatta 5400 common migration issues](https://cloud.ibm.com/docs/virtual-router-appliance?topic=virtual-router-appliance-vyatta-5400-common-migration-issues).
For the SDK for Node.js buildpack V3.23 or later, try packaging the dependencies in the same source files as your app. This can resolve various errors that can occur when dependencies assume that they are in the same base directory as the app.



1. From your app root directory, install dependencies by running the following command.

npm install
2. Ensure that your .cfignore file does not include the following line:

node_modules/



Now when you deploy your app with the ibmcloud cf push command, instead of downloading your dependencies to a separate location, the dependencies are copied into the same directory as the rest of the app.





 App fails to start with a "No space left on device" error 

 What’s happening 

A Node.js app fails to start with a "No space left on device" error. For example, the error in the logs might look like the following:

2017-01-16T14:25:14.61-0500 [CELL/0] ERR tar: ./app/node_modules/pm2/node_modules/cron/node_modules/moment-timezone/LICENSE: Cannot write: No space left on device

 Why it’s happening 

Node.js apps using NPM versions prior to version 3 consume more space downloading dependencies.

 How to fix it 

Modify the package.json file for your app to use an NPM version 3 or greater.

{
"name": "myapp",
"description": "this is my app",
"version": "0.1",
"engines": {
"node": "4.2.4",
"npm": "3.10.10"
}
}





 App restarts due to memory constraints 

Node.js does not know how much memory is available to the app, so the garbage collector might not run before memory is exhausted.

2017-09-01T11:00:42.19-0400 [APP/PROC/WEB/0]OUT Exit status 137
4. Check the installed version and path. ![screenshot_install_apic-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/screenshot_install_apic-1.png)







 Install the API Connect toolkit and Microgateway 



1. Update the npm config to allow use of untrusted certificates.
npm config -g set strict-ssl false
2. Install the API Connect toolkit from npm.
npm install -g apiconnect
3. Check the installed version.
apic -v
4. Run the following command: npm install -g microgateway



The Microgateway functions as a local test server.
* [BasicIBMOAuthCredentials](https://ibm.github.io/ibm-cos-sdk-java/com/ibm/cloud/objectstorage/oauth/BasicIBMOAuthCredentials.html)
* [ClientConfiguration](https://ibm.github.io/ibm-cos-sdk-java/com/ibm/cloud/objectstorage/ClientConfiguration.html)
* [EndpointConfiguration](https://ibm.github.io/ibm-cos-sdk-java/com/ibm/cloud/objectstorage/client/builder/AwsClientBuilder.EndpointConfiguration.html)
* [SdkClientException](https://ibm.github.io/ibm-cos-sdk-java/com/ibm/cloud/objectstorage/SdkClientException.html)









 Determining Endpoint 

The methods below can be used to determine the service endpoint based on the bucket location, endpoint type (public or private), and specific region (optional). For more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpointsendpoints).

/
* Returns a service endpoint based on the
* storage class location (i.e. us-standard, us-south-standard),
* endpoint type (public or private)
/
public static String getEndpoint(String location, String endPointType) {
return getEndpoint(location, "", endPointType);
}

/
* Returns a service endpoint based on the
* storage class location (i.e. us-standard, us-south-standard),
* specific region if desired (i.e. sanjose, amsterdam) - only use if you want a specific regional endpoint,
* endpoint type (public or private)
/
public static String getEndpoint(String location, String region, String endpointType) {
"pem": "-----BEGIN CERTIFICATE-----nMIICCzCCAbKgAwIBAgIUYH1G2I60YOEZuiAQPsvSmWXABxUwCgYIKoZIzj0EAwIwnZDELMAkGA1UEBhMCVVMxFzAVBgNVBAg
< MATERIAL REMOVED FOR BREVITY AND SECURITY>
DAQH/MB0GA1UdDgQWBBRDV6AdNnpIEGO9n7mbUM5bk4U0/yTAKBggqhkjOPQQDAgNHADBEAiAxjAM3zkf4v0TXUlJZZgS4TFE5nY7eO7e16X1rETFryywIgHuSvyhPDUog0hD5VUUtZjroXYG4pO1aI1L/zue9lr48=n-----END CERTIFICATE-----n"
},
"grpcOptions": {
"ssl-target-name-override": "n257768-org1peer1.us-east.containers.appdomain.cloud"
}

Click the Organization MSP tile for the organization that your client application interacts with. Click Create connection profile to open a side panel where you can build and download your connection profile.

Attention: The remainder of this page describes the Fabric v2.2 and earlier methods for developing applications, which remain supported in IBM Blockchain Platform v2.5.4 and Fabric v2.4. (IBM Blockchain Platform does not support Hyperledger Fabric v2.3). The Fabric v2.2 and earlier development methods are described as the high-level programming model and SDKs and its predecessor, the low-level programming model.







 Legacy model of developing applications 

This section describes the legacy model of developing applications, which was designed for Hyperledger Fabric v2.2 and earlier. Refer to the previous section on [using the v2.4 Fabric Gateway peer service](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-appibp-console-app-gateway-peer-service) for details on developing new applications for Fabric v2.4.

Developing an application might require coordination between two distinct users of your network, the network operator and the application developer:
Let's start by opening a tool familiar to experienced developers, and a new best friend to those just getting started: the command line. For many, the graphic user interface (GUI) relegated your computer's command-line interface to second-class status. But now, it's time to bring it back (although the GUI isn't going away anytime soon, especially when we need to browse the web to download instructions for the command-line toolset).

Open a shell and create a directory. Change your own reference directory to the new one you created. When created, your application has its own subdirectory with the starter code and configuration needed to get up and running.

Leave the command line and return to your browser so you can follow the instructions to install the [IBM Cloud Platform developer tools](https://cloud.ibm.com/docs/cli?topic=cli-install-devtools-manually) at the link. The Developer Tools offer an extensible and repeatable approach to building and deploying cloud applications.





 Installing Docker 

Using containers, like Docker, speeds up development and eases testing and supports automated deployment. A container is a lightweight structure that doesn't need an operating system, just your code and configuration for everything from dependencies to settings.

[Docker](https://www.docker.com) is installed as part of the Developer Tools, and we need it. Its work takes place mostly in the background within routines that scaffold your new app. Docker must be running for the build commands to work. Go ahead and create a Docker account online at [Docker hub](https://hub.docker.com), run the Docker app, and sign in.





 Installing Node.js 

The app that you build uses [Node.JS](https://nodejs.org/) as the server-side engine to run the JavaScript code for this web application. To use the Node Package Manager (npm) to manage your app's dependencies, you must install Node locally. Also, a local installation of Node simplifies testing, speeding up development.
1.27.1 04 March 2022 <br><br> * Fixed various bugs.<br> * Upgraded to Go 1.17.8.<br><br><br> 
 1.27.0 02 March 2022 <br><br> * CLI 1.27.0 introduces an improved service binding implementation, which is used for all new service bindings. Existing applications and jobs continue to function normally. However, if you want to bind an additional service instance to an app or job, you must first delete any existing service bindings from that app or job. You can then re-create those service bindings with the improved service binding implementation.<br> * Added the --service-instance-id option to the app bind and job bind commands.<br> * Updated the default timeout value for the --wait-timeout option from 300 seconds to 600 seconds for the app create, app delete, and app update commands.<br> * Fixed various bugs.<br><br><br> 
 1.26.1 24 February 2022 <br><br> * Fixed various bugs.<br><br><br> 
 1.26.0 17 February 2022 <br><br> * Added support for choosing different names for keys that are referenced as environment variables from secrets or configmaps with the --env-from-secret and --env-from-configmap options.<br> * Fixed various bugs.<br> * Updated translations for the CLI.<br> * Upgraded to Go 1.17.7.<br><br><br> 
 1.25.4 10 February 2022 <br><br> * Fixed various bugs.<br><br><br> 
 1.25.3 03 February 2022 <br><br> * Fixed various bugs.<br><br><br> 
 1.25.2 27 January 2022 <br><br> * Fixed various bugs.<br><br><br> 
 1.25.0 20 January 2022 <br><br> * Added support for creating a build that pulls source from a local directory.
Errors 



  Error delivery 

SDK methods MUST surface errors to the caller in the manner that is idiomatic for the particular language. For example, a Go SDK should return an error value from the method, but a Java SDK should raise an Exception.





  Error content 

When an SDK method encounters an error, it MUST capture all relevant information about the error and return it in the error structure that is returned to the caller. Relevant information includes the entire contents of the error response and all response headers. The SDK documentation MUST clearly describe how this information is returned and how it can be accessed by the calling program.

Errors that are generated within the SDK MUST give a clear and specific description of the problem. For example, if a method parameter failed a validation, the message should state which parameter is invalid and the reason it is invalid.
Subscribe push android and push iOS destinations to the above topic.
4. Next, send an event notification with payload containing attribute "notification-type":"maintenance"and "ibmenpushto": "{"platforms":["push_android","push_ios"]]}", notification-type attribute is added so that it matches against the topic condition and ibmenpushto for targeting customers with android and iOS devices.
5. Event Notifications will get routed to customers with android and iOS devices, since its payload contains "notification-type":"maintenance" which matches the condition for Topic ACME-Maintenance and "ibmenpushto": "{"platforms":["push_android","push_ios"]]}" as ibmenpushto is mandatory for push type Event Notifications destinations.



All push devices will get registered under Event Notifications destination of type push. For example, push-android, push-ios, and others.
* Event Notifications Tag subscriptions to push devices

For example, ACME Bank wants to route maintenance event notifications to customers by using android and iOS devices. ACME Bank maintenance usually takes place in one region at a time.

ACME Bank wants to register each of their customer's android and iOS devices under region-specific tags.



1. To achieve this the bank can use Event Notifications Android Client SDK and iOS Client SDK to subscribe to Asia Pacific customers' android and iOS devices under the AP tag.



Follow the below links on how to subscribe tag to push devices by using Event Notifications client SDKs:



* [Android Push Notifications (FCM)](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-push-fcm)
* [iOS Push Notifications (APNs)](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-push-apns)
* [Chrome Push Notifications](https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-push-chrome)
In these cases, the process of "updating to the latest" release is, at a high level, a two step process:



1. Upgrade the Fabric version on all nodes.
2. Update the channels to the new capability levels. For information about how to update channels, see [Capabilities](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-governibp-console-govern-capabilities).



You must upgrade nodes before you update the channels. If a node attempts to read a configuration block containing a capability level it does not understand (which is true in cases where the capability is a higher level than the node version), the node will crash on all channels. The node must then be upgraded to the appropriate Fabric version before it can be used again.

The process of upgrading a node involves two main steps:



1. Backing up the persistent volumes associated with the node. These backups ensure that in the case of an upgrade failure in which the peer pod is corrupted that the node can be re-deployed using the ledger. For more information, see [Backup considerations for each node type](https://cloud.ibm.com/docs/blockchain?topic=blockchain-backup-restorebackup-restore-node-considerations).
2. Upgrading the Fabric versions of the nodes one at a time (also known as a "rolling upgrade").



It may also be necessary to update SDKs and smart contracts before you can take advantage of the latest Fabric features. For more information, check out [Step three: Update SDKs and smart contracts](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-govern-componentsibp-console-govern-components-upgrade-step-three).



 Upgrading nodes from Fabric v1.4 to v2.2 

Use the following recommended procedure to upgrade your Fabric v1.4 peer and orderer nodes to v2.2, regardless of whether you are also migrating your v1.4 chaincode to run on Fabric v2.2. Once on v2.2, you can migrate your nodes to v2.5.