com.pulumi.awsnative.sagemaker.kotlin.ModelPackage.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.ModelPackageModelApprovalStatus
import com.pulumi.awsnative.sagemaker.kotlin.enums.ModelPackageSkipModelValidation
import com.pulumi.awsnative.sagemaker.kotlin.enums.ModelPackageStatus
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageAdditionalInferenceSpecificationDefinition
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageCustomerMetadataProperties
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageDriftCheckBaselines
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageInferenceSpecification
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageMetadataProperties
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageModelMetrics
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageSourceAlgorithmSpecification
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageStatusDetails
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageValidationSpecification
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.Int
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.ModelPackageModelApprovalStatus.Companion.toKotlin as modelPackageModelApprovalStatusToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.ModelPackageSkipModelValidation.Companion.toKotlin as modelPackageSkipModelValidationToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.enums.ModelPackageStatus.Companion.toKotlin as modelPackageStatusToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageAdditionalInferenceSpecificationDefinition.Companion.toKotlin as modelPackageAdditionalInferenceSpecificationDefinitionToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageCustomerMetadataProperties.Companion.toKotlin as modelPackageCustomerMetadataPropertiesToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageDriftCheckBaselines.Companion.toKotlin as modelPackageDriftCheckBaselinesToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageInferenceSpecification.Companion.toKotlin as modelPackageInferenceSpecificationToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageMetadataProperties.Companion.toKotlin as modelPackageMetadataPropertiesToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageModelMetrics.Companion.toKotlin as modelPackageModelMetricsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageSourceAlgorithmSpecification.Companion.toKotlin as modelPackageSourceAlgorithmSpecificationToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageStatusDetails.Companion.toKotlin as modelPackageStatusDetailsToKotlin
import com.pulumi.awsnative.sagemaker.kotlin.outputs.ModelPackageValidationSpecification.Companion.toKotlin as modelPackageValidationSpecificationToKotlin
/**
* Builder for [ModelPackage].
*/
@PulumiTagMarker
public class ModelPackageResourceBuilder internal constructor() {
public var name: String? = null
public var args: ModelPackageArgs = ModelPackageArgs()
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 ModelPackageArgsBuilder.() -> Unit) {
val builder = ModelPackageArgsBuilder()
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(): ModelPackage {
val builtJavaResource = com.pulumi.awsnative.sagemaker.ModelPackage(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ModelPackage(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SageMaker::ModelPackage
*/
public class ModelPackage internal constructor(
override val javaResource: com.pulumi.awsnative.sagemaker.ModelPackage,
) : KotlinCustomResource(javaResource, ModelPackageMapper) {
/**
* An array of additional Inference Specification objects.
*/
public val additionalInferenceSpecifications:
Output>?
get() = javaResource.additionalInferenceSpecifications().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
modelPackageAdditionalInferenceSpecificationDefinitionToKotlin(args0)
})
})
}).orElse(null)
})
/**
* An array of additional Inference Specification objects to be added to the existing array. The total number of additional Inference Specification objects cannot exceed 15. Each additional Inference Specification object specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.
*/
public val additionalInferenceSpecificationsToAdd:
Output>?
get() = javaResource.additionalInferenceSpecificationsToAdd().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
modelPackageAdditionalInferenceSpecificationDefinitionToKotlin(args0)
})
})
}).orElse(null)
})
/**
* A description provided when the model approval is set.
*/
public val approvalDescription: Output?
get() = javaResource.approvalDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether the model package is to be certified to be listed on AWS Marketplace. For information about listing model packages on AWS Marketplace, see [List Your Algorithm or Model Package on AWS Marketplace](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-mkt-list.html) .
*/
public val certifyForMarketplace: Output?
get() = javaResource.certifyForMarketplace().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A unique token that guarantees that the call to this API is idempotent.
*/
public val clientToken: Output?
get() = javaResource.clientToken().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The time that the model package was created.
*/
public val creationTime: Output
get() = javaResource.creationTime().applyValue({ args0 -> args0 })
/**
* The metadata properties for the model package.
*/
public val customerMetadataProperties: Output?
get() = javaResource.customerMetadataProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageCustomerMetadataPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.
*/
public val domain: Output?
get() = javaResource.domain().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Represents the drift check baselines that can be used when the model monitor is set using the model package.
*/
public val driftCheckBaselines: Output?
get() = javaResource.driftCheckBaselines().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageDriftCheckBaselinesToKotlin(args0) })
}).orElse(null)
})
/**
* Defines how to perform inference generation after a training job is run.
*/
public val inferenceSpecification: Output?
get() = javaResource.inferenceSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageInferenceSpecificationToKotlin(args0) })
}).orElse(null)
})
/**
* The last time the model package was modified.
*/
public val lastModifiedTime: Output?
get() = javaResource.lastModifiedTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Metadata properties of the tracking entity, trial, or trial component.
*/
public val metadataProperties: Output?
get() = javaResource.metadataProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageMetadataPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The approval status of the model. This can be one of the following values.
* - `APPROVED` - The model is approved
* - `REJECTED` - The model is rejected.
* - `PENDING_MANUAL_APPROVAL` - The model is waiting for manual approval.
*/
public val modelApprovalStatus: Output?
get() = javaResource.modelApprovalStatus().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageModelApprovalStatusToKotlin(args0) })
}).orElse(null)
})
/**
* Metrics for the model.
*/
public val modelMetrics: Output?
get() = javaResource.modelMetrics().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
modelPackageModelMetricsToKotlin(args0)
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the model package.
*/
public val modelPackageArn: Output
get() = javaResource.modelPackageArn().applyValue({ args0 -> args0 })
/**
* The description of the model package.
*/
public val modelPackageDescription: Output?
get() = javaResource.modelPackageDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The model group to which the model belongs.
*/
public val modelPackageGroupName: Output?
get() = javaResource.modelPackageGroupName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the model.
*/
public val modelPackageName: Output?
get() = javaResource.modelPackageName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The status of the model package. This can be one of the following values.
* - `PENDING` - The model package creation is pending.
* - `IN_PROGRESS` - The model package is in the process of being created.
* - `COMPLETED` - The model package was successfully created.
* - `FAILED` - The model package creation failed.
* - `DELETING` - The model package is in the process of being deleted.
*/
public val modelPackageStatus: Output
get() = javaResource.modelPackageStatus().applyValue({ args0 ->
args0.let({ args0 ->
modelPackageStatusToKotlin(args0)
})
})
/**
* Specifies the validation and image scan statuses of the model package.
*/
public val modelPackageStatusDetails: Output?
get() = javaResource.modelPackageStatusDetails().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageStatusDetailsToKotlin(args0) })
}).orElse(null)
})
/**
* The version number of a versioned model.
*/
public val modelPackageVersion: Output?
get() = javaResource.modelPackageVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).
*/
public val samplePayloadUrl: Output?
get() = javaResource.samplePayloadUrl().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Indicates if you want to skip model validation.
*/
public val skipModelValidation: Output?
get() = javaResource.skipModelValidation().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageSkipModelValidationToKotlin(args0) })
}).orElse(null)
})
/**
* A list of algorithms that were used to create a model package.
*/
public val sourceAlgorithmSpecification: Output?
get() = javaResource.sourceAlgorithmSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
modelPackageSourceAlgorithmSpecificationToKotlin(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 machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification.
*/
public val task: Output?
get() = javaResource.task().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies batch transform jobs that SageMaker runs to validate your model package.
*/
public val validationSpecification: Output?
get() = javaResource.validationSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> modelPackageValidationSpecificationToKotlin(args0) })
}).orElse(null)
})
}
public object ModelPackageMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sagemaker.ModelPackage::class == javaResource::class
override fun map(javaResource: Resource): ModelPackage = ModelPackage(
javaResource as
com.pulumi.awsnative.sagemaker.ModelPackage,
)
}
/**
* @see [ModelPackage].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ModelPackage].
*/
public suspend fun modelPackage(
name: String,
block: suspend ModelPackageResourceBuilder.() -> Unit,
): ModelPackage {
val builder = ModelPackageResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ModelPackage].
* @param name The _unique_ name of the resulting resource.
*/
public fun modelPackage(name: String): ModelPackage {
val builder = ModelPackageResourceBuilder()
builder.name(name)
return builder.build()
}