You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var s3 = new AmazonS3Client(RegionEndpoint.EUWest1);
var res1 = await s3.PutBucketAsync(bucketName);
var res2 = await s3.PutBucketTaggingAsync(new PutBucketTaggingRequest
{
BucketName = bucketName,
TagSet = new List<Tag>
{
new Tag { Key = "my-key", Value = "my-value"}
}
});
var res3 = await s3.GetBucketTaggingAsync(new GetBucketTaggingRequest {BucketName = bucketName});
var tag = res3.TagSet.FirstOrDefault();
if (tag.Key != "my-key" || tag.Value != $"my-value")
Console.WriteLine("Wrong tags");
Context
Create bucket and put some tag
Your Environment
AWSSDK.Core version used: 3.3.25.4
Service assembly and version used: AWSSDK.S3 3.3.24.1
Operating System and version: Ubuntu 16.04
Visual Studio version: Rider 2018.2.3
Targeted .NET platform: .NETCoreApp 2.1
.NET Core Info
.NET Core version used for development:
.NET Core version installed in the environment where application runs:
Output of dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 2.1.403
Commit: 04e15494b6
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.403/
Host (useful for support):
Version: 2.1.5
Commit: 290303f510
AmazonS3Client.PutBucketTagging puts tags key as a tag value.
Expected Behavior
AmazonS3Client.PutBucketTagging puts passed tag value as a value
Current Behavior
AWSSDK.S3 starting from version 3.3.24 creates buckets tags with wrong value. It puts passed Key as a Value.
Possible Solution
It seems that there is a bug in the https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/S3/Custom/Model/Tag.cs line 69
there are should be:
xmlWriter.WriteElementString("Value", S3Transforms.ToXmlStringValue(value));
Steps to Reproduce (for bugs)
Context
Create bucket and put some tag
Your Environment
.NET Core Info
dotnet --info
:The text was updated successfully, but these errors were encountered: