getSecurityPolicy method
Future<GetSecurityPolicyResponse>
getSecurityPolicy({
- required String name,
- required SecurityPolicyType type,
Returns information about a configured OpenSearch Serverless security policy. For more information, see Network access for Amazon OpenSearch Serverless and Encryption at rest for Amazon OpenSearch Serverless.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter name :
The name of the security policy.
Parameter type :
The type of security policy.
Implementation
Future<GetSecurityPolicyResponse> getSecurityPolicy({
required String name,
required SecurityPolicyType type,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'OpenSearchServerless.GetSecurityPolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
'type': type.value,
},
);
return GetSecurityPolicyResponse.fromJson(jsonResponse.body);
}