IBM Cloud Object Storage - does object versioning support and how do I get the UUID?

1) The documentation says:

Universally Unique Identifier (UUID): This identifier is assigned to every object in the OBS system. This UUID allows the object storage system to distinguish objects from each other and is used to find data without having to know the exact physical disk, array, or site where the data resides.

However, I cannot find information in the API on how to retrieve objects via their UUID or how to get the UUID of an object. Can I do it?

2) Does COS support automatic maintenance of stored objects like aws? For example, if I store data in a versioned slave, I get a header x-amz-version-id

(see here ) with the version ID that was assigned. Does the COS version support version control, and if so, how do I get the object versions?

+3


source to share


2 answers


The UUID object is actually a combination {bucket-name}/{object-key}

. Since each bucket name must be globally unique, this allows the key object to define a unique identifier for the object. Thanks for asking this, I must rewrite this part of the docs to not use a UUID as this implies an additional base ID.



Not at this time, COS does not support S3-style versioning of AWS objects in the public cloud (although it is possible in private cloud implementations). It will be on the roadmap later this year.

+2


source


Regulatory version, I don't know, but if you want the UUID to be as AWS presents it, then you can also talk about Etag. The Etag for this object looks like this:

52816d090462f946a7a6273ea3d3896c

      



To get this Etag, BOTO3 is awesome: use this call to get it:

s3ressource = client(
    service_name='s3', 
    endpoint_url= "endpoint_url",
    aws_access_key_id= "aws_access_key_id",
    aws_secret_access_key="aws_secret_access_key",
    use_ssl=True,
    )


OBJE = s3ressource.head_object(Bucket = TheNameOfYourBucket, Key = theNameOfYourObject) 
ETAGOBJE=OBJE['ETag']

      

0


source







All Articles