Package com.pulumi.aws.transcribe
Class Vocabulary
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.transcribe.Vocabulary
-
public class Vocabulary extends com.pulumi.resources.CustomResource
Resource for managing an AWS Transcribe Vocabulary. ## Example Usage ### Basic Usage <!--Start PulumiCodeChooser --> ```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.Vocabulary; import com.pulumi.aws.transcribe.VocabularyArgs; 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-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 exampleVocabulary = new Vocabulary("exampleVocabulary", VocabularyArgs.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()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Transcribe Vocabulary using the `vocabulary_name`. For example: ```sh $ pulumi import aws:transcribe/vocabulary:Vocabulary example example-name ```
-
-
Constructor Summary
Constructors Constructor Description Vocabulary(java.lang.String name)
Vocabulary(java.lang.String name, VocabularyArgs args)
Vocabulary(java.lang.String name, VocabularyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.lang.String>
downloadUri()
static Vocabulary
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VocabularyState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
languageCode()
com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>
phrases()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
com.pulumi.core.Output<java.lang.String>
vocabularyFileUri()
com.pulumi.core.Output<java.lang.String>
vocabularyName()
-
-
-
Constructor Detail
-
Vocabulary
public Vocabulary(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Vocabulary
public Vocabulary(java.lang.String name, VocabularyArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Vocabulary
public Vocabulary(java.lang.String name, VocabularyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the Vocabulary.
-
downloadUri
public com.pulumi.core.Output<java.lang.String> downloadUri()
- Returns:
- Generated download URI.
-
languageCode
public com.pulumi.core.Output<java.lang.String> languageCode()
- Returns:
- The language code you selected for your vocabulary.
-
phrases
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> phrases()
- Returns:
- A list of terms to include in the vocabulary. Conflicts with `vocabulary_file_uri`
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
-
vocabularyFileUri
public com.pulumi.core.Output<java.lang.String> vocabularyFileUri()
- Returns:
- The Amazon S3 location (URI) of the text file that contains your custom vocabulary. Conflicts wth `phrases`.
-
vocabularyName
public com.pulumi.core.Output<java.lang.String> vocabularyName()
- Returns:
- The name of the Vocabulary. The following arguments are optional:
-
get
public static Vocabulary get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VocabularyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-