describeSecurityPolicy method

Future<DescribeSecurityPolicyResponse> describeSecurityPolicy({
  1. required String securityPolicyName,
})

Describes the security policy that is attached to your server or SFTP connector. The response contains a description of the security policy's properties. For more information about security policies, see Working with security policies for servers or Working with security policies for SFTP connectors.

May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter securityPolicyName : Specify the text name of the security policy for which you want the details.

Implementation

Future<DescribeSecurityPolicyResponse> describeSecurityPolicy({
  required String securityPolicyName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.DescribeSecurityPolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SecurityPolicyName': securityPolicyName,
    },
  );

  return DescribeSecurityPolicyResponse.fromJson(jsonResponse.body);
}