=====================================================================================================================================================================
| Current | New |
=====================================================================================================================================================================
| from cos_config import resource_configuration_v1.ResourceConfigurationV1 | from ibm_cos_sdk_config import resource_configuration_v1.ResourceConfigurationV1 |
| | from ibm_cloud_sdk_core.authenticators import IAMAuthenticator |
Credentials are no longer passed in as constructor parameters. Rather, a single authenticator
is instantiated and passed in to the constructor.
Example:
=====================================================================================================================================================================
| Current | New |
=====================================================================================================================================================================
| | authenticator = IAMAuthenticator( |
| | apikey="api_key" |
| | url="iam_auth_url" |
| | ) |
| | |
| rcConfig = ResourceConfigurationV1( | rcConfig = ResourceConfigurationV1( |
| iam_apikey: "iam_api_key", | authenticator=authenticator |
| iam_auth_url: "iam_auth_url", | ) |
| iam_rc_endpoint_url: "iam_rc_endpoint_url", | rcConfig.set_service_url("iam_rc_endpoint_url") |
| ) | |
-
Creating API objects
Activity-Tracking
======================================================================================================================================================= | Current | New | ======================================================================================================================================================= | activity_tracking = {"read_data_events": False/True, | bucket_patch = {'activity_tracking': {"read_data_events": False/True, | | "write_data_events": False/True, | "write_data_events": False/True, | | "activity_tracker_crn": activity_tracker_crn} | "activity_tracker_crn": CRN}} | | | | | rcConfig.update_bucket_config(bucket_name, activity_tracking) | rcConfig.update_bucket_config(bucket_name, bucket_patch) |
Metrics-Monitoring
======================================================================================================================================================================== | Current | New | ======================================================================================================================================================================== | metrics_monitoring = {"metrics_monitoring_crn": metrics_monitoring_crn, | bucket_patch = {'metrics_monitoring': {"metrics_monitoring_crn": metrics_monitoring_crn, | | "usage_metrics_enabled": False/True, | "usage_metrics_enabled": False/True, | | "request_metrics_enabled": False/True} | "request_metrics_enabled": False/True}} | | | | | rcConfig.update_bucket_config(bucket_name, activity_tracking) | rcConfig.update_bucket_config(bucket_name, bucket_patch) |
Firewall
===================================================================================================================== | Current | New | ===================================================================================================================== | firewall = {"allowed_ip": [ip-list]} | bucket_patch = {'firewall': {"allowed_ip": [ip-list]}} | | | | | rcConfig.update_bucket_config(bucket_name, firewall) | rcConfig.update_bucket_config(bucket_name, bucket_patch) |
Hard-Quota
======================================================================================================================= | Current | New | ======================================================================================================================= | hard_quota = 1024 | bucket_patch = {'hard_quota': 1024} | | | | | rcConfig.update_bucket_config(bucket_name, hard_quota) | rcConfig.update_bucket_config(bucket_name, bucket_patch) |
ibm-cos-resource-config-sdk-python --> ibm-cos-sdk-python-config
This issue will be used to track features and changes we want to make in the next major release of this package.