All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.fsx.kotlin.OntapStorageVirtualMachineArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.fsx.kotlin

import com.pulumi.aws.fsx.OntapStorageVirtualMachineArgs.builder
import com.pulumi.aws.fsx.kotlin.inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationArgs
import com.pulumi.aws.fsx.kotlin.inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a FSx Storage Virtual Machine.
 * See the [FSx ONTAP User Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) for more information.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.fsx.OntapStorageVirtualMachine("test", {
 *     fileSystemId: testAwsFsxOntapFileSystem.id,
 *     name: "test",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.fsx.OntapStorageVirtualMachine("test",
 *     file_system_id=test_aws_fsx_ontap_file_system["id"],
 *     name="test")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Fsx.OntapStorageVirtualMachine("test", new()
 *     {
 *         FileSystemId = testAwsFsxOntapFileSystem.Id,
 *         Name = "test",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/fsx"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := fsx.NewOntapStorageVirtualMachine(ctx, "test", &fsx.OntapStorageVirtualMachineArgs{
 * 			FileSystemId: pulumi.Any(testAwsFsxOntapFileSystem.Id),
 * 			Name:         pulumi.String("test"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.fsx.OntapStorageVirtualMachine;
 * import com.pulumi.aws.fsx.OntapStorageVirtualMachineArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var test = new OntapStorageVirtualMachine("test", OntapStorageVirtualMachineArgs.builder()
 *             .fileSystemId(testAwsFsxOntapFileSystem.id())
 *             .name("test")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:fsx:OntapStorageVirtualMachine
 *     properties:
 *       fileSystemId: ${testAwsFsxOntapFileSystem.id}
 *       name: test
 * ```
 * 
 * ### Using a Self-Managed Microsoft Active Directory
 * Additional information for using AWS Directory Service with ONTAP File Systems can be found in the [FSx ONTAP Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/self-managed-AD.html).
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.fsx.OntapStorageVirtualMachine("test", {
 *     fileSystemId: testAwsFsxOntapFileSystem.id,
 *     name: "mysvm",
 *     activeDirectoryConfiguration: {
 *         netbiosName: "mysvm",
 *         selfManagedActiveDirectoryConfiguration: {
 *             dnsIps: [
 *                 "10.0.0.111",
 *                 "10.0.0.222",
 *             ],
 *             domainName: "corp.example.com",
 *             password: "avoid-plaintext-passwords",
 *             username: "Admin",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.fsx.OntapStorageVirtualMachine("test",
 *     file_system_id=test_aws_fsx_ontap_file_system["id"],
 *     name="mysvm",
 *     active_directory_configuration={
 *         "netbios_name": "mysvm",
 *         "self_managed_active_directory_configuration": {
 *             "dns_ips": [
 *                 "10.0.0.111",
 *                 "10.0.0.222",
 *             ],
 *             "domain_name": "corp.example.com",
 *             "password": "avoid-plaintext-passwords",
 *             "username": "Admin",
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Fsx.OntapStorageVirtualMachine("test", new()
 *     {
 *         FileSystemId = testAwsFsxOntapFileSystem.Id,
 *         Name = "mysvm",
 *         ActiveDirectoryConfiguration = new Aws.Fsx.Inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationArgs
 *         {
 *             NetbiosName = "mysvm",
 *             SelfManagedActiveDirectoryConfiguration = new Aws.Fsx.Inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationSelfManagedActiveDirectoryConfigurationArgs
 *             {
 *                 DnsIps = new[]
 *                 {
 *                     "10.0.0.111",
 *                     "10.0.0.222",
 *                 },
 *                 DomainName = "corp.example.com",
 *                 Password = "avoid-plaintext-passwords",
 *                 Username = "Admin",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/fsx"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := fsx.NewOntapStorageVirtualMachine(ctx, "test", &fsx.OntapStorageVirtualMachineArgs{
 * 			FileSystemId: pulumi.Any(testAwsFsxOntapFileSystem.Id),
 * 			Name:         pulumi.String("mysvm"),
 * 			ActiveDirectoryConfiguration: &fsx.OntapStorageVirtualMachineActiveDirectoryConfigurationArgs{
 * 				NetbiosName: pulumi.String("mysvm"),
 * 				SelfManagedActiveDirectoryConfiguration: &fsx.OntapStorageVirtualMachineActiveDirectoryConfigurationSelfManagedActiveDirectoryConfigurationArgs{
 * 					DnsIps: pulumi.StringArray{
 * 						pulumi.String("10.0.0.111"),
 * 						pulumi.String("10.0.0.222"),
 * 					},
 * 					DomainName: pulumi.String("corp.example.com"),
 * 					Password:   pulumi.String("avoid-plaintext-passwords"),
 * 					Username:   pulumi.String("Admin"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.fsx.OntapStorageVirtualMachine;
 * import com.pulumi.aws.fsx.OntapStorageVirtualMachineArgs;
 * import com.pulumi.aws.fsx.inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationArgs;
 * import com.pulumi.aws.fsx.inputs.OntapStorageVirtualMachineActiveDirectoryConfigurationSelfManagedActiveDirectoryConfigurationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var test = new OntapStorageVirtualMachine("test", OntapStorageVirtualMachineArgs.builder()
 *             .fileSystemId(testAwsFsxOntapFileSystem.id())
 *             .name("mysvm")
 *             .activeDirectoryConfiguration(OntapStorageVirtualMachineActiveDirectoryConfigurationArgs.builder()
 *                 .netbiosName("mysvm")
 *                 .selfManagedActiveDirectoryConfiguration(OntapStorageVirtualMachineActiveDirectoryConfigurationSelfManagedActiveDirectoryConfigurationArgs.builder()
 *                     .dnsIps(
 *                         "10.0.0.111",
 *                         "10.0.0.222")
 *                     .domainName("corp.example.com")
 *                     .password("avoid-plaintext-passwords")
 *                     .username("Admin")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:fsx:OntapStorageVirtualMachine
 *     properties:
 *       fileSystemId: ${testAwsFsxOntapFileSystem.id}
 *       name: mysvm
 *       activeDirectoryConfiguration:
 *         netbiosName: mysvm
 *         selfManagedActiveDirectoryConfiguration:
 *           dnsIps:
 *             - 10.0.0.111
 *             - 10.0.0.222
 *           domainName: corp.example.com
 *           password: avoid-plaintext-passwords
 *           username: Admin
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import FSx Storage Virtual Machine using the `id`. For example:
 * ```sh
 * $ pulumi import aws:fsx/ontapStorageVirtualMachine:OntapStorageVirtualMachine example svm-12345678abcdef123
 * ```
 * Certain resource arguments, like `svm_admin_password` and the `self_managed_active_directory` configuation block `password`, do not have a FSx API method for reading the information after creation. If these arguments are set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example:
 * @property activeDirectoryConfiguration Configuration block that Amazon FSx uses to join the FSx ONTAP Storage Virtual Machine(SVM) to your Microsoft Active Directory (AD) directory. Detailed below.
 * @property fileSystemId The ID of the Amazon FSx ONTAP File System that this SVM will be created on.
 * @property name The name of the SVM. You can use a maximum of 47 alphanumeric characters, plus the underscore (_) special character.
 * @property rootVolumeSecurityStyle Specifies the root volume security style, Valid values are `UNIX`, `NTFS`, and `MIXED`. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume. Default value is `UNIX`.
 * @property svmAdminPassword Specifies the password to use when logging on to the SVM using a secure shell (SSH) connection to the SVM's management endpoint. Doing so enables you to manage 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.
 * @property tags A map of tags to assign to the storage virtual machine. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class OntapStorageVirtualMachineArgs(
    public val activeDirectoryConfiguration: Output? = null,
    public val fileSystemId: Output? = null,
    public val name: Output? = null,
    public val rootVolumeSecurityStyle: Output? = null,
    public val svmAdminPassword: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.fsx.OntapStorageVirtualMachineArgs =
        com.pulumi.aws.fsx.OntapStorageVirtualMachineArgs.builder()
            .activeDirectoryConfiguration(
                activeDirectoryConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .fileSystemId(fileSystemId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .rootVolumeSecurityStyle(rootVolumeSecurityStyle?.applyValue({ args0 -> args0 }))
            .svmAdminPassword(svmAdminPassword?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [OntapStorageVirtualMachineArgs].
 */
@PulumiTagMarker
public class OntapStorageVirtualMachineArgsBuilder internal constructor() {
    private var activeDirectoryConfiguration:
        Output? = null

    private var fileSystemId: Output? = null

    private var name: Output? = null

    private var rootVolumeSecurityStyle: Output? = null

    private var svmAdminPassword: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Configuration block that Amazon FSx uses to join the FSx ONTAP Storage Virtual Machine(SVM) to your Microsoft Active Directory (AD) directory. Detailed below.
     */
    @JvmName("tqffgadhuqmswntx")
    public suspend fun activeDirectoryConfiguration(`value`: Output) {
        this.activeDirectoryConfiguration = value
    }

    /**
     * @param value The ID of the Amazon FSx ONTAP File System that this SVM will be created on.
     */
    @JvmName("usujohexgwyxtmnw")
    public suspend fun fileSystemId(`value`: Output) {
        this.fileSystemId = value
    }

    /**
     * @param value The name of the SVM. You can use a maximum of 47 alphanumeric characters, plus the underscore (_) special character.
     */
    @JvmName("lggakilwmcxcvxwx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the root volume security style, Valid values are `UNIX`, `NTFS`, and `MIXED`. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume. Default value is `UNIX`.
     */
    @JvmName("kuosyredgifcjkyp")
    public suspend fun rootVolumeSecurityStyle(`value`: Output) {
        this.rootVolumeSecurityStyle = value
    }

    /**
     * @param value Specifies the password to use when logging on to the SVM using a secure shell (SSH) connection to the SVM's management endpoint. Doing so enables you to manage 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.
     */
    @JvmName("asdnxtdlrsenasxf")
    public suspend fun svmAdminPassword(`value`: Output) {
        this.svmAdminPassword = value
    }

    /**
     * @param value A map of tags to assign to the storage virtual machine. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ofjympxbuwclwhrd")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Configuration block that Amazon FSx uses to join the FSx ONTAP Storage Virtual Machine(SVM) to your Microsoft Active Directory (AD) directory. Detailed below.
     */
    @JvmName("rdirvlbvucvhbgfv")
    public suspend fun activeDirectoryConfiguration(`value`: OntapStorageVirtualMachineActiveDirectoryConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activeDirectoryConfiguration = mapped
    }

    /**
     * @param argument Configuration block that Amazon FSx uses to join the FSx ONTAP Storage Virtual Machine(SVM) to your Microsoft Active Directory (AD) directory. Detailed below.
     */
    @JvmName("qeiulsppakhvwcxj")
    public suspend fun activeDirectoryConfiguration(argument: suspend OntapStorageVirtualMachineActiveDirectoryConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped =
            OntapStorageVirtualMachineActiveDirectoryConfigurationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.activeDirectoryConfiguration = mapped
    }

    /**
     * @param value The ID of the Amazon FSx ONTAP File System that this SVM will be created on.
     */
    @JvmName("vutuqmprybxjphdj")
    public suspend fun fileSystemId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fileSystemId = mapped
    }

    /**
     * @param value The name of the SVM. You can use a maximum of 47 alphanumeric characters, plus the underscore (_) special character.
     */
    @JvmName("gmoknlvfupmammhm")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the root volume security style, Valid values are `UNIX`, `NTFS`, and `MIXED`. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume. Default value is `UNIX`.
     */
    @JvmName("ebvjmnnfduhfcmot")
    public suspend fun rootVolumeSecurityStyle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rootVolumeSecurityStyle = mapped
    }

    /**
     * @param value Specifies the password to use when logging on to the SVM using a secure shell (SSH) connection to the SVM's management endpoint. Doing so enables you to manage 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.
     */
    @JvmName("ofxeygeuskqnbynq")
    public suspend fun svmAdminPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.svmAdminPassword = mapped
    }

    /**
     * @param value A map of tags to assign to the storage virtual machine. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("pgwoxjrygvswpvqv")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the storage virtual machine. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("bevwtuuvsphqybar")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): OntapStorageVirtualMachineArgs = OntapStorageVirtualMachineArgs(
        activeDirectoryConfiguration = activeDirectoryConfiguration,
        fileSystemId = fileSystemId,
        name = name,
        rootVolumeSecurityStyle = rootVolumeSecurityStyle,
        svmAdminPassword = svmAdminPassword,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy