createStorageVirtualMachine method

Future<CreateStorageVirtualMachineResponse> createStorageVirtualMachine({
  1. required String fileSystemId,
  2. required String name,
  3. CreateSvmActiveDirectoryConfiguration? activeDirectoryConfiguration,
  4. String? clientRequestToken,
  5. StorageVirtualMachineRootVolumeSecurityStyle? rootVolumeSecurityStyle,
  6. String? svmAdminPassword,
  7. List<Tag>? tags,
})

Creates a storage virtual machine (SVM) for an Amazon FSx for ONTAP file system.

May throw ActiveDirectoryError. May throw BadRequest. May throw FileSystemNotFound. May throw IncompatibleParameterError. May throw InternalServerError. May throw ServiceLimitExceeded. May throw UnsupportedOperation.

Parameter name : The name of the SVM.

Parameter activeDirectoryConfiguration : Describes the self-managed Microsoft Active Directory to which you want to join the SVM. Joining an Active Directory provides user authentication and access control for SMB clients, including Microsoft Windows and macOS clients accessing the file system.

Parameter rootVolumeSecurityStyle : The security style of the root volume of the SVM. Specify one of the following values:

  • UNIX if the file system is managed by a UNIX administrator, the majority of users are NFS clients, and an application accessing the data uses a UNIX user as the service account.
  • NTFS if the file system is managed by a Microsoft Windows administrator, the majority of users are SMB clients, and an application accessing the data uses a Microsoft Windows user as the service account.
  • MIXED This is an advanced setting. For more information, see Volume security style in the Amazon FSx for NetApp ONTAP User Guide.

Parameter svmAdminPassword : The password to use when managing the SVM using the NetApp ONTAP CLI or REST API. If you do not specify a password, you can still use the file system's fsxadmin user to manage the SVM.

Implementation

Future<CreateStorageVirtualMachineResponse> createStorageVirtualMachine({
  required String fileSystemId,
  required String name,
  CreateSvmActiveDirectoryConfiguration? activeDirectoryConfiguration,
  String? clientRequestToken,
  StorageVirtualMachineRootVolumeSecurityStyle? rootVolumeSecurityStyle,
  String? svmAdminPassword,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSSimbaAPIService_v20180301.CreateStorageVirtualMachine'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FileSystemId': fileSystemId,
      'Name': name,
      if (activeDirectoryConfiguration != null)
        'ActiveDirectoryConfiguration': activeDirectoryConfiguration,
      'ClientRequestToken':
          clientRequestToken ?? _s.generateIdempotencyToken(),
      if (rootVolumeSecurityStyle != null)
        'RootVolumeSecurityStyle': rootVolumeSecurityStyle.value,
      if (svmAdminPassword != null) 'SvmAdminPassword': svmAdminPassword,
      if (tags != null) 'Tags': tags,
    },
  );

  return CreateStorageVirtualMachineResponse.fromJson(jsonResponse.body);
}