describeAgreement method

Future<DescribeAgreementResponse> describeAgreement({
  1. required String agreementId,
  2. required String serverId,
})

Describes the agreement that's identified by the AgreementId.

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

Parameter agreementId : A unique identifier for the agreement. This identifier is returned when you create an agreement.

Parameter serverId : The server identifier that's associated with the agreement.

Implementation

Future<DescribeAgreementResponse> describeAgreement({
  required String agreementId,
  required String serverId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.DescribeAgreement'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AgreementId': agreementId,
      'ServerId': serverId,
    },
  );

  return DescribeAgreementResponse.fromJson(jsonResponse.body);
}