vania-janet/multiturn-rag-retrieval-data huggingface dataset:
.withMinimumRetentionInDays(10)
.withDefaultRetentionInDays(100)
.withMaximumRetentionInDays(1000);

SetBucketProtectionConfigurationRequest newRequest = new SetBucketProtectionConfigurationRequest()
.withBucketName(bucketName)
.withProtectionConfiguration(newConfig);

cos.setBucketProtectionConfiguration(newRequest);

System.out.printf("Protection added to bucket %sn", bucketName);
}

Show more

def add_protection_configuration_to_bucket(bucket_name):
try:
new_protection_config = {
"Status": "Retention",
"MinimumRetention": {"Days": 10},
"DefaultRetention": {"Days": 100},
"MaximumRetention": {"Days": 1000}
}

cos.put_bucket_protection_configuration(Bucket=bucket_name, ProtectionConfiguration=new_protection_config)

print("Protection added to bucket {0}n".format(bucket_name))
except ClientError as be:
print("CLIENT ERROR: {0}n".format(be))
except Exception as e:
print("Unable to set bucket protection config: {0}".format(e))

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()
[tcp_keepalives_idle](https://www.postgresql.org/docs/10/runtime-config-connection.html)



* Default - 300
* Restarts database - No



[tcp_keepalives_interval](https://www.postgresql.org/docs/10/runtime-config-connection.html)



* Default - 10
* Restarts database - No



[tcp_keepalives_count](https://www.postgresql.org/docs/10/runtime-config-connection.html)



* Default - 6
* Restarts database - No







 IBM Cloud® Databases for PostgreSQL WAL Settings 

[archive_timeout](https://www.postgresql.org/docs/current/runtime-config-wal.html)



* Default - 1800
* Restarts database - No
* Options - Minimum value of 300
* Notes - The number of seconds to wait before forcing a switch to the next WAL file. If the number of seconds has passed and if there has been database activity, the server switches to a new segment. Effectively limits the amount of time data can remain unarchived.



The next three settings wal_level, max_replication_slots and max_wal_senders enable use of the [wal2json logical decoding plug-in](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-wal2json). If you aren't using this plug-in, leave these settings at the default.

[wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html)



* Default - hot_standby
* Restarts database - YES
* Notes - Controls WAL level. Allowed values are hot_standby or logical. Set to logical to use logical decoding.
When this is set to on, it is recommended to set the application_name in the connection URI to keep an overview in the logs, as the IP addresses shown are the Kubernetes internal IPs. Details about adjusting the connection URI are found in the [PostgreSQL documentation](https://www.postgresql.org/docs/current/libpq-connect.htmlLIBPQ-CONNSTRING). When set to off, there is no change in behavior to the default setting and no disconnections are logged. Logs are available through the [logging integration](https://cloud.ibm.com/docs/databases-for-postgresql?topic=cloud-databases-logging). If on is set, the logs show lines similar to this example where the application name is set as test-app:

2021-03-01 10:27:56 UTC [test-app] [00000] [708]: [3-1] user=admin,db=ibmclouddb,client=127.0.0.1 LOG: disconnection: session time: 0:00:00.793 user=admin database=ibmclouddb host=127.0.0.1 port=50638







 WAL Settings 

[archive_timeout](https://www.postgresql.org/docs/current/runtime-config-wal.html)



* Default - 1800
* Restarts database - No
* Options - Minimum value of 300
* Notes - The number of seconds to wait before forcing a switch to the next WAL file. If the number of seconds passed and if there has been database activity, the server switches to a new segment. Effectively limits the amount of time data can remain unarchived.



[log_min_duration_statement](https://www.postgresql.org/docs/current/runtime-config-logging.html)



* Default - 100
* Restarts database - No
* Options - Minimum value of 100
* Notes - Statements that take longer than the specified number of milliseconds are logged.
set system conntrack modules 'gre'
set system conntrack modules h323 'disable'
set system conntrack modules nfs 'disable'
set system conntrack modules pptp 'disable'
set system conntrack modules sip 'disable'
set system conntrack modules sqlnet 'disable'
set system conntrack modules tftp 'disable'
set system conntrack table-size '3000000'







 Set system conntrack timeout 



 Set system conntrack timeout issues 

set system conntrack timeout icmp '30'
set system conntrack timeout other '600'
set system conntrack timeout tcp close '10'
set system conntrack timeout tcp close-wait '60'
set system conntrack timeout tcp established '432000'
set system conntrack timeout tcp fin-wait '120'
set system conntrack timeout tcp last-ack '30'
set system conntrack timeout tcp syn-recv '60'
set system conntrack timeout tcp syn-sent '120'
set system conntrack timeout tcp time-wait '60'







 Time based firewall 



 Time based firewall issues 

set firewall name PRIV_SERVICE_IN rule 58 action 'accept'
set firewall name PRIV_SERVICE_IN rule 58 description '586427 Acesso a base de dados ate 22-2-18'
set firewall name PRIV_SERVICE_IN rule 58 destination address '10.150.156.57'
set firewall name PRIV_SERVICE_IN rule 58 destination port '3306'
set firewall name PRIV_SERVICE_IN rule 58 protocol 'tcp'
set firewall name PRIV_SERVICE_IN rule 58 source address '10.150.156.104'
set firewall name PRIV_SERVICE_IN rule 58 time startdate '2017-08-22'
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) 
 Expiration policy ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/checkmark-icon.svg) !
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 [Retention policies](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-sdk-aboutsdk-about-retention) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 [Aspera high-speed transfer](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-sdk-aboutsdk-about-aspera) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) !
System.out.printf("Adding protection to bucket: %sn", bucketName);

BucketProtectionConfiguration newConfig = new BucketProtectionConfiguration()
.withStatus(BucketProtectionStatus.Retention)
.withMinimumRetentionInDays(10)
.withDefaultRetentionInDays(100)
.withMaximumRetentionInDays(1000);

SetBucketProtectionConfigurationRequest newRequest = new SetBucketProtectionConfigurationRequest()
.withBucketName(bucketName)
.withProtectionConfiguration(newConfig);

cos.setBucketProtectionConfiguration(newRequest);

System.out.printf("Protection added to bucket %sn", bucketName);
}
Show more





 Check protection on a bucket 

public static void getProtectionConfigurationOnBucket(String bucketName) {
System.out.printf("Retrieving protection configuration from bucket: %sn", bucketName;

BucketProtectionConfiguration config = cos.getBucketProtection(bucketName);

String status = config.getStatus();

System.out.printf("Status: %sn", status);

if (!status.toUpperCase().equals("DISABLED")) {
System.out.printf("Minimum Retention (Days): %sn", config.getMinimumRetentionInDays());
System.out.printf("Default Retention (Days): %sn", config.getDefaultRetentionInDays());
System.out.printf("Maximum Retention (Days): %sn", config.getMaximumRetentionInDays());
}
}





 Upload a protected object
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 [Retention policies](https://cloud.ibm.com/docs/cloud-object-storage/basics?topic=cloud-object-storage-sdk-aboutsdk-about-retention) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) 
 [Aspera high-speed transfer](https://cloud.ibm.com/docs/cloud-object-storage/basics?topic=cloud-object-storage-sdk-aboutsdk-about-aspera) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/icons/checkmark-icon.svg) !
X-Clv-Request-Id: 7afca6d8-e209-4519-8f2c-1af3f1540b42
Accept-Ranges: bytes
Server: Cleversafe/3.14.1
X-Clv-S3-Version: 2.5
x-amz-request-id: 7afca6d8-e209-4519-8f2c-1af3f1540b42
Content-Length: 0



* Java
* Python
* Node



public static void addProtectionConfigurationToBucket(String bucketName) {
System.out.printf("Adding protection to bucket: %sn", bucketName);

BucketProtectionConfiguration newConfig = new BucketProtectionConfiguration()
.withStatus(BucketProtectionStatus.Retention)
.withMinimumRetentionInDays(10)
.withDefaultRetentionInDays(100)
.withMaximumRetentionInDays(1000);

cos.setBucketProtection(bucketName, newConfig);

System.out.printf("Protection added to bucket %sn", bucketName);
}

public static void addProtectionConfigurationToBucketWithRequest(String bucketName) {
System.out.printf("Adding protection to bucket: %sn", bucketName);

BucketProtectionConfiguration newConfig = new BucketProtectionConfiguration()
.withStatus(BucketProtectionStatus.Retention)
.withMinimumRetentionInDays(10)
.withDefaultRetentionInDays(100)
.withMaximumRetentionInDays(1000);

SetBucketProtectionConfigurationRequest newRequest = new SetBucketProtectionConfigurationRequest()
.withBucketName(bucketName)
.withProtectionConfiguration(newConfig);
When this is set to on, it is recommended to set the application_name in the connection URI to keep an overview in the logs, as the IP addresses shown are the Kubernetes internal IPs. Details about adjusting the connection URI are found in the [PostgreSQL documentation](https://www.postgresql.org/docs/current/libpq-connect.htmlLIBPQ-CONNSTRING). When set to off, there is no change in behavior to the default setting and no disconnections are logged. Logs are available through the [logging integration](https://cloud.ibm.com/docs/databases-for-postgresql?topic=cloud-databases-logging). If on is set, the logs show lines similar to this example where the application name is set as test-app:



2021-03-01 10:27:56 UTC [test-app] [00000] [708]: [3-1] user=admin,db=ibmclouddb,client=127.0.0.1 LOG: disconnection: session time: 0:00:00.793 user=admin database=ibmclouddb host=127.0.0.1 port=50638

[log_min_duration_statement](https://www.postgresql.org/docs/current/runtime-config-logging.html)



* Default - 100
* Restarts database - No
* Options - Minimum value of 100
* Notes - Statements that take longer than the specified number of milliseconds are logged.



[tcp_keepalives_idle](https://www.postgresql.org/docs/10/runtime-config-connection.html)



* Default - 300
* Restarts database - No



[tcp_keepalives_interval](https://www.postgresql.org/docs/10/runtime-config-connection.html)



* Default - 10
* Restarts database - No
Furthermore, on the server side, the following [keepalive configurations](https://www.postgresql.org/docs/12/runtime-config-connection.html) are used as the default.



* tcp_keepalives_idle is set to 5 minutes
* tcp_keepalives_interval probe interval is set to 10 seconds
* tcp_keepalives_count is set to 6



To prevent half-open/closed connections or bursts in connection attempts from overwhelming your deployment, set the [max_connections parameter](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-changing-configuration) for Postgres to at least double your expected connection count.

If your connection limit is reached, you can [end all connections](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-managing-connectionsend-connections) immediately.
* Requires restart: True



For more information, see [MySQL net_read_timeout documentation](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.htmlsysvar_net_read_timeout).





 net_write_timeout 



* Description: The number of seconds to wait for a block to be written to a connection before aborting the write.
* Default setting: 60
* Max:
* Min: 1
* Requires restart: True



For more information, see [net_write_timeout documentation](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.htmlsysvar_net_write_timeout).
[max_connections](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.htmlsysvar_max_connections)



* Default - 200
* Restarts database? - false



You might need to [scale before you increase max connections](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-high-availabilityconnection-limits-ha).

[mysql_max_binlog_age_sec](https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html)



* Default - 1800
* Restarts database? - false



[net_write_timeout](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.htmlsysvar_net_write_timeout)



* Description: The number of seconds to wait for a block to be written to a connection before aborting the write.
* Default: 60
* Minimum: 1
* Maximum: 7200
* Restarts database? - false



[sql_mode](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html)



* Allowable values:



* ALLOW_INVALID_DATES
* ANSI_QUOTES
* ERROR_FOR_DIVISION_BY_ZERO
* HIGH_NOT_PRECEDENCE
* IGNORE_SPACE
* NO_AUTO_CREATE_USER
* NO_AUTO_VALUE_ON_ZERO
* NO_BACKSLASH_ESCAPES
* NO_DIR_IN_CREATE
* NO_ENGINE_SUBSTITUTION
* NO_FIELD_OPTIONS
* NO_KEY_OPTIONS
* NO_TABLE_OPTIONS
* NO_UNSIGNED_SUBTRACTION
* NO_ZERO_DATE
* NO_ZERO_IN_DATE
* ONLY_FULL_GROUP_BY
* PAD_CHAR_TO_FULL_LENGTH
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) 
 Secret revocation blocked com.ibm.cloud.secrets-manager.secret_revocation_blocked One time Not applicable<br><br>[5] Not applicable<br><br>[6] Not applicable<br><br>[7] Not applicable<br><br>[8] Not applicable<br><br>[9] ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) Not applicable<br><br>[10] 
 Secret expiration blocked com.ibm.cloud.secrets-manager.secret_expiration_blocked One time <br>Daily ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) !
If you want to check what's in the trash, run the [ibmcloud cr trash-list](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_images_registry_images_list_trash) command. You can restore images from the trash by running the [ibmcloud cr image-restore](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_images_registry_images_restore) command.

If you want to check your policies, you can run the [ibmcloud cr retention-policy-list](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_retention_policy_list) command.

If you want to cancel a policy, [update the retention policy so that it keeps all your images](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_retentionretention_policy_keep).

You can also clean up your namespace by [deleting your untagged images](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_retentionretention_images_untagged).



 Planning retention 

The [ibmcloud cr retention-run](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_retention_run) and [ibmcloud cr retention-policy-set](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_retention_policy_set) commands operate on a per-namespace basis. If you have multiple namespaces in your pipeline, you can apply different retention criteria for each namespace to best suit your requirements.

Consider a typical delivery pipeline with development, staging, and production environments. As code is delivered, continuous integration and continuous deployment pushes images into the registry and then deploys them straight to your development environment. After testing, some builds from development are promoted to staging, and then potentially onto production. In this scenario, the rate of image change is fastest in development and slowest in production.
* [25 October 2019](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notesregistry-25oct2019)



* [IBM Log Analysis platform services logs are available](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes25oct2019_logs)



* [14 October 2019](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notesregistry-14oct2019)



* [ibmcloud cr manifest-inspect command is available](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes14oct2019_manifest)



* [23 September 2019](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notesregistry-23sep2019)



* [You can create retention policies for your images](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes23sep2019_retention_policy)
* [You can restore deleted images from the trash](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes23sep2019_restore_trash)



* [1 August 2019](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notesregistry-01aug2019)



* [ibmcloud cr retention-run command is available](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes01aug2019_retention)



* [25 July 2019](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notesregistry-25jul2019)



* [IBM Cloud Activity Tracker available for Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_release_notes25jul2019_at)
<accountID> represents the logging account ID, that is, the ID that is shown in the [web UI URL](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-get_web_url).

HHHH represents hours in 24 format.



* The timestamp that is used to determine whether the log is included in an archive is the UTC timestamp.



Depending on your location, there might be logs that you see in local time in your views on a specific day. However, you cannot find them in the archive file. You are most likely viewing logs in local time and the archive process uses the UTC timestamp.





 Configure archiving 

For information on how to configure archiving, see:



* [Configuring archiving through the UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-archiving).
* [Configuring archiving by using the API](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-archiving-manage-apiarchivingapi-conf).



In addition, consider the following information:



* You must have the manager role to configure archiving in the IBM Log Analysis instance. This role includes the logdna.dashboard.manage IAM action role that allows a user to perform admin tasks such as configure archiving.
* When you configure archiving, the Log Analysis instance and the IBM Cloud Object Storage (COS) instance must be provisioned in the same account.
* The credential that Log Analysis uses to write data into a COS bucket must have writer role.







 Monitor archiving 

To monitor archiving, you can use the following services:



* IBM Cloud Monitoring service:

IBM Cloud Object Storage is integrated with the Monitoring service. Monitoring provides a default template that you can customize to monitor the bucket that you configure to store data for long term.
If you are an existing customer who used only the runtime microservices of the Speech services prior to version 4.6.0, PostgreSQL remains installed but is not used. In this case, installation of PostgreSQL persists across upgrades.

The MinIO datastore is always installed because the runtime microservices depend on it. The RabbitMQ datastore is installed only if the sttAsync microservice is installed.

For more information, see Datastore properties in Using the Watson Speech services custom resource in [Watson Speech services on IBM Cloud Pak for Data](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.6.x?topic=services-watson-speech).

Defect fix: Creation of a Network Policy is no longer necessary for the PostgreSQL operator to monitor its operands
: Defect fix: For version 4.6.0, it is not necessary to create a Network Policy to allow the PostgreSQL operator to monitor its operands, as described in the [10 November 2022 (Versions 4.0.x and 4.5.x)](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes-datatext-to-speech-data-10november2022) service update. As of version 4.6.0, the service handles this situation automatically.

New beta rate_percentage query parameter for controlling the global speaking rate
: The service offers a new rate_percentage query parameter to modify the speaking rate for a speech synthesis request. The speaking rate is the speed at which the service speaks the text that it synthesizes into speech. A higher rate causes the text to be spoken more quickly; a lower rate causes the text to be spoken more slowly. The parameter changes the per-voice default rate for an entire request. For more information, see [Modifying the speaking rate](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-rate-percentage).

New beta pitch_percentage query parameter for controlling the global speaking pitch