vania-janet/multiturn-rag-retrieval-data huggingface dataset:
: The name of the function. Use a name that is unique within the project.



* The name must begin with a lowercase letter.
* The name must end with a lowercase alphanumeric character.
* The name must be 63 characters or fewer and can contain lowercase letters, numbers, and hyphens (-).



This value is required.

--runtime, -r
: The runtime to use for the function. This value is either a managed runtime identifier or an image reference URL. See [Runtimes](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-runtime). This value is required.

--build-commit, --commit, --bcm, --cm, --revision
: The commit, tag, or branch in the source repository to pull. This value is optional.

--build-context-dir, --context-dir, --bcdr, --cdr
: The directory in the repository that contains the source code for your function. This value is optional.

--build-git-repo-secret, --git-repo-secret, --bgrs, --grs, --repo
: The name of the SSH secret, which contains the credentials to access the private repository that contains the source code to build your container image. To create this SSH secret, use the secret create --format SSH command. An SSH secret is also used as a Git repository access secret. This option is allowed only if the --build-source option is set to the URL of a Git repository. This value is optional.

--build-source, --source, --bsrc, --src
: The URL of the Git repository or the path to local source that contains your source code; for example https://github.com/IBM/CodeEngine or .. This value is optional.

--build-strategy, --strategy, --bstr, --str
--build-source, --source, --bsrc, --src
: The URL of the Git repository or the path to local source that contains your source code; for example https://github.com/IBM/CodeEngine or .. This value is optional.

--build-strategy, --strategy, --bstr, --str
: The strategy to use for building the image. This option is required only if a build strategy must be chosen for a custom runtime. See [Runtimes](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-runtime). This value is optional.

--build-timeout, --bto
: The amount of time, in seconds, that can pass before the build must succeed or fail. This value is optional. The default value is 600.

--code-bundle, --cb
: The name of the code-bundle image that is used for build push of the function. The format is 'REGISTRY/NAMESPACE/REPOSITORY:TAG' where 'REGISTRY' and 'TAG' are optional. If 'REGISTRY' is not specified, the default is 'docker.io'. If 'TAG' is not specified, the default is 'latest'. The code-bundle option is required if the 'build-source' option is not specified. This value is optional.

--code-bundle-secret, --cs, --cbs
: The name of the registry secret that is used to authenticate with a private registry. You can add the registry secret by running the registry create command. This value is optional.

--cpu
: The amount of CPU set for the instance of the function. For valid values, see [Supported memory and CPU combinations](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo). This value is optional. The default value is 0.25.

--env, -e
: Set environment variables in the function.
* Code Engine automatically determines whether your source resides in a repo or on a local workstation, based on the value of the --source option.



The following table summarizes the options that are used with the buildrun submit command in this example. For more information about the command and its options, see the [ibmcloud ce buildrun submit](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-submit) command.



Table 3. Command description

 Option Description 

 --name The name of the build run. Use a name that is unique within the project. This value is required.<br><br><br><br> * The name must begin and end with a lowercase letter.<br> * The name must be 63 characters or fewer and can contain lowercase alphanumeric characters and hyphens (-).<br><br><br> 
 --source The URL of the Git repository or the path to the local source that contains your source code; for example, git@github.com:myprivaterepo/builds.git. 
 --context-dir The directory in the repository that contains the buildpacks file or the Dockerfile. Specify this value if your buildpacks file or Dockerfile is contained in a subdirectory. 
 --strategy The strategy to use for building the image. Valid values are dockerfile and buildpacks. 
 --git-repo-secret The name of the SSH secret, which contains the credentials to access the private repository that contains the source code to build your container image. Run the secret create --ssh command to create this secret. An SSH secret is also used as a Git repository access secret. 



2. Use the buildrun get command to check the status of your build run.

ibmcloud ce buildrun get --name helloworld-buildrun-private

Example output

