updateDirectoryConfig method

Future<UpdateDirectoryConfigResult> updateDirectoryConfig({
  1. required String directoryName,
  2. CertificateBasedAuthProperties? certificateBasedAuthProperties,
  3. List<String>? organizationalUnitDistinguishedNames,
  4. ServiceAccountCredentials? serviceAccountCredentials,
})

Updates the specified Directory Config object in WorkSpaces Applications. This object includes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.

May throw ConcurrentModificationException. May throw IncompatibleImageException. May throw InvalidRoleException. May throw OperationNotPermittedException. May throw ResourceInUseException. May throw ResourceNotFoundException.

Parameter directoryName : The name of the Directory Config object.

Parameter certificateBasedAuthProperties : The certificate-based authentication properties used to authenticate SAML 2.0 Identity Provider (IdP) user identities to Active Directory domain-joined streaming instances. Fallback is turned on by default when certificate-based authentication is Enabled . Fallback allows users to log in using their AD domain password if certificate-based authentication is unsuccessful, or to unlock a desktop lock screen. Enabled_no_directory_login_fallback enables certificate-based authentication, but does not allow users to log in using their AD domain password. Users will be disconnected to re-authenticate using certificates.

Parameter organizationalUnitDistinguishedNames : The distinguished names of the organizational units for computer accounts.

Parameter serviceAccountCredentials : The credentials for the service account used by the fleet or image builder to connect to the directory.

Implementation

Future<UpdateDirectoryConfigResult> updateDirectoryConfig({
  required String directoryName,
  CertificateBasedAuthProperties? certificateBasedAuthProperties,
  List<String>? organizationalUnitDistinguishedNames,
  ServiceAccountCredentials? serviceAccountCredentials,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.UpdateDirectoryConfig'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryName': directoryName,
      if (certificateBasedAuthProperties != null)
        'CertificateBasedAuthProperties': certificateBasedAuthProperties,
      if (organizationalUnitDistinguishedNames != null)
        'OrganizationalUnitDistinguishedNames':
            organizationalUnitDistinguishedNames,
      if (serviceAccountCredentials != null)
        'ServiceAccountCredentials': serviceAccountCredentials,
    },
  );

  return UpdateDirectoryConfigResult.fromJson(jsonResponse.body);
}