Applicable Products
myQNAPcloud Object
What is myQNAPcloud Object?
myQNAPcloud Object is a cloud-based object storage service designed to provide high-performance, reliable, and secure data storage for a broad range of applications and use cases. This service is built to be fully compatible with the Amazon Web Service Simple Storage Service (AWS S3) API, ensuring seamless integration with S3-compatible applications and gateway devices.
myQNAPcloud Object is tailored for individuals and organizations seeking a cost-effective and efficient data storage infrastructure. Designed to work with S3-compatible applications, myQNAPcloud Object enables users to leverage familiar tools and workflows while benefiting from the reliability and flexibility of QNAP’s ecosystem.
- Compatibility: myQNAPcloud Object is designed to be fully compatible with the AWS S3 API, ensuring that existing AWS S3-compatible applications can work seamlessly.
- Performance: myQNAPcloud Object offers a high-performance storage solution optimized for reliability and efficiency.
About myQNAPcloud Object S3 API Guide
While myQNAPcloud Object aligns closely with AWS S3, certain features may have been enhanced or implemented differently. This guide aims to clarify these nuances to help users maximize the potential of myQNAPcloud Object.
This guide uses examples involving access to buckets in specific myQNAPcloud Object regions. For more information about region-specific endpoints and service URLs, see "Service URLs for myQNAPcloud Object Storage Regions".
Note
- Regional URLs: When accessing buckets, ensure that you use URLs specific to the myQNAPcloud Object storage region where your bucket is created. Using the incorrect URL may allow GET requests but could result in errors for PUT or DELETE operations. Refer to the [Service URLs for myQNAPcloud Object Storage Regions].
- ASW IAM: Unlike AWS, myQNAPcloud Object does not include support for AWS IAM (Identity and Access Management). Therefore, this guide focuses exclusively on S3 API compatibility and does not reference IAM-related capabilities.
REST API Introduction
Host Designation
myQNAPcloud Object supports both path-style and virtual-style requests, similar to AWS S3. A unique host name is required (for example, s3.us-east-1.myqnapcloud.io versus s3.amazonaws.com). We recommend using path-style requests, as shown in all examples in this guide (e.g., http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object) because path-style requests provide greater flexibility in bucket naming, avoiding domain name conflicts.
Always Consistent
Unlike the strong consistency model of AWS S3, myQNAPcloud Object provides an "always consistent" view of all operations. This ensures that any operation following another will produce consistent results. For instance, after deleting an object (DELETE operation), performing a subsequent HEAD request will always confirm the object's deletion, eliminating the need for additional programming to wait for operation completion.
Authenticating Requests
myQNAPcloud Object supports both autonomous and signature versions 2 and 4, compatible with AWS S3, for headers and query parameters. While signature version 4 offers better security, it requires more computational resources due to the overhead of calculating the SHA256 hash. If performance is critical, signature version 2 may be used, with MD5 (returned as the ETag header) ensuring data integrity.
For version 4 signing requests, all regions are supported for myQNAPcloud Object signing requests.
myQNAPcloud Object does not support signature signing for browser-based uploads or HTML form requests, as these operations are not currently supported.
For version 2 signing, the following sub-resource keys are specified as query parameters in requests:
- append
- compose
- force_delete=true
These query parameters must be included when calculating the signature for PutObject and DeleteBucket operations.
Error Responses
Wherever possible, myQNAPcloud Object uses error responses compatible with AWS S3. Additional error codes may also be provided for enhanced functionality.
HTTP Error Codes
| Error Code | myQNAPcloud Object Description | HTTP Status Code |
|---|
| Unavailable | Temporarily unavailable | 503 |
| Unrecoverable | Data Unrecoverable |
|
| Not Implemented | Not Implemented | 501 |
| DB Entity Not found | No such entity | 404 |
| DB Entity Found | Entity Already Exists | 409 |
| Disconnect Error | Connection Closed | 410 |
| Status Internal Server Error | Internal Error: We encountered an internal error. Please contact customer support. | 500 |
| Status Forbidden | Access Denied | 403 |
| Access Forbidden |
| Account Not Activated |
| Account Problem |
| Authentication Lockout: There have been too many attempts to access the account with the wrong credentials. Please try again in five minutes. |
| Invalid Access Key ID: The AWS Access Key ID you provided does not exist in our records. |
| Invalid Authentication Code: Authentication code for device is not valid. |
| Request Time Too Skewed: The difference between the request time and the current time is too large. |
| Invalid Object State: The operation is not valid for the current state of the object. |
| Status Bad Request | Authorization Header Malformed | 400 |
| Authorization Query Parameters Error |
| Bad Digest: The Content-MD5 you specified did not match what we received. |
| Bad Request: An error occurred when parsing the HTTP request. |
| Incomplete Signature: Request must contain a signature that conforms to AWS standards. |
| Invalid Action |
| Invalid Argument |
| Invalid Digest: The Content-MD5 you specified was invalid. |
| Invalid Input |
| Invalid Parameter Value: An invalid or out-of-range value was supplied for the input parameter. |
| Invalid Request |
| Malformed Policy |
| Malformed Policy Document |
| Password Policy Violation |
| Validation Error |
| X Amz Content SHA256 Mismatch: The provided 'x-amz-content-sha256' header does not match what was computed. |
| Encryption Not Allowed: User provided encryption keys are not allowed in this operation. |
| The object was stored using a form of Server Side Encryption. The correct parameters must be provided to retrieve the object. |
| Entity Too Large: Your proposed upload is larger than the maximum allowed size. |
| Entity Too Small: Your proposed upload is smaller than the minimum allowed size. |
| Illegal Compliance Request |
| Illegal Versioning Configuration Exception: The versioning configuration specified in the request is not valid. |
| Incomplete Body: You did not provide the number of bytes specified by the Content-Length HTTP header. |
| Invalid ACL Request: You must provide only one of either ACL headers or an XML body when setting ACLs. |
| Invalid Argument |
| Invalid Bucket Name: The specified bucket is not valid. |
| Invalid Encryption Algorithm Error: The Encryption request you specified is not valid. Supported value: AES256. |
| Invalid Part Order: The list of parts was not in ascending order. Parts must be ordered by part number. |
| Invalid Part: One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag. |
| Invalid Policy Document: The content of the form does not meet the conditions specified in the policy document. |
| Key Too Long Error: Your key is too long. |
| Logging Bucket Same Owner: The logging target bucket must have the same owner as the bucket being logged. |
| Malformed XML: The XML you provided was not well formed or did not validate against our published schema. |
| Meta data Too Large: Your metadata headers exceed the maximum allowed metadata size. |
| Request Timeout: Your socket connection to the server was not read from or written to within the timeout period. |
| Too Many Buckets: You have attempted to create more buckets than allowed. |
| Too Many Components: A composite object may not have more than 1024 components. |
| Unresolvable Grant By Email Address: The email address you provided does not match any account on record. |
| Storage Quota Exceeded: Your account has surpassed its storage limit. |
| Bucket Account Inactive: The account that owns this bucket is not active. |
| Status Gone | Connection Closed: Network connection was closed. | 410 |
| Status Unprocessable Entity | Data Unrecoverable: The data in the request is unrecoverable. Please contact customer support. | 422 |
| Status Conflict | Delete Conflict | 409 |
| Entity Already Exists |
| Entity Temporarily Unmodifiable: The entity is temporarily unmodifiable. Please try again later. |
| Limit Exceeded |
| Operation Aborted: A conflicting conditional operation is currently in progress against this resource. Please try again. |
| Bucket Already Exists |
| Bucket Not Empty |
| Compliance Settings Locked: The compliance settings are now locked and cannot be changed. |
| Status Not Found | No Such Entity | 404 |
| No Such Lifecycle Configuration: The lifecycle configuration does not exist. |
| No Such Bucket: The specified bucket does not exist. |
| No Such Bucket Policy: The bucket policy does not exist. |
| No Such Key: The specified key does not exist. |
| No Such Replication Configuration: The replication configuration does not exist. |
| No Such Tag Set Error: There is no tag set associated with the bucket. |
| No Such Upload: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. |
| No Such Version: The specified version does not exist. |
| Status Not Implemented | Not Implemented: A header you provided implies functionality that is not implemented. | 501 |
| Status Service Unavailable | Temporarily Unavailable: Resources for this operation are temporarily unavailable. Please try again later. | 503 |
| Status Found | Key Already Exists | 302 |
| Status Method Not Allowed | Method Not Allowed: This method is not allowed for other than the account owner. | 405 |
| Method Not Allowed: The specified method is not allowed against this resource. |
| Status Length Required | Missing Content Length: You must provide the Content-Length HTTP header. | 411 |
TCP Error Codes
myQNAPcloud Object supports the following TCP error codes:
- Unexpected EOF
- Broken Pipe
- Connection reset by Peer
Not Supported in myQNAPcloud Object
| Operation | Description |
|---|
| SOAP | AWS S3 has deprecated support for SOAP, and myQNAPcloud Object does not support any SOAP operations. |
Operations on Buckets with myQNAPcloud Object S3 API
Operations on buckets include: deleting, renaming, and logging buckets as well as cross-origin resource sharing (CORS) support, lifecycle policy, object locking, and compliance.
Force Delete Bucket
AWS S3 will not allow you to delete a bucket if it contains objects that have not been deleted.
myQNAPcloud Object provides a force delete option that first deletes all the objects in the bucket and then deletes the bucket. The deletion of objects is subject to policy and compliance requirements on the bucket.
To use the force delte option, simply add it as a query string. For example:
DELETE http://s3.us-east-1.myqnapcloud.io/my-bucket?force_delete=true HTTP/1.1
Renaming a Bucket
AWS S3 does not support renaming of buckets. It only supports renaming of objects in a bucket.
myQNAPcloud Object supports the renaming of buckets. The new bucket name must not be in use for the renaming to be successful. The caller must have the s3:CreateBucket policy permission to rename a bucket.
To rename a bucket, use the HTTP method MOVE along with the header field “Destination” to give the new bucket name. For example:
MOVE http://s3.us-east-1.myqnapcloud.io/my_old_bucket HTTP/1.1
Destination: my_new_bucket
MFA (Multi-Factor Authentication) Delete
myQNAPcloud Object supports the “x-amz-mfa” header while:
- configuring versioning on a bucket, or
- deleting objects with object deletion requests compatible with AWS S3.
myQNAPcloud Object does not require the “x-amz-mfa” header if the user's access credentials signing the request were authenticated with MFA. myQNAPcloud Object only supports virtual MFA devices.
Maximum Number of Buckets
Standard AWS S3 supports only 100 buckets.
myQNAPcloud Object allows for a maximum of 1000 buckets per account and this number may be increased by contacting myQNAPcloud Object Customer Support.
Bucket Logging
myQNAPcloud Object supports bucket logging, which creates a text log file of all access to a bucket. The format of the log file is identical to the AWS S3 log file.
myQNAPcloud Object bucket logging does not require any ACL permission settings to store logs in a target bucket. Although you can give permission settings in the logging request or in an ACL, they are not required for logging to work in myQNAPcloud Object. However, the bucket that is a target for log files must be inside the same account as the bucket being logged.
Bucket Cross-Origin Resource Sharing (CORS) Support
For compatibility with browser access to myQNAPcloud Object as a web server, the myQNAPcloud Object server will return CORS headers when the header “Origin” is given in an HTTP request. Additionally, the server supports the HTTP method OPTIONS on either buckets or objects to return the CORS headers needed for a browser pre-flight test before accessing myQNAPcloud Object.
Different from AWS, myQNAPcloud Object returns the settings that will allow the browser full access to myQNAPcloud Object. Hence, myQNAPcloud Object does not support the AWS functions that allow a PUT and GET on a bucket with the “cors” parameter in the URL. Note that allowing browser full access to data does not affect the security of access to any objects and all access policies will still be enforced.
The following are the HTTP headers returned by default when the header “Origin” is given in an HTTP request:
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, MOVE, OPTIONS
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 86400
Lifecycle Policy
The Lifecyle feature establishes a Lifecycle policy with rules to define actions that you want myQNAPcloud Object to take during the life of an object. This feature replaces the need to manually delete an object after a retention period.
Configuring Lifecycle Settings
The lifecycle settings for a bucket are configuring with the "put-bucket-lifecycle-configuration" command. For example:
$ aws s3api put-bucket-lifecycle-configuration --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io --lifecycle-configuration file://lifecycle.json
{
"Rules": [
{
"Expiration": {
"Days": 1
},
"ID": "lifecycle_rule_1",
"Filter": {
"And": {
"ObjectSizeGreaterThan": 1,
"ObjectSizeLessThan": 21474836480
}
},
"Status": "Enabled"
},
{
"Expiration": {
"Days": 1
},
"ID": "object_lifecycle_rule_bucket_6807766",
"Filter": {
"Prefix": "1"
},
"Status": "Enabled"
}
]
}
Here is another example:
PUT https://s3.us-east-1.myqnapcloud.io/1-1-1-1?lifecycle
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<Expiration>
<Days>1</Days>
</Expiration>
<ID>lifecycle_rule_1</ID>
<Filter>
<And>
<ObjectSizeGreaterThan>1</ObjectSizeGreaterThan>
<ObjectSizeLessThan>21474836480</ObjectSizeLessThan>
</And>
</Filter>
<Status>Enabled</Status>
</Rule>
<Rule>
<Expiration>
<Days>1</Days>
</Expiration>
<ID>object_lifecycle_rule_bucket_6807766</ID>
<Filter>
<Prefix>1</Prefix>
</Filter>
<Status>Enabled</Status>
</Rule>
</LifecycleConfiguration>
There is no response body for this call.
Retrieving Lifecycle Settings
The lifecycle settings for a bucket can be retrieved with the "get-bucket-lifecycle-configuration" command. For example:
$ aws s3api get-bucket-lifecycle-configuration --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io
{
"Rules": [
{
"Expiration": {
"Days": 1
},
"ID": "lifecycle_rule_1",
"Filter": {
"And": {
"ObjectSizeGreaterThan": 1,
"ObjectSizeLessThan": 21474836480
}
},
"Status": "Enabled"
},
{
"Expiration": {
"Days": 1
},
"ID": "object_lifecycle_rule_bucket_6807766",
"Filter": {
"Prefix": "1"
},
"Status": "Enabled"
}
]
}
Here is another example:
GET https://s3.us-east-1.myqnapcloud.io/1-1-1-1?lifecycle
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<Expiration>
<Days>1</Days>
</Expiration>
<ID>lifecycle_rule_1</ID>
<Filter>
<And>
<ObjectSizeGreaterThan>1</ObjectSizeGreaterThan>
<ObjectSizeLessThan>21474836480</ObjectSizeLessThan>
</And>
</Filter>
<Status>Enabled</Status>
</Rule>
<Rule>
<Expiration>
<Days>1</Days>
</Expiration>
<ID>object_lifecycle_rule_bucket_6807766</ID>
<Filter>
<Prefix>1</Prefix>
</Filter>
<Status>Enabled</Status>
</Rule>
</LifecycleConfiguration>
Deleting Lifecycle Settings
The lifecycle settings for a bucket can be deleted with the "delete-bucket-lifecycle" command. For example:
$ aws s3api delete-bucket-lifecycle --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io
There is no response body for this call.
Object Lock
myQNAPcloud Object supports an object lock that prevents the deletion or overwrite of object versions for a fixed amount of time or indefinitely.
| Tag | Description |
|---|
| ObjectLockConfiguration | This is the mandatory root level tag for object lock configuration. |
| ObjectLockEnabled | This tag must be configured as Enabled. |
| Rule | This specifies the object lock rule for a bucket. It requires both a mode and a period. The period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time. Mode should be either COMPLIANCE or GOVERNANCE. |
The object lock settings for a bucket are specified using the “?object-lock” query string along with the object lock settings as the XML body in the request. For example:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>COMPLIANCE</Mode>
<Days>10</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
The object lock settings for a bucket can be retrieved by getting the bucket with the “?object-lock” query string. For example:
GET https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>COMPLIANCE</Mode>
<Days>10</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
There are also object lock settings for each object described in Operations on Objects.
The object lock settings for a bucket can be cleared using "?object-lock" query string. For example:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1
Response body:
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode></Mode>
<Days></Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
myQNAPcloud Object Compliance
myQNAPcloud Object supports a compliance policy that prevents the deletion of objects and provides additional information to prove that the original data is not modified since the time written. The compliance feature may be required for certain regulatory needs, but is also useful to prevent accidental data deletion.
Compliance is different from the object locking setting for a bucket.
You can set the compliance policy on any bucket controlling all the objects that are stored in that bucket. Specify the bucket compliance policy with the following XML tags.
| Tag | Description |
|---|
| Status | Either "enabled" or "disabled" to turn compliance on and off, respectively. Enabling will immediately apply to all objects in the bucket. |
| LockTime | The time at which the compliance settings are "locked"-the settings cannot be reduced by any API call. Once the settings are locked, they cannot be unlocked without the intervention of QNAP Customer Support. The lock time allows you to support two use cases:- Testing that your software works properly before locking the compliance feature; or
- Never locking which means that data can be deleted with an additional step of an administrator turning compliance off.
The lock time parameter may be:- An ISO date (for example, 2016-11-07T15:08:05Z),
- The string "now" to force immediate locking, or
- The string "off to not lock the compliance settings. This is the default.
|
| RetentionDays | An integer for the minimum number of days that objects are always retained after their creation date or release from conditional hold. You can extend the retention date for any individual object, but may not shorten the date. This parameter is always required. |
| ConditionalHold | A Boolean value ("true" or "false") indicating if newly created objects are placed on conditional hold, meaning that they cannot be deleted until the conditional hold is explicitly turned off. The default is false if this parameter is not given. Note that this setting may be changed even after the settings are locked. |
The compliance settings for a bucket are specified using the “?compliance” query string along with the compliance settings as the XML body in the request. For example:
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket?complianceHTTP./1.1
<BucketComplianceConfiguration>
<Status>enabled</Status>
<LockTime>off</LockTime>
<RetentionDays>365</RetentionDays>
<DeleteAfterRetention>true</DeleteAfterRetention>
</BucketComplianceConfiguration>
After compliance is enabled for a bucket, the policy is immediately applied to all objects in the bucket. An attempt to delete an object before the retention period will return an error.
The compliance settings for a bucket can be retrieved by getting the bucket with the “?compliance” query string. For example:
GET http://s3.us-east-1.myqnapcloud.io/my-buck?complianceHTTP/1.1
Response body:
<BucketComplianceConfiguration xml ns="http://s3.amazonaws.com/doc/2006-03-01/">
<Status>enabled</Status>
<LockTime>2016-11-07T15:08:05Z</LockTime>
<IsLocked>false</IsLocked>
<RetentionDays>0</RetentionDays>
<ConditionalHold>false</ConditionalHold>
<DeleteAfterRetention>false</DeleteAfterRetention>
</BucketComplianceConfiguration>
There are also compliance settings for each object described in Operations on Objects.
Operations on Buckets Not Supported in myQNAPcloud Object
| Operation | Description |
|---|
| Bucket Tagging | Bucket tagging is currently unavailable in myQNAPcloud Object. |
| Bucket Website | Website configuration is unavailable in myQNAPcloud Object. Given the nature of myQNAPcloud Object as a long-term object store, we do not expect to support website operations to buckets. The header "x-amz-website-redirect-location" is ignored in any object requests. |
| Bucket Accelerate | myQNAPcloud Object does not implement the AWS S3 bucket accelerate subresource. |
| Bucket Request Payment | myQNAPcloud Object does not support the use of the "requestPayment" subresource for buckets. |
| Metrics Configuration | myQNAPcloud Object does not support the operation to receive one-minute CloudWatch metrics, set CloudWatch alarms, and access CloudWatch dashboards to view near-real-time operations and performance of your Amazon S3 storage. |
S3 Block Public Access | myQNAPcloud Object does not support the operation to centrally block existing public access (whether it is made possible via an ACL or a policy) and make sure newly created items are not inadvertently granted public access. |
| S3 Select | myQNAPcloud Object does not support the S3 Select API. |
Operations on Objects With myQNAPcloud Object S3 API
Operations on Objects include renaming, composing, appending, and deleting objects as well as encryption, storage class, object locking, and compliance.
Renaming Objects
myQNAPcloud Object supports functionality to move an object-in effect, renaming the object by changing the key. This eliminates the two-step process of first copying an object and then deleting the original object. The caller must have s3:PutObject policy permission on the bucket to rename objects.
To rename objects, use the HTTP method MOVE along with the following parameters in the request headers that affect the move operation.
|
| Overwrite | A Boolean value that, when “true,” allows overwriting destination objects with the same key. Otherwise, an error is generated and the original key is not changed. |
| X-Wasabi-Quiet | A Boolean value that, when “true,” causes the XML status return body to only display the keys that encounter errors. Otherwise, all objects renamed are given in the status. The default value is “false.” |
| X-Wasabi-Prefix | A Boolean value that, when “true,” means that the values given for the source in the URL and the destination are prefixes—they match the left-most part of keys. Conceptually, think of the prefix as a folder of objects. Otherwise, only the objects (including all versions) that exactly match the key are renamed. The default value is “false.” |
The call will return the results as an XML body of the response. The results include the following for each object renamed:
- original source key,
- renamed destination key,
- version ID of the object, and
- any error in the rename operation.
The quiet option will cause the results to list only the keys that encountered an error.
Below is an example, which renames all objects that start with the prefix “TestMove-Dir2/” to have the new prefix “TestMove-Dir2-Renamed/
MOVE http://s3.us-east-1.myqnapcloud.io/my_bucket/TestMove-Dir2/HTTP/1.1 Destination:TestMove-Dir2-Renamed/X-Wasabi-Prefix:true
Response body:
<MoveObjectResult> <SourcePrefix>TestMove-Dir2/SourcePrefix> <DestinationPrefix>TestMove-Dir2-Renamed/DestinationPrefix> <MoveObject> <SourceKey>TestMove-Dir2/SourceKey> <DestinationKey>TestMove-Dir2-Renamed/DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir1/SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir1/DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir1/Obj1SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir1/Obj1DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir1/Obj2SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir1/Obj2DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir2/SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir2/DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir2/Obj1SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir2/Obj1DestinationKey> MoveObject> <MoveObject> <SourceKey>TestMove-Dir2/Dir2/Obj2SourceKey> <DestinationKey>TestMove-Dir2-Renamed/Dir2/Obj2DestinationKey> MoveObject> <MoveCount>7MoveCount> MoveObjectResult>
Composing Objects
myQNAPcloud Object provides a feature to create a new object that is composed of other objects. A composed object is formed not by copying the original data objects, but rather by linking the composed object to the data objects. This is in contrast to AWS S3, which does not offer a way to compose objects. myQNAPcloud Object operation is much faster and does not require multiple copies of the original data. The original composed objects may be deleted at any time, and the system will retain the original data as long as there are any links to the data.
Composing objects is an alternative to using the multi-part upload feature for creating objects larger than 5 GB. The caller must have s3:PutObject policy permission on the bucket to compose objects. Composed objects may be created from other composed objects as well as original data objects. However, the total number of original data objects may not exceed 32 in any one composed object. Composed objects may only link to other objects in the same bucket.
The compose operation is done using the HTTP method PUT with the query string parameter “?compose” to indicate that the object is composed of objects given in the XML body. The XML body contains a list of object keys and, optionally, the version IDs that form the new object. If the version ID is not given, the latest version of the object is used. The new object will appear to be one object with all the linked data objects concatenated. The new composed object does not have an ETag (i.e, MD5) value, which is the MD5 of the concatenated objects, but rather the result of hashing all the data object MD5s together (like the calculation done when multi-part objects are completed). Composed objects may not have user provided encryption keys. However, all data is stored encrypted at rest.
There is a charge only for the metadata used in composed objects. The original data used in linked objects is charged at the normal rate until all composed objects that link to the original data object are deleted.
Below is an example that composes a new object “TestComp from three objects: “TestCompose-Data-1”, “TestCompose-Data-2”, and “TestCompose-Data-3”.
PUT http://s3.wasabisys.com/my_bucket/TestCompose-Object-1?composeHTTP/1.1Content-Type:text/xml
<ComposeRequest>
<Component>
<Key>TestCompose-Data-1</Key>
</Component>
<Component>
<Key>TestCompose-Data-2</Key>
</Component>
<Component>
<Key>TestCompose-Data-3</Key>
</Component>
</ComposeRequest>
Appending to Objects
AWS S3 does not offer a way to append to objects.
Appending to an existing object is a different form of composing an object (see Composing Objects). The call uploads the data in the body to a temporary object and then creates a new composed object consisting of the data from the original object with the newly uploaded data appended. If the bucket is versioned, a new version of the composed object is created while keeping the original data. When not versioned, the newly composed object replaces the original object. The caller must have s3:PutObject policy permission on the bucket to append to objects. Additionally for a bucket without versioning, the s3:DeleteObject policy permission may be required to replace the original object.
Like composed objects, you can append only 1023 times to any object since each creates a link to the uploaded data. Be careful not to simply append small amounts of data many times to an object since each append data uploaded creates a new object subject to minimum size charges, and can slow down the performance due to a small data read. The append operation is done using the HTTP method PUT with the query string parameter “?append”. The data to be appended is uploaded in the body of the request.
Below is an example that appends the string “<appended data>” to an existing object “TestAppend-Object”.
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket/TestAppend-Object?appendHTTP/1.1Content-Length:15
PUT Object Copy Uses Link
Normally, to rename objects using AWS S3 protocol, an object is uploaded with one key value. Then, a PUT operation with the new key value copied from the original key value is given, and the object for the original key value is deleted.
myQNAPcloud Object automatically optimizes this sequence by linking the new key value object to the original data from the copy key value. This avoids making another copy of the data, which would result in higher storage charges. Because myQNAPcloud Object uses links to the original data, any size object up to the 5 TB limit may be copied and does not require the use of a multi-part upload.
Delete Object MFADelete
If the MFADelete option is turned on in the bucket versioning, the “x-amz-mfa” is not required if the access credentials were signed using MFA (see also MFA (Multi-Factor Authentication) Delete).
If bucket logging is enabled, deleting multiple objects will create a separate log entry for each object that is deleted.
GET Object Response Headers
Any header in the GET object request that starts with “response-” will be returned as a response header (minus the string “response-”).
Object Server-Side Encryption
myQNAPcloud Object encrypts all data stored at rest regardless of the requested encryption. The system will use any caller provided encryption keys when given, or generate a random key encryption key for each object if no customer key is provided. If the customer provides the encryption key, similar to AWS S3, myQNAPcloud Object will not keep a copy of the customer key in the metadata and the caller must provide the encryption key to read the data. No action on the part of the caller is needed if myQNAPcloud Object provides the encryption key.
The caller may provide the encryption key using the headers x-amz-server-side-encryption-customer-algorithm, x-amz-server-side-encryption-customer-key, and x-amz-server-side-encryption-customer-key-MD5. These parameters work identical to AWS S3.
myQNAPcloud Object does not support a key management service. Hence, the “x-amz-server-side-encryption” is not supported along with all the “aws:kms” functionality. myQNAPcloud Object stores an MD5 for the data that is always the uploaded data regardless of server-side encryption.
Object Storage Class
myQNAPcloud Object only provides a single storage class which is most like the standard AWS S3 storage class. Where the storage class is returned in any operation, myQNAPcloud Object will return the standard AWS S3 storage class.
Operations on Objects Not Supported in myQNAPcloud Object
|
| Object RESTORE | myQNAPcloud Object does not support multiple classes of storage and does not support the POST object RESTORE request used to restore objects from a different class of storage. |
| Select Object Content | myQNAPcloud Object does not support the operation to filter the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. |
| S3 Batch Operations | myQNAPcloud Object does not support S3 Batch Operations for object management. |
Compliance with myQNAPcloud Object S3 API
The compliance settings for any one object in a bucket with compliance can also be changed within the limits of the compliance on the bucket. Specify the object compliance settings with the following XML tags.
|
| LegalHold | A Boolean value “true” or “false” to set the legal hold status. When an object has a legal hold status of true, the object cannot be deleted regardless of the retention period. |
| RetentionTime | An ISO time giving a new retention time for the object in which the object cannot be deleted before this time. Note that the new retention time must be past the retention period given by the bucket policy or an error is returned. |
The following is an example of setting the compliance on an object:
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object?complianceHTTP/1.1
<ObjectComplianceConfiguration>
<ConditionalHold>false</ConditionalHold>
<RetentionTime>2018-03-13T10:45:00Z</RetentionTime>
</ObjectComplianceConfiguration>
The compliance settings for any specific object can also be retrieved using the “?compliance” query string. In addition to the object compliance settings above, the query returns the calculated SHA256 hash for the object, which can be used to determine that the object has not been modified. Note that the SHA256 value is only available for objects that are uploaded as a single object and is not available for multi-part or composed objects.
The following is an example of getting the compliance on an object:
GET http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object?complianceHTTP/1.1
Response body:
<ObjectComplianceConfiguration xml ns="http://s3.amazonaws.com/doc/2006-03-01/">
<RetentionTime>2016-10-31T15:08:05Z</RetentionTime>
<ConditionalHold>false</ConditionalHold>
<LegalHold>false</LegalHold>
<SHA256>14b4be3894e92166b508007b6c2e4fb6e88d3d0ad652c76475089a50ebe6e33b</SHA256>
</ObjectComplianceConfiguration>
The object compliance settings also appear in the bucket listings when the bucket has compliance enabled.
Object Lock with myQNAPcloud Object S3 API
You can add or update the object lock settings for an object using the tags described below.
|
| RetainUntilDate | This defines the retention time for an object. The object cannot be deleted before this time. Note that the retention time must be in the future. |
| LegalHold | This should be either ON or OFF, which is not case-sensitive. |
The following is an example of setting the object locking configuration on an object:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/beta_vpn.png?retention&versionId= 001617181245457483475-4ylsTbqqvP
<Retention>
<Mode>compliance</Mode>
<RetainUntilDate>2021-04-06T09:00:45Z</RetainUntilDate>
</Retention>
The following is an example of setting legal hold for an object:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/beta_vpn.png?legal-hold&versionId=001617181245457483475-4ylsTbqqvP
<LegalHold>
<Status>ON</Status>
</LegalHold>
The following is an example of setting governance mode for an object:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/public/ACL.PNG?retention
<Retention>
<Mode>governance</Mode>
<RetainUntilDate>2021-05-20T09:00:45Z</RetainUntilDate>
</Retention>
The “x-amz-bypass-governance-retention =true” header must be included whenever you want to override governance settings for an object.
Service URLs for myQNAPcloud Object Storage Regions
The myQNAPcloud service URLs for myQNAPcloud Object's different storage regions are:
Americas
| Region | Service URL |
|---|
| US East 1 (N. Virginia) | s3 .us-east-1.myqnapcloud.io |
| US Central 1 (Texas) | s3.us-central-1. myqnapcloud.io |
| US West 1 (Oregon) | s3.us-west-1. myqnapcloud.io |
| CA Central 1 (Toronto) | s3.ca-central-1. myqnapcloud.io |
EMEA
| EU Central 1 (Amsterdam) | s3.eu-central-1. myqnapcloud.io |
| EU Central 2 (Frankfurt) | s3.eu-central-2. myqnapcloud.io |
| EU West 1 (London) | s3.eu-west-1. myqnapcloud.io |
| EU West 2 (Paris) | s3.eu-west-2. myqnapcloud.io |
| EU West 3 (London) | s3.eu-west-3. myqnapcloud.io |
| EU South 1 (Milan) | s3.eu-south-1. myqnapcloud.io |
APAC
| AP Northeast 1 (Tokyo) | s3.ap-northeast-1. myqnapcloud.io |
| AP Northeast 2 (Osaka) | s3.ap-northeast-2. myqnapcloud.io |
| AP Southeast 1 (Singapore) | s3.ap-southeast-1. myqnapcloud.io |
| AP Southeast 2 (Sydney) | s3.ap-southeast-2. myqnapcloud.io |
The myQNAPcloud Object Management Console can be reached through myQNAPcloud Portal.
If you are looking for the correct service URL to use with your third-party storage application, you should choose the one that matches your bucket location.
When working with third-party storage applications, you should be aware that these applications have different methods to handle storage region service URLs. These methods include:
- Applications that allow you to explicitly enter in the service URL. These applications are the most flexible because you can easily configure new service URLs as they become available.
- Applications that only allow you to choose from a pre-built list of storage regions. These applications are the least flexible because, if a storage provider implements a new region, you have to wait for an application update to get access to the new region. If your storage application does not support all of the myQNAPcloud Object storage regions on their predefined region lists, contact the application vendor (not QNAP) to ask them for support.
- Applications that only allow you to enter in your API key set and then offer up all of the buckets in your account. These applications provide flexibility but do require some automatic redirects to perform at the HTTP level.
Object Replication with myQNAPcloud Object S3 API
GET Object Tagging
myQNAPcloud Object supports functionality to fetch the tag set of an object when the object:
- Does not have any tags
- Does have tags
When the Object Does Not Have Any Tags
GET https://s3.myqnapcloud.io/my_bucket/Test-object1.txt?tagging
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<Tagging>
<TagSet></TagSet>
</Tagging>
Status 200 OK
When the Object Has Tags
GET https://s3.myqnapcloud.io/my_bucket/Test-object2.pdf?tagging
Response body:
<!--?xml version="1.0" encoding="UTF-8"?-->
<Tagging>
<TagSet>
<Tag>
<Key>key2</Key>
<Value>value2</Value>
</Tag>
<Tag>
<Key>key1</Key>
<Value>value1</Value>
</Tag>
</TagSet>
</Tagging>
PUT Object Tagging
myQNAPcloud Object supports functionality for:
- Adding the tag value of an existing object in a bucket
- Appending the tag value of an existing object in a bucket
Adding the Tag Value of an Existing Object in a Bucket
PUT https://s3.myqnapcloud.io/my_bucket/Test-object3.pdf?tagging
Content-Type: text/xml
Response body:
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>tag1</Key>
<Value>value1</Value>
</Tag>
</TagSet>
</Tagging>
Appending the Tag Value of an Existing Object in a Bucket
In this example, an existing object already has the tag value of “key5” –“value5”, You can append a new tag pairs along with the existing pair.
PUT https://s3.myqnapcloud.io/my_bucket/Test-object4.jpg?tagging
Content-Type: text/xml
Response body:
<Tagging xmlns="http://s3.myqnapcloud.io/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>key5</Key>
<Value>value5</Value>
</Tag>
<Tag>
<Key>key6</Key>
<Value>value6</Value>
</Tag>
</TagSet>
</Tagging>
Status 200 OK
To PUT tags of any other version, use the versionId query parameter.
DELETE Object Tagging
This removes the entire tag set from the specified object.
DELETE https://s3.myqnapcloud.io/my_bucket/Test-object5.pdf?tagging
Response body:
<empty>
Status 204 No Content
To delete tags of any other version, use the versionId query parameter.
Object Tagging with myQNAPcloud Object API
Get Object Tagging
myQNAPcloud Object supports functionality to fetch the tag set of an object when the object:
- Does not have any tags
- Does have tags
When the object does not have any tags
GET
https://s3.myqnapcloud.io/my_bucket/Test-object1.txt?tagging
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<Tagging>
<TagSet></TagSet>
</Tagging>
Status 200 OK
When the object has Tags
GET
https://s3.myqnapcloud.io/my_bucket/Test-object2.pdf?tagging
Response body:
<!--?xml version="1.0" encoding="UTF-8"?-->
<Tagging>
<TagSet>
<Tag>
<Key>key2</Key>
<Value>value2</Value>
</Tag>
<Tag>
<Key>key1</Key>
<Value>value1</Value>
</Tag>
</TagSet>
</Tagging>
PUT Object Tagging
myQNAPcloud Object supports functionality for:
- Adding the tag value of an existing object in a bucket
- Appending the tag value of an existing object in a bucket
Adding the tag value of an existing object in a bucket
PUT
https://s3.myqnapcloud.io/my_bucket/Test-object3.pdf?tagging
Content-Type: text/xml
Response body:
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>tag1</Key>
<Value>value1</Value>
</Tag>
</TagSet>
</Tagging>
Appending the Tag Value of an Existing Object in a Bucket
In this example, an existing object already has the tag value of “key5” –“value5”, You can append a new tag pair along with the existing pair.
PUT
https://s3.myqnapcloud.io/my_bucket/Test-object4.jpg?tagging
Content-Type: text/xml
Response body:
<Tagging xmlns="http://s3.myqnapcloud.io/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>key5</Key>
<Value>value5</Value>
</Tag>
<Tag>
<Key>key6</Key>
<Value>value6</Value>
</Tag>
</TagSet>
</Tagging>
Status 200 OK
To PUT tags of any other version, use the versionId query parameter.
DELETE Object Tagging
This removes the entire tag set from the specified object.
DELETE
https://s3.myqnapcloud.io/my_bucket/Test-object5.pdf?tagging
Response body:
<empty>
Status 204 No Content
To delete tags of any other version, use the versionId query parameter.
Further Reading
Given its compatibility with AWS S3, the official AWS documentation for S3 serves as a complementary resource when working with myQNAPcloud Object. Refer to the Amazon Simple Storage Service API Reference for details on the API version 2006-03-01:
Amazon Simple Storage Service API Reference
対象製品
myQNAPcloud Object
myQNAPcloud Object とは何ですか?
myQNAPcloud Object は、幅広いアプリケーションとユースケースに対して高性能で信頼性が高く、安全なデータストレージを提供するように設計されたクラウドベースのオブジェクトストレージサービスです。このサービスは、Amazon Web Service Simple ストレージ Service (AWS S3) API と完全に互換性があり、S3 互換のアプリケーションやゲートウェイデバイスとのシームレスな統合を保証します。
myQNAPcloud Object は、コスト効率が高く効率的なデータストレージインフラストラクチャを求める個人や組織向けに調整されています。S3 互換のアプリケーションと連携するように設計されており、myQNAPcloud Object は、QNAP のエコシステムの信頼性と柔軟性を享受しながら、使い慣れたツールとワークフローを活用することができます。
- 互換性:myQNAPcloud Object は、AWS S3 API と完全に互換性があるように設計されており、既存の AWS S3 互換アプリケーションがシームレスに動作することを保証します。
- パフォーマンス:myQNAPcloud Object は、信頼性と効率性を最適化した高性能なストレージソリューションを提供します。
myQNAPcloud Object S3 API ガイドについて
myQNAPcloud Object は AWS S3 に密接に対応していますが、特定の機能が強化されたり、異なる方法で実装されている場合があります。このガイドは、これらの微妙な違いを明確にし、ユーザーが myQNAPcloud Object の可能性を最大限に活用できるようにすることを目的としています。
このガイドでは、特定の myQNAPcloud Object リージョンでのバケットへのアクセスに関する例を使用しています。リージョン固有のエンドポイントとサービス URL についての詳細は、「myQNAPcloud Object ストレージリージョンのサービス URL」を参照してください。
注意
- リージョナル URL:バケットにアクセスする際は、バケットが作成された myQNAPcloud Object ストレージリージョンに特化した URL を使用することを確認してください。誤った URL を使用すると、GET リクエストは可能でも、PUT または DELETE 操作でエラーが発生する可能性があります。[myQNAPcloud Object ストレージリージョンのサービス URL] を参照してください。
- ASW IAM: AWS とは異なり、myQNAPcloud Object は AWS IAM(Identity and Access Management)のサポートを含んでいません。したがって、このガイドは S3 API の互換性にのみ焦点を当てており、IAM 関連の機能には言及していません。
REST API の紹介
ホスト指定
myQNAPcloud Object は、AWS S3 と同様にパススタイルとバーチャルスタイルの両方のリクエストをサポートしています。ユニークなホスト名が必要です(例: s3.us-east-1.myqnapcloud.io 対 s3.amazonaws.com)。このガイドのすべての例で示されているように、パススタイルのリクエストを使用することをお勧めします(例: http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object)。パススタイルのリクエストは、バケット名の柔軟性を高め、ドメイン名の競合を避けることができます。
常に一貫性
AWS S3 の強い一貫性モデルとは異なり、myQNAPcloud Object はすべての操作に対して「常に一貫した」ビューを提供します。これにより、ある操作の後に続く操作が常に一貫した結果を生み出すことが保証されます。例えば、オブジェクトを削除した後(DELETE 操作)、続けて HEAD リクエストを行うと、常にオブジェクトの削除が確認され、操作完了を待つための追加のプログラミングが不要になります。
リクエストの認証
myQNAPcloud Object は、AWS S3 と互換性のあるヘッダーおよびクエリパラメータのために、自律型および署名バージョン 2 と 4 の両方をサポートしています。署名バージョン 4 はより高いセキュリティを提供しますが、SHA256 ハッシュの計算のオーバーヘッドのためにより多くの計算リソースを必要とします。パフォーマンスが重要な場合は、署名バージョン 2 を使用することができ、MD5(ETag ヘッダーとして返される)がデータの整合性を保証します。
バージョン 4 の署名リクエストでは、すべてのリージョンが myQNAPcloud Object の署名リクエストをサポートしています。
myQNAPcloud Object は、ブラウザベースのアップロードや HTML フォームリクエストのための署名署名をサポートしていません。これらの操作は現在サポートされていません。
バージョン 2 の署名では、以下のサブリソースキーがリクエストのクエリパラメータとして指定されます:
- append
- compose
- force_delete=true
これらのクエリパラメータは、PutObject および DeleteBucket 操作の署名を計算する際に含める必要があります。
エラーレスポンス
可能な限り、myQNAPcloud Object は AWS S3 と互換性のあるエラーレスポンスを使用します。追加のエラーコードも、機能を強化するために提供される場合があります。
HTTP エラーコード
| エラーコード | myQNAPcloud Object の説明 | HTTP ステータスコード |
|---|
| 利用不可 | 一時的に利用不可 | 503 |
| 回復不能 | データ回復不能 |
|
| 未実装 | 未実装 | 501 |
| DB エンティティが見つかりません | そのようなエンティティはありません | 404 |
| DB エンティティが見つかりました | エンティティは既に存在します | 409 |
| 切断エラー | 接続が閉じられました | 410 |
| 内部サーバーエラーのステータス | 内部エラー: 内部エラーが発生しました。カスタマーサポートにお問い合わせください。 | 500 |
| 禁止されたステータス | アクセスが拒否されました | 403 |
| アクセス禁止 |
| アカウントが有効化されていません |
| アカウントの問題 |
| 認証ロックアウト: 誤った資格情報でアカウントにアクセスしようとする試行が多すぎます。5 分後に再試行してください。 |
| 無効なアクセスキー ID: 提供された AWS アクセスキー ID は、当社の記録に存在しません。 |
| 無効な認証コード: デバイスの認証コードが無効です。 |
| リクエスト時間が大きくずれている: リクエスト時間と現在の時間の差が大きすぎます。 |
| 無効なオブジェクト状態: 現在のオブジェクトの状態では操作が無効です。 |
| 不正なリクエストのステータス | 認証ヘッダーが不正です | 400 |
| 認証クエリパラメータエラー |
| 不正なダイジェスト: 指定された Content-MD5 が受信したものと一致しませんでした。 |
| 不正なリクエスト: HTTP リクエストの解析中にエラーが発生しました。 |
| 不完全な署名: リクエストには AWS 標準に準拠した署名が含まれている必要があります。 |
| 無効なアクション |
| 無効な引数 |
| 無効なダイジェスト: 指定された Content-MD5 が無効です。 |
| 無効な入力 |
| 無効なパラメータ値: 入力パラメータに無効または範囲外の値が指定されました。 |
| 無効なリクエスト |
| 不正なポリシー |
| 不正なポリシードキュメント |
| パスワードポリシー違反 |
| 検証エラー |
| X Amz Content SHA256 の不一致: 提供された 'x-amz-content-sha256' ヘッダーが計算されたものと一致しません。 |
| 暗号化は許可されていません: この操作ではユーザー提供の暗号化キーは許可されていません。 |
| オブジェクトはサーバーサイド暗号化の形式で保存されました。オブジェクトを取得するには正しいパラメータを提供する必要があります。 |
| エンティティが大きすぎます: 提案されたアップロードは許可されている最大サイズを超えています。 |
| エンティティが小さすぎます: 提案されたアップロードは許可されている最小サイズを下回っています。 |
| 不正なコンプライアンスリクエスト |
| 不正なバージョニング構成例外: リクエストで指定されたバージョニング構成が無効です。 |
| 不完全な本文: Content-Length HTTP ヘッダーで指定されたバイト数を提供しませんでした。 |
| 無効な ACL リクエスト: ACL を設定する際には、ACL ヘッダーまたは XML ボディのいずれか一つのみを提供する必要があります。 |
| 無効な引数 |
| 無効なバケット名: 指定されたバケットは無効です。 |
| 無効な暗号化アルゴリズムエラー: 指定された暗号化リクエストは無効です。サポートされる値: AES256。 |
| 無効なパート順序: パートのリストが昇順になっていません。パートはパート番号で順序付けされる必要があります。 |
| 無効なパート: 指定されたパートの一部またはすべてが見つかりませんでした。パートがアップロードされていないか、指定されたエンティティタグがパートのエンティティタグと一致しない可能性があります。 |
| 無効なポリシードキュメント: フォームの内容がポリシードキュメントで指定された条件を満たしていません。 |
| キーが長すぎるエラー: キーが長すぎます。 |
| ログバケットの所有者が同じ: ログターゲットバケットは、ログされているバケットと同じ所有者でなければなりません。 |
| 不正な XML: 提供された XML は正しく形成されていないか、公開されたスキーマに対して検証されませんでした。 |
| メタデータが大きすぎます: メタデータヘッダーが許可されている最大メタデータサイズを超えています。 |
| リクエストタイムアウト: サーバーへのソケット接続がタイムアウト期間内に読み取られたり書き込まれたりしませんでした。 |
| バケットが多すぎます: 許可されている以上のバケットを作成しようとしました。 |
| コンポーネントが多すぎます: 複合オブジェクトは 1024 以上のコンポーネントを持つことはできません。 |
| メールアドレスによる付与が解決できません: 提供されたメールアドレスは記録されているアカウントと一致しません。 |
| ストレージのクォータを超えました: アカウントがストレージの制限を超えました。 |
| バケットアカウントが非アクティブです: このバケットを所有するアカウントはアクティブではありません。 |
| ステータス消失 | 接続が閉じられました: ネットワーク接続が閉じられました。 | 410 |
| ステータス処理不能エンティティ | データが回復不能です: リクエスト内のデータは回復不能です。カスタマーサポートにお問い合わせください。 | 422 |
| ステータス競合 | 削除競合 | 409 |
| エンティティは既に存在します |
| エンティティは一時的に変更できません: エンティティは一時的に変更できません。後でもう一度お試しください。 |
| 制限を超えました |
| 操作が中止されました: このリソースに対して競合する条件付き操作が現在進行中です。もう一度お試しください。 |
| バケットは既に存在します |
| バケットが空ではありません |
| コンプライアンス設定がロックされました: コンプライアンス設定は現在ロックされており、変更できません。 |
| ステータスが見つかりません | そのようなエンティティはありません | 404 |
| そのようなライフサイクル設定はありません: ライフサイクル設定は存在しません。 |
| そのようなバケットはありません: 指定されたバケットは存在しません。 |
| そのようなバケットポリシーはありません: バケットポリシーは存在しません。 |
| そのようなキーはありません: 指定されたキーは存在しません。 |
| そのようなレプリケーション設定はありません: レプリケーション設定は存在しません。 |
| そのようなタグセットエラーはありません: バケットに関連付けられたタグセットはありません。 |
| そのようなアップロードはありません: 指定されたアップロードは存在しません。アップロード ID が無効であるか、アップロードが中止または完了した可能性があります。 |
| そのようなバージョンはありません: 指定されたバージョンは存在しません。 |
| ステータス未実装 | 未実装: 提供されたヘッダーは未実装の機能を示唆しています。 | 501 |
| ステータスサービス利用不可 | 一時的に利用不可: この操作のリソースは一時的に利用できません。後でもう一度お試しください。 | 503 |
| ステータス発見 | キーは既に存在します | 302 |
| ステータスメソッドが許可されていません | メソッドが許可されていません: このメソッドはアカウント所有者以外には許可されていません。 | 405 |
| メソッドが許可されていません: 指定されたメソッドはこのリソースに対して許可されていません。 |
| ステータス長さが必要です | コンテンツ長が不足しています: Content-Length HTTP ヘッダーを提供する必要があります。 | 411 |
TCP エラーコード
myQNAPcloud Object は以下の TCP エラーコードをサポートしています:
- 予期しない EOF
- パイプ破損
- ピアによる接続リセット
myQNAPcloud Object ではサポートされていません
| 操作 | 説明 |
|---|
| SOAP | AWS S3 は SOAP のサポートを廃止しており、myQNAPcloud Object は SOAP 操作をサポートしていません。 |
myQNAPcloud Object S3 API を使用したバケットの操作
バケットの操作には、削除、名前変更、バケットのログ記録、クロスオリジンリソース共有(CORS)サポート、ライフサイクルポリシー、オブジェクトロック、コンプライアンスが含まれます。
バケットの強制削除
AWS S3 は、削除されていないオブジェクトを含むバケットの削除を許可しません。
myQNAPcloud Object は、バケット内のすべてのオブジェクトを最初に削除してからバケットを削除する強制削除オプションを提供します。オブジェクトの削除は、バケットのポリシーおよびコンプライアンス要件に従います。
強制削除オプションを使用するには、単にクエリ文字列として追加します。例えば:
DELETE http://s3.us-east-1.myqnapcloud.io/my-bucket?force_delete=true HTTP/1.1
バケットの名前変更
AWS S3 はバケットの名前変更をサポートしていません。バケット内のオブジェクトの名前変更のみをサポートしています。
myQNAPcloud Object はバケットの名前変更をサポートしています。新しいバケット名が使用されていないことが名前変更の成功に必要です。呼び出し元はバケットを名前変更するために s3:CreateBucket ポリシー権限を持っている必要があります。
バケットの名前を変更するには、HTTP メソッド MOVE を使用し、ヘッダーフィールド「Destination」で新しいバケット名を指定します。例えば:
MOVE http://s3.us-east-1.myqnapcloud.io/my_old_bucket HTTP/1.1
Destination: my_new_bucket
MFA(多要素認証)削除
myQNAPcloud Object は「x-amz-mfa」ヘッダーをサポートしていますが、次の場合に限ります:
- バケットでバージョニングを設定する場合、または
- AWS S3 と互換性のあるオブジェクト削除リクエストでオブジェクトを削除する場合。
ユーザーのアクセス認証情報が MFA で認証されている場合、myQNAPcloud Object は「x-amz-mfa」ヘッダーを必要としません。myQNAPcloud Object は仮想 MFA デバイスのみをサポートします。
最大バケット数
標準の AWS S3 は 100 バケットのみをサポートします。
myQNAPcloud Object はアカウントごとに最大 1000 バケットを許可しており、この数は myQNAPcloud Object カスタマーサポートに連絡することで増やすことができます。
バケットロギング
myQNAPcloud Object はバケットログをサポートしており、バケットへのすべてのアクセスを記録したテキストログファイルを作成します。ログファイルの形式は AWS S3 のログファイルと同一です。
myQNAPcloud Object のバケットログは、ターゲットバケットにログを保存するための ACL 権限設定を必要としません。ログリクエストや ACL で権限設定を行うことはできますが、myQNAPcloud Object でのログ記録には必要ありません。ただし、ログファイルのターゲットとなるバケットは、記録されるバケットと同じアカウント内にある必要があります。
バケットのクロスオリジンリソース共有 (CORS) サポート
myQNAPcloud Object をウェブサーバーとしてブラウザからアクセスするための互換性を考慮し、HTTP リクエストで「Origin」ヘッダーが指定された場合、myQNAPcloud Object サーバーは CORS ヘッダーを返します。さらに、サーバーはバケットまたはオブジェクトに対して HTTP メソッド OPTIONS をサポートし、ブラウザが myQNAPcloud Object にアクセスする前のプリフライトテストに必要な CORS ヘッダーを返します。
AWS とは異なり、myQNAPcloud Object はブラウザが myQNAPcloud Object に完全にアクセスできる設定を返します。そのため、myQNAPcloud Object は URL に「cors」パラメータを含むバケットへの PUT および GET を許可する AWS の機能をサポートしていません。ブラウザがデータに完全にアクセスできるようにすることは、オブジェクトへのアクセスのセキュリティには影響せず、すべてのアクセスポリシーは引き続き適用されます。
HTTP リクエストで「Origin」ヘッダーが指定された場合にデフォルトで返される HTTP ヘッダーは次のとおりです:
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, MOVE, OPTIONS
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 86400
ライフサイクルポリシー
ライフサイクル機能は、オブジェクトのライフサイクル中に myQNAPcloud Object が実行するアクションを定義するルールを持つライフサイクルポリシーを確立します。この機能により、保持期間後にオブジェクトを手動で削除する必要がなくなります。
ライフサイクル設定の構成
バケットのライフサイクル設定は、"put-bucket-lifecycle-configuration" コマンドで設定します。例えば:
$ aws s3api put-bucket-lifecycle-configuration --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io --lifecycle-configuration file://lifecycle.json
{
"Rules": [
{
"Expiration": {"Days": 1},
"ID": "lifecycle_rule_1",
"Filter": {
"And": {
"ObjectSizeGreaterThan": 1,
"ObjectSizeLessThan": 21474836480
}
},
"Status": "Enabled"
},
{
"Expiration": {"Days": 1},
"ID": "object_lifecycle_rule_bucket_6807766",
"Filter": {"Prefix": "1"},
"Status": "Enabled"
}
]
}
別の例はこちらです:
PUT https://s3.us-east-1.myqnapcloud.io/1-1-1-1?lifecycle <lifecycleconfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <rule> <expiration> <days>1</days> </expiration> <id>lifecycle_rule_1</id> <filter> <and> <objectsizegreaterthan>1</objectsizegreaterthan> <objectsizelessthan>21474836480</objectsizelessthan> </and> </filter> <status>Enabled</status> </rule> <rule> <expiration> <days>1</days> </expiration> <id>object_lifecycle_rule_bucket_6807766</id> <filter> <prefix>1</prefix> </filter> <status>Enabled</status> </rule> </lifecycleconfiguration>
この呼び出しにはレスポンスボディがありません。
ライフサイクル設定の取得
バケットのライフサイクル設定は「get-bucket-lifecycle-configuration」コマンドで取得できます。例えば:
$ aws s3api get-bucket-lifecycle-configuration --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io
{
"Rules": [
{
"Expiration": {"Days": 1},
"ID": "lifecycle_rule_1",
"Filter": {
"And": {
"ObjectSizeGreaterThan": 1,
"ObjectSizeLessThan": 21474836480
}
},
"Status": "Enabled"
},
{
"Expiration": {"Days": 1},
"ID": "object_lifecycle_rule_bucket_6807766",
"Filter": {"Prefix": "1"},
"Status": "Enabled"
}
]
}
こちらは別の例です:
GET https://s3.us-east-1.myqnapcloud.io/1-1-1-1?lifecycle <?xml version="1.0" encoding="UTF-8"?> <lifecycleconfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <rule> <expiration> <days>1</days> </expiration> <id>lifecycle_rule_1</id> <filter> <and> <objectsizegreaterthan>1</objectsizegreaterthan> <objectsizelessthan>21474836480</objectsizelessthan> </and> </filter> <status>Enabled</status> </rule> <rule> <expiration> <days>1</days> </expiration> <id>object_lifecycle_rule_bucket_6807766</id> <filter> <prefix>1</prefix> </filter> <status>Enabled</status> </rule> </lifecycleconfiguration>
ライフサイクル設定の削除
バケットのライフサイクル設定は「delete-bucket-lifecycle」コマンドで削除できます。例えば:
$ aws s3api delete-bucket-lifecycle --bucket 1-1-1-1 --endpoint-url https://s3.us-east-1.myqnapcloud.io
この呼び出しにはレスポンスボディがありません。
オブジェクトロック
myQNAPcloud Object は、オブジェクトバージョンの削除や上書きを一定期間または無期限に防ぐオブジェクトロックをサポートしています。
| タグ | 説明 |
|---|
| ObjectLockConfiguration | これはオブジェクトロック設定の必須ルートレベルタグです。 |
| ObjectLockEnabled | このタグは有効として設定する必要があります。 |
| ルール | これはバケットのオブジェクトロックルールを指定します。モードと期間の両方が必要です。期間は Days または Years のいずれかを選択する必要がありますが、同時に指定することはできません。 モードは COMPLIANCE または GOVERNANCE のいずれかである必要があります。 |
バケットのオブジェクトロック設定は、"?object-lock" クエリ文字列とリクエストの XML ボディとしてのオブジェクトロック設定を使用して指定されます。例えば:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1 <objectlockconfiguration> <objectlockenabled>Enabled</objectlockenabled> <rule> <defaultretention> <mode>COMPLIANCE</mode> <days>10</days> </defaultretention> </rule> </objectlockconfiguration>
バケットのオブジェクトロック設定は、"?object-lock" クエリ文字列を使用してバケットを取得することで取得できます。例えば:
GET https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1
レスポンスボディ:
<?xml version="1.0" encoding="UTF-8"?> <objectlockconfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <objectlockenabled>Enabled</objectlockenabled> <rule> <defaultretention> <mode>COMPLIANCE</mode> <days>10</days> </defaultretention> </rule> </objectlockconfiguration>
各オブジェクトに対するオブジェクトロック設定も以下に記載されていますオブジェクトの操作。
バケットのオブジェクトロック設定は、"?object-lock" クエリ文字列を使用してクリアできます。例えば:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/?object-lock HTTP/1.1
レスポンスボディ:
<objectlockconfiguration> <objectlockenabled>有効</objectlockenabled> <rule> <defaultretention> <mode></mode> <days></days> </defaultretention> </rule> </objectlockconfiguration>
myQNAPcloud Object コンプライアンス
myQNAPcloud Object は、オブジェクトの削除を防ぎ、書き込まれた時点から元のデータが変更されていないことを証明する追加情報を提供するコンプライアンスポリシーをサポートします。このコンプライアンス機能は、特定の規制要件に必要な場合がありますが、誤ってデータを削除するのを防ぐのにも役立ちます。
コンプライアンスは、バケットのオブジェクトロック設定とは異なります。
バケットに保存されているすべてのオブジェクトを制御するコンプライアンスポリシーを任意のバケットに設定できます。次の XML タグを使用してバケットのコンプライアンスポリシーを指定します。
| タグ | 説明 |
|---|
| ステータス | コンプライアンスをオンまたはオフにするために、それぞれ「有効」または「無効」。有効にすると、バケット内のすべてのオブジェクトに即座に適用されます。 |
| ロック時間 | コンプライアンス設定が「ロック」される時間 - 設定は API コールによって減少させることはできません。一度設定がロックされると、QNAP カスタマーサポートの介入なしには解除できません。ロック時間は、次の 2 つのユースケースをサポートします:- コンプライアンス機能をロックする前にソフトウェアが正しく動作することをテストすること、または
- コンプライアンスをオフにするための管理者の追加ステップでデータを削除できることを意味する、ロックしないこと。
ロック時間パラメータは次のようになります:- ISO 日付(例:2016-11-07T15:08:05Z)、
- 即時ロックを強制するための文字列「now」、または
- 文字列 "off to not lock the compliance settings. This is the default.
|
| RetentionDays | オブジェクトが作成日または条件付きホールド解除後に常に保持される最小日数を示す整数です。個々のオブジェクトの保持日を延長することはできますが、短縮することはできません。このパラメータは常に必要です。 |
| ConditionalHold | 新しく作成されたオブジェクトが条件付きホールドに置かれるかどうかを示すブール値("true" または "false")。条件付きホールドが明示的に解除されるまで削除できないことを意味します。このパラメータが指定されていない場合、デフォルトは false です。設定がロックされた後でも、この設定は変更可能です。 |
バケットのコンプライアンス設定は、リクエストの XML ボディとしてコンプライアンス設定とともに "?compliance" クエリ文字列を使用して指定されます。例:
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket?complianceHTTP./1.1 <bucketcomplianceconfiguration> <status>enabled</status> <locktime>off</locktime> <retentiondays>365</retentiondays> <deleteafterretention>true</deleteafterretention> </bucketcomplianceconfiguration>
バケットに対してコンプライアンスが有効になると、ポリシーはバケット内のすべてのオブジェクトに即座に適用されます。保持期間前にオブジェクトを削除しようとするとエラーが返されます。
バケットのコンプライアンス設定は、"?compliance" クエリ文字列を使用してバケットを取得することで取得できます。例:
GET http://s3.us-east-1.myqnapcloud.io/my-buck?complianceHTTP/1.1
レスポンスボディ:
<bucketcomplianceconfiguration xml ns="http://s3.amazonaws.com/doc/2006-03-01/"> <status>enabled</status> <locktime>2016-11-07T15:08:05Z</locktime> <islocked>false</islocked> <retentiondays>0</retentiondays> <conditionalhold>false</conditionalhold> <deleteafterretention>false</deleteafterretention> </bucketcomplianceconfiguration>
各オブジェクトに対するコンプライアンス設定も以下に記載されていますオブジェクトの操作。
バケットの操作は myQNAPcloud Object でサポートされていません
| 操作 | 説明 |
|---|
| バケットタグ付け | バケットタグ付けは現在 myQNAPcloud Object で利用できません。 |
| バケットウェブサイト | ウェブサイト構成は myQNAPcloud Object で利用できません。myQNAPcloud Object が長期オブジェクトストアである性質上、バケットへのウェブサイト操作をサポートする予定はありません。オブジェクトリクエストでのヘッダー「x-amz-website-redirect-location」は無視されます。 |
| バケットアクセラレート | myQNAPcloud Object は AWS S3 バケットアクセラレートサブリソースを実装していません。 |
| バケットリクエストペイメント | myQNAPcloud Object はバケットのための「requestPayment」サブリソースの使用をサポートしていません。 |
| メトリクス構成 | myQNAPcloud Object は、1 分間の CloudWatch メトリクスを受信し、CloudWatch アラームを設定し、Amazon S3 ストレージのほぼリアルタイムの操作とパフォーマンスを表示するために CloudWatch ダッシュボードにアクセスする操作をサポートしていません。 |
S3 パブリックアクセスブロック | myQNAPcloud Object は、既存のパブリックアクセスを中央でブロックし(ACL またはポリシーを介して可能であるかどうかにかかわらず)、新しく作成されたアイテムが誤ってパブリックアクセスを許可されないようにする操作をサポートしていません。 |
| S3 セレクト | myQNAPcloud Object は S3 Select API をサポートしていません。 |
myQNAPcloud Object S3 API を使用したオブジェクトの操作
オブジェクトの操作には、オブジェクトの名前変更、作成、追加、削除、暗号化、ストレージクラス、オブジェクトロック、コンプライアンスが含まれます。
オブジェクトの名前変更
myQNAPcloud Object は、オブジェクトを移動する機能をサポートしており、キーを変更することでオブジェクトの名前を変更します。これにより、オブジェクトをコピーしてから元のオブジェクトを削除するという 2 段階のプロセスが不要になります。オブジェクトの名前を変更するには、呼び出し元がバケットに対して s3:PutObject ポリシーの権限を持っている必要があります。
オブジェクトの名前を変更するには、HTTP メソッド MOVE を使用し、移動操作に影響を与える以下のパラメータをリクエストヘッダーに含めます。
|
| 上書き | ブール値で、「true」の場合、同じキーを持つ宛先オブジェクトを上書きすることができます。それ以外の場合、エラーが生成され、元のキーは変更されません。 |
| X-Wasabi-Quiet | ブール値で、「true」の場合、XML ステータスの返却ボディはエラーが発生したキーのみを表示します。それ以外の場合、名前が変更されたすべてのオブジェクトがステータスに表示されます。デフォルト値は「false」です。 |
| X-Wasabi-Prefix | ブール値で、「true」の場合、URL のソースと宛先に指定された値がプレフィックスであることを意味し、キーの左端部分に一致します。概念的には、プレフィックスをオブジェクトのフォルダと考えてください。それ以外の場合、キーに完全に一致するオブジェクト(すべてのバージョンを含む)のみが名前変更されます。デフォルト値は「false」です。 |
呼び出しは、レスポンスの XML ボディとして結果を返します。結果には、名前が変更された各オブジェクトについて以下が含まれます:
- 元のソースキー、
- 変更された宛先キー、
- オブジェクトのバージョン ID、および
- リネーム操作でのエラー。
クワイエットオプションを使用すると、エラーが発生したキーのみがリストされます。
以下は例です。「TestMove-Dir2/」で始まるすべてのオブジェクトを「TestMove-Dir2-Renamed/」にリネームします。
MOVE http://s3.us-east-1.myqnapcloud.io/my_bucket/TestMove-Dir2/HTTP/1.1 宛先:TestMove-Dir2-Renamed/X-Wasabi-Prefix:true
レスポンスボディ:
<moveobjectresult> <sourceprefix>TestMove-Dir2/SourcePrefix> <destinationprefix>TestMove-Dir2-Renamed/DestinationPrefix> <moveobject> <sourcekey>TestMove-Dir2/SourceKey> <destinationkey>TestMove-Dir2-Renamed/DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir1/SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir1/DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir1/Obj1SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir1/Obj1DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir1/Obj2SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir1/Obj2DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir2/SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir2/DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir2/Obj1SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir2/Obj1DestinationKey> MoveObject> <moveobject> <sourcekey>TestMove-Dir2/Dir2/Obj2SourceKey> <destinationkey>TestMove-Dir2-Renamed/Dir2/Obj2DestinationKey> MoveObject> <movecount>7MoveCount> MoveObjectResult>
オブジェクトの構成
myQNAPcloud Object は、他のオブジェクトで構成された新しいオブジェクトを作成する機能を提供します。構成されたオブジェクトは、元のデータオブジェクトをコピーするのではなく、構成されたオブジェクトをデータオブジェクトにリンクすることで形成されます。これは、オブジェクトを構成する方法を提供しない AWS S3 とは対照的です。myQNAPcloud Object 操作は非常に高速で、元のデータの複数のコピーを必要としません。元の構成オブジェクトはいつでも削除可能であり、データへのリンクがある限り、システムは元のデータを保持します。
オブジェクトの構成は、5 GB を超えるオブジェクトを作成するためのマルチパートアップロード機能の代替手段です。呼び出し元は、オブジェクトを構成するためにバケットに対する s3:PutObject ポリシーの権限を持っている必要があります。 合成オブジェクトは、他の合成オブジェクトや元のデータオブジェクトから作成することができます。ただし、1 つの合成オブジェクト内の元のデータオブジェクトの総数は 32 を超えてはなりません。合成オブジェクトは同じバケット内の他のオブジェクトにのみリンクできます。
合成操作は、HTTP メソッド PUT を使用し、クエリ文字列パラメータ "?compose" を指定して、オブジェクトが XML 本文に与えられたオブジェクトで構成されていることを示します。XML 本文には、オブジェクトキーのリストと、オプションで新しいオブジェクトを構成するバージョン ID が含まれています。バージョン ID が指定されていない場合、オブジェクトの最新バージョンが使用されます。新しいオブジェクトは、すべてのリンクされたデータオブジェクトが連結された 1 つのオブジェクトとして表示されます。新しい合成オブジェクトには、連結されたオブジェクトの MD5 ではなく、すべてのデータオブジェクトの MD5 を一緒にハッシュ化した結果(マルチパートオブジェクトが完了したときの計算のように)としての ETag (MD5) 値がありません。合成オブジェクトには、ユーザーが提供する暗号化キーを持たせることはできません。ただし、すべてのデータは保存時に暗号化されます。
合成オブジェクトで使用されるメタデータに対してのみ課金されます。リンクされたオブジェクトで使用される元のデータは、元のデータオブジェクトにリンクするすべての合成オブジェクトが削除されるまで、通常の料金で課金されます。
以下は、3 つのオブジェクト「TestCompose-Data-1」、「TestCompose-Data-2」、「TestCompose-Data-3」から新しいオブジェクト「TestComp」を合成する例です。
PUT http://s3.wasabisys.com/my_bucket/TestCompose-Object-1?composeHTTP/1.1Content-Type:text/xml <composerequest> <component> <key>TestCompose-Data-1</key> </component> <component> <key>TestCompose-Data-2</key> </component> <component> <key>TestCompose-Data-3</key> </component> </composerequest>
オブジェクトへの追加
AWS S3 はオブジェクトへの追加を提供していません。
既存のオブジェクトへの追加は、オブジェクトを構成する別の形式です(オブジェクトの構成を参照)。この呼び出しは、データを一時オブジェクトにアップロードし、元のオブジェクトのデータに新しくアップロードされたデータを追加した新しい構成オブジェクトを作成します。バケットがバージョン管理されている場合、元のデータを保持しながら、新しいバージョンの構成オブジェクトが作成されます。バージョン管理されていない場合、新しく構成されたオブジェクトが元のオブジェクトを置き換えます。オブジェクトに追加するには、呼び出し元はバケットに対する s3:PutObject ポリシー権限を持っている必要があります。さらに、バージョン管理されていないバケットの場合、元のオブジェクトを置き換えるために s3:DeleteObject ポリシー権限が必要になる場合があります。
構成されたオブジェクトと同様に、アップロードされたデータへのリンクを作成するため、任意のオブジェクトに最大 1023 回までしか追加できません。小さなデータを何度もオブジェクトに追加しないように注意してください。各追加データのアップロードは、最小サイズの料金がかかる新しいオブジェクトを作成し、小さなデータの読み取りによってパフォーマンスが低下する可能性があります。追加操作は、クエリ文字列パラメータ「?append」を使用して HTTP メソッド PUT で行われます。追加するデータはリクエストのボディにアップロードされます。
以下は、既存のオブジェクト「TestAppend-Object」に文字列「」を追加する例です。
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket/TestAppend-Object?appendHTTP/1.1Content-Length:15
PUT オブジェクトコピーはリンクを使用
通常、AWS S3 プロトコルを使用してオブジェクトの名前を変更するには、オブジェクトを 1 つのキー値でアップロードします。その後、元のキー値からコピーされた新しいキー値で PUT 操作を行い、元のキー値のオブジェクトを削除します。
myQNAPcloud Objectこのシーケンスを自動的に最適化し、新しいキー値オブジェクトをコピーキー値からの元のデータにリンクします。これにより、データの別のコピーを作成する必要がなくなり、ストレージ料金が高くなるのを避けられます。myQNAPcloud Object は元のデータへのリンクを使用するため、5TB の制限までの任意のサイズのオブジェクトをコピーでき、マルチパートアップロードを使用する必要はありません。
オブジェクト削除 MFADelete
バケットバージョニングで MFADelete オプションがオンになっている場合、アクセス認証情報が MFA を使用して署名されている場合は、「x-amz-mfa」は必要ありません(MFA(多要素認証)削除も参照)。
バケットロギングが有効になっている場合、複数のオブジェクトを削除すると、削除された各オブジェクトに対して個別のログエントリが作成されます。
GET オブジェクトレスポンスヘッダー
「response-」で始まる GET オブジェクトリクエストのヘッダーは、レスポンスヘッダーとして返されます(「response-」の文字列を除く)。
オブジェクトサーバーサイド暗号化
myQNAPcloud Objectは、要求された暗号化に関係なく、保存されたすべてのデータを暗号化します。システムは、提供された場合は呼び出し元が提供した暗号化キーを使用し、顧客キーが提供されない場合は各オブジェクトに対してランダムなキー暗号化キーを生成します。顧客が暗号化キーを提供する場合、AWS S3 と同様に、myQNAPcloud Object はメタデータに顧客キーのコピーを保持せず、データを読み取るために呼び出し元が暗号化キーを提供する必要があります。myQNAPcloud Object が暗号化キーを提供する場合、呼び出し元は何もする必要はありません。
呼び出し元は、x-amz-server-side-encryption-customer-algorithm、x-amz-server-side-encryption-customer-key、および x -amz-server-side-encryption-customer-key-MD5 ヘッダーを使用して暗号化キーを提供できます。これらのパラメータは AWS S3 と同様に機能します。
myQNAPcloud Objectは、キー管理サービスをサポートしていません。そのため、「x-amz-server-side-encryption」はサポートされておらず、「aws:kms」機能もすべてサポートされていません。myQNAPcloud Objectは、サーバーサイド暗号化に関係なく、常にアップロードされたデータの MD5 を保存します。
オブジェクトストレージクラス
myQNAPcloud Objectは、標準の AWS S3 ストレージクラスに最も似た単一のストレージクラスのみを提供します。どの操作でもストレージクラスが返される場合、myQNAPcloud Object は標準の AWS S3 ストレージクラスを返します。
myQNAPcloud Object でサポートされていないオブジェクトの操作
|
| オブジェクト RESTORE | myQNAPcloud Objectは、複数のストレージクラスをサポートしておらず、異なるストレージクラスからオブジェクトを復元するために使用される POST オブジェクト RESTORE リクエストをサポートしていません。 |
| オブジェクトコンテンツの選択 | myQNAPcloud Objectは、単純な構造化クエリ言語(SQL)ステートメントに基づいて Amazon S3 オブジェクトの内容をフィルタリングする操作をサポートしていません。 |
| S3 バッチオペレーション | myQNAPcloud Object はオブジェクト管理のための S3 バッチオペレーションをサポートしていません。 |
myQNAPcloud Object S3 API の準拠
コンプライアンスがあるバケット内の任意のオブジェクトのコンプライアンス設定は、バケットのコンプライアンスの範囲内で変更することもできます。以下の XML タグを使用してオブジェクトのコンプライアンス設定を指定します。
|
| リーガルホールド | リーガルホールドの状態を設定するためのブール値「true」または「false」。オブジェクトが true のリーガルホールド状態にある場合、保持期間に関係なく削除できません。 |
| 保持時間 | オブジェクトの新しい保持時間を与える ISO 時間。この時間より前にオブジェクトを削除することはできません。新しい保持時間はバケットポリシーで与えられた保持期間を過ぎている必要があることに注意してください。そうでない場合、エラーが返されます。 |
オブジェクトにコンプライアンスを設定する例は以下の通りです:
PUT http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object?complianceHTTP/1.1 <objectcomplianceconfiguration> <conditionalhold>false</conditionalhold> <retentiontime>2018-03-13T10:45:00Z</retentiontime> </objectcomplianceconfiguration>
特定のオブジェクトのコンプライアンス設定は、「?compliance」クエリ文字列を使用して取得することもできます。上記のオブジェクトコンプライアンス設定に加えて、クエリはオブジェクトが変更されていないことを確認するために使用できる計算された SHA256 ハッシュを返します。SHA256 値は単一のオブジェクトとしてアップロードされたオブジェクトにのみ利用可能であり、マルチパートまたは合成オブジェクトには利用できません。
オブジェクトのコンプライアンスを取得する例は以下の通りです:
GET http://s3.us-east-1.myqnapcloud.io/my-bucket/my-object?complianceHTTP/1.1
レスポンスボディ:
<objectcomplianceconfiguration xml ns="http://s3.amazonaws.com/doc/2006-03-01/"> <retentiontime>2016-10-31T15:08:05Z</retentiontime> <conditionalhold>false</conditionalhold> <legalhold>false</legalhold> <sha256>14b4be3894e92166b508007b6c2e4fb6e88d3d0ad652c76475089a50ebe6e33b</sha256> </objectcomplianceconfiguration>
オブジェクトのコンプライアンス設定は、バケットにコンプライアンスが有効になっている場合、バケットリストにも表示されます。
myQNAPcloud Object S3 API を使用したオブジェクトロック
以下に説明するタグを使用して、オブジェクトのオブジェクトロック設定を追加または更新できます。
|
| 保持日付まで保持 | これはオブジェクトの保持期間を定義します。この時間が経過するまでオブジェクトを削除することはできません。保持期間は将来の日付でなければならないことに注意してください。 |
| LegalHold | これは ON または OFF のいずれかで、大文字と小文字は区別されません。 |
以下はオブジェクトに対するオブジェクトロック設定の例です:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/beta_vpn.png?retention&versionId= 001617181245457483475-4ylsTbqqvP <retention> <mode>compliance</mode> <retainuntildate>2021-04-06T09:00:45Z</retainuntildate> </retention>
以下はオブジェクトに対する法的保留の設定例です:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/beta_vpn.png?legal-hold&versionId=001617181245457483475-4ylsTbqqvP <legalhold> <status>ON</status> </legalhold>
以下はオブジェクトに対するガバナンスモードの設定例です:
PUT https://s3.us-east-1.myqnapcloud.io/qa.objectlock.002/public/ACL.PNG?retention <retention> <mode>governance</mode> <retainuntildate>2021-05-20T09:00:45Z</retainuntildate> </retention>
オブジェクトのガバナンス設定を上書きする場合は、必ず「x-amz-bypass-governance-retention =true」ヘッダーを含める必要があります。
myQNAPcloud Object ストレージ地域のサービス URL
myQNAPcloud Object の異なるストレージ地域の myQNAPcloud サービス URL は以下の通りです:
アメリカ大陸
| 地域 | サービス URL |
|---|
| US East 1 (N. Virginia) | s3 .us-east-1.myqnapcloud.io |
| US Central 1 (Texas) | s3.us-central-1. myqnapcloud.io |
| US West 1 (Oregon) | s3.us-west-1. myqnapcloud.io |
| CA Central 1 (Toronto) | s3.ca-central-1. myqnapcloud.io |
EMEA
| EU Central 1 (アムステルダム) | s3.eu-central-1. myqnapcloud.io |
| EU Central 2 (フランクフルト) | s3.eu-central-2. myqnapcloud.io |
| EU ウェスト 1 (ロンドン) | s3.eu-west-1. myqnapcloud.io |
| EU ウェスト 2 (パリ) | s3.eu-west-2. myqnapcloud.io |
| EU ウェスト 3 (ロンドン) | s3.eu-west-3. myqnapcloud.io |
| EU サウス 1 (ミラノ) | s3.eu-south-1. myqnapcloud.io |
APAC
| AP ノースイースト 1 (東京) | s3.ap-northeast-1. myqnapcloud.io |
| AP ノースイースト 2 (大阪) | s3.ap-northeast-2. myqnapcloud.io |
| AP サウスイースト 1 (シンガポール) | s3.ap-southeast-1. myqnapcloud.io |
| AP サウスイースト 2 (シドニー) | s3.ap-southeast-2. myqnapcloud.io |
myQNAPcloud Object 管理コンソールは myQNAPcloud ポータルを通じてアクセスできます。
サードパーティのストレージアプリケーションで使用する正しいサービス URL を探している場合は、バケットの場所に一致するものを選択してください。
サードパーティのストレージアプリケーションを使用する際、これらのアプリケーションはストレージリージョンサービス URL を処理するための異なる方法を持っていることを認識しておくべきです。これらの方法には以下が含まれます:
- サービス URL を明示的に入力できるアプリケーション。これらのアプリケーションは最も柔軟で、新しいサービス URL が利用可能になると簡単に設定できます。
- ストレージリージョンの事前構築されたリストから選択することしかできないアプリケーション。これらのアプリケーションは最も柔軟性が低く、ストレージプロバイダーが新しいリージョンを実装した場合、新しいリージョンにアクセスするためにアプリケーションの更新を待つ必要があります。もしあなたのストレージアプリケーションが事前定義されたリージョンリストにすべての myQNAPcloud Object ストレージリージョンをサポートしていない場合、アプリケーションベンダー(QNAP ではなく)にサポートを依頼してください。
- API キーセットを入力するだけで、アカウント内のすべてのバケットを提供するアプリケーション。これらのアプリケーションは柔軟性を提供しますが、HTTP レベルでの自動リダイレクトが必要です。
myQNAPcloud Object S3 API によるオブジェクトレプリケーション
GET オブジェクトタグ付け
myQNAPcloud Object は、オブジェクトが以下の場合にタグセットを取得する機能をサポートしています:
オブジェクトにタグがない場合
GET https://s3.myqnapcloud.io/my_bucket/Test-object1.txt?tagging
レスポンスボディ:
<?xml version="1.0" encoding="UTF-8"?> <tagging> <tagset></tagset> </tagging>
ステータス 200 OK
オブジェクトにタグがある場合
GET https://s3.myqnapcloud.io/my_bucket/Test-object2.pdf?tagging
レスポンスボディ:
<!--?xml version="1.0" encoding="UTF-8"?--> <tagging> <tagset> <tag> <key>key2</key> <value>value2</value> </tag> <tag> <key>key1</key> <value>value1</value> </tag> </tagset> </tagging>
PUT オブジェクトタグ付け
myQNAPcloud Object は以下の機能をサポートします:
- バケット内の既存オブジェクトにタグ値を追加する
- バケット内の既存オブジェクトにタグ値を追加する
バケット内の既存オブジェクトのタグ値を追加する
PUT https://s3.myqnapcloud.io/my_bucket/Test-object3.pdf?tagging
Content-Type: text/xml
レスポンスボディ:
<tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <tagset> <tag> <key>tag1</key> <value>value1</value> </tag> </tagset> </tagging>
バケット内の既存オブジェクトのタグ値を追加する
この例では、既存のオブジェクトにはすでに「key5」-「value5」のタグ値があります。既存のペアに新しいタグペアを追加できます。
PUT https://s3.myqnapcloud.io/my_bucket/Test-object4.jpg?tagging
Content-Type: text/xml
レスポンスボディ:
<tagging xmlns="http://s3.myqnapcloud.io/doc/2006-03-01/"> <tagset> <tag> <key>key5</key> <value>value5</value> </tag> <tag> <key>key6</key> <value>value6</value> </tag> </tagset> </tagging>
ステータス 200 OK
他のバージョンのタグを PUT するには、versionId クエリパラメータを使用します。
オブジェクトタグの削除
指定されたオブジェクトからタグセット全体を削除します。
DELETE https://s3.myqnapcloud.io/my_bucket/Test-object5.pdf?tagging
レスポンスボディ:
<empty>
ステータス 204 No Content
他のバージョンのタグを削除するには、versionId クエリパラメータを使用します。
myQNAPcloud Object API によるオブジェクトタグ付け
オブジェクトタグの取得
myQNAPcloud Object は、オブジェクトのタグセットを取得する機能をサポートします。オブジェクトが:
オブジェクトがタグを持っていない場合
GET
https://s3.myqnapcloud.io/my_bucket/Test-object1.txt?tagging
レスポンスボディ:
<?xml version="1.0" encoding="UTF-8"?> <tagging> <tagset></tagset> </tagging>
ステータス 200 OK
オブジェクトにタグがある場合
GET
https://s3.myqnapcloud.io/my_bucket/Test-object2.pdf?tagging
レスポンスボディ:
<!--?xml version="1.0" encoding="UTF-8"?--> <tagging> <tagset> <tag> <key>key2</key> <value>value2</value> </tag> <tag> <key>key1</key> <value>value1</value> </tag> </tagset> </tagging>
PUT オブジェクトタグ付け
myQNAPcloud Object は以下の機能をサポートします:
- バケット内の既存オブジェクトにタグ値を追加する
- バケット内の既存オブジェクトにタグ値を追加する
バケット内の既存オブジェクトにタグ値を追加する
PUT
https://s3.myqnapcloud.io/my_bucket/Test-object3.pdf?tagging
Content-Type: text/xml
レスポンスボディ:
<tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <tagset> <tag> <key>tag1</key> <value>value1</value> </tag> </tagset> </tagging>
バケット内の既存オブジェクトにタグ値を追加する
この例では、既存のオブジェクトに既に「key5」-「value5」のタグ値があります。既存のペアに新しいタグペアを追加できます。
PUT
https://s3.myqnapcloud.io/my_bucket/Test-object4.jpg?tagging
Content-Type: text/xml
レスポンスボディ:
<tagging xmlns="http://s3.myqnapcloud.io/doc/2006-03-01/"> <tagset> <tag> <key>key5</key> <value>value5</value> </tag> <tag> <key>key6</key> <value>value6</value> </tag> </tagset> </tagging>
ステータス 200 OK
他のバージョンのタグを PUT するには、versionId クエリパラメータを使用します。
オブジェクトタグの削除
これにより、指定されたオブジェクトからタグセット全体が削除されます。
DELETE
https://s3.myqnapcloud.io/my_bucket/Test-object5.pdf?tagging
レスポンスボディ:
<empty>
ステータス 204 No Content
他のバージョンのタグを削除するには、versionId クエリパラメータを使用します。
さらに読む
AWS S3 との互換性があるため、myQNAPcloud Object を使用する際には、公式の AWS S3 ドキュメントが補完的なリソースとして役立ちます。API バージョン 2006-03-01 の詳細については、Amazon Simple ストレージ Service API Reference を参照してください。
Amazon Simple ストレージ Service API Reference