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

com.pulumi.awsnative.sagemaker.kotlin.MonitoringSchedule.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.24.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.enums.MonitoringScheduleStatus
import com.pulumi.awsnative.sagemaker.kotlin.outputs.MonitoringScheduleConfig
import com.pulumi.awsnative.sagemaker.kotlin.outputs.MonitoringScheduleMonitoringExecutionSummary
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.enums.MonitoringScheduleStatus.Companion.toKotlin as monitoringScheduleStatusToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.MonitoringScheduleConfig.Companion.toKotlin as monitoringScheduleConfigToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.MonitoringScheduleMonitoringExecutionSummary.Companion.toKotlin as monitoringScheduleMonitoringExecutionSummaryToKotlin

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

    public var args: MonitoringScheduleArgs = MonitoringScheduleArgs()

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

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

    /**
     * The name of the endpoint using the monitoring schedule.
     */
    public val endpointName: Output?
        get() = javaResource.endpointName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Contains the reason a monitoring job failed, if it failed.
     */
    public val failureReason: Output?
        get() = javaResource.failureReason().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A timestamp that indicates the last time the monitoring job was modified.
     */
    public val lastModifiedTime: Output
        get() = javaResource.lastModifiedTime().applyValue({ args0 -> args0 })

    /**
     * Describes metadata on the last execution to run, if there was one.
     */
    public val lastMonitoringExecutionSummary: Output?
        get() = javaResource.lastMonitoringExecutionSummary().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    monitoringScheduleMonitoringExecutionSummaryToKotlin(args0)
                })
            }).orElse(null)
        })

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

    /**
     * The configuration object that specifies the monitoring schedule and defines the monitoring job.
     */
    public val monitoringScheduleConfig: Output
        get() = javaResource.monitoringScheduleConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                monitoringScheduleConfigToKotlin(args0)
            })
        })

    /**
     * The name of the monitoring schedule.
     */
    public val monitoringScheduleName: Output
        get() = javaResource.monitoringScheduleName().applyValue({ args0 -> args0 })

    /**
     * The status of a schedule job.
     */
    public val monitoringScheduleStatus: Output?
        get() = javaResource.monitoringScheduleStatus().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> monitoringScheduleStatusToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * 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 MonitoringScheduleMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.sagemaker.MonitoringSchedule::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy