Object Storage (HCM04) provides a range of APIs for managing data and interacting with your cloud storage resources. Here is a summary of the main types of APIs we provide:
vStorage API: you can use Service Account to authenticate and work with projects, buckets, objects, reports via API.
S3 API : you can use S3 keys to authenticate and work with buckets and objects via API.
vStorage API - Authentication
Follow the steps below to work with vStorage via Service Account
Select the Integration folder .
Select the vStorage API icon .
In the Authentication section , you need to fill in the necessary information to configure your vStorage API including:
Enter the Client ID . A Client ID is a string of characters used by the Service API to identify your application, and is also used to construct the "authorization URL" displayed to the user. You can create and manage Client IDs through the vIAM system. The Client ID is automatically generated when you create a new Service Account .
Enter the Client Secret corresponding to the Client ID you just entered. The Client ID and Client Secret pair are created and managed by you through the vIAM system. You can select Click here to manage your Client ID. so we can navigate you to the vIAM system and in detail the Service Account management screens.
Once you've finished selecting your authentication configuration , select Authentication to go to the Configuration screen . Here you can use the vStorage APIs directly, or you can use the API via Postman . You can always come back here to change your Authorization information , then select Authentication again to update the S3 Rest API list with your new parameters.
For details, please refer to https://docs.api.vngcloud.vn/service-docs/vstorage-api.html .
S3 API - Authentication
Access Key: initialize and retrieve information on the vStorage Portal.
Secret Key: initialize and retrieve information on vStorage Portal.
For example:
Working with Bucket
These APIs allow you to manage buckets.
1. Basic APIs
Create Bucket : Create a new bucket.
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041014Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=8b4d67b37ab0ba0c6bb42df8d6451fdb48aba5874a0717798aeee9f4c57b8fe9'
List Buckets : List all buckets belonging to the user.
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041050Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=997d9b761262a6827002384dd9ba21b777ec4f26e84dedd164a5866bf78d348a'
Delete Bucket : Delete a bucket (only if the bucket is empty).
Path:DELETE /<bucket-name>
Or Curl via command:
Copy curl --location --request DELETE 'https://hcm04.vstorage.vngcloud.vn/demobucket' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041239Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=e164da98dd0564eea205ec8624d701d8809afab7ab57867e45a3beb227f8a71d'
GET Bucket (List Objects) : List objects in a bucket.
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041313Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7481242fb41364a753658d7db3b2e95c4b2e10458987e14584dc297330ea7dab'
HEAD Bucket : Check for existence and access to bucket.
Or Curl via command:
Copy curl --location --head 'https://hcm04.vstorage.vngcloud.vn/demobucket' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041336Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=425119560f45bd0cd7a5a58f6835d189e0cc3d7907cdd72bfd84bd6d88f59ae9'
2. Access Control APIs
Manage access rights for buckets and objects.
GET Bucket ACL : Get the bucket's access control list (ACL).
Path:GET /<bucket-name>?acl
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket?acl=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041447Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=fd112a35fed96929de946f9c48d050c8f15ca1249ae549d7b86664adde8d81cd'
PUT Bucket ACL : Set ACL for bucket.
Path:PUT /<bucket-name>?acl
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket?acl=null' \
--header 'Content-Type: application/xml' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T043655Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=47e95dfbf5a61141dd1088cc286ee2f187ae78c0f7cc108c20538ac1ee77d18b' \
--data '<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Owner>
<ID>rootuser-092410</ID> <!-- Replace with the bucket owner'\''s canonical user ID -->
<DisplayName>Demo_user</DisplayName> <!-- Optional: Owner'\''s display name -->
</Owner>
<AccessControlList>
<Grant>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
<ID>user1-054549</ID> <!-- Replace with the grantee'\''s canonical user ID -->
<DisplayName>UserA</DisplayName> <!-- Optional: Grantee'\''s display name -->
</Grantee>
<Permission>FULL_CONTROL</Permission> <!-- Possible values: FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP -->
</Grant>
<Grant>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group">
<URI>http://acs.amazonaws.com/groups/global/AllUsers</URI> <!-- All users -->
</Grantee>
<Permission>READ</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>
'
GET Object ACL : Get the ACL of an object.
Path:GET /<bucket-name>/<object-key>?acl
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket/videoplayback.mp4?acl=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041603Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=eb53bff6d55ade68e688ea5af5b44ff9da9afb7b361e5e60563f6d0f3e4c763b'
PUT Bucket Make Public: Set up a Public Bucket
Path:GET /<bucket-name>/?publicAccessBlock
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket01/?publicAccessBlock=null' \
--header 'Content-Type: application/xml' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T063152Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=9c9624d2ac082b98e6925444ab497746/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=341d2a2ba5e1645ae7ee1b9d5e06649333b08433c7efcd47953ac3e2603ee0bb' \
--data '<PublicAccessBlockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<BlockPublicAcls>true</BlockPublicAcls>
<IgnorePublicAcls>true</IgnorePublicAcls>
<BlockPublicPolicy>true</BlockPublicPolicy>
<RestrictPublicBuckets>true</RestrictPublicBuckets>
</PublicAccessBlockConfiguration>'
GET Bucket Make Public: Get public or private bucket information.
Path:GET /<bucket-name>/?publicAccessBlock
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket01/?publicAccessBlock=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T063914Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=9c9624d2ac082b98e6925444ab497746/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=041a0737e3e204ca2941069a3bab021ad54a8eb837fcbfd2ff8d2a3dd647d060'
3. Versioning API
Manage versions of objects in buckets.
PUT Bucket Versioning : Enable or disable versioning for the bucket.
Path:PUT /<bucket-name>?versioning
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket?versioning=null' \
--header 'Content-Type: application/xml' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T041647Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=79d17ba3ab6fe55a68df54b423fa17c9633ed24b462ab4727f9997bef28ed3ac' \
--data '<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Status>Enabled</Status>
</VersioningConfiguration>'
GET Bucket Versioning : Check the bucket versioning status.
Path:GET /<bucket-name>?versioning
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket?versioning=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041708Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=b45886dbf42a0a6d613a465e38e33f6e59b548c27f361798ea168335fe8243e3'
GET Object Versions : List versions of objects in the bucket.
Path:GET /<bucket-name>?versions
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket/?versions=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T041846Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=1b4454bcc74c22d919121588f4c26ccc921b69544510ae65de3fdb1c5c9ac274'
4. API Lifecycle
Lifecycle management for buckets and objects:
PUT Bucket Lifecycle : Initializes lifecycle expiration for a bucket.
Path:PUT /<bucket-name>?lifecycle
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket?lifecycle=null' \
--header 'Content-Type: application/xml' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T042040Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=9bc1af859707fb67367fda2cb60236b2d1b9c4442a9e44a77f918242ae8bca87' \
--data '<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<Expiration>
<Days>1</Days>
</Expiration>
<ID>test-lifecyle</ID>
<Filter>
<Prefix>*</Prefix>
</Filter>
<Status>Enabled</Status>
</Rule>
</LifecycleConfiguration>'
GET Bucket Lifecycle : Get bucket lifecycle rule information.
Path:GET /<bucket-name>?lifecycle
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket?lifecycle=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042134Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=31f4e56f55429f271348de461934dc4c495856330d333559fa6e9ae983800fbd'
DELETE Bucket Lifecycle : Deletes the lifecycle rules set for the bucket.
Path:DELETE /<bucket-name>?lifecycle
Or Curl via command:
Copy curl --location --request DELETE 'https://hcm04.vstorage.vngcloud.vn/demobucket?lifecycle=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042209Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=c4ab9fbfa8ca73af115142e0a78103e0292e87af6b70a214f21fe020535c3db0'
5. CORS API
Manage access and use S3 as a static website hosting service.
PUT Bucket Website : Set up the bucket as a static website.
Path:PUT /<bucket-name>?cors
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket?cors=null' \
--header 'Content-Type: application/xml' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T042330Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=bdfa1e44bd7f1e52c0c40b73ea484b68dbd2bd80c2a470f41262740614d64a1d' \
--data '<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin> <!-- Allows all origins -->
<AllowedMethod>GET</AllowedMethod> <!-- Allows the GET HTTP method -->
<AllowedMethod>POST</AllowedMethod> <!-- Allows the POST HTTP method -->
<AllowedMethod>PUT</AllowedMethod> <!-- Allows the PUT HTTP method -->
<AllowedMethod>DELETE</AllowedMethod> <!-- Allows the DELETE HTTP method -->
<AllowedHeader>*</AllowedHeader> <!-- Allows all headers in requests -->
<MaxAgeSeconds>3000</MaxAgeSeconds> <!-- Cache the response for preflight requests for 3000 seconds -->
<ExposeHeader>x-amz-request-id</ExposeHeader> <!-- Exposes the x-amz-request-id header to the client -->
</CORSRule>
</CORSConfiguration>
'
GET Bucket Website : Get the bucket's website configuration.
Path:GET /<bucket-name>?cors
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket?cors=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042406Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=7632d687924e286195d06f4024d2307c91ccb6df49f6da27328acdd63da63458'
DELETE Bucket Website : Deletes the bucket's website configuration.
Path:DELETE /<bucket-name>?website
Or Curl via command:
Copy curl --location --request DELETE 'https://hcm04.vstorage.vngcloud.vn/demobucket?cors=null' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042453Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=78fdf2ff9a9ec36927431dc1f42a8d5fdcb8fd4a1a2c48794cd45c555de3d6b9'
6. API Object Locked
Attention:
To set Object Locked for a bucket, when initializing the bucket, you need to add the parameter x-amz-bucket-object-lock-enabled = true .
Set Object Locked via API.
Update Object Locked Configuration: Used to upload objects into a bucket.
Path:PUT /<bucket-name>?object-lock
Or Curl created via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demoobjectlocked?object-lock=null' \
--header 'Content-MD5: frQ6AD8WUb/ZlO+2+AKIlw==' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T085503Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=c65bce455f431914fe5f39c28e8d56f7/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=f39c72fe719ac44ea493df3013534510ea44d5f75360186532b514fe38139a8c' \
--data '<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>COMPLIANCE</Mode>
<Days>1</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>'
Working with Objects
These are the basic APIs for manipulating objects (files) in S3.
PUT Object : Used to upload objects into a bucket.
Path:PUT /<bucket-name>/<object-key>
Or Curl via command:
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket/demoobject.txt' \
--header 'Content-MD5: h6xLdLBQrPaV94Ve6q8WPQ==' \
--header 'Content-Type: text/plain' \
--header 'X-Amz-Content-Sha256: beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20240829T042534Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=content-length;content-md5;content-type;host;x-amz-content-sha256;x-amz-date, Signature=f0592a78ee6b84a5b7cbc4edaf90e76cacc496a0351c5d10b19b9a574e4e9a1a' \
--data 'datatest'
GET Object : Get an object from S3.
Path:GET /<bucket-name>/<object-key>
Or Curl via command:
Copy curl --location 'https://hcm04.vstorage.vngcloud.vn/demobucket/demoobject.txt' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042558Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=5d1d085388c0464652e30d68b894e4ff1a6ade86c8f04eed4f9fba7c5968676d'
DELETE Object : Delete an object from S3.
Path:DELETE /<bucket-name>/<object-key>
Or Curl via command:
Copy curl --location --request DELETE 'https://hcm04.vstorage.vngcloud.vn/demobucket/demoobject.txt' \
--header 'x-amz-bypass-governance-retention: true' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042811Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-bypass-governance-retention;x-amz-content-sha256;x-amz-date, Signature=54babdc95afd251946a37352d569f825cc5bce8c7b900c0c03874fb3554fdf6c'
Attention:
To delete a version object, you need to add the versionId param to this API. For example, to delete the test.txt object with version-id = "z3-o0S5HEC6-XsjEjuHoRwoE-F6X1IF", you can curl the following command:
Copy curl --location --request DELETE 'https://hcm04.vstorage.vngcloud.vn/demobucket/test.txt?versionId=z3-o0S5HEC6-XsjEjuHoRwoE-F6X1IF' \
--header 'x-amz-bypass-governance-retention: true' \
--header 'versionId: z3-o0S5HEC6-XsjEjuHoRwoE-F6X1IF' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240911T065412Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=b98adf996bb003a1bd79748c5e779ccd/20240911/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-bypass-governance-retention;x-amz-content-sha256;x-amz-date, Signature=6a69759b132a6be8f609fb66bca41f06a33e560ca4ff012de01351cc7bcbd05e'
HEAD Object : Query object metadata without downloading content.
Path:HEAD /<bucket-name>/<object-key>
Or Curl via command:
Copy curl --location --head 'https://hcm04.vstorage.vngcloud.vn/demobucket/demoobject.txt' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T042639Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=0fe5fc5caca290919c3782c74f793c0f7cfe36f4f2c7829de8b895bab51ac7d1'
COPY Object : Copy an object from one S3 location to another.
Request: PUT /<destination-bucket>/<destination-object-key>
with header x-amz-copy-source
.
Copy curl --location --request PUT 'https://hcm04.vstorage.vngcloud.vn/demobucket01/demoobject.txt' \
--header 'x-amz-copy-source: /demobucket/demoobject.txt' \
--header 'x-amz-object-lock-legal-hold: OFF' \
--header 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-Amz-Date: 20240829T040428Z' \
--header 'Authorization: AWS4-HMAC-SHA256 Credential=f8502b7bf7ca4773c68899d9efd85474/20240829/HCM04/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-copy-source;x-amz-date;x-amz-object-lock-legal-hold, Signature=bf53eedc8b407de21d94c73191940f2257a6c9759f411e844c912de3c2b26ee9'