com.pulumi.aws.transcribe.kotlin.MedicalVocabulary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.transcribe.kotlin
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [MedicalVocabulary].
*/
@PulumiTagMarker
public class MedicalVocabularyResourceBuilder internal constructor() {
public var name: String? = null
public var args: MedicalVocabularyArgs = MedicalVocabularyArgs()
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 MedicalVocabularyArgsBuilder.() -> Unit) {
val builder = MedicalVocabularyArgsBuilder()
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(): MedicalVocabulary {
val builtJavaResource = com.pulumi.aws.transcribe.MedicalVocabulary(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MedicalVocabulary(builtJavaResource)
}
}
/**
* Resource for managing an AWS Transcribe MedicalVocabulary.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.s3.BucketV2("example", {
* bucket: "example-medical-vocab-123",
* forceDestroy: true,
* });
* const object = new aws.s3.BucketObjectv2("object", {
* bucket: example.id,
* key: "transcribe/test1.txt",
* source: new pulumi.asset.FileAsset("test.txt"),
* });
* const exampleMedicalVocabulary = new aws.transcribe.MedicalVocabulary("example", {
* vocabularyName: "example",
* languageCode: "en-US",
* vocabularyFileUri: pulumi.interpolate`s3://${example.id}/${object.key}`,
* tags: {
* tag1: "value1",
* tag2: "value3",
* },
* }, {
* dependsOn: [object],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.s3.BucketV2("example",
* bucket="example-medical-vocab-123",
* force_destroy=True)
* object = aws.s3.BucketObjectv2("object",
* bucket=example.id,
* key="transcribe/test1.txt",
* source=pulumi.FileAsset("test.txt"))
* example_medical_vocabulary = aws.transcribe.MedicalVocabulary("example",
* vocabulary_name="example",
* language_code="en-US",
* vocabulary_file_uri=pulumi.Output.all(
* id=example.id,
* key=object.key
* ).apply(lambda resolved_outputs: f"s3://{resolved_outputs['id']}/{resolved_outputs['key']}")
* ,
* tags={
* "tag1": "value1",
* "tag2": "value3",
* },
* opts = pulumi.ResourceOptions(depends_on=[object]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.S3.BucketV2("example", new()
* {
* Bucket = "example-medical-vocab-123",
* ForceDestroy = true,
* });
* var @object = new Aws.S3.BucketObjectv2("object", new()
* {
* Bucket = example.Id,
* Key = "transcribe/test1.txt",
* Source = new FileAsset("test.txt"),
* });
* var exampleMedicalVocabulary = new Aws.Transcribe.MedicalVocabulary("example", new()
* {
* VocabularyName = "example",
* LanguageCode = "en-US",
* VocabularyFileUri = Output.Tuple(example.Id, @object.Key).Apply(values =>
* {
* var id = values.Item1;
* var key = values.Item2;
* return $"s3://{id}/{key}";
* }),
* Tags =
* {
* { "tag1", "value1" },
* { "tag2", "value3" },
* },
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* @object,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transcribe"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
* Bucket: pulumi.String("example-medical-vocab-123"),
* ForceDestroy: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* object, err := s3.NewBucketObjectv2(ctx, "object", &s3.BucketObjectv2Args{
* Bucket: example.ID(),
* Key: pulumi.String("transcribe/test1.txt"),
* Source: pulumi.NewFileAsset("test.txt"),
* })
* if err != nil {
* return err
* }
* _, err = transcribe.NewMedicalVocabulary(ctx, "example", &transcribe.MedicalVocabularyArgs{
* VocabularyName: pulumi.String("example"),
* LanguageCode: pulumi.String("en-US"),
* VocabularyFileUri: pulumi.All(example.ID(), object.Key).ApplyT(func(_args []interface{}) (string, error) {
* id := _args[0].(string)
* key := _args[1].(string)
* return fmt.Sprintf("s3://%v/%v", id, key), nil
* }).(pulumi.StringOutput),
* Tags: pulumi.StringMap{
* "tag1": pulumi.String("value1"),
* "tag2": pulumi.String("value3"),
* },
* }, pulumi.DependsOn([]pulumi.Resource{
* object,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.s3.BucketV2;
* import com.pulumi.aws.s3.BucketV2Args;
* import com.pulumi.aws.s3.BucketObjectv2;
* import com.pulumi.aws.s3.BucketObjectv2Args;
* import com.pulumi.aws.transcribe.MedicalVocabulary;
* import com.pulumi.aws.transcribe.MedicalVocabularyArgs;
* import com.pulumi.resources.CustomResourceOptions;
* import com.pulumi.asset.FileAsset;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new BucketV2("example", BucketV2Args.builder()
* .bucket("example-medical-vocab-123")
* .forceDestroy(true)
* .build());
* var object = new BucketObjectv2("object", BucketObjectv2Args.builder()
* .bucket(example.id())
* .key("transcribe/test1.txt")
* .source(new FileAsset("test.txt"))
* .build());
* var exampleMedicalVocabulary = new MedicalVocabulary("exampleMedicalVocabulary", MedicalVocabularyArgs.builder()
* .vocabularyName("example")
* .languageCode("en-US")
* .vocabularyFileUri(Output.tuple(example.id(), object.key()).applyValue(values -> {
* var id = values.t1;
* var key = values.t2;
* return String.format("s3://%s/%s", id,key);
* }))
* .tags(Map.ofEntries(
* Map.entry("tag1", "value1"),
* Map.entry("tag2", "value3")
* ))
* .build(), CustomResourceOptions.builder()
* .dependsOn(object)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:s3:BucketV2
* properties:
* bucket: example-medical-vocab-123
* forceDestroy: true
* object:
* type: aws:s3:BucketObjectv2
* properties:
* bucket: ${example.id}
* key: transcribe/test1.txt
* source:
* fn::FileAsset: test.txt
* exampleMedicalVocabulary:
* type: aws:transcribe:MedicalVocabulary
* name: example
* properties:
* vocabularyName: example
* languageCode: en-US
* vocabularyFileUri: s3://${example.id}/${object.key}
* tags:
* tag1: value1
* tag2: value3
* options:
* dependson:
* - ${object}
* ```
*
* ## Import
* Using `pulumi import`, import Transcribe MedicalVocabulary using the `vocabulary_name`. For example:
* ```sh
* $ pulumi import aws:transcribe/medicalVocabulary:MedicalVocabulary example example-name
* ```
*/
public class MedicalVocabulary internal constructor(
override val javaResource: com.pulumi.aws.transcribe.MedicalVocabulary,
) : KotlinCustomResource(javaResource, MedicalVocabularyMapper) {
/**
* ARN of the MedicalVocabulary.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Generated download URI.
*/
public val downloadUri: Output
get() = javaResource.downloadUri().applyValue({ args0 -> args0 })
/**
* The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
*/
public val languageCode: Output
get() = javaResource.languageCode().applyValue({ args0 -> args0 })
/**
* A map of tags to assign to the MedicalVocabulary. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy