Skip to content

create_storage_virtual_machine async

create_storage_virtual_machine(
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    active_directory_configuration: Optional[
        CreateSvmActiveDirectoryConfiguration
    ] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    file_system_id: Optional[FileSystemId] = None,
    name: Optional[StorageVirtualMachineName] = None,
    svm_admin_password: Optional[AdminPassword] = None,
    tags: Optional[Tags] = None,
    root_volume_security_style: Optional[
        StorageVirtualMachineRootVolumeSecurityStyle
    ] = None,
) -> CreateStorageVirtualMachineResponse

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

Parameters:

  • active_directory_configuration (Optional[CreateSvmActiveDirectoryConfiguration], default: None ) –

    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.

  • name (Optional[StorageVirtualMachineName], default: None ) –

    The name of the SVM.

  • svm_admin_password (Optional[AdminPassword], default: None ) –

    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.

  • root_volume_security_style (Optional[StorageVirtualMachineRootVolumeSecurityStyle], default: None ) –

    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.

Raises:

  • ActiveDirectoryError –

    An Active Directory error.

  • BadRequest –

    A generic error indicating a failure with a client request.

  • FileSystemNotFound –

    No Amazon FSx file systems were found based upon supplied parameters.

  • IncompatibleParameterError –

    The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • ServiceLimitExceeded –

    An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.

  • UnsupportedOperation –

    The requested operation is not supported for this resource or API.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fsx/_services/async_f_sx.py
async def create_storage_virtual_machine(
    self,
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    active_directory_configuration: Optional[
        "capo_fsx.types.create_svm_active_directory_configuration.CreateSvmActiveDirectoryConfiguration"
    ] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    file_system_id: Optional["capo_fsx.types.file_system_id.FileSystemId"] = None,
    name: Optional[
        "capo_fsx.types.storage_virtual_machine_name.StorageVirtualMachineName"
    ] = None,
    svm_admin_password: Optional[
        "capo_fsx.types.admin_password.AdminPassword"
    ] = None,
    tags: Optional["capo_fsx.types.tags.Tags"] = None,
    root_volume_security_style: Optional[
        "capo_fsx.types.storage_virtual_machine_root_volume_security_style.StorageVirtualMachineRootVolumeSecurityStyle"
    ] = None,
) -> "capo_fsx.types.create_storage_virtual_machine_response.CreateStorageVirtualMachineResponse":
    """<p>Creates a storage virtual machine (SVM) for an Amazon FSx for ONTAP file system.</p>

    Args:
        active_directory_configuration: <p>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.</p>
        name: <p>The name of the SVM.</p>
        svm_admin_password: <p>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 <code>fsxadmin</code> user to manage the SVM.</p>
        root_volume_security_style: <p>The security style of the root volume of the SVM. Specify one of the following values:</p> <ul> <li> <p> <code>UNIX</code> 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.</p> </li> <li> <p> <code>NTFS</code> 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.</p> </li> <li> <p> <code>MIXED</code> This is an advanced setting. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/volume-security-style.html">Volume security style</a> in the Amazon FSx for NetApp ONTAP User Guide.</p> </li> </ul> <p></p>

    Raises:
        capo_fsx.errors.active_directory_error.ActiveDirectoryError: <p>An Active Directory error.</p>
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
        capo_fsx.errors.incompatible_parameter_error.IncompatibleParameterError: <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.service_limit_exceeded.ServiceLimitExceeded: <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.</p>
        capo_fsx.errors.unsupported_operation.UnsupportedOperation: <p>The requested operation is not supported for this resource or API.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fsx.types.create_storage_virtual_machine_request.CreateStorageVirtualMachineRequest]",
    ) -> AsyncOperationResponse[
        "capo_fsx.types.create_storage_virtual_machine_response.CreateStorageVirtualMachineResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.create_storage_virtual_machine

        (
            output,
            http_response,
        ) = await capo_fsx._operations.aws_simba_api_service_v20180301.create_storage_virtual_machine.async_create_storage_virtual_machine(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_fsx.types.create_storage_virtual_machine_request.CreateStorageVirtualMachineRequest",
    ) -> dict[str, Any]:
        import capo_fsx.types.create_storage_virtual_machine_request

        return (
            capo_fsx.types.create_storage_virtual_machine_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateStorageVirtualMachine", redact_input=_redact_input),
    )
    input_: capo_fsx.types.create_storage_virtual_machine_request.CreateStorageVirtualMachineRequest = {}
    if active_directory_configuration is not None:
        input_["active_directory_configuration"] = active_directory_configuration
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if file_system_id is not None:
        input_["file_system_id"] = file_system_id
    if name is not None:
        input_["name"] = name
    if svm_admin_password is not None:
        input_["svm_admin_password"] = svm_admin_password
    if tags is not None:
        input_["tags"] = tags
    if root_volume_security_style is not None:
        input_["root_volume_security_style"] = root_volume_security_style

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output