createDirectoryConfig method
Creates a 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 InvalidAccountStatusException.
May throw InvalidRoleException.
May throw LimitExceededException.
May throw OperationNotPermittedException.
May throw ResourceAlreadyExistsException.
May throw ResourceNotFoundException.
Parameter directoryName :
The fully qualified name of the directory (for example, corp.example.com).
Parameter organizationalUnitDistinguishedNames :
The distinguished names of the organizational units for computer accounts.
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 serviceAccountCredentials :
The credentials for the service account used by the fleet or image builder
to connect to the directory.
Implementation
Future<CreateDirectoryConfigResult> createDirectoryConfig({
required String directoryName,
required List<String> organizationalUnitDistinguishedNames,
CertificateBasedAuthProperties? certificateBasedAuthProperties,
ServiceAccountCredentials? serviceAccountCredentials,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.CreateDirectoryConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DirectoryName': directoryName,
'OrganizationalUnitDistinguishedNames':
organizationalUnitDistinguishedNames,
if (certificateBasedAuthProperties != null)
'CertificateBasedAuthProperties': certificateBasedAuthProperties,
if (serviceAccountCredentials != null)
'ServiceAccountCredentials': serviceAccountCredentials,
},
);
return CreateDirectoryConfigResult.fromJson(jsonResponse.body);
}