vania-janet/multiturn-rag-retrieval-data huggingface dataset:
},
"connection_limit": 2000,
"port": 443,
"protocol": "https",
"policies":
{
"name": "hostname_header",
"action": "redirect",
"priority": 1,
"target": {
"url": "https://www.examples.com/",
"http_status_code": 307
},
"rules":
{
"condition": "contains",
"type": "header",
"field": "aheader",
"value": "avalue"
},
{
"condition": "equals",
"type": "hostname",
"value": "abc.com"
}
]
},
{
"name": "header_cookie",
"action": "redirect",
"priority": 5,
"target": {
"url": "https://www.mycookies.com/",
"http_status_code": 302
},
"rules":
{
"condition": "contains",
"type": "header",
"field": "aheader",
"value": "avalue"
},
{
"condition": "equals",
"type": "header",
"field": "cookie",
"value": "flavor=oatmeal"
}
]
},
{
"name": "path_hostname",
"action": "redirect",
"priority": 10,
"target": {
"url": "https://www.myexamples.com/",
"http_status_code": 301
},
"rules":
{
"condition": "contains",
"id": "1a15dca5-7e33-45e1-b7c5-bc690e569531",
"base_connection_id": "975f58c1-afe7-469a-9727-7f3d720f2d32",
"created_at": "2022-02-10T14:52:54.918Z",
"local_bgp_asn": 64490,
"local_gateway_ip": "192.168.100.1",
"local_tunnel_ip": "192.168.129.2",
"mtu": 9000,
"network_account_id": "28e4d90ac7504be694471ee66e70d0d5",
"prefix_filters": [
{
"action": "permit",
"before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
"created_at": "2022-02-10T14:52:54.918Z",
"ge": 0,
"id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
"le": 32,
"prefix": "192.168.100.0/24",
"updated_at": "2022-02-10T14:52:54.918Z"
}
],
"prefix_filters_default": "permit",
"remote_bgp_asn": 65010,
"remote_gateway_ip": "10.242.63.12",
"remote_tunnel_ip": "192.168.129.1",
"request_status": "pending",
"status": "attached",
"updated_at": "2022-02-10T14:52:54.918Z",
GET /v1/{crn}/zones/{domain_id}/setting/ip_geolocation internet-svcs.zones.read internet-svcs.ip-geolocation-setting.read 
 Update IP geolocation settings. PUT /v1/{crn}/zones/{domain_id}/setting/ip_geolocation internet-svcs.zones.update internet-svcs.ip-geolocation-setting.update 
 Get server side exclude settings. GET /v1/{crn}/zones/{domain_id}/setting/server_side_exclude internet-svcs.security.read internet-svcs.server-side-exclude-setting.read 
 Update server-side exclude settings. PUT /v1/{crn}/zones/{domain_id}/setting/server_side_exclude internet-svcs.security.update internet-svcs.server-side-exclude-setting.update 
 Get security header settings. GET /v1/{crn}/zones/{domain_id}/setting/security_header internet-svcs.security.read internet-svcs.security-header-setting.read 
 Update security header settings. PUT /v1/{crn}/zones/{domain_id}/setting/security_header internet-svcs.security.update internet-svcs.security-header-setting.update 
 Get mobile redirect settings. GET /v1/{crn}/zones/{domain_id}/setting/mobile_redirect internet-svcs.performance.read internet-svcs.mobile-redirect-setting.read 
 Update mobile redirect settings. PUT /v1/{crn}/zones/{domain_id}/setting/mobile_redirect internet-svcs.performance.update internet-svcs.mobile-redirect-setting.update 
 Get prefetch / preload settings. GET /v1/{crn}/zones/{domain_id}/setting/prefetch_preload internet-svcs.performance.read internet-svcs.prefetch-preload-setting.read
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="s2202bbbbafa9d270d1c15990b738f4ab36139d463" InResponseTo="_e4a78780-35da-012e-8ea7-0050569200d8" Version="2.0" IssueInstant="2011-03-21T11:22:02Z" Destination="https://example.example.com/">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">idp_entityId</saml:Issuer>
<samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<samlp:StatusCode xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0" ID="pfx539c9774-de5c-5f52-0c3f-b1c2e2697a89" IssueInstant="2018-01-29T13:02:58Z" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer>idp_entityId</saml:Issuer>
Pausing and resuming 

On the Workload patterns page, you can initiate, edit or delete your Pause/resume operations and check their History.



  Initiating on demand pause 



1.  Go to Workload patterns.
2.  Click Pause/resume.
3.  Type the name for your pause operation.
4.  Click Pause and Confirm.







  Initiating on demand resume 



1.  Go to Workload patterns.
2.  Click Pause/resume.
3.  Type the name for your resume operation.
4.  Click Resume and Confirm.







  Scheduling pause 



1.  Go to Workload patterns.
2.  Click Pause/resume.
3.  Type the name for your pause operation.
4.  Select the Schedule for a later time checkbox.
5.  Click the Pause radio button.
6.  Select the required parameters.
7.  Click Schedule pause and Confirm.







  Scheduling resume 



1.  Go to Workload patterns.
2.  Click Pause/resume.
3.  Type the name for your pause operation.
4.  Select the Schedule for a later time checkbox.
5.  Click the Resume radio button.
6.  Select the required parameters.
7.  Click Schedule resume and Confirm.







  Editing scheduled pause or resume 



1.  Go to Workload patterns > Schedules.
2.  Select the operation that you want to edit.
3.  Click Edit.
4.  Select the required parameters.
5.  Click Save.







  Deleting scheduled pause or resume 



1.  Go to Workload patterns > Schedules.
2.  Select the operation that you want to delete.
3.  Click Delete.
4.  Click Delete.







  Checking pause or resume history 



1.  Go to Workload patterns > History.
2.  Depending on your requirements, perform one of the following actions:



*  Filter by Time completed or Owner.
*  In Find history, type the name of the operation.









  Auto-pausing and auto-resuming 

On the Workload patterns page, you can enable or disable your Auto pause operations and check their History.





  Enabling auto-pause 



1.  Go to Workload patterns.
2.  Click Pause/resume.
3.  Type the name for your auto-pause operation.
4.  Select the Auto pause checkbox.
5.  Click Confirm.







  Disabling auto-pause 



1.  Go to Workload patterns.







  Checking auto-pause history 



1.  Go to Workload patterns > History.
2.  Depending on your requirements, perform one of the following actions:



*  Filter by Time completed or Owner.
*  In Find history, type the name of the operation.
If your on-premises destination is located behind a SOCKS proxy, you can configure the proxy settings for your destination in the Proxy Options panel. ![Proxy Options Panel](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/proxyOptions.png?raw=true)

To configure the proxy settings, you only need to provide the hostname and port that the proxy is listening on as well as the SOCKS protocol that is being used (4, 4a, 5).





 Configuring Miscellaneous options 

![Miscellaneous Options panel](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/miscellaneousOptions.png?raw=true)

To compress the data flowing through the wss connection between Secure Gateway Server and Secure Gateway Client, check the box Enable Compression from the Miscellaneous Options panel.

Connection Timeout is default to 0, which mean disable the connection timeout. To enable the connection timeout, edit the text field with the number of seconds you would like the connection timeout be (minimum 1, maximum 180).

The session TTL of our firewall is 3600 seconds. If the connection between the cloud application and the Secure Gateway Server hangs (no data flowing) over than 3600 seconds, our firewall will drop the connection even if the Connection Timeout is disabled. In this case, you can enable the TCP keep-alive on the cloud application, to keep the connections alive.





 Destination Settings 

Once your destination has been created, click the settings icon ![Setting Icon](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/settingIcon.png?raw=true) to see the following information:

!
In the Washington DC (us-east) region, the following network addresses are in use:

169.60.80.160/27
169.60.82.128/26
169.60.84.128/25
169.61.82.224/27
169.61.87.128/25
169.61.87.64/26
169.63.78.192/26
169.63.80.128/25
169.63.83.0/24
52.116.125.68/32
169.59.191.31/32
150.239.226.24/32

In the London (eu-gb) region, the following network addresses are in use:

141.125.69.128/25
141.125.69.64/27
141.125.76.64/26
158.175.103.128/25
158.175.120.160/27
158.175.85.64/26
158.176.68.64/26
158.176.84.128/27
158.176.87.0/25
161.156.196.171/32
141.125.163.176/32
158.176.169.175/32

In the Frankfurt (eu-de) region, the following network addresses are in use:

149.81.126.96/27
149.81.69.192/26
159.122.74.216/29
159.122.84.160/27
161.156.69.0/27
161.156.72.64/26
169.50.23.96/27
169.50.24.160/27
169.50.39.128/27
169.50.40.128/27
169.50.44.128/26
158.177.8.42/32
161.156.160.242/32
149.81.217.78/32

In the Sydney (au-syd) region, the following network addresses are in use:

130.198.71.64/27
If it is expensive or impractical to provide a total_count value, the total_count field MAY be omitted.





 Example offset and limit pagination response 

{
"offset": 100,
"limit": 50,
"total_count": 232,
"first": {
"href": "http://api.example.com/v2/accounts?limit=50"
},
"last": {
"href": "http://api.example.com/v2/accounts?offset=200&limit=50"
},
"previous": {
"href": "http://api.example.com/v2/accounts?offset=50&limit=50"
},
"next": {
"href": "http://api.example.com/v2/accounts?offset=150&limit=50"
},
"accounts": [
...
]
}
Show more
pattern ^crn:v[0-9](:([!A-Za-z0-9-._$&'()+,;=@/] %[0-9A-Z]{2})){8}$ pattern SHOULD be present. 







 Request formats 

For requests, a CRN field MUST have a documented maximum length of 512 characters. A CRN field MUST have a permissible character set limited to printable ASCII and SHOULD have a documented regular expression pattern which CRNs are required to match.

Length, character set, and pattern constraints MUST be checked prior to any other processing of CRNs included in requests. Failure to match constraints MUST cause the entire request to fail with a 400 status code and appropriate error response model.

In request bodies and query parameters, CRN values SHOULD be matched case-sensitively.



Schema guidance for CRNs in requests

 Constraint Recommended value Description 

 type string type MUST be string. 
 format crn format MUST be crn. 
 minLength 9 minLength MUST be present. 
 maxLength 512 maxLength MUST be present. 
 pattern ^crn:v[0-9](:([!A-Za-z0-9-._$&'()+,;=@/] %[0-9A-Z]{2})){8}$ pattern MUST be present. 









 Enumeration 

Enumerations are a category of types for specified sets of string values. Each individual enumeration type is defined by the set of valid string values. For example, a model might define a color enumeration allowing only the values red, blue, and green. Consequently, a field of the color enumeration type could only contain one of those three values.



 Response format 

An enumeration value MUST be a member of the set of values defined for a particular enumeration type. These values MUST be lower snake case strings and MUST begin with a letter and not a number.

In a response body, an enumeration field MUST be required. If the property is inapplicable to certain states of the resource, this MUST be represented by an explicit value, such as inapplicable.
169.50.24.160/27
169.50.39.128/27
169.50.40.128/27
169.50.44.128/26
158.177.8.42/32
161.156.160.242/32
149.81.217.78/32

In the Sydney (au-syd) region, the following network addresses are in use:

130.198.71.64/27
130.198.80.64/26
130.198.81.128/25
135.90.65.64/26
135.90.70.0/27
168.1.40.64/27
168.1.40.96/27
168.1.44.64/27
168.1.45.0/27
168.1.45.64/27
168.1.45.96/27
168.1.8.32/27
159.23.95.148/32
135.90.129.108/32
130.198.18.239/32
Exceeding the connection limit for your deployment will negatively affect the health of your database and cause it to be unreachable by your applications. After the connection limit is reached, any attempts at starting a new connection result in an error.

FATAL: remaining connection slots are reserved for
non-replication superuser connections

You can access information about connections to your deployment with the admin user, mysql, and SHOW GLOBAL STATUS.

mysql> SHOW GLOBAL STATUS;
+-----------------------------------+------------+
 Variable_name Value 
+-----------------------------------+------------+
 Aborted_clients 0 
 Aborted_connects 0 
 Bytes_received 155372598 
 Bytes_sent 1176560426 
...
 Connections 30023 
 Created_tmp_disk_tables 0 
 Created_tmp_files 3 
 Created_tmp_tables 2 
...
 Threads_created 217 
 Threads_running 88 
 Uptime 1389872 
+-----------------------------------+------------+
Show more

If you need to figure out where the connections are going, you can break down the connections by database with the help of the threads_connected variable.

mysql> show status where variable_name = 'Threads_connected';

To further investigate your connections, use the SHOW PROCESSLIST command.

SHOW [FULL] PROCESSLIST;





 Ending MySQL Connections
* dal13 address 166.9.16.0/23
* dal13 address 166.9.58.0/24
* dal13 address 166.9.230.0/24
* dal13 address 166.9.251.0/27
* dal13 address 10.200.142.0/24
* dal13 address 10.200.143.128/25
* dal13 address 161.26.114.0/24
* dal13 address 161.26.115.0/24
* fra02 address 10.201.154.0/24
* fra02 address 161.26.36.0/22
* fra02 address 161.26.38.0/24
* fra02 address 161.26.39.0/24
* fra02 address 166.9.28.0/23
* fra04 address 161.26.144.0/22
* fra04 address 161.26.146.0/24
* fra04 address 166.9.30.0/23
* fra05 address 161.26.148.0/22
* fra05 address 161.26.150.0/24
* fra05 address 166.0.32.0/23
* lon02 address 161.26.8.0/22
* lon02 address 161.26.10.0/24
* lon02 address 10.201.110.0/24
* lon04 address 161.26.128.0/22
* lon04 address 161.26.130.0/24
* lon04 address 166.9.36.0/23
* lon05 address 161.26.140.0/22
* lon05 address 161.26.162.0/24
* lon05 address 166.9.34.0/23
* lon06 address 161.26.142.0/24
* lon06 address 161.26.160.0/22
* lon06 address 166.9.38.0/23
* max()



{
"context": {
"bigger_number": "<? T(Math).max($number1,$number2) ?>"
},
"output": {
"generic": [
{
"values":
{
"text": "The bigger number is $bigger_number."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
}
}
Show more



* min()



{
"context": {
"smaller_number": "<? T(Math).min($number1,$number2) ?>"
},
"output": {
"generic": [
{
"values":
{
"text": "The smaller number is $smaller_number."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
}
}
Show more



* pow()



{
"context": {
"power_of_two": "<? T(Math).pow($base.toDouble(),2.toDouble()) ?>"
},
"output": {
"generic": [
{
"values":
{
"text": "Your number $base to the second power is $power_of_two."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
}
}
Show more

See the [java.lang.Math reference documentation](https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html) for information about other methods.





 java.util.Random() 

Returns a random number.
groups[3] (555) null No match against the group that is included as the second operand in the OR expression ((958)l(555)) 
 groups[4] (d{3}) 234 String that matches the regular expression that is defined for the group. 
 groups[5] (d{4}) 3456 String that matches the regular expression that is defined for the group. 



To help you decipher which group number to use to capture the section of input you are interested in, you can extract information about all the groups at once. Use the following syntax to create a context variable that returns an array of all the grouped pattern entity matches:



 Variable Value 

 array_of_matched_groups 



Use the Try it out pane to enter some test phone number values. For the input 958-123-2345, this expression sets $array_of_matched_groups to ["958-123-2345","958","958",null,"123","2345"].

You can then count each value in the array starting with 0 to get the group number for it.



Array elements

 Array element value Array element number 

 958-123-2345 0 
 958 1 
 958 2 
 null 3 
 123 4 
 2345 5 



From the result, you can determine that, to capture the last four digits of the phone number, you need group #5, for example.

To return the JSONArray structure that is created to represent the grouped pattern entity, use the following syntax:



 Variable Value 

 json_matched_groups 



This expression sets $json_matched_groups to the following JSON array:

[
{"group": "group_0","location": 0, 12]},
{"group": "group_1","location": 0, 3]},
{"group": "group_2","location": 0, 3]},
{"group": "group_3"},
{"group": "group_4","location": 4, 7]},
If the number of connections to the database exceeds the 100-connection limit, new connections fail and return an error.

FATAL: remaining connection slots are reserved for
non-replication superuser connections

Exceeding the connection limit for your deployment can cause your database to be unreachable by your applications.

You can check the number of connections to your deployment with the admin user, psql, and pg_stat_database.

SELECT count(distinct(numbackends)) FROM pg_stat_database;

If you need to figure out where the connections are going, you can break down the connections by database.

SELECT datname, numbackends FROM pg_stat_database;

To further investigate connections to a specific database, query pg_stat_activity.

SELECT * FROM pg_stat_activity WHERE datname='ibmclouddb';





 Terminating PostgreSQL Connections 

If you are on PostgreSQL 9.6 and newer, your admin user has the pg_signal_backend role. If you find connections that need to reset or be closed, the admin user can use both [pg_cancel_backend and pg_terminate_backend](https://www.postgresql.org/docs/current/functions-admin.htmlFUNCTIONS-ADMIN-SIGNAL-TABLE). The pid of a process is found from the pg_stat_activity table.



* pg_cancel_backend cancels a connection's current query without terminating the connection, and without stopping any other queries that it might be running.

SELECT pg_cancel_backend(pid);
* pg_terminate_backend stops the entire process and closes the connection.

SELECT pg_terminate_backend(pid);



The admin user does have the power to reset or close the connections for any user on the deployment except superusers. Be careful not to terminate replication connections from the ibm-replication user, as it interferes with the high-availability of your deployment.



 End PostgreSQL Connections
The response displays the 200 OK status and data about the current weather in the specified zip code.

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

![response-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/response-1.png)
6. Now, before a minute passesp, click the the Call operation button again (with a different zip code if you prefer). This time, the response is the 429 Too Many Requests status.

![response-2.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/response-2.png)
7. To validate that the rate-limit resets, wait a minute. Then, try again and confirm that you receive a valid response.







 Conclusion 

Congratulations! You have successfully created a rate-limiting Plan, associated it with your secure API, and verified that your API only responds to requests within the parameters you specified.

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





 Next step 

Start to socialize your API by [setting up and configuring a developer portal](https://cloud.ibm.com/docs/apiconnect/tutorials?topic=apiconnect-tut_config_dev_portal).

Create > Manage > Secure > Socialize > Analyze
The groups are delimited by the regular expression that is used to define the group pattern. For example, if the user input that matches the pattern defined in the entity @phone_number is: 958-234-3456, then the following groups are created:



Group details

 Group number Regex engine value Dialog value Explanation 

 groups[0] 958-234-3456 958-234-3456 The first group is always the full matching string. 
 groups[1] ((958)l(555)) 958 String that matches the regex for the first defined group, which is ((958)l(555)). 
 groups[2] (958) 958 Match against the group that is included as the first operand in the OR expression ((958)l(555)) 
 groups[3] (555) null No match against the group that is included as the second operand in the OR expression ((958)l(555)) 
 groups[4] (d{3}) 234 String that matches the regular expression that is defined for the group. 
 groups[5] (d{4}) 3456 String that matches the regular expression that is defined for the group. 



To help you decipher which group number to use to capture the section of input you are interested in, you can extract information about all the groups at once. Use the following syntax to create a context variable that returns an array of all the grouped pattern entity matches:



 Variable Value 

 array_of_matched_groups 



Use the "Try it out" pane to enter some test phone number values. For the input 958-123-2345, this expression sets $array_of_matched_groups to ["958-123-2345","958","958",null,"123","2345"].

You can then count each value in the array starting with 0 to get the group number for it.



Array elements

 Array element value Array element number 

 958-123-2345 0 
 958 1 
 958 2 
 null 3 
 123 4 
 2345 5
* lon05 address 161.26.140.0/22
* lon05 address 161.26.162.0/24
* lon05 address 166.9.34.0/23
* lon06 address 161.26.142.0/24
* lon06 address 161.26.160.0/22
* lon06 address 166.9.38.0/23
* mil01 address 161.26.52.0/22
* mil01 address 161.26.54.0/24
* mon01 address 161.26.56.0/22
* mon01 address 161.26.58.0/24
* osa21 address 161.26.184.0/22
* osa21 address 161.26.186.0/24
* osa21 address 166.9.70.0/24
* osa22 address 161.26.188.0/22
* osa22 address 161.26.190.0/24
* osa22 address 166.9.71.0/24
* osa23 address 161.26.192.0/22
* osa23 address 161.26.194.0/24
* osa23 address 166.9.72.0/24
* par01 address 10.2.159.0/24
* par01 address 161.26.62.0/24
* par01 address 161.26.60.0/22
* par01 address 166.9.79.0/24
* par01 address 166.9.245.128/27
* par04 address 10.202.94.0/24
* par04 address 161.26.174.0/24
* par05 address 10.202.78.0/24
* par05 address 161.26.178.0/24
* par06 address 10.202.62.0/24
* par06 address 161.26.182.0/24
* sao01 address 10.200.15.0/25
* sao01 address 10.203.78.0/24
<parameter name="enableACR" value="true"/>
<!--<parameter name="enableSeamLessACR" value="true"/>-->
<parameter name="maxAcrRetries" value="10"/>
<!--maximum number of connection attempts to each server in the list of alternate servers for ACR-->
<parameter name="acrRetryInterval" value="5"/>
<!--number of seconds to wait between retries-->
<parameter name="affinityFailbackInterval" value="10"/>
<!--number of seconds to wait after the first transaction boundary to fail back to the primary server-->
<alternateserverlist>
<server name="dal10" hostname="db2-icd-preprod-us-s-759393.us-south.serviceendpoint.cloud.ibm.com" port="31014">
</server>
<server name="dal12" hostname="db2-icd-preprod-us-s-207889.us-south.serviceendpoint.cloud.ibm.com" port="31014">
</server>
<server name="dal13" hostname="db2-icd-preprod-us-s-747467.us-south.serviceendpoint.cloud.ibm.com" port="31014">
</server>
</alternateserverlist>
<affinitylist>
<list name="dal13_primary" serverorder="dal13,dal12,dal10">
</list>
<list name="dal12_primary" serverorder="dal12,dal13,dal10">
</list>
<list name="dal10_primary" serverorder="dal10,dal12,dal13">
</list>
</affinitylist>
<clientaffinitydefined>
<!--this section has specific defined affinities -->