[opensearchserverless] SecurityPolicyDetail does not include the policy JSON
FlorianSW opened this issue · comments
Describe the feature
The API operation GetSecurityPolicy
contains the policy document of the requested policy in the response. The policy is available in the key policy
.
However, when using the GetSecurityPolicy
method on an opensearchserverless
client of the aws-sdk-go, the return type (GetSecurityPolicyOutput
-> SecurityPolicyDetail
) does not include the policy document.
See the code:
aws-sdk-go/service/opensearchserverless/api.go
Lines 8512 to 8532 in ea713c0
This makes it currently impossible to inspect the policy document of, e.g., the network or encryption policy applied to an OpenSearch serverless collection.
Use Case
To automate the workflows when working with OpenSearch Serverless collections, I need to be able to inspect several properties of an encryption or network policy applied to a collection. Based on the applied policies our tool using the AWS Go SDK will recommend changes or auto-remediate them. Without knowing the currently applied policies, this is not possible.
Proposed Solution
Add the policy content to the GetSecurityPolicyOutput
type.
Other Information
The policy
field is added to the v2 version of the SDK already: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/opensearchserverless@v1.8.1/types#SecurityPolicyDetail
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
SDK version used
v1.47.11
Environment details (Version of Go (go version
)? OS name and version, etc.)
go version go1.21.3 darwin/arm64
Hi @FlorianSW ,
Thanks for opening this issue. This seems like a bug in our model code generation. Specifically there is a discrepancy between the published model and the model the SDK holds for code generation purposes.
We will look into this with priority.
All the best,
Ran~
Hi @FlorianSW ,
https://github.com/aws/aws-sdk-go/releases/tag/v1.43.0
This is a known issue where the Go SDK v1 cannot deserialize JSONValue types.
The solution is to upgrade to Go v2.
Thanks,
Ran~
⚠️ COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.