Inconsistency in AWS service model definitions #3007
-
Describe the bugAmazon's S3 Bucket shape has defined the shape of each of the members as the Name as seen below. For instance, BucketName is the name of json property retrieved from this SDK and not Name.
CreationDate is defined as "CreationDate":{"type":"timestamp"}. This extra shape definition is not present in the cloud front file. In Amazon CloudFront, FunctionMetadata's definition defines the shape as the type and not the Name. timestamp is the data type of the property and not the Name. But FunctionArn is the json property sent by the SDK.
Is there a reason why we use the data type in the shape for some resources but the name (introducing another shape that is defined with the type ) for others? Could you also share what resources follow which pattern? Expected BehaviorModifying Amazon CloudFront's FunctionMetadata to introduce another data shape for each of the members
OR Modifying Amazon S3 bucket to use the data type without another shape definition
Current Behaviormentioned in the bug description Reproduction Stepscheck source files S3 - CloudFront - https://github.com/aws/aws-sdk-net/blob/master/generator/ServiceModels/cloudfront/cloudfront-2020-05-31.normal.json#L5131 Possible SolutionNo response Additional Information/ContextNo response AWS .NET SDK and/or Package version usedAWS SDK - 3.7.602.1 Targeted .NET Platform.NET Operating System and versionLinux |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@PriyankaHariharan Good morning. Thanks for posting the question. If you examine the BucketName shape, it defines the actual data type Thanks, |
Beta Was this translation helpful? Give feedback.
-
thank you so much @ashishdhingra for the detailed response! |
Beta Was this translation helpful? Give feedback.
-
@PriyankaHariharan In the case of S3 using As a warning be careful reading too much into the code generation for S3. All other services are generated from service models but due to legacy reasons S3 is only partially generated. Basically just the service client and inteface. All of the sub types and marshallers are handcoded. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@PriyankaHariharan Good morning. Thanks for posting the question. If you examine the BucketName shape, it defines the actual data type
string
. A shape can define other attributes, for example if it is anenum
or if it is required.Name
member forBucket
shape could be one of case of simple type. S3 is one of the oldest services and such one of case might be expected. As such, these models are not controlled by the SDK and are pushed by the service teams. Once SDK received the models via automated process, build is triggered to update the model definitions in the SDK.Thanks,
Ashish