Getting build run 'helloworld-buildrun-private'...
For more information about configuring security groups and network ACLs, see [Configuring ACLs and security groups for use with VPN](https://cloud.ibm.com/docs/vpc?topic=vpc-acls-security-groups-vpn).
* The traffic source IP is not in any subnet associated with the VPC routing table. For example, the VPC routing table is associated with subnet A and includes a route whose next hop is a VPN connection. However, when the traffic reaches the VPN gateway, the source IP is not in subnet A or any other subnets that are associated with the routing table. Therefore, the VPN gateway drops the traffic.
Form method
: Specify POST.
* In the Form parameters section, list of the key-value pairs of form parameters.

Complete the Key and Value fields, and then click + to add one or more form parameters.





10. Optional: If you are using a proxy server to access the data source server, then in the Proxy settings section, set the Enable proxy settings switch to On. Add values to the following fields:

Username
: The proxy server username to use to authenticate with the proxy server if the proxy server requires authentication.

Password
: The proxy server password to use to authenticate with the proxy server if the proxy server requires authentication.

Proxy server domains
: The domain or domains that the hosts reside in. You can specify a wildcard in this field, such as an asterisk () to crawl all domains or a leading asterisk (.server1.bar.com) to crawl domains that match a pattern.

Proxy server host name or IP address
: The hostname if you want to access the server by using a LAN, or the IP address of the server that you want to use as the proxy server.

Proxy server port number
: The network port that you want to connect to on the proxy server.
11. Optional: Complete the following fields in Advanced Configuration:

Code page to use
: Specify the character encoding of the website pages. If unspecified, the default value of UTF-8 is used.

If you are crawling Chinese websites, specify UTF-8.

URL Path Depth
: The level of site paths to crawl.

For example, if you specify the starting URL of https://www.example.com and a path depth of 4, then the crawler will access the page https://www.example.com/some/more/examples/index.html, which is located at a path that is four levels away from the root URL.

You can enter a positive value only. If unspecified, the default value is 5. The maximum path depth allowed is 20.

Maximum hops
: The number of consecutive links to follow from the start URL.

If unspecified, the default value is 5.
Examples of such workloads are websites, chatbots, and mobile applications. Use [applications](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloads).

Is your computation lightweight and does it require low CPU, memory, and I/O?
: If your workload is lightweight and requires low CPU, memory, and I/O, then the concurrency option, available for applications might be helpful. A typical example is an API Server that provides basic operations and is backed with a NoSQL database. These types of requests typically have a small amount of data and require low memory or fewer CPU cycles. With higher concurrency, the application can process the data of a first request while the second request is waiting for I/O. Because the CPU and memory requirements are low, many requests can be run concurrently. Use [applications](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloads).

Is your computation bound to CPU, memory, or I/O?
: To process a specific amount of data, where each chunk of the data is large and requires a large amount of CPU and memory, jobs are typically the better choice. However, if the workload requires a request-response pattern, it's also possible to use apps. In both cases, the computation task runs with single concurrency. Each application instance or job task processes only one request or chunk of data concurrently to fully leverage the resources that are configured for the instance. Parallelism is achieved by the number of instances or tasks, where the cost of creating an additional task is negligible due to the high resource constraints. A typical example is the processing of image data in a Object Storage bucket or serving machine learning models. Use [applications](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloads) or [jobs](https://cloud.ibm.com/docs/codeengine?topic=codeengine-job-plan).

Does your computation run for a long time?
}
Show more



 Usage examples 

Map assistants from one source instance to assistants in multiple target instances.

The following example maps 2 assistants in 1 source instance to 2 assistants in 2 target instances.

{
"instances": [
{
"source_id": "07079e0a-a8cd-4dc5-b3a4-7879d7cf0a8f",
"target_id": "90876f0b-c98d-fcc9-c4b5-0291a3bd4f9a",
"assistants":
{
"source_id": "081513d5-9858-4eb9-9012-5ce0af8182a6",
"target_id": "f4e5f6d5-3903-486f-8563-416446d8c8a0"
}
]
},
{
"source_id": "07079e0a-a8cd-4dc5-b3a4-7879d7cf0a8f",
"target_id": "79640a7b-45bc-7eea-b4f1-98b55fca6b1c",
"assistants":
{
"source_id": "9645f5d1-f432-4abd-a589-12bc4af5b133",
"target_id": "a4bb579e-e3b5-34bc-afe5-9afc490e8bac"
}
]
}
]
}
Show more
--build-git-repo-secret, --git-repo-secret, --bgrs, --grs, --repo
: The name of the SSH secret, which contains the credentials to access the private repository that contains the source code to build your container image. To create this SSH secret, use the secret create --format SSH command. An SSH secret is also used as a Git repository access secret. This option is allowed only if the --build-source option is set to the URL of a Git repository. This value is optional.

--build-size, --size, --bsz, --sz
: The size for the build, which determines the amount of resources used. Valid values are small, medium, large, xlarge. For details, see [Determining the size of the build](https://cloud.ibm.com/docs/codeengine?topic=codeengine-plan-buildbuild-size). The build size option is allowed only if the --build-source option is set. This value is optional. The default value is medium.

--build-source, --source, --bsrc, --src
: The URL of the Git repository or the path to local source that contains your source code; for example https://github.com/IBM/CodeEngine or .. This value is optional.

--build-strategy, --strategy, --bstr, --str
: The strategy to use for building the image. Valid values are dockerfile and buildpacks. The build strategy option is allowed only if the --build-source option is set. If not specified, the build strategy is determined by Code Engine if --build-source is specified and the source is on your local machine. This value is optional. The default value is dockerfile.

--build-timeout, --bto
: The amount of time, in seconds, that can pass before the build must succeed or fail.
* [Create a Git repository secret to access your source](https://cloud.ibm.com/docs/codeengine?topic=codeengine-code-repositories).





1. Run a build to build an image from a private repository and let Code Engine automatically store and access the image. For example, the following buildrun submit command runs a build run that is called helloworld-buildrun-private that builds from the private Git repo https://github.com/myprivaterepo/builds.

ibmcloud ce buildrun submit --name helloworld-buildrun-private --source git@github.com:myprivaterepo/builds.git --context-dir /hello --strategy buildpacks --git-repo-secret myrepossh



* This example command uses the buildpacks strategy and medium build size.
* By not specifying the location of the image registry or a registry secret, Code Engine pushes the build output to IBM Cloud Container Registry with automatic access.
* Because the source in the specified Git repo is private, access requires an SSH secret. An SSH secret is also used as a Git repository access secret. As a result, the --source that you specify must use the SSH protocol, such as git@github.com:myprivaterepo/builds.git. The value for --source must not use the http or https format.
* Because the branch name of the repository is not specified with the --commit option, Code Engine automatically uses the default branch of the specified repository.
* Code Engine automatically determines whether your source resides in a repo or on a local workstation, based on the value of the --source option.



The following table summarizes the options that are used with the buildrun submit command in this example. For more information about the command and its options, see the [ibmcloud ce buildrun submit](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-submit) command.



Table 3. Command description

 Option Description
In addition, each source_field must be enriched by a unique model. For example, if you want to apply multiple custom models to the source_field of text and you apply the model{watson_knowledge_studio_model_ID} to the entities enrichment, you must not use that model again for the entities enrichment.

"enrichments": [
{
"source_field": "text",
"destination_field": "enriched_text",
"enrichment": "natural_language_understanding",
"options": {
"features": {
"entities": {
"model": "{watson_knowledge_studio_model_ID}"
},
"relations": {
"model": "{watson_knowledge_studio_model_ID}"
}
}
}
},
{
"source_field": "text",
"destination_field": "enriched_text_2",
"enrichment": "natural_language_understanding",
"options": {
"features": {
"entities": {
"model": "{watson_knowledge_studio_model_ID_b}"
},
"relations": {
"model": "{watson_knowledge_studio_model_ID_c}"
}
}
}
}]
Show more







 Integrating your custom model with the Discovery tooling 

You can integrate a Knowledge Studio custom model into the [Entity Extraction](https://cloud.ibm.com/docs/discovery?topic=discovery-configserviceentity-extraction) or [Relation Extraction](https://cloud.ibm.com/docs/discovery?topic=discovery-configservicerelation-extraction) enrichments with the Discovery tooling.

You cannot apply multiple custom models to the same field using the Discovery tooling. It is possible to apply more than one custom model to identical fields using the API.
ESA-6 - Source Code Management 



  Control requirements 

ESA-6 - 0
:   Maintain version control of code repositories related to applications and/or services provided to FSS Cloud customers. The organization limits ‘read-only’ and ‘read-write’ access to only authorized users who have a valid job function/role to access the source code. The organization must be able to reconstruct the operational equivalent of the binaries and configuration running in production. The organization ensures third and fourth parties meet the same source code management requirements stated above.
This option is allowed only if the --build-source option is set to the URL of a Git repository. This value is optional.

--build-source, --source, --bsrc, --src
: The URL of the Git repository or the path to local source that contains your source code; for example https://github.com/IBM/CodeEngine or .. This value is optional.

--build-strategy, --strategy, --bstr, --str
: The strategy to use for building the image. This option is required only if a build strategy must be chosen for a custom runtime. See [Runtime](https://cloud.ibm.com/docs/codeengine?topic=codeengine-fun-runtime). This value is optional.

--build-timeout, --bto
: The amount of time, in seconds, that can pass before the build must succeed or fail. This value is optional. The default value is 600.

--code-bundle, --cb
: The name of the code-bundle image that is used for build push of the function. The format is REGISTRY/NAMESPACE/REPOSITORY:TAG where REGISTRY and TAG are optional. If REGISTRY is not specified, the default is docker.io. If TAG is not specified, the default is latest. This value is optional.

--code-bundle-secret, --cs, --cbs
: The name of the registry secret that is used to authenticate with a private registry. You can add the registry secret by running the registry create command. This value is optional.

--cpu
: The amount of CPU set for the instance of the function. For valid values see [Supported memory and CPU combinations](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo). This value is optional. The default value is 0.25.

--env, -e
: Set environment variables in the function. Must be in NAME=VALUE format.
source_share = ibm_is_share.example.id
name = "my-replica1"
profile = "tier-3iops"
replication_cron_spec = "0 /5 * * "
}

For more information about the arguments and attributes, see [ibm_is_share](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/is_share).





 Next steps 



* [Manage replication](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-manage-replication).
* [Fail over to the replica site](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-failover).
Use jsonpath to specify the path to an element of the JSON output. This value is optional.

--quiet, -q
: Specify this option to reduce the output of the command. This value is optional. The default value is false.

--registry-secret, --rs
: The name of the registry secret. The registry secret is used to authenticate with a private registry when you download the container image. This value is optional.

--size, --sz
: The size for the build, which determines the amount of resources used. Valid values are small, medium, large, xlarge. For details, see [Determining the size of the build](https://cloud.ibm.com/docs/codeengine?topic=codeengine-plan-buildbuild-size). This value is optional.

--source, --src
: The URL of the Git repository that contains your source code; for example https://github.com/IBM/CodeEngine. This value is optional.

--strategy, --str
: The strategy to use for building the image. Valid values are dockerfile and buildpacks. This value is optional.

--timeout, --to
: The amount of time, in seconds, that can pass before the build must succeed or fail. This value is optional. The default value is 600.





 Example 

ibmcloud ce build update --name helloworld-build --source https://github.com/IBM/CodeEngine --context-dir /hello --commit main --timeout 900





 Example output 

Updating build helloworld-build...
OK









 Buildrun commands 

A build, or image build, is a mechanism that you can use to create a container image from your source code. Code Engine supports building from a Dockerfile and Cloud Native Buildpacks. Use buildrun commands to submit, display details, and delete build runs.
A valid value for the cursor can be obtained from the cursors object in the result_info structure.--country: The 2-digit country code in which the request originated. For example, US.--since: Start date and time of requesting data period in the ISO8601 format. Can't go back more than a year. For example, 2016-11-11T12:00:00Z.--until: End date and time of requesting data period in the ISO8601 format. For example, 2016-11-11T12:00:00Z.--source: Source of the event. Valid values: unknown, asn, country, ip, ipRange, securityLevel, zoneLockdown, waf, uaBlock, rateLimit, firewallRules, bic, hot, l7ddos.--limit: The number of events to return. The cursor attribute may be used to iterate over the next batch of events, if there are more events in the queried time range. Note that the scanned_range parameter in the result_info structure gives an indication of when events were considered in the current resultset if a limit was applied. Valid values are from 10 to 1000. Default value: 50.--rule-id: The ID of the rule that triggered the event, should be considered in the context of source.-i, --instance: Instance name or ID. If not set, the context instance specified by ibmcloud cis instance-set INSTANCE is used.--output: Specify output format, only JSON is supported.<-- </section "id="section-list-security-event-options" "> --><-- <section "id="section-list-security-event-examples" "> --> Examples Get security events for domain 31984fea73a15b45779fa0df4ef62f9b. ibmcloud cis security-events 31984fea73a15b45779fa0df4ef62f9b --action challenge --colo SJC --country US --host "www.example.com" --ip-class clean
When you create an application, consider using an API key with the role Reader for all calls to GET API methods. The Reader role can't perform any destructive or additive functions to the service instance.
* Do not embed the API key directly in code. API keys that are embedded in code might be exposed to your users. Instead of embedding the API keys in your application code, consider storing them either in environment variables or in files outside of your source code control system.
* 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.









 Exchange the API key for an IBM Cloud IAM access token 

To exchange your API key for an IAM access token, use the following command:

curl -X POST 
"https://iam.cloud.ibm.com/identity/token" 
--header 'Content-Type: application/x-www-form-urlencoded' 
--header 'Accept: application/json' 
--data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' 
--data-urlencode 'apikey={api_key}'

where {api_key} is the value of your API key. The response looks like the following example:

{"access_token":"[_access-token-value_]","refresh_token":"not_supported","token_type":"Bearer","expires_in":3600,"expiration":1615370557,"scope":"ibm openid"}
// any IDs can be used to determine asset origin, see example
[index: string]: string;
},
details: Record<string, string>,

// Assets can relate to each other, for example
// an Image Asset can relate to the Git Commit Asset
// it was built from on code level
related: SHA256[];
}

Show more



 Example 



 Example v2 Asset 

{
"version": "1",
"id": "cdd3ee20188d2f5bfb7f14bdb9c7fa99b22184ca195d9fa0a953dfbe9b1769cb",
"uri": "https://github.ibm.com/cocoa-test/e2e-hello-compliance-app-20220412084808399.git8c2a65373cb4fd27bccff646e8bdf63d02cae856",
"origin": {
"toolchain_crn": "crn:v1:bluemix:public:toolchain:us-south:a/40111714589c4f7099032529b26a7a63:fd3f2bf6-00f1-417f-b1a2-7df894223115::",
"pipeline_run_id": "a5e89ecc-a413-4dcb-b129-ff870ef3be85",
"pipeline_id": "66b583d9-3d1b-4b34-9e3a-cb807bf0c5ab"
},
"details": {
"sha": "8c2a65373cb4fd27bccff646e8bdf63d02cae856",