
com.pulumi.awsnative.sagemaker.kotlin.InferenceExperiment.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.InferenceExperimentDesiredState
import com.pulumi.awsnative.sagemaker.kotlin.enums.InferenceExperimentStatus
import com.pulumi.awsnative.sagemaker.kotlin.enums.InferenceExperimentType
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentDataStorageConfig
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentEndpointMetadata
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentModelVariantConfig
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentSchedule
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentShadowModeConfig
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.InferenceExperimentDesiredState.Companion.toKotlin as inferenceExperimentDesiredStateToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.InferenceExperimentStatus.Companion.toKotlin as inferenceExperimentStatusToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.InferenceExperimentType.Companion.toKotlin as inferenceExperimentTypeToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentDataStorageConfig.Companion.toKotlin as inferenceExperimentDataStorageConfigToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentEndpointMetadata.Companion.toKotlin as inferenceExperimentEndpointMetadataToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentModelVariantConfig.Companion.toKotlin as inferenceExperimentModelVariantConfigToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentSchedule.Companion.toKotlin as inferenceExperimentScheduleToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceExperimentShadowModeConfig.Companion.toKotlin as inferenceExperimentShadowModeConfigToKotlin
/**
* Builder for [InferenceExperiment].
*/
@PulumiTagMarker
public class InferenceExperimentResourceBuilder internal constructor() {
public var name: String? = null
public var args: InferenceExperimentArgs = InferenceExperimentArgs()
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 InferenceExperimentArgsBuilder.() -> Unit) {
val builder = InferenceExperimentArgsBuilder()
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(): InferenceExperiment {
val builtJavaResource =
com.pulumi.awsnative.sagemaker.InferenceExperiment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return InferenceExperiment(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SageMaker::InferenceExperiment
*/
public class InferenceExperiment internal constructor(
override val javaResource: com.pulumi.awsnative.sagemaker.InferenceExperiment,
) : KotlinCustomResource(javaResource, InferenceExperimentMapper) {
/**
* The Amazon Resource Name (ARN) of the inference experiment.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The timestamp at which you created the inference experiment.
*/
public val creationTime: Output
get() = javaResource.creationTime().applyValue({ args0 -> args0 })
/**
* The Amazon S3 location and configuration for storing inference request and response data.
*/
public val dataStorageConfig: Output?
get() = javaResource.dataStorageConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> inferenceExperimentDataStorageConfigToKotlin(args0) })
}).orElse(null)
})
/**
* The description of the inference experiment.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The desired state of the experiment after starting or stopping operation.
*/
public val desiredState: Output?
get() = javaResource.desiredState().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
inferenceExperimentDesiredStateToKotlin(args0)
})
}).orElse(null)
})
public val endpointMetadata: Output
get() = javaResource.endpointMetadata().applyValue({ args0 ->
args0.let({ args0 ->
inferenceExperimentEndpointMetadataToKotlin(args0)
})
})
/**
* The name of the endpoint.
*/
public val endpointName: Output
get() = javaResource.endpointName().applyValue({ args0 -> args0 })
/**
* The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
*/
public val kmsKey: Output?
get() = javaResource.kmsKey().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The timestamp at which you last modified the inference experiment.
*/
public val lastModifiedTime: Output
get() = javaResource.lastModifiedTime().applyValue({ args0 -> args0 })
/**
* An array of ModelVariantConfig objects. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant.
*/
public val modelVariants: Output>
get() = javaResource.modelVariants().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> inferenceExperimentModelVariantConfigToKotlin(args0) })
})
})
/**
* The name for the inference experiment.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* The duration for which the inference experiment ran or will run.
* The maximum duration that you can set for an inference experiment is 30 days.
*/
public val schedule: Output?
get() = javaResource.schedule().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
inferenceExperimentScheduleToKotlin(args0)
})
}).orElse(null)
})
/**
* The configuration of `ShadowMode` inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates.
*/
public val shadowModeConfig: Output?
get() = javaResource.shadowModeConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> inferenceExperimentShadowModeConfigToKotlin(args0) })
}).orElse(null)
})
/**
* The status of the inference experiment.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
inferenceExperimentStatusToKotlin(args0)
})
})
/**
* The error message or client-specified reason from the StopInferenceExperiment API, that explains the status of the inference experiment.
*/
public val statusReason: Output?
get() = javaResource.statusReason().applyValue({ args0 ->
args0.map({ args0 ->
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)
})
/**
* The type of the inference experiment that you want to run.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
inferenceExperimentTypeToKotlin(args0)
})
})
}
public object InferenceExperimentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sagemaker.InferenceExperiment::class == javaResource::class
override fun map(javaResource: Resource): InferenceExperiment = InferenceExperiment(
javaResource
as com.pulumi.awsnative.sagemaker.InferenceExperiment,
)
}
/**
* @see [InferenceExperiment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [InferenceExperiment].
*/
public suspend fun inferenceExperiment(
name: String,
block: suspend InferenceExperimentResourceBuilder.() -> Unit,
): InferenceExperiment {
val builder = InferenceExperimentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [InferenceExperiment].
* @param name The _unique_ name of the resulting resource.
*/
public fun inferenceExperiment(name: String): InferenceExperiment {
val builder = InferenceExperimentResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy