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

com.pulumi.awsnative.sagemaker.kotlin.Domain.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.sagemaker.kotlin

import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAppNetworkAccessType
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAppSecurityGroupManagement
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAuthMode
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainDefaultSpaceSettings
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainSettings
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainUserSettings
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAppNetworkAccessType.Companion.toKotlin as domainAppNetworkAccessTypeToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAppSecurityGroupManagement.Companion.toKotlin as domainAppSecurityGroupManagementToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.DomainAuthMode.Companion.toKotlin as domainAuthModeToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainDefaultSpaceSettings.Companion.toKotlin as domainDefaultSpaceSettingsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainSettings.Companion.toKotlin as domainSettingsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.DomainUserSettings.Companion.toKotlin as domainUserSettingsToKotlin

/**
 * Builder for [Domain].
 */
@PulumiTagMarker
public class DomainResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: DomainArgs = DomainArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend DomainArgsBuilder.() -> Unit) {
        val builder = DomainArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Domain {
        val builtJavaResource = com.pulumi.awsnative.sagemaker.Domain(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Domain(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::SageMaker::Domain
 */
public class Domain internal constructor(
    override val javaResource: com.pulumi.awsnative.sagemaker.Domain,
) : KotlinCustomResource(javaResource, DomainMapper) {
    /**
     * Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly.
     */
    public val appNetworkAccessType: Output?
        get() = javaResource.appNetworkAccessType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> domainAppNetworkAccessTypeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided.
     */
    public val appSecurityGroupManagement: Output?
        get() = javaResource.appSecurityGroupManagement().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> domainAppSecurityGroupManagementToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The mode of authentication that members use to access the domain.
     */
    public val authMode: Output
        get() = javaResource.authMode().applyValue({ args0 ->
            args0.let({ args0 ->
                domainAuthModeToKotlin(args0)
            })
        })

    /**
     * The default space settings.
     */
    public val defaultSpaceSettings: Output?
        get() = javaResource.defaultSpaceSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> domainDefaultSpaceSettingsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The default user settings.
     */
    public val defaultUserSettings: Output
        get() = javaResource.defaultUserSettings().applyValue({ args0 ->
            args0.let({ args0 ->
                domainUserSettingsToKotlin(args0)
            })
        })

    /**
     * The Amazon Resource Name (ARN) of the created domain.
     */
    public val domainArn: Output
        get() = javaResource.domainArn().applyValue({ args0 -> args0 })

    /**
     * The domain name.
     */
    public val domainId: Output
        get() = javaResource.domainId().applyValue({ args0 -> args0 })

    /**
     * A name for the domain.
     */
    public val domainName: Output
        get() = javaResource.domainName().applyValue({ args0 -> args0 })

    /**
     * A collection of settings that apply to the `SageMaker Domain` . These settings are specified through the `CreateDomain` API call.
     */
    public val domainSettings: Output?
        get() = javaResource.domainSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> domainSettingsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The ID of the Amazon Elastic File System (EFS) managed by this Domain.
     */
    public val homeEfsFileSystemId: Output
        get() = javaResource.homeEfsFileSystemId().applyValue({ args0 -> args0 })

    /**
     * SageMaker uses AWS KMS to encrypt the EFS volume attached to the domain with an AWS managed customer master key (CMK) by default.
     */
    public val kmsKeyId: Output?
        get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The ID of the security group that authorizes traffic between the RSessionGateway apps and the RStudioServerPro app.
     */
    public val securityGroupIdForDomainBoundary: Output
        get() = javaResource.securityGroupIdForDomainBoundary().applyValue({ args0 -> args0 })

    /**
     * The ARN of the application managed by SageMaker in IAM Identity Center. This value is only returned for domains created after October 1, 2023.
     */
    public val singleSignOnApplicationArn: Output
        get() = javaResource.singleSignOnApplicationArn().applyValue({ args0 -> args0 })

    /**
     * The SSO managed application instance ID.
     */
    public val singleSignOnManagedApplicationInstanceId: Output
        get() = javaResource.singleSignOnManagedApplicationInstanceId().applyValue({ args0 -> args0 })

    /**
     * The VPC subnets that Studio uses for communication.
     */
    public val subnetIds: Output>
        get() = javaResource.subnetIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * A list of tags to apply to the user profile.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> createOnlyTagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The URL to the created domain.
     */
    public val url: Output
        get() = javaResource.url().applyValue({ args0 -> args0 })

    /**
     * The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.
     */
    public val vpcId: Output
        get() = javaResource.vpcId().applyValue({ args0 -> args0 })
}

public object DomainMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.sagemaker.Domain::class == javaResource::class

    override fun map(javaResource: Resource): Domain = Domain(
        javaResource as
            com.pulumi.awsnative.sagemaker.Domain,
    )
}

/**
 * @see [Domain].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Domain].
 */
public suspend fun domain(name: String, block: suspend DomainResourceBuilder.() -> Unit): Domain {
    val builder = DomainResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Domain].
 * @param name The _unique_ name of the resulting resource.
 */
public fun domain(name: String): Domain {
    val builder = DomainResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy