vania-janet/multiturn-rag-retrieval-data huggingface dataset:
GET /cit_dump-log?lifecycle HTTP/1.1
Host: 192.168.35.22
User-Agent: curl/7.64.1
Accept: /
Date: Fri, 28 Feb 2020 14:00:43 +0000
Authorization: AWS MOfXYiHQ9QTyD2ALoiOh:iKm2QNetyW740kylP6ja2pze3DM=
Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==

Example Response

HTTP/1.1 200 OK Date: Fri, 28 Feb 2020 14:00:43 GMT X-Clv-Request-Id: ecbf9294-284d-4169-b2cd-5d52b2450808 Server: Cleversafe/3.14.9.53 X-Clv-S3-Version: 2.5 Accept-Ranges: bytes x-amz-request-id: ecbf9294-284d-4169-b2cd-5d52b2450808 Content-Type: application/xml Content-Length: 276

<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>ID1</ID>
<Status>Enabled</Status>
<Filter>
<Prefix/>
</Filter>
<Expiration>
<Days>270</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>

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





 Delete stale data with expiration rules 

Objects that are subject to a bucket's Immutable Object Storage retention policy will have any expiration actions deferred until the retention policy is no longer enforced.

For more about using lifecycle configuration to delete objects, check out the [documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-expiry).
If the state is not saved, it can lead to performance problems when replication of large data sets resumes. The reason is that without checkpoints, the replication process restarts from the beginning each time that it is resumed.





 Replication document is conflicted 

Another consequence of setting user permissions incorrectly is that the _replicator document becomes conflicted. The _replicator document records the current state of the replication process. In an extreme case, the document can become huge because it contains many unresolved conflicts. Such a large document uses much of the available space and causes extra server load.

You can check the size of your _replicator database by sending a GET request to the /_replicator endpoint:



* Curl
* Java
* Node
* Python
* Go



curl "$SERVICE_URL/_replicator"

import com.ibm.cloud.cloudant.v1.Cloudant;
import com.ibm.cloud.cloudant.v1.model.DatabaseInformation;
import com.ibm.cloud.cloudant.v1.model.GetDatabaseInformationOptions;

Cloudant service = Cloudant.newInstance();

GetDatabaseInformationOptions databaseInfoOptions =
new GetDatabaseInformationOptions.Builder()
.db("_replicator")
.build();

DatabaseInformation response =
service.getDatabaseInformation(databaseInfoOptions).execute()
.getResult();

System.out.println(response);

const { CloudantV1 } = require('@ibm-cloud/cloudant');

const service = CloudantV1.newInstance({});

service.getDatabaseInformation({db: '_replicator'}).then(response => {
console.log(response.result);
});

from ibmcloudant.cloudant_v1 import CloudantV1

service = CloudantV1.new_instance()
While the console does not allow you to set custom expiration dates for certificates, notice that the Peer TLS certificate expiration date is in 15 years, so that renewal of this TLS certificate is not required again next year. However, the peer enrollment certificate expires again in one year, so you will need to renew it again before that date.

An alternative to renewing these certificates is to simply deploy a new peer, and then delete the peer with expired certificates. You would need to configure the new peer on the network in the same way the existing peer is configured, namely:



* Join it to the same channel or channels.
* Make this peer an [anchor peer](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-build-networkibp-console-build-network-join-peer), if the previous peer was an anchor peer.
* Install the same smart contracts on it.
* Download a new [connection profile](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-organizationsibp-console-organizations-connx-profile) that includes the new peer for client applications to address the new peer.







 Renew ordering node enrollment and TLS certificates 

If any single ordering node enrollment certificate expires, the entire ordering service goes down. When the ordering node TLS certificate expires, the node can no longer participate in the Raft cluster, which can cause consenter [quorum](https://cloud.ibm.com/docs/blockchain?topic=blockchain-glossaryglossary-quorum) to be lost, and the blockchain network goes down. It’s also not possible to upgrade any node in the ordering service if one of ordering nodes in the orderer consenter set is down. The automatic certificate renewal process attempts to re-enroll the ordering node enrollment and TLS certificates 30 days before they expire, and when successful, no further action is required on your part. But if the automatic certificate renewal fails because the CA is down or unreachable when the renewal attempt is made, or if the associated CA TLS certificate is expired, you have to manually update these certificates.
Why did my locked certificate move to the Destroyed state? 

You have an SSL/TLS certificate that you manage in IBM Cloud® Secrets Manager, but it still expires even though it is locked.

  What’s happening 

You want to prevent an SSL/TLS certificate in your Secrets Manager service instance from expiring, so you attach one or more locks to it. But, when your certificate reaches its expiration date, it still moves to the Destroyed state.

  Why it’s happening 

A lock on an SSL/TLS certificate can prevent you or an authorized user from deleting the certificate from your instance, for example during a security audit. But, a lock can't prevent a certificate from reaching its defined expiration date.

The validity period of an X.509 certificate can't be changed or modified, even if the certificate is associated with one or more locks in Secrets Manager. When your certificate passes its defined expiration date, it is no longer valid. In Secrets Manager, a secret that is no longer valid moves to the Destroyed state.

  How to fix it 

To avoid downtime in your applications that results from an expired certificate, be sure to [set up Event Notifications](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-event-notifications) to alert you when certificates are about to expire. Then, rotate your certificates and deploy the new versions to your SSL/TLS termination points. For suggested guidelines around periodic rotation of certificates, see [Best practices for rotating and locking secrets](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-best-practices-rotate-secretsbest-practices-lock-secrets).
The default expiration date for the Security Token is 90 days from when it is created. To change the expiration date, keep the Token Expiration box checked and edit the text field with the number of days you would like the token to expire in (minimum 1, maximum 365). To create a token that does not expire, uncheck the Token Expiration box.

To finish the creation of your gateway, click Add Gateway. Once the gateway is created, the page will automatically navigate into your new gateway.

![New Gateway](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/newGateway.png?raw=true)

Now that you have your newly created gateway, you can [connect your first client](https://cloud.ibm.com/docs/services/SecureGateway?topic=SecureGateway-add-client).



 Regenerate security token 

By clicking the Settings button ![Setting Button](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/settingIcon.png?raw=true) on any of the gateway tiles, you can edit the configuration of the gateway and check the Current Token Expiring on the panel.

![Guided Setup](https://cloud.ibm.com/docs-content/v1/content/690bf9a59650e0582967be8899e39840589532f7/SecureGateway/images/editGateway.png?raw=true)

When the security token is expired, it will not affect the connecting Secure Gateway Client, since the security token is only used when start/restart a Secure Gateway Client. However, you will not able to configure the destinations until you regenerate the security token.
You will add a second conditional response to the Not found section that checks whether the counter is greater than 1, which indicates that the user has provided an invalid response 3 times previously. In this case, the dialog assigns the time value on the user's behalf to the popular dinner reservation time of 8 PM. Don't worry; the user will have a chance to change the time value when the confirmation slot is triggered. Click Add a response.
11. Add the following condition and response.



Not found response details

 Condition Response 

 `$counter > 1` You seem to be having trouble choosing a time. I will make the reservation at 8PM for you. 



You must set the $time variable to 8PM, so click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/edit-slot.png) icon. Select Open JSON editor, add the following context variable definition, and then click Back.

{
"output": {
"text": {
"values": [
"You seem to be having trouble choosing a time.
I will make the reservation at 8 PM for you."
]
}
},
"context": {
"time": "<? '20:00:00'.reformatDateTime('h:mm a') ?>"
}
}
12. The conditional response that you just added has a more precise condition than the true condition that is used by the first conditional response. You must move this response so it comes before the original conditional response or it will never be triggered. Click the response you just added, and use the up arrow to move it up, and then click Save.
13. Test your changes by using the following script.





 Speaker Utterance 

 You i want to make a reservation 
 Watson I can make a reservation for you. Just tell me the day and time of the reservation, and how many people it is for. 
 You tomorrow
--session-invalidation-in-seconds SECONDS_INV
: The number of seconds of inactivity after which a session is invalidated (can also be "NOT_SET", which resets the value to default).

--max-sessions-per-identity SESSIONS_MAX
: The maximum number of sessions per identity on the account (can also be NOT_SET, which resets the value to default).

--mfa MFA
: The type of MFA on the account (one of NONE, TOTP, TOTP4ALL, LEVEL1, LEVEL2, or LEVEL3).

--output FORMAT
: Specify output format. Only 'JSON' is supported.

-q, --quiet
: Suppress verbose output.





 Examples 

Update the multi-factor authentication setting of an account to LEVEL3:

ibmcloud iam account-settings-update --mfa LEVEL3

Update the number of seconds after which a session expires to default (with NOT_SET):

ibmcloud iam account-settings-update --session-expiration-in-seconds NOT_SET
ibmcloud fn action invoke --result ACTION_NAME -p person '{"PARAM_NAME": "PARAM_VALUE", "PARAM_NAME": "PARAM_VALUE"}'

The following example shows possible output from the previous invocation.

{
"payload": "Hello, Dorothy from Kansas"
}





 Testing blocking actions 

The invocation of the action can be blocking or non-blocking. Invocations are non-blocking by default. If you don't need the action result right away, use a non-blocking invocation.

Blocking invocations use a request-response style and wait for the activation result to be available. The wait period is the lesser of 60 seconds or the action's [time limit value](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-limits).

Run the action by running a blocking invocation.

ibmcloud fn action invoke --blocking ACTION_NAME

The following example shows possible output from the previous invocation.

ok: invoked hello with id 44794bd6aab74415b4e42a308d880e5b

{
"result": {
"payload": "Hello world"
},
"status": "success",
"success": true
}

The command outputs the following information.



* The invocation result, if it is available within the expected wait period
* Without the --result option, the activation ID is displayed in the result. The activation ID (44794bd6aab74415b4e42a308d880e5b) which can be used to retrieve the logs or the result of the invocation.









 Testing triggers 

Triggers can be fired, or activated, by using a dictionary of key-value pairs. Sometimes this dictionary is referred to as the event. Triggers can be explicitly fired by a user or fired on behalf of a user by an external event source. As with actions, each firing of a trigger that is associated with a rule results in an activation ID.



1.
"action": "user-management.user-setting.update",
"message": "User management service: update user settings",
"requestData": {
"2FA": false,
"allowed_ip_addresses": "",
"iam_id": "IBMid-xxxxxxx",
"origin": "BSS",
"security_questions_setup": false
}





 Restrict IP addresses 

When you configure IP address restrictions from the IP address restrictions section, you get 1 event with action user-management.user-setting.update.

For example, see the requestData field for the event user-management.user-setting.update:

"action": "user-management.user-setting.update",
"message": "User management service: update user settings",
"requestData": {
"allowed_ip_addresses": "14.15.98.123",
"iam_id": "IBMid-xxxxxxx",
"origin": "BSS"
}





 Manage user's login 

When you modify information about a user's login from the Manage > Access IAM > Users > User Details section, you get 1 event with action user-management.user-setting.update.

See the sample of the requestData field when the User-managed login: property is disabled:

"action": "user-management.user-setting.update",
"message": "User management service: update user settings",
"requestData": {
"iam_id": "IBMid-27000757DW",
"origin": "BSS",
"self_manage": false
}

See the sample of the requestData field when the User one-time passcode authentication: property is enabled. The requestData.2FA field is set to true.

"action": "user-management.user-setting.update",
"message": "User management service: update user settings",
"requestData": {
A "-failure" flag is included in the message if the attempt to delete a user failed. 
 <service_id>.lock.enable Locks a user account indefinitely. A "-failure" flag is included in the message if the attempt to delete a user failed. 
 <service_id>.lock.disable Unlocks a user account. A "-failure" flag is included in the message if the attempt to delete a user failed. 
 <service_id>.policy.list Lists available policies. A "-failure" flag is included in the message if the attempt to delete a user failed. 
 <service_id>.policy.update A policy was updated. A "-failure" flag is included in the message if the attempt to delete a user failed. 
 <service_id>.policy.delete A policy was deleted. "-failure" flag is included in the message if the attempt to delete a user failed. 
 `<service_id>.schema.create A schema was created. A "-failure" flag is included in the message if the attempt to delete a user failed. 



The <service_id> field indicates the type of Cloud Databases deployment. For example, dashdb or messages-for-rabbitmq.





 Viewing events 

You can access Activity Tracker with LogDNA through the Observability tab of your deployment's Manage page. The Manage Activity Tracker button links to the main list of all Activity Tracker instances in your IBM Cloud account. Select the instance where you set your database logs to be forwarded. IBM Cloud Activity Tracker can have only one instance per location. Click View Activity Tracker to view the events.

After the event activity is forwarded to the service, each event can be expanded to a detailed view by clicking the arrow to the left of the time stamp.
What do I do if I use the Cloudflare Origin root certificate, and it's expiring? 

  What’s happening 

Your origin root certificate has expired, or will soon expire,

  Why it’s happening 

Some origin web servers (such as IIS and cPanel) validate origin root CA certificates and require you to upload one. If you are using an expired version of the Cloudflare origin root CA, you must take the following actions to avoid site disruptions.

  How to fix it 

Select one of the following root certificates to download and install.



*  [RSA version certificate](https://cloud.ibm.com/media/docs/downloads/cis/origin_ca_rsa_root.pem)
*  [ECC version certificate](https://cloud.ibm.com/media/docs/downloads/cis/origin_ca_ecc_root.pem)
Objects written to a protected bucket cannot be deleted until the protection period has expired and all legal holds on the object are removed. The bucket's default retention value is given to an object unless an object specific value is provided when the object is created. Objects in protected buckets that are no longer under retention (retention period has expired and the object does not have any legal holds), when overwritten, will again come under retention. The new retention period can be provided as part of the object overwrite request or the default retention time of the bucket will be given to the object.

The minimum and maximum supported values for the retention period settings MinimumRetention, DefaultRetention, and MaximumRetention are 0 days and 365243 days (1000 years) respectively.

function addProtectionConfigurationToBucket(bucketName) {
console.log(Adding protection to bucket ${bucketName});
return cos.putBucketProtectionConfiguration({
Bucket: bucketName,
ProtectionConfiguration: {
'Status': 'Retention',
'MinimumRetention': {'Days': 10},
'DefaultRetention': {'Days': 100},
'MaximumRetention': {'Days': 1000}
}
}).promise()
.then(() => {
console.log(Protection added to bucket ${bucketName}!);
})
.catch((e) => {
console.log(ERROR: ${e.code} - ${e.message}n);
});
}
Show more





 Check protection on a bucket 

function getProtectionConfigurationOnBucket(bucketName) {
console.log(Retrieve the protection on bucket ${bucketName});
return cos.getBucketProtectionConfiguration({
Bucket: bucketName
}).promise()
.then((data) => {
console.log(Configuration on bucket ${bucketName}:);
console.log(data);
})
However, by choosing this action as the Not found response next step, you instruct your assistant to stop trying to fill this slot if the user does not provide a valid value for it.
* Skip to response: If, when the condition you define is met, you no longer need to fill any of the remaining slots in this node, choose this action to skip the remaining slots and go directly to the node-level response next. For example, if after capturing the one-way flight information, the slot prompt is, Are you buying round trip tickets? the Not found condition can check for #No. If #No is found, use this option to skip the remaining slots that capture information about the return flight, and go straight to the node-level response instead.



Click Back to return to the edit view of the slot.
5. To add another conditional response, click Add a response, and then enter the condition and the response to display if the condition is met.

Be sure to add at least one response that will be displayed no matter what. You can leave the condition field blank for this catch all response. Your assistant automatically populates the empty condition field with the true special condition.
6. Click Save to save your changes, close the edit view of the slot, and return to the edit view of the node.







 Moving on after multiple failed attempts 

You can provide users with a way to exit a slot if they cannot answer it correctly after several attempts by using Not found conditional responses. In the catchall response, open the JSON editor to add a counter context variable that will keep track of the number of times the Not found response is returned. In an earlier node, be sure to set the initial counter context variable value to 0.

In this example, your assistant asks for the pizza size. It lets the user answer the question incorrectly 3 times before applying a size (medium) to the variable for the user. (You can include a confirmation slot where users can always correct the size when they are asked to confirm the order information.)

Check for: @size Save it as: $size Not found catchall condition:

{
"output": {
"text": {
"values": [
"What size did you want?
.accountId(exampleAccountId)
.iamId(exampleUserId)
.state("deleted")
.sort("last_modified_at")
.build();

Response<PolicyList> response = service.listPolicies(options).execute();
PolicyList policyList = response.getResult();

System.out.println(policyList);

policy_list = iam_policy_management_service.list_policies(
account_id=example_account_id, iam_id=example_user_id, state='deleted', sort='last_modified_at'
).get_result()

print(json.dumps(policy_list, indent=2))

options := iamPolicyManagementService.NewListPoliciesOptions(
exampleAccountID,
)
options.SetIamID(exampleUserID)
options.SetSort("last_modified_at")
options.SetState("deleted")

policyList, response, err := iamPolicyManagementService.ListPolicies(options)
if err = nil {
panic(err)
}
b, _ := json.MarshalIndent(policyList, "", " ")
fmt.Println(string(b))

const params = {
accountId: exampleAccountId,
iamId: exampleUserId,
sort: 'last_modified_at',
state: 'deleted'
};

iamPolicyManagementService.listPolicies(params)
.then(res => {
console.log('listPolicies() result:n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
});

The format of the response is represented in JSON.

{
"policies":
{
Confirm that if you select No, the action ends.
* Try including additional information in your initial message. For example, try typing I want to withdraw $50 from my savings account. Confirm that the assistant does not ask you again to specify the information you already provided.



That's it! You built a simple action that includes multiple steps, collects information that it stores as action variables, and conditions its responses based on what your customer chooses. There is a lot more you can do with actions, but all of it is built on this basic pattern.





 Action limits 

The number of actions, steps, and variables you can create depends on your Watson Assistant [plan type](https://www.ibm.com/products/watson-assistant/pricing/).



Plan details

 Plan Actions Steps Variables 

 Lite 100 1,000 2,000 
 Trial 100 1,000 2,000 
 Plus 2,000 5,000 8,000 
 Enterprise 2,000 5,000 8,000 
 Enterprise with Data Isolation 2,000 5,000 8,000
{"given_name":"Sally","membership_status":"true"}
9. If you don't send or change any session variables, you can delete the first conditional response. Otherwise, consider adding a response to show when a return variable is sent from the called action.

You might want to specify a custom response to show in case the exchange that took place when the action was processed resulted in a change to the value of the session variable that you passed to the action.

For example, let's say that the dialog asks for the person's given name and stores it in the $name context variable. The dialog then passes the name to the action as a given_name session variable. Then, the action that is called asks if the customer prefers that the assistant use a nickname. The action then replaces the value that was stored in the given_name session variable with the nickname that the customer submitted.

To continue with this example, you might want to address the user by the preferred nickname, now that you know it. You can add a response that says, Thanks for your business, <? $action_result_1.given_name ?>! The <? $action_result_1.given_name ?> expression extracts the value of the given_name session variable that is returned from the called action.
10. Add a response to show when no return variable is provided as the second conditional response.

The second response that is added automatically for you has an anything_else condition. This response is shown if none of the other conditional responses are displayed.

You can delete or edit the conditional responses that are added automatically. You can add more conditional responses and reorder them.
11. Click X to close the dialog node. Your changes are saved automatically.
12. Use the Preview page to test the interaction between the dialog and the action.