Tagging
Tags for Buckets and Objects
Returns the tag set associated with the bucket.
To use this operation, you must have permission to perform the `GetBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
`GetBucketTagging` has the following special error:
Error code: `NoSuchTagSetError`
Description: There is no tag set associated with the bucket.
The bucket name.
my-bucket
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
Success
<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>Project</Key>
<Value>Project 1</Value>
</Tag>
<Tag>
<Key>Client</Key>
<Value>Client 1</Value>
</Tag>
</TagSet>
</Tagging>
Sets the tags for a bucket.
When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.
To use this operation, you must have permissions to perform the `PutBucketTagging` operation. The bucket owner has this permission by default and can grant this permission to others.
`PutBucketTagging` has the following special errors:
Error code: `InvalidTagError`
Description: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation.
Error code: `MalformedXMLError`
Description: The XML provided does not match the schema.
Error code: `OperationAbortedError `
Description: A conflicting conditional operation is currently in progress against this resource. Please try again.
Error code: `InternalError`
Description: The service was unable to apply the provided tag to the bucket.
The bucket name.
my-bucket
The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 348
"<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>Project</Key>
<Value>Project 1</Value>
</Tag>
<Tag>
<Key>Client</Key>
<Value>Client 1</Value>
</Tag>
</TagSet>
</Tagging>
"
Success
No content
Deletes the tags from the bucket.
To use this operation, you must have permission to perform the `PutBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
The bucket name.
my-bucket
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
Success
No content
Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.
To use this operation, you must have permission to perform the `GetObjectTagging` operation. By default, the GET operation returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the `GetObjectVersionTagging` operation.
By default, the bucket owner has this permission and can grant this permission to others.
The bucket name.
my-bucket
Object key for which to get the tagging information.
The versionId of the object for which to get the tagging information.
GET /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
Success
<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>Project</Key>
<Value>Project 1</Value>
</Tag>
<Tag>
<Key>Client</Key>
<Value>Client 1</Value>
</Tag>
</TagSet>
</Tagging>
Sets the supplied tag-set to an object that already exists in a bucket.
A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request.
Note that IONOS Object Storage limits the maximum number of tags to 10 tags per object.
To use this operation, you must have permission to perform the `PutObjectTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
To put tags of any other version, use the `versionId` query parameter. You also need permission for the `PutObjectVersionTagging` operation.
Special Errors
Code: InvalidTagError
Cause: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation.
Code: MalformedXMLError
Cause: The XML provided does not match the schema.
Code: OperationAbortedError
Cause: A conflicting conditional operation is currently in progress against this resource. Please try again.
Code: InternalError
Cause: The service was unable to apply the provided tag to the object.
The bucket name.
my-bucket
Name of the object key.
The versionId of the object that the tag-set will be added to.
The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.
{"VersionId":"null"}
PUT /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 348
"<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<TagSet>
<Tag>
<Key>Project</Key>
<Value>Project 1</Value>
</Tag>
<Tag>
<Key>Client</Key>
<Value>Client 1</Value>
</Tag>
</TagSet>
</Tagging>
"
Success
<?xml version="1.0"?>
<object>
<VersionId>null</VersionId>
</object>
Removes the entire tag set from the specified object.
To use this operation, you must have permission to perform the `DeleteObjectTagging` operation.
To delete tags of a specific object version, add the `versionId` query parameter in the request. You will need permission for the `DeleteObjectVersionTagging` operation.
The bucket name.
my-bucket
The key that identifies the object in the bucket from which to remove all tags.
The versionId of the object that the tag-set will be removed from.
{"VersionId":"null"}
DELETE /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
Success
<?xml version="1.0"?>
<object>
<VersionId>null</VersionId>
</object>
Was this helpful?