IBM / ibm-cos-sdk-python

ibm-cos-sdk-python
Apache License 2.0
44 stars 26 forks source link

README.md client configuration sample out of sync with SoftLayer docs. #21

Closed maxcaibm closed 5 years ago

maxcaibm commented 5 years ago

The configuration instructions are out of date with those provided here: https://console.bluemix.net/docs/services/cloud-object-storage/libraries/python.html#using-python

Here is the SoftLayer docs:

import ibm_boto3
from ibm_botocore.client import Config

# Constants for IBM COS values
COS_ENDPOINT = "<endpoint>" # Current list avaiable at https://cos-service.bluemix.net/endpoints
COS_API_KEY_ID = "<api-key>"
COS_AUTH_ENDPOINT = "https://iam.ng.bluemix.net/oidc/token"
COS_RESOURCE_CRN = "<resource-instance-id>"
COS_BUCKET_LOCATION = "<location>"

# Create resource
cos = ibm_boto3.resource("s3",
    ibm_api_key_id=COS_API_KEY_ID,
    ibm_service_instance_id=COS_RESOURCE_CRN,
    ibm_auth_endpoint=COS_AUTH_ENDPOINT,
    config=Config(signature_version="oauth"),
    endpoint_url=COS_ENDPOINT
)

The above instructions more closely match what the user has to do, especially since the fields are named slightly differently.

barry-hueston commented 5 years ago

Hi @maxcaibm, we will review the documentation and provide an update shortly.

Thanks Barry

paul-carron commented 5 years ago

This will be resolved in the next patch release.

maxcaibm commented 5 years ago

Thank you for the update!

Max

Sent from my iPhone

On Jan 10, 2019, at 04:29, Paul Carron notifications@github.com wrote:

This will be resolved in the next patch release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

paul-carron commented 5 years ago

@maxcaibm the README was updated in the last patch release.

It now contains URL's to the relevant code examples.