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

com.pulumi.awsnative.sagemaker.kotlin.Space.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.sagemaker.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceOwnershipSettings
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceSettings
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceSharingSettings
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.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceOwnershipSettings.Companion.toKotlin as spaceOwnershipSettingsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceSettings.Companion.toKotlin as spaceSettingsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.SpaceSharingSettings.Companion.toKotlin as spaceSharingSettingsToKotlin

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

    public var args: SpaceArgs = SpaceArgs()

    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 SpaceArgsBuilder.() -> Unit) {
        val builder = SpaceArgsBuilder()
        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(): Space {
        val builtJavaResource = com.pulumi.awsnative.sagemaker.Space(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Space(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::SageMaker::Space
 */
public class Space internal constructor(
    override val javaResource: com.pulumi.awsnative.sagemaker.Space,
) : KotlinCustomResource(javaResource, SpaceMapper) {
    /**
     * The ID of the associated Domain.
     */
    public val domainId: Output
        get() = javaResource.domainId().applyValue({ args0 -> args0 })

    /**
     * The collection of ownership settings for a space.
     */
    public val ownershipSettings: Output?
        get() = javaResource.ownershipSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> spaceOwnershipSettingsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The space Amazon Resource Name (ARN).
     */
    public val spaceArn: Output
        get() = javaResource.spaceArn().applyValue({ args0 -> args0 })

    /**
     * The name of the space that appears in the Studio UI.
     */
    public val spaceDisplayName: Output?
        get() = javaResource.spaceDisplayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * A collection of settings.
     */
    public val spaceSettings: Output?
        get() = javaResource.spaceSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> spaceSettingsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A collection of space sharing settings.
     */
    public val spaceSharingSettings: Output?
        get() = javaResource.spaceSharingSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> spaceSharingSettingsToKotlin(args0) })
            }).orElse(null)
        })

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

    /**
     * Returns the URL of the space. If the space is created with AWS IAM Identity Center (Successor to AWS Single Sign-On) authentication, users can navigate to the URL after appending the respective redirect parameter for the application type to be federated through AWS IAM Identity Center.
     * The following application types are supported:
     * - Studio Classic: `&redirect=JupyterServer`
     * - JupyterLab: `&redirect=JupyterLab`
     * - Code Editor, based on Code-OSS, Visual Studio Code - Open Source: `&redirect=CodeEditor`
     */
    public val url: Output
        get() = javaResource.url().applyValue({ args0 -> args0 })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy