-
Notifications
You must be signed in to change notification settings - Fork 937
Description
Describe the bug
I have a vpc endpoint connection with state pending acceptance, but when I access the state value in the SDK result it returns UNKNOWN_TO_SDK_VERSION. It seems that the problem is caused by the SDK expecting the state value to have pascal case while it actually has camel case. When I parse the response from a string manually using the vpcEndpointStateAsString method with a camel case parser it works for me, but I'd like to be able to used the SDK enum values instead of parsing the string myself. There is a related issue in the old rust AWS SDK repo here aws/aws-sdk#360. This is the state enum in the service-2.json
file.
"State":{
"type":"string",
"enum":[
"PendingAcceptance",
"Pending",
"Available",
"Deleting",
"Deleted",
"Rejected",
"Failed",
"Expired",
"Partial"
]
}
As I understand it this is used to generate the string representation of the state enum used when the sdk parses the value. I imagine that the solution is for this enum to be updated to match the values used by the API.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
I expected the SDK to return the PENDING_ACCEPTANCE value of the State enum for a VpcEndpointConnection with state pending acceptance that I looked up on the API.
Current Behavior
The SDK returned UNKNOWN_TO_SDK_VERSION.
Reproduction Steps
Create a vpc endpoint connection and use the describeVpcEndpointConnections method to query it from the AWS API. The state will be incorrectly parsed as UNKNOWN_TO_SDK_VERSION.
Possible Solution
It seems to me that the file service-2.json is used in codegen for the SDK. If that's correct a possible solution may be to update the values of the State enum for a VpcEndpointConnection to be camel case so that they match the values returned by the API.
Additional Information/Context
No response
AWS Java SDK version used
2.32.30
JDK version used
21
Operating System and version
Debian linux