describeSecurityPolicy method

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

Describes the security policy that is attached to your file transfer protocol-enabled server. The response contains a description of the security policy's properties. For more information about security policies, see Working with security policies.

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

Parameter securityPolicyName : Specifies the name of the security policy that is attached to the server.

Implementation

Future<DescribeSecurityPolicyResponse> describeSecurityPolicy({
  required String securityPolicyName,
}) async {
  ArgumentError.checkNotNull(securityPolicyName, 'securityPolicyName');
  _s.validateStringLength(
    'securityPolicyName',
    securityPolicyName,
    0,
    100,
    isRequired: true,
  );
  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);
}