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

com.pulumi.awsnative.healthlake.kotlin.FhirDatastore.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.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.healthlake.kotlin

import com.pulumi.awsnative.healthlake.kotlin.enums.FhirDatastoreDatastoreStatus
import com.pulumi.awsnative.healthlake.kotlin.enums.FhirDatastoreDatastoreTypeVersion
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreCreatedAt
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreIdentityProviderConfiguration
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastorePreloadDataConfig
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreSseConfiguration
import com.pulumi.awsnative.kotlin.outputs.Tag
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.healthlake.kotlin.enums.FhirDatastoreDatastoreStatus.Companion.toKotlin as fhirDatastoreDatastoreStatusToKotlin
import com.pulumi.awsnative.healthlake.kotlin.enums.FhirDatastoreDatastoreTypeVersion.Companion.toKotlin as fhirDatastoreDatastoreTypeVersionToKotlin
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreCreatedAt.Companion.toKotlin as fhirDatastoreCreatedAtToKotlin
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreIdentityProviderConfiguration.Companion.toKotlin as fhirDatastoreIdentityProviderConfigurationToKotlin
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastorePreloadDataConfig.Companion.toKotlin as fhirDatastorePreloadDataConfigToKotlin
import com.pulumi.awsnative.healthlake.kotlin.outputs.FhirDatastoreSseConfiguration.Companion.toKotlin as fhirDatastoreSseConfigurationToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: FhirDatastoreArgs = FhirDatastoreArgs()

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

/**
 * HealthLake FHIR Datastore
 */
public class FhirDatastore internal constructor(
    override val javaResource: com.pulumi.awsnative.healthlake.FhirDatastore,
) : KotlinCustomResource(javaResource, FhirDatastoreMapper) {
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 ->
            args0.let({ args0 ->
                fhirDatastoreCreatedAtToKotlin(args0)
            })
        })

    /**
     * The Data Store ARN is generated during the creation of the Data Store and can be found in the output from the initial Data Store creation request.
     */
    public val datastoreArn: Output
        get() = javaResource.datastoreArn().applyValue({ args0 -> args0 })

    /**
     * The endpoint for the created Data Store.
     */
    public val datastoreEndpoint: Output
        get() = javaResource.datastoreEndpoint().applyValue({ args0 -> args0 })

    /**
     * The Amazon generated Data Store id. This id is in the output from the initial Data Store creation call.
     */
    public val datastoreId: Output
        get() = javaResource.datastoreId().applyValue({ args0 -> args0 })

    /**
     * The user generated name for the data store.
     */
    public val datastoreName: Output?
        get() = javaResource.datastoreName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The status of the FHIR Data Store. Possible statuses are ‘CREATING’, ‘ACTIVE’, ‘DELETING’, ‘DELETED’.
     */
    public val datastoreStatus: Output
        get() = javaResource.datastoreStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                fhirDatastoreDatastoreStatusToKotlin(args0)
            })
        })

    /**
     * The FHIR version of the data store. The only supported version is R4.
     */
    public val datastoreTypeVersion: Output
        get() = javaResource.datastoreTypeVersion().applyValue({ args0 ->
            args0.let({ args0 ->
                fhirDatastoreDatastoreTypeVersionToKotlin(args0)
            })
        })

    /**
     * The identity provider configuration that you gave when the data store was created.
     */
    public val identityProviderConfiguration: Output?
        get() = javaResource.identityProviderConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    fhirDatastoreIdentityProviderConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The preloaded data configuration for the data store. Only data preloaded from Synthea is supported.
     */
    public val preloadDataConfig: Output?
        get() = javaResource.preloadDataConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> fhirDatastorePreloadDataConfigToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The server-side encryption key configuration for a customer provided encryption key specified for creating a data store.
     */
    public val sseConfiguration: Output?
        get() = javaResource.sseConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> fhirDatastoreSseConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object FhirDatastoreMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.healthlake.FhirDatastore::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy