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

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

package com.pulumi.aws.sagemaker.kotlin

import com.pulumi.aws.sagemaker.SpaceArgs.builder
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceOwnershipSettingsArgs
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceOwnershipSettingsArgsBuilder
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceSpaceSettingsArgs
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceSpaceSettingsArgsBuilder
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceSpaceSharingSettingsArgs
import com.pulumi.aws.sagemaker.kotlin.inputs.SpaceSpaceSharingSettingsArgsBuilder
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

/**
 * Provides a SageMaker Space resource.
 * ## Example Usage
 * ### Basic usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.sagemaker.Space("example", {
 *     domainId: test.id,
 *     spaceName: "example",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.sagemaker.Space("example",
 *     domain_id=test["id"],
 *     space_name="example")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Sagemaker.Space("example", new()
 *     {
 *         DomainId = test.Id,
 *         SpaceName = "example",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := sagemaker.NewSpace(ctx, "example", &sagemaker.SpaceArgs{
 * 			DomainId:  pulumi.Any(test.Id),
 * 			SpaceName: pulumi.String("example"),
 * 		})
 * 		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.sagemaker.Space;
 * import com.pulumi.aws.sagemaker.SpaceArgs;
 * 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 example = new Space("example", SpaceArgs.builder()
 *             .domainId(test.id())
 *             .spaceName("example")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:sagemaker:Space
 *     properties:
 *       domainId: ${test.id}
 *       spaceName: example
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import SageMaker Spaces using the `id`. For example:
 * ```sh
 * $ pulumi import aws:sagemaker/space:Space test_space arn:aws:sagemaker:us-west-2:123456789012:space/domain-id/space-name
 * ```
 * @property domainId The ID of the associated Domain.
 * @property ownershipSettings A collection of ownership settings. Required if `space_sharing_settings` is set. See `ownership_settings` Block below.
 * @property spaceDisplayName The name of the space that appears in the SageMaker Studio UI.
 * @property spaceName The name of the space.
 * @property spaceSettings A collection of space settings. See `space_settings` Block below.
 * @property spaceSharingSettings A collection of space sharing settings. Required if `ownership_settings` is set. See `space_sharing_settings` Block below.
 * @property tags A map of tags to assign to the resource. 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 SpaceArgs(
    public val domainId: Output? = null,
    public val ownershipSettings: Output? = null,
    public val spaceDisplayName: Output? = null,
    public val spaceName: Output? = null,
    public val spaceSettings: Output? = null,
    public val spaceSharingSettings: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.sagemaker.SpaceArgs =
        com.pulumi.aws.sagemaker.SpaceArgs.builder()
            .domainId(domainId?.applyValue({ args0 -> args0 }))
            .ownershipSettings(ownershipSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .spaceDisplayName(spaceDisplayName?.applyValue({ args0 -> args0 }))
            .spaceName(spaceName?.applyValue({ args0 -> args0 }))
            .spaceSettings(spaceSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .spaceSharingSettings(
                spaceSharingSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [SpaceArgs].
 */
@PulumiTagMarker
public class SpaceArgsBuilder internal constructor() {
    private var domainId: Output? = null

    private var ownershipSettings: Output? = null

    private var spaceDisplayName: Output? = null

    private var spaceName: Output? = null

    private var spaceSettings: Output? = null

    private var spaceSharingSettings: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The ID of the associated Domain.
     */
    @JvmName("knfaxcdkaqcfaepv")
    public suspend fun domainId(`value`: Output) {
        this.domainId = value
    }

    /**
     * @param value A collection of ownership settings. Required if `space_sharing_settings` is set. See `ownership_settings` Block below.
     */
    @JvmName("erbybpnlekkjjoae")
    public suspend fun ownershipSettings(`value`: Output) {
        this.ownershipSettings = value
    }

    /**
     * @param value The name of the space that appears in the SageMaker Studio UI.
     */
    @JvmName("vtbeksdwgndousjj")
    public suspend fun spaceDisplayName(`value`: Output) {
        this.spaceDisplayName = value
    }

    /**
     * @param value The name of the space.
     */
    @JvmName("bagvjgiqpawtisar")
    public suspend fun spaceName(`value`: Output) {
        this.spaceName = value
    }

    /**
     * @param value A collection of space settings. See `space_settings` Block below.
     */
    @JvmName("nvuucjmjmsrkmeyr")
    public suspend fun spaceSettings(`value`: Output) {
        this.spaceSettings = value
    }

    /**
     * @param value A collection of space sharing settings. Required if `ownership_settings` is set. See `space_sharing_settings` Block below.
     */
    @JvmName("devgmkkheqcwgsww")
    public suspend fun spaceSharingSettings(`value`: Output) {
        this.spaceSharingSettings = value
    }

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

    /**
     * @param value The ID of the associated Domain.
     */
    @JvmName("bvdwjrbcamnabofu")
    public suspend fun domainId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainId = mapped
    }

    /**
     * @param value A collection of ownership settings. Required if `space_sharing_settings` is set. See `ownership_settings` Block below.
     */
    @JvmName("fihpvipecvoehrkx")
    public suspend fun ownershipSettings(`value`: SpaceOwnershipSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ownershipSettings = mapped
    }

    /**
     * @param argument A collection of ownership settings. Required if `space_sharing_settings` is set. See `ownership_settings` Block below.
     */
    @JvmName("wrwectfaempfttuk")
    public suspend fun ownershipSettings(argument: suspend SpaceOwnershipSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = SpaceOwnershipSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ownershipSettings = mapped
    }

    /**
     * @param value The name of the space that appears in the SageMaker Studio UI.
     */
    @JvmName("vfikxbxllwdtenlv")
    public suspend fun spaceDisplayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spaceDisplayName = mapped
    }

    /**
     * @param value The name of the space.
     */
    @JvmName("gcwnxikebognrcby")
    public suspend fun spaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spaceName = mapped
    }

    /**
     * @param value A collection of space settings. See `space_settings` Block below.
     */
    @JvmName("srfoyquxaptnfjla")
    public suspend fun spaceSettings(`value`: SpaceSpaceSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spaceSettings = mapped
    }

    /**
     * @param argument A collection of space settings. See `space_settings` Block below.
     */
    @JvmName("xaykcbsgcbebnath")
    public suspend fun spaceSettings(argument: suspend SpaceSpaceSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = SpaceSpaceSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.spaceSettings = mapped
    }

    /**
     * @param value A collection of space sharing settings. Required if `ownership_settings` is set. See `space_sharing_settings` Block below.
     */
    @JvmName("fugcvesrmnnxhkto")
    public suspend fun spaceSharingSettings(`value`: SpaceSpaceSharingSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spaceSharingSettings = mapped
    }

    /**
     * @param argument A collection of space sharing settings. Required if `ownership_settings` is set. See `space_sharing_settings` Block below.
     */
    @JvmName("huxbqxiywywabwik")
    public suspend fun spaceSharingSettings(argument: suspend SpaceSpaceSharingSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = SpaceSpaceSharingSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.spaceSharingSettings = mapped
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("yathleupnjktpgvm")
    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 resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("oktxlopfdqsxhsdj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): SpaceArgs = SpaceArgs(
        domainId = domainId,
        ownershipSettings = ownershipSettings,
        spaceDisplayName = spaceDisplayName,
        spaceName = spaceName,
        spaceSettings = spaceSettings,
        spaceSharingSettings = spaceSharingSettings,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy