-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(timestream): RententionProperties key should be PascalCase #23570
Comments
Thanks for reporting this, we actually reverted this intentionally because the behavior you see in From here forward, please fill in these properties as if they are |
Why does the behavior of the dataclass change as well? This is the example from the official documentation: # The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_timestream as timestream
retention_properties_property = timestream.CfnTable.RetentionPropertiesProperty(
magnetic_store_retention_period_in_days="magneticStoreRetentionPeriodInDays",
memory_store_retention_period_in_hours="memoryStoreRetentionPeriodInHours"
) |
You won't want to use the dataclass - the example up top shows that the properties in the CfnTable construct should be specified as any - not as a dataclass |
p1: Any = {} # ok
p2: Any = timestream.CfnTable.RetentionPropertiesProperty() # ok
p3: dict = {} # ok
p4: dict = timestream.CfnTable.RetentionPropertiesProperty # error so somewhere seems to be an error? |
Defining it like this works for me on latest version:
|
Yes, this would work for me also. However, it is not an error to define it with the given dataclass. I like cdk because it helps me to define everything with the right typings and it is harder to missuse. But not in this case. e.g. with cdk v1 (maybe not compatible in this case) has a complete example with the dataclass in the properties. Why is there this dataclass, and it will produce something which will produce a so similar cloudformation template in the end? The only issue is, that the producing template becomes camelCase instead of PascalCase. It would give type hints, e.g. properties must be string and not integer. |
I understand now the issue. With the new cloudformation spec came the newly generated dataclasses. With the patch they became It looks like it is a dup with #8996. |
|
Describe the bug
In the cloudformation documentation all property keys are PascalCase. With 2.56.0 the RetentionProperties for timestream changed to camelCase:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-table.html
Expected Behavior
PascalCase for properties
Current Behavior
camelCase for properties
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
Framework Version
>= 2.56.0
Node.js Version
OS
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: