Skip to content

Commit 4ab2188

Browse files
Merge remote-tracking branch 'origin/development' into local-staged-release
2 parents 43f62f4 + ffab7d4 commit 4ab2188

File tree

117 files changed

+5298
-3368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+5298
-3368
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "S3",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Generate GetBucketReplication, PutBucketReplication, GetBucketPolicy, GetBucketLocation, GetBucketMetadataTableConfiguration, GetBucketOwnershipControls",
8+
"[Breaking Change] The following public IsSet() methods are now internal: IsSetAccountId() in Amazon.S3.Model.ReplicationDestination. IsSetEncryptionConfiguration() in Amazon.S3.Model.ReplicationDestination, IsSetAccessControlTranslation() in Amazon.S3.Model.ReplicationDestination.",
9+
"[Breaking Change] Priority in Amazon.S3.Model.ReplicationRule changed from int to int?"
10+
]
11+
}
12+
]
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"core": {
3+
"changeLogMessages": [
4+
"Update `JsonErrorResponseUnmarshaller` not to check nested properties when trying to populate details for operations that failed."
5+
],
6+
"type": "patch",
7+
"updateMinimum": true
8+
},
9+
"services": [
10+
{
11+
"serviceName": "DynamoDBv2",
12+
"type": "patch",
13+
"changeLogMessages": [
14+
"Fix issue where `ReturnValuesOnConditionCheckFailure` could not be used if the provided document included properties that ended with `code` or `message` (https://github.com/aws/aws-sdk-net/issues/3764)."
15+
]
16+
}
17+
]
18+
}

generator/ServiceClientGeneratorLib/Generators/SourceFiles/StructureGenerator.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,36 +395,36 @@ public override string TransformText()
395395
if (this.StructureType == StructureType.Response && member.PropertyName == "ContentLength")
396396
continue;
397397

398+
398399

399400
#line default
400401
#line hidden
401402
this.Write(" private ");
402403

403-
#line 176 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
404+
#line 177 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
404405
this.Write(this.ToStringHelper.ToStringWithCulture(member.DetermineType()));
405406

406407
#line default
407408
#line hidden
408409
this.Write(" ");
409410

410-
#line 176 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
411+
#line 177 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
411412
this.Write(this.ToStringHelper.ToStringWithCulture(member.VariableName));
412413

413414
#line default
414415
#line hidden
415416

416-
#line 176 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
417+
#line 177 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
417418
this.Write(this.ToStringHelper.ToStringWithCulture(member.IsCollection ? string.Format(" = AWSConfigs.InitializeCollections ? new {0}() : null;", member.DetermineType()) : ";"));
418419

419420
#line default
420421
#line hidden
421422
this.Write("\r\n");
422423

423-
#line 177 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
424-
424+
#line 178 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\SourceFiles\StructureGenerator.tt"
425+
425426
}
426427

427-
428428

429429
#line default
430430
#line hidden

generator/ServiceClientGeneratorLib/Generators/SourceFiles/StructureGenerator.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ namespace <#=this.Config.Namespace#>.Model
172172
// If the shape is a response then skip adding ContentLength because the property comes from the base class.
173173
if (this.StructureType == StructureType.Response && member.PropertyName == "ContentLength")
174174
continue;
175+
175176
#>
176177
private <#=member.DetermineType()#> <#=member.VariableName#><#= member.IsCollection ? string.Format(" = AWSConfigs.InitializeCollections ? new {0}() : null;", member.DetermineType()) : ";"#>
177-
<#
178+
<#
178179
}
179-
180180
#>
181181

182182
<#

generator/ServiceClientGeneratorLib/Member.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,15 @@ public string DeprecationMessage
992992
{
993993
string message = this.model.Customizations.GetPropertyModifier(this.OwningShape.Name, this._name)?.DeprecationMessage ??
994994
this.data[DeprecatedMessageKey].CastToString();
995+
if (message == null)
996+
{
997+
var shapeModifier = this.model.Customizations.GetShapeModifier(this.OwningShape.Name);
998+
if (shapeModifier != null && shapeModifier.PropertyModifier(this._name) != null)
999+
{
1000+
var propertyModifier = shapeModifier.PropertyModifier(this._name);
1001+
message = propertyModifier.DeprecationMessage;
1002+
}
1003+
}
9951004
// TODO: Fill in s3 deprecation messages
9961005
if (message == null)
9971006
throw new Exception(string.Format("The 'message' property of the 'deprecated' trait is missing for member {0}.{1}.\nFor example: \"MemberName\":{{ ... \"deprecated\":true, \"deprecatedMessage\":\"This property is deprecated, use XXX instead.\"}}", this.OwningShape.Name, this._name));

generator/ServiceClientGeneratorLib/Operation.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,33 @@ public Member ResponsePayloadMember
324324
if (this.ResponseStructure != null)
325325
{
326326
var payload = this.ResponseStructure.PayloadMemberName;
327+
// check to see if the payload member has been overridden by another member defined in the service customizations
328+
// file. For example, the payload member could've been included in the "exclude" array and another member
329+
// could've been injected or the member could've been renamed
330+
if (this.model.Customizations.ShapeModifiers.ContainsKey(this.ResponseStructure.Name))
331+
{
332+
var customization = this.model.Customizations.ShapeModifiers[this.ResponseStructure.Name];
333+
if (customization.IsExcludedProperty(payload))
334+
{
335+
foreach (var injectedProperty in customization.InjectedPropertyNames)
336+
{
337+
var propertyInjector = customization.InjectedPropertyData(injectedProperty);
338+
if (string.Equals(propertyInjector.Data[CustomizationsModel.OriginalMemberKey].ToString(), payload, StringComparison.OrdinalIgnoreCase))
339+
{
340+
payload = injectedProperty;
341+
break;
342+
}
343+
344+
}
345+
}
346+
347+
}
348+
// has the payload's property been modified via an "emitPropertyName" customization?
349+
if (payload != null && this.model.Customizations.GetPropertyModifier(this.ResponseStructure.Name, payload) != null)
350+
{
351+
var propertyModifier = this.model.Customizations.GetPropertyModifier(this.ResponseStructure.Name, payload);
352+
payload = propertyModifier.EmitName;
353+
}
327354
if (!string.IsNullOrWhiteSpace(payload))
328355
{
329356
return this.ResponseStructure.Members.Single(m => m.ModeledName.Equals(payload, StringComparison.InvariantCultureIgnoreCase));

generator/ServiceClientGeneratorLib/ServiceModel.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,14 @@ public List<Operation> S3AllowListOperations
485485
new Operation(this, "GetBucketEncryption", DocumentRoot[OperationsKey]["GetBucketEncryption"]),
486486
//new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]),
487487
//new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]),
488-
//new Operation(this, "GetBucketLocation", DocumentRoot[OperationsKey]["GetBucketLocation"]),
488+
new Operation(this, "GetBucketLocation", DocumentRoot[OperationsKey]["GetBucketLocation"]),
489489
//new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]),
490-
//new Operation(this, "GetBucketMetadataTableConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataTableConfiguration"]),
490+
new Operation(this, "GetBucketMetadataTableConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataTableConfiguration"]),
491491
//new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]),
492-
//new Operation(this, "GetBucketOwnershipControls", DocumentRoot[OperationsKey]["GetBucketOwnershipControls"]),
493-
//new Operation(this, "GetBucketPolicy", DocumentRoot[OperationsKey]["GetBucketPolicy"]),
494-
//new Operation(this, "GetBucketPolicyStatus", DocumentRoot[OperationsKey]["GetBucketPolicyStatus"]),
495-
//new Operation(this, "GetBucketReplication", DocumentRoot[OperationsKey]["GetBucketReplication"]),
492+
new Operation(this, "GetBucketOwnershipControls", DocumentRoot[OperationsKey]["GetBucketOwnershipControls"]),
493+
new Operation(this, "GetBucketPolicy", DocumentRoot[OperationsKey]["GetBucketPolicy"]),
494+
new Operation(this, "GetBucketPolicyStatus", DocumentRoot[OperationsKey]["GetBucketPolicyStatus"]),
495+
new Operation(this, "GetBucketReplication", DocumentRoot[OperationsKey]["GetBucketReplication"]),
496496
//new Operation(this, "GetBucketRequestPayment", DocumentRoot[OperationsKey]["GetBucketRequestPayment"]),
497497
//new Operation(this, "GetBucketTagging", DocumentRoot[OperationsKey]["GetBucketTagging"]),
498498
//new Operation(this, "GetBucketVersioning", DocumentRoot[OperationsKey]["GetBucketVersioning"]),
@@ -513,6 +513,7 @@ public List<Operation> S3AllowListOperations
513513
//new Operation(this, "ListParts", DocumentRoot[OperationsKey]["ListParts"]),
514514
//new Operation(this, "PutBucketAccelerateConfiguration", DocumentRoot[OperationsKey]["PutBucketAccelerateConfiguration"]),
515515
new Operation(this, "PutBucketEncryption", DocumentRoot[OperationsKey]["PutBucketEncryption"]),
516+
new Operation(this, "PutBucketReplication", DocumentRoot[OperationsKey]["PutBucketReplication"]),
516517
//new Operation(this, "PutBucketPolicy", DocumentRoot[OperationsKey]["PutBucketPolicy"]),
517518
//new Operation(this, "PutObjectLegalHold", DocumentRoot[OperationsKey]["PutObjectLegalHold"]),
518519
//new Operation(this, "PutObjectLockConfiguration", DocumentRoot[OperationsKey]["PutObjectLockConfiguration"]),

generator/ServiceModels/s3/s3.customizations.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,30 @@
113113
}
114114
]
115115
},
116+
"ReplicationDestination" : {
117+
"modify": [
118+
{
119+
"Account" : {"emitPropertyName": "AccountId"}
120+
},
121+
{
122+
"Bucket" : { "emitPropertyName": "BucketArn"}
123+
}
124+
]
125+
},
126+
"GetBucketLocationOutput":{
127+
"modify":[
128+
{
129+
"LocationConstraint":{"emitPropertyName": "Location"}
130+
}
131+
]
132+
},
133+
"GetBucketReplicationOutput":{
134+
"modify":[
135+
{
136+
"ReplicationConfiguration":{"emitPropertyName": "Configuration"}
137+
}
138+
]
139+
},
116140
"LifecycleRule": {
117141
"modify": [
118142
{
@@ -165,13 +189,30 @@
165189
}
166190
]
167191
},
192+
"PutBucketReplicationRequest": {
193+
"modify": [
194+
{
195+
"ReplicationConfiguration" : {"emitPropertyName": "Configuration"}
196+
}
197+
]
198+
},
168199
"QueueConfigurationDeprecated": {
169200
"modify": [
170201
{
171202
"Event": { "deprecatedMessage": "This property is deprecated. Use Events instead." }
172203
}
173204
]
174205
},
206+
"ReplicationRule":{
207+
"modify":[
208+
{
209+
"Prefix" : {"deprecatedMessage" : "This property is deprecated. Use Filter instead."}
210+
},
211+
{
212+
"ID": { "emitPropertyName": "Id" }
213+
}
214+
]
215+
},
175216
"RestoreObjectRequest": {
176217
"exclude": [ "RestoreRequest" ],
177218
"inject": [
@@ -221,6 +262,13 @@
221262
}
222263
]
223264
},
265+
"SseKmsEncryptedObjects":{
266+
"modify":[
267+
{
268+
"Status": {"emitPropertyName" : "SseKmsEncryptedObjectsStatus"}
269+
}
270+
]
271+
},
224272
"UploadPartCopyRequest": {
225273
"modify": [
226274
{
@@ -324,6 +372,15 @@
324372
},
325373
"ServerSideEncryption":{
326374
"renameShape":"ServerSideEncryptionMethod"
375+
},
376+
"BucketLocationConstraint":{
377+
"renameShape": "S3Region"
378+
},
379+
"Destination" :{
380+
"renameShape" : "ReplicationDestination"
381+
},
382+
"StorageClass":{
383+
"renameShape": "S3StorageClass"
327384
}
328385
}
329386
}

sdk/src/Core/Amazon.Runtime/Internal/Transform/JsonErrorResponseUnmarshaller.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ private static void GetValuesFromJsonIfPossible(JsonUnmarshallerContext context,
162162

163163
while (TryReadContext(context, ref reader))
164164
{
165+
// Do not attempt to process nested properties, as for DynamoDB the error response may contain
166+
// extra values that end with one of the prefixes we're looking.
167+
// Issue reported in: https://github.com/aws/aws-sdk-net/issues/3764
168+
if (context.CurrentDepth > 1)
169+
{
170+
continue;
171+
}
172+
165173
if (context.TestExpression("__type"))
166174
{
167175
type = StringUnmarshaller.GetInstance().Unmarshall(context, ref reader);

sdk/src/Services/S3/Custom/Model/DeleteMarkerReplication.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)