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

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

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

package com.pulumi.awsnative.sagemaker.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.sagemaker.kotlin.enums.ModelPackageGroupStatus
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.Any
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.enums.ModelPackageGroupStatus.Companion.toKotlin as modelPackageGroupStatusToKotlin

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

    public var args: ModelPackageGroupArgs = ModelPackageGroupArgs()

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

/**
 * Resource Type definition for AWS::SageMaker::ModelPackageGroup
 */
public class ModelPackageGroup internal constructor(
    override val javaResource: com.pulumi.awsnative.sagemaker.ModelPackageGroup,
) : KotlinCustomResource(javaResource, ModelPackageGroupMapper) {
    /**
     * The time at which the model package group was created.
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

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

    /**
     * The description for the model group.
     */
    public val modelPackageGroupDescription: Output?
        get() = javaResource.modelPackageGroupDescription().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the model group.
     */
    public val modelPackageGroupName: Output
        get() = javaResource.modelPackageGroupName().applyValue({ args0 -> args0 })

    /**
     * A resouce policy to control access to a model group. For information about resoure policies, see [Identity-based policies and resource-based policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html) in the *AWS Identity and Access Management User Guide.* .
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SageMaker::ModelPackageGroup` for more information about the expected schema for this property.
     */
    public val modelPackageGroupPolicy: Output?
        get() = javaResource.modelPackageGroupPolicy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The status of a modelpackage group job.
     */
    public val modelPackageGroupStatus: Output
        get() = javaResource.modelPackageGroupStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                modelPackageGroupStatusToKotlin(args0)
            })
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy