updateTrust method

Future<UpdateTrustResult> updateTrust({
  1. required String trustId,
  2. SelectiveAuth? selectiveAuth,
})

Updates the trust that has been set up between your Managed Microsoft AD directory and an self-managed Active Directory.

May throw ClientException. May throw EntityDoesNotExistException. May throw InvalidParameterException. May throw ServiceException.

Parameter trustId : Identifier of the trust relationship.

Parameter selectiveAuth : Updates selective authentication for the trust.

Implementation

Future<UpdateTrustResult> updateTrust({
  required String trustId,
  SelectiveAuth? selectiveAuth,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.UpdateTrust'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TrustId': trustId,
      if (selectiveAuth != null) 'SelectiveAuth': selectiveAuth.value,
    },
  );

  return UpdateTrustResult.fromJson(jsonResponse.body);
}