Vocabulary
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());
}
}
Content copied to clipboard
Import
Transcribe Vocabulary can be imported using the vocabulary_name
, e.g.,
$ pulumi import aws:transcribe/vocabulary:Vocabulary example example-name
Content copied to clipboard
Properties
Link copied to clipboard
Generated download URI.
Link copied to clipboard
The language code you selected for your vocabulary.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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
The name of the Vocabulary. The following arguments are optional: