[opensearchserverless] SecurityPolicyDetail does not include the policy JSON #5070
Closed
1 of 2 tasks
Labels
bug
This issue is a bug.
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
p1
This is a high priority issue
Describe the feature
The API operation
GetSecurityPolicy
contains the policy document of the requested policy in the response. The policy is available in the keypolicy
.However, when using the
GetSecurityPolicy
method on anopensearchserverless
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/[email protected]/types#SecurityPolicyDetailAcknowledgements
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
The text was updated successfully, but these errors were encountered: