Vocabulary

class Vocabulary : KotlinCustomResource

Resource for managing an AWS Transcribe Vocabulary.

Example Usage

Basic Usage

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.Vocabulary;
import com.pulumi.aws.transcribe.VocabularyArgs;
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 exampleBucketV2 = new BucketV2("exampleBucketV2", BucketV2Args.builder()
.forceDestroy(true)
.build());
var object = new BucketObjectv2("object", BucketObjectv2Args.builder()
.bucket(exampleBucketV2.id())
.key("transcribe/test1.txt")
.source(new FileAsset("test.txt"))
.build());
var exampleVocabulary = new Vocabulary("exampleVocabulary", VocabularyArgs.builder()
.vocabularyName("example")
.languageCode("en-US")
.vocabularyFileUri(Output.tuple(exampleBucketV2.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());
}
}

Import

Transcribe Vocabulary can be imported using the vocabulary_name, e.g.,

$ pulumi import aws:transcribe/vocabulary:Vocabulary example example-name

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the Vocabulary.

Link copied to clipboard
val downloadUri: Output<String>

Generated download URI.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val languageCode: Output<String>

The language code you selected for your vocabulary.

Link copied to clipboard
val phrases: Output<List<String>>?

A list of terms to include in the vocabulary. Conflicts with vocabulary_file_uri

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the Vocabulary. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The Amazon S3 location (URI) of the text file that contains your custom vocabulary. Conflicts wth phrases.

Link copied to clipboard
val vocabularyName: Output<String>

The name of the Vocabulary. The following arguments are optional: