![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.sagemaker.kotlin.InferenceComponent.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.InferenceComponentStatus
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceComponentRuntimeConfig
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceComponentSpecification
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.InferenceComponentStatus.Companion.toKotlin as inferenceComponentStatusToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceComponentRuntimeConfig.Companion.toKotlin as inferenceComponentRuntimeConfigToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.InferenceComponentSpecification.Companion.toKotlin as inferenceComponentSpecificationToKotlin
/**
* Builder for [InferenceComponent].
*/
@PulumiTagMarker
public class InferenceComponentResourceBuilder internal constructor() {
public var name: String? = null
public var args: InferenceComponentArgs = InferenceComponentArgs()
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 InferenceComponentArgsBuilder.() -> Unit) {
val builder = InferenceComponentArgsBuilder()
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(): InferenceComponent {
val builtJavaResource =
com.pulumi.awsnative.sagemaker.InferenceComponent(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return InferenceComponent(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SageMaker::InferenceComponent
*/
public class InferenceComponent internal constructor(
override val javaResource: com.pulumi.awsnative.sagemaker.InferenceComponent,
) : KotlinCustomResource(javaResource, InferenceComponentMapper) {
/**
* The time when the inference component was created.
*/
public val creationTime: Output
get() = javaResource.creationTime().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.
*/
public val endpointArn: Output?
get() = javaResource.endpointArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the endpoint that hosts the inference component.
*/
public val endpointName: Output
get() = javaResource.endpointName().applyValue({ args0 -> args0 })
public val failureReason: Output
get() = javaResource.failureReason().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the inference component.
*/
public val inferenceComponentArn: Output
get() = javaResource.inferenceComponentArn().applyValue({ args0 -> args0 })
/**
* The name of the inference component.
*/
public val inferenceComponentName: Output?
get() = javaResource.inferenceComponentName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The status of the inference component.
*/
public val inferenceComponentStatus: Output
get() = javaResource.inferenceComponentStatus().applyValue({ args0 ->
args0.let({ args0 ->
inferenceComponentStatusToKotlin(args0)
})
})
/**
* The time when the inference component was last updated.
*/
public val lastModifiedTime: Output
get() = javaResource.lastModifiedTime().applyValue({ args0 -> args0 })
public val runtimeConfig: Output
get() = javaResource.runtimeConfig().applyValue({ args0 ->
args0.let({ args0 ->
inferenceComponentRuntimeConfigToKotlin(args0)
})
})
public val specification: Output
get() = javaResource.specification().applyValue({ args0 ->
args0.let({ args0 ->
inferenceComponentSpecificationToKotlin(args0)
})
})
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The name of the production variant that hosts the inference component.
*/
public val variantName: Output
get() = javaResource.variantName().applyValue({ args0 -> args0 })
}
public object InferenceComponentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sagemaker.InferenceComponent::class == javaResource::class
override fun map(javaResource: Resource): InferenceComponent = InferenceComponent(
javaResource as
com.pulumi.awsnative.sagemaker.InferenceComponent,
)
}
/**
* @see [InferenceComponent].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [InferenceComponent].
*/
public suspend fun inferenceComponent(
name: String,
block: suspend InferenceComponentResourceBuilder.() -> Unit,
): InferenceComponent {
val builder = InferenceComponentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [InferenceComponent].
* @param name The _unique_ name of the resulting resource.
*/
public fun inferenceComponent(name: String): InferenceComponent {
val builder = InferenceComponentResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy