vania-janet/multiturn-rag-retrieval-data huggingface dataset:
target-s3-creds S3 credentials of target location target-s3-creds:<TARGET_S3_CREDS> 
 ingestion-engine-endpoint Endpoint of ingestion engine. hostname=<hostname>,port=<port> ingestion-engine-endpoint:<INGESTION_ENGINE_ENDPOINT> 
 dbuser Username of ingestion engine dbuser:<DBUSER> 
 dbpassword User password of ingestion engine dbpassword:<DBPASSWORD> 
 trust-store-path Path of truststore to access ingestion engine trust-store-path:<TRUST_STORE_PATH> 
 trust-store-password Password of truststore to access ingestion engine trust-store-password:<TRUST_STORE_PASSWORD> 
 create-if-not-exist Create target table if not existed create-if-not-exist 







 Schema file specification 

The schema parameter points to the schema file. The schema file can be used to specify CSV file properties such as field delimiter, line delimiter, escape character, encoding and whether header exists in CSV file.

Following is the schema file specification:

[CSV]
DELIMITER:<delim> default '|'

LINE_DELIMITER:
A single char delimiter other than ' '(blank), need not be enclosed in quotes
Must be enclosed in quotes if it is one of: 'n' for newline, 't' for TAB, ' ' for space
LINE_DELIMITER:<line_delim> default 'n'

HEADER:<true|false> default 'true'

single character value
ESCAPECHAR:<escape_char> default '\'

Example encodings:
utf-8, cp1252, iso-88509-1, latin1 etc
ENCODING:<encoding> default None
Show more

Following is an example of schema specification:

Example:

$ more /tmp/schema.cfg
[CSV]
DELIMITER:,
HEADER:false
LINE_DELIMITER:'n'
In the Responses section, change the SCHEMA to Current.

![path-current-responses.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/path-current-responses.png)

e. Save your API.
15. Repeat the process in step 11 to create another path named "/today". In this case, set the Responses schema to Today. Save your API.
16. Save your API.
17. Click the Assemble tab. You created two operations so far: GET /current and GET /today. To ensure that the correct target endpoint is invoked, create some logic that executes a conditional on the operation that's being called. Let's use the Operation Switch logic construct to do this. The Operation Switch provides a decision point. Based on the verb and path pair, the appropriate operation needs to be invoked.

a. If the canvas displays a default invoke policy, delete the policy now.
b. From the palette, drag the Operation Switch and drop it on the canvas.



* To case 0, assign the get /current operation.
* Add a new Case: case 1.
* Assign the get /today operation to case 1.



![new-assemble-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/new-assemble-1.png)

c. Drag the invoke policy from the palette and drop it on the processing line beneath get /current. The invoke action is used to call an existing service from within an operation.
d. Update the action title to "invoke-current".
e.
Copy the content of the state file from your command-line output in to a file on your local machine that is named terraform.tfstate. 3. Use the relative path to the file in the --state command parameter. 
 --github-token or -g Optional Enter the functional personal access tokens for HTTPS Git operations. For example, --github-token ${FUNCTIONAL_GIT_KEY}. 
 --agent-id or --aid Optional New ID of the Agent to bind your new workspace. Agents help you to run your workspace jobs on your infrastructure. For more information, see [Schematics Agents](https://cloud.ibm.com/docs/schematics?topic=schematics-agents-intro). 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 
 --json or -j Deprecated Prints the output in the JSON format. 



The Schematics ibmcloud terraform command usage displays warning and deprecation message as Alias 'terraform' will be deprecated. Use 'schematics' or 'sch' in your commands.



 Create file template in JSON format 

Schematics supports to download the Terraform modules template from the private repository. For more information, see [Supporting to download modules from private remote host](https://cloud.ibm.com/docs/schematics?topic=schematics-download-modules-pvt-git).

You can create the JSON file as shared in the example.json file for workspace creation and pass the file path along with the file name in --file flag. The description of all the parameters of example.json as described in the table.

You need to replace the <...> placeholders with the actual values. For example, "<workspace_name>" as "testworkspace".

example.json:

{
"name": "<workspace_name>",
"type": [
"<terraform_version>"
],
"created_at": "2023-03-16T18:08:18.39924616Z",
"creation_by": "geetha_sathyamurthy@in.ibm.com",
"updated_at": "0001-01-01T00:00:00Z",
"system_state": {
"status_code": "draft"
},
"agent_kpi": {}
}

Now, call the agent deploy API with the agent ID to create the Schematics workspace that will deploy the agent. The agent deploy operation, invokes both the agent plan, and agent apply operations to setup the agent.

Syntax

PUT /v2/agents/<enter your agentID>/deploy HTTP/1.1
Host: schematics.cloud.ibm.com
Content-Type: application/json
Authorization: Bearer

Example

PUT /v2/agents/agentb1-gsmforvpc-mar17.soA.115c/deploy HTTP/1.1
Host: schematics.cloud.ibm.com
Content-Type: application/json
Authorization: Bearer

Output

{
"workspace_id": "eu-de.workspace.agentb1-gsmforvpc-mar17-deploy.13a324df",
"job_id": ".ACTIVITY.7f40fdc0",
"updated_at": "2023-03-16T18:13:27.217864196Z",
"updated_by": "geetha_sathyamurthy@in.ibm.com",
"status_code": "PENDING",
"status_message": "Triggered deployment"
}





 Next steps 

The next step is to [create an agent assignment policy](https://cloud.ibm.com/docs/schematics?topic=schematics-policy-manage) for the newly deployed agent.
ibmcloud schematics workspace update --id WORKSPACE_ID --file FILE_NAME [--github-token GITHUB_TOKEN]

To provision or modify IBM Cloud resources, you can run the command ibmcloud schematics plan command. For more information, see the [IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/hpc-slurm?topic=schematics-schematics-cli-referenceschematics-plan) reference.







 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-generate-plan&interface=cli) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics API](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-setting-up-api&interface=cli).





 Creating a workspace using the API 



1. To create a workspace by using the IBM Cloud Schematics Python APIs, create a Python file and provide a name of your choice, for example, schematics_create_workspace.py.
2. Copy and paste the [Create a Schematics workspace using Python API](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-creating-workspace&interface=apiexample-request-create) example request to your Python file.
3. Change the following parameters as part of the request:



* Replace your IBM Cloud API key to the authenticator = IAMAuthenticator('<ibm-api-key>') variable.
You can provide a payload file to specify certain parameters for the job run command. Then, you pass the file name to the command by using the --file command option.

You need to replace the <...> placeholders with the actual values. For example, "<COMMAND_OBJECT>" as "action".

Syntax

{
"command_object": "<COMMAND_OBJECT>",
"command_object_id": "<COMMAND_OBJECT_ID>",
"command_name": "<COMMAND_NAME>",
"command_parameter": "<PLAYBOOK_NAME>"
}

Example

{
"command_object": "action",
"command_object_id": "us-east.ACTION.Example-11110000011",
"command_name": "ansible_playbook_check",
"command_parameter": "site.yml"
}

ibmcloud schematics job run --file sample.json





 Using the interactive mode 

Instead of entering your job details by using command options or a payload file, you can use the interactive mode for the command. This mode prompts you to enter the required values to create a job in Schematics.



1. Enter the command to create the job without any command options.

ibmcloud schematics job run
2. When prompted to Enter command-object>, enter action and press the return key.
3. When prompted to Enter command-object-id>, enter the action ID details and press the return key.
4. When prompted to Enter command-name>, enter ansible_playbook_run or ansible_playbook_check, and press the return key.
5. Review the CLI output for the job that was created for you.









 ibmcloud schematics job update 

Create a job by copying the settings of an existing job, and run the job in IBM Cloud Schematics.

Syntax

ibmcloud schematics job update --id JOB_ID [--output OUTPUT] [--no-prompt] [--json]
9. From the Summary pane on the right side of the screen, verify the configuration and estimated cost.
10. After having read and agreed to the third-party service agreements, click on Create.



While waiting for the instance to create, proceed to review the Terraform template section of this tutorial and come back to perform access steps below once the instance is available.





 Access the IBM Cloud for VMware Solutions Shared Instance 



1. Navigate to the [IBM Cloud for VMware Solutions Shared](https://cloud.ibm.com/infrastructure/vmware-solutions/console/instances/vdc) page.
2. Click on the IBM Cloud for VMware Solutions Site, for example Dallas Director 01.
3. Click on Reset site admin password, and copy the password (vcd_password) for the admin user (vcd_user) when it is presented on the screen.
4. With your password created, click on the vCloud Director console button found on the top right of the page and login with your credentials.
5. Note the tabs at the top and click Networking then click the Edge Gateways category. Take note of the name of the edge gateway (vdc_edge_gateway_name).
6. Click on the radio button next to the edge gateway name, at the top of the page, click on Enable Distributed Routing. You can proceed to the next steps, however come back to confirm the status of distributed routing is enabled prior to running the [Terraform plan](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vmware-solutions-shared-getting-startedvmware-solutions-shared-getting-started-create-schematics).
7. Change to Administration from the main toolbar. Click on General under the Settings category and take note of the Organization name. It is your virtual cloud director organization name below (vcd_org).





Table 1. Use the following table to confirm that you have all of the information you will need for use later on.

 Name Description Default 

 vcd_user vCloud Director username admin
Automate your setup with templates that use [IBM Cloud® Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-getting-started) to create a Satellite location, provision hosts in a cloud provider, and set up the Satellite location control plane for you.

To create a location that is enabled for Red Hat CoreOS, you must create your location [manually](https://cloud.ibm.com/docs/satellite?topic=satellite-locationslocation-create-manual).

Do not reuse the same name for multiple locations, even after the other location is deleted. If you use the same name 5 times or more within 7 days, you might reach the Let's Encrypt [Duplicate Certificate rate limit](https://cloud.ibm.com/docs/openshift?topic=openshift-cs_rate_limit).

For IBM Cloud Satellite to perform actions on your behalf in a cloud provider, you must provide credentials to the cloud provider. The credentials that you provide are stored and encrypted in etcd of the Satellite location control plane master. For more information, see [Securing your data](https://cloud.ibm.com/docs/satellite?topic=satellite-data-security).

You can set up Satellite locations with a Schematics template for the following cloud providers.



* [AWS](https://cloud.ibm.com/docs/satellite?topic=satellite-awsaws-template)
* [Azure](https://cloud.ibm.com/docs/satellite?topic=satellite-azureazure-template)
* [GCP](https://cloud.ibm.com/docs/satellite?topic=satellite-gcpgcp-template)



If you are using this template for demonstration purposes, do not assign all your hosts to your control plane. Hosts that are assigned to the control plane cannot be used for other purposes, such as worker nodes for your cluster. For more information, see [Understanding Satellite locations](https://cloud.ibm.com/docs/satellite?topic=satellite-location-host).

What's next?
1. Run a workspace create command.

curl -X POST https://schematics.cloud.ibm.com/v1/workspaces -H 'authorization: <auth> -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{
"name": "smulampa-schematics-agent-infra-workspace",
"type": [
"terraform_v1.0"
],
"description": "schematics agents infra workspace",
"template_repo": {
"url": ""
},
"template_data": [{
"folder": ".",
"type": "terraform_v1.0",
"variablestore": {
"name": "agent_prefix",
"type": "string",
"value": "myproject-agent"
},
{
"name": "location",
"type": "string",
"value": "us-south"
},
{
"name": "resource_group_name",
"type": "string",
"value": "Default"
}
]
}]
}'
2. Run [workspace get](https://cloud.ibm.com/apidocs/schematics/schematicsget-workspace) to record the workspace ID.

curl -X GET https://schematics.cloud.ibm.com/v1/workspaces/ -H 'authorization: <auth> -H 'cache-control: no-cache'
3. Run [workspace upload](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-workspace-upload) to upload a agent-infrastructure-templates.tar file that contains the blueprint template, inputs details.
Creating per-schema rules requires at least:



* Reader role access to the Event Streams cluster resource type.
* Manager role access to the schema resource for which the rule applies.



An activity tracker event is generated to report the action. For more information, see [Activity Tracker events](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-at_eventsevents).





 Getting a per-schema rule 

To retrieve the current value of a type of rule that is applied to a specific schema, a GET request is made to the /artifacts/{schema-id}/rules/{rule-type} endpoint (where {schema-id} is the ID of the schema, and {rule-type} is the type of global rule to be retrieved - currently the only supported type is COMPATIBILITY). If the request is successful, the current rule value is returned in the payload of the response, together with a status code of 200 (OK).

Example curl request:

curl -u token:$APIKEY $URL/artifacts/my-schema/rules/COMPATIBILITY

Example response:

{"type":"COMPATIBILITY","config":"FORWARD"}

Getting per-schema rules requires at least:



* Reader role access to the Event Streams cluster resource type.
* Reader role access to the schema resource to which the rule applies.







 Updating a per-schema rule 

The rules applied to a specific schema are modified by making a PUT request to the /artifacts/{schema-id}/rules/{rule-type} endpoint (where {schema-id} is the ID of the schema, and {rule-type} is the type of global rule to be retrieved - currently the only supported type is COMPATIBILITY). If the request is successful, the newly updated rule config is returned in the payload of the response, together with a status code of 200 (OK).

Example curl request:

curl -u token:$APIKEY -X PUT $URL/artifacts/my-schema/rules/COMPATIBILITY -d '{"type":"COMPATIBILITY","config":"BACKWARD"}'

Example response:
You cannot create multiple Virtual Private Endpoint Gateways for the same Schematics instance.

The steps to add the private network endpoints for Schematics:



1. Create a Schematics Workspace. For more information, see [creating a workspace](https://cloud.ibm.com/docs/schematics?topic=schematics-sch-create-wks&interface=uicreate-wks-ui).
2. Optionally, you can deploy a resource instance into Schematics Workspace. For more information, see [deploying your resource](https://cloud.ibm.com/docs/schematics?topic=schematics-manage-lifecycledeploy-resources).
3. Create a Virtual Private Endpoint Gateways. For more information, see [creating an endpoint gateway](https://cloud.ibm.com/docs/vpc?topic=vpc-ordering-endpoint-gatewayvpe-creating-ui). And you can assign the listed Schematics services endpoint into Virtual Private Endpoint Gateways.
4. View the created Virtual Private Endpoint Gateways associated with the Schematics services. For more information, see [Viewing details of an endpoint gateway](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-viewing-details-of-an-endpoint-gateway).
Creating an auto deploy button for Schematics Actions 

Use the instructions to create a button that opens the Schematics Actions create page and pre-populates an action name and the GitHub repository URL that stores your Ansible playbook. You can use the button to create Schematics Actions more quickly.

For a sample button, see the Deploy to IBM Cloud® button on the [Sample Ansible playbook for IBM Cloud](https://cloud.ibm.com/docs/schematics?topic=schematics-sample_actiontemplates) page.



 Creating the deployment URL 



1. Create an Ansible playbook and publish the playbook in a GitHub repository. If you do not have a playbook, you can use one of the [IBM-provided Ansible playbooks](https://github.com/Cloud-Schematics/?q=Ansible&type=&language=&sort=).
2. Copy the Git repository URL, such as https://github.com/Cloud-Schematics/ansible-app-deploy.
3. Use the following syntax to create the URL to automatically pre-populate an action name and the Git repository URL on the Schematics Actions create page. If you do not provide the name and Git repository URL, the Deploy to IBM Cloud link defaults to the Create an action page without pre-populating an action name or the Git repository URL.

Syntax

https://cloud.ibm.com/schematics/actions/create?name=<action_name>&repository=<git_repository_url>

Example

https://cloud.ibm.com/schematics/actions/create?name=ansible-app-deploy&repository=https://github.com/Cloud-Schematics/ansible-app-deploy
4. Open your web browser and enter the URL.
5. Verify that the Schematics Actions create page opens and that the Action name and Repository URL are pre-populated.







 Adding the button to a website or page
ibmcloud schematics workspace update --id WORKSPACE_ID --file FILE_NAME [--github-token GITHUB_TOKEN]

To provision or modify IBM Cloud resources, you can run the command ibmcloud schematics plan command. For more information, see the [IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/hpc-openshift?topic=schematics-schematics-cli-referenceschematics-plan) reference.







 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/hpc-openshift?topic=hpc-openshift-generate-plan&interface=cli) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics API](https://cloud.ibm.com/docs/hpc-openshift?topic=hpc-openshift-setting-up-api).





 Creating a workspace using the API 



1. To create a workspace by using the IBM Cloud Schematics Python APIs, create a Python file and provide a name of your choice, for example, schematics_create_workspace.py.
2. Copy and paste the [Create a Schematics workspace using Python API](https://cloud.ibm.com/docs/hpc-openshift?topic=hpc-openshift-creating-workspace&interface=apiexample-request-create) example request to your Python file.
3. Change the following parameters as part of the request:



* Replace your IBM Cloud API key to the authenticator = IAMAuthenticator('<ibm-api-key>') variable.
Observe IBM Cloud is specified in Select your deployment target and Terraform Version 1.0.7 or Terraform Version 2.0.0 is displayed in Select a delivery method.
2. In the Configure your workspace section, enter Name for your Schematics Workspace, select your Resource group, and the Location where you want to create the workspace.
3. Check Override default Terraform version to configure the template to support your Terraform version.
4. In the Set the deployment values section, enter the following information.



* Click Yes toggle button to enter value for admin-password as user123, and db-user-password as user123 that you want to use to log in to your PostgreSQL instance.

The admin-password and db-user-password must be between 10 and 32 characters long and do not support any special characters.
* Enter the iaas_classic_username as <your classic_username> that you retrieved earlier. For more information about how to retrieve this information, see [Creating a classic infrastructure API key](https://cloud.ibm.com/docs/account?topic=account-classic_keyscreate-classic-infrastructure-key).
* Select the resource group where you want to provision your virtual server and PostgresSQL instance.



5. Accept the license agreement, and click Install. You are redirected to the Schematics Workspaces Activity page where you can monitor the progress of your VSI and PostgreSQL setup. Note that it takes a few minutes for the setup to complete.
6. Verify your virtual server and PostgreSQL setup.



* From the workspace Resources page, find the virtual server and PostgreSQL instance that were created for you.
* Click the link to see the details of your instances.



7. Optional: Remove your Schematics Workspaces and all related IBM Cloud resources.



* Select the Actions drop down list, click Delete.
* Select the Delete workspace and Delete all associated resources option.
* Enter the name of your workspace, and click Delete.
Creating blueprints via the CLI using a config file 

Alternative to creating a blueprint via the CLI using parameters and flags, a JSON config file can be provided to pass blueprint create API parameters directly. This is a direct interface via the API and the JSON file format is not guaranteed to remain compatible on API changes. Use the CLI With parameters and flags if long term compatibility is required. The CLI -input-file parameter provides an alternative way to pass complex input values as a YAML file and will retain long term compatibility.

The blueprint config is created from a user provided configuration supplied as a JSON file that specifies the source of the blueprint template in a Git repository, the source of any input files and optional dynamic or override inputs. The file operation passes the configuration directly to the Schematics API and uses the API parameter definitions. The definition of the config file uses the [Schematics API payload](https://cloud.ibm.com/apidocs/schematics/schematicscreate-blueprint), which differs from to the schematics blueprint create CLI syntax.



 Using a config file 

Alternative to use command line parameters, you can provide a config JSON file to specify the parameters for the blueprint create. Pass the file name to the command by using the --file command option. This approach supports passing complex input variables at create time.

Syntax to create using command with the config file option:

ibmcloud schematics blueprint create --file CONFIG_FILE_PATH [--output OUTPUT]

Example

ibmcloud schematics blueprint create -file config.json

Output:

Created blueprint ID: Blueprint-Basic.eaB.b5f7

Modules to be created
SNO Module Type Name
1 Workspace basic-resource-group
2 Workspace basic-cos-storage

Blueprint job us-east.JOB.Blueprint-Basic.a5013d5b started at 2022-12-21 12:54:50

Module job execution status
Waiting:0 In Progress:0 Success:2 Failed:0