com.pulumi.aws.transcribe.LanguageModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.transcribe;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.transcribe.LanguageModelArgs;
import com.pulumi.aws.transcribe.inputs.LanguageModelState;
import com.pulumi.aws.transcribe.outputs.LanguageModelInputDataConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource for managing an AWS Transcribe LanguageModel.
*
* > This resource can take a significant amount of time to provision. See Language Model [FAQ](https://aws.amazon.com/transcribe/faqs/) for more details.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.iam.IamFunctions;
* import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
* import com.pulumi.aws.iam.Role;
* import com.pulumi.aws.iam.RoleArgs;
* import com.pulumi.aws.iam.RolePolicy;
* import com.pulumi.aws.iam.RolePolicyArgs;
* 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.LanguageModel;
* import com.pulumi.aws.transcribe.LanguageModelArgs;
* import com.pulumi.aws.transcribe.inputs.LanguageModelInputDataConfigArgs;
* import static com.pulumi.codegen.internal.Serialization.*;
* 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) {
* final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .statements(GetPolicyDocumentStatementArgs.builder()
* .actions("sts:AssumeRole")
* .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
* .type("Service")
* .identifiers("transcribe.amazonaws.com")
* .build())
* .build())
* .build());
*
* var exampleRole = new Role("exampleRole", RoleArgs.builder()
* .name("example")
* .assumeRolePolicy(example.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .build());
*
* var testPolicy = new RolePolicy("testPolicy", RolePolicyArgs.builder()
* .name("example")
* .role(exampleRole.id())
* .policy(serializeJson(
* jsonObject(
* jsonProperty("Version", "2012-10-17"),
* jsonProperty("Statement", jsonArray(jsonObject(
* jsonProperty("Action", jsonArray(
* "s3:GetObject",
* "s3:ListBucket"
* )),
* jsonProperty("Effect", "Allow"),
* jsonProperty("Resource", jsonArray("*"))
* )))
* )))
* .build());
*
* var exampleBucketV2 = new BucketV2("exampleBucketV2", BucketV2Args.builder()
* .bucket("example-transcribe")
* .forceDestroy(true)
* .build());
*
* var object = new BucketObjectv2("object", BucketObjectv2Args.builder()
* .bucket(exampleBucketV2.id())
* .key("transcribe/test1.txt")
* .source(new FileAsset("test1.txt"))
* .build());
*
* var exampleLanguageModel = new LanguageModel("exampleLanguageModel", LanguageModelArgs.builder()
* .modelName("example")
* .baseModelName("NarrowBand")
* .inputDataConfig(LanguageModelInputDataConfigArgs.builder()
* .dataAccessRoleArn(exampleRole.arn())
* .s3Uri(exampleBucketV2.id().applyValue(id -> String.format("s3://%s/transcribe/", id)))
* .build())
* .languageCode("en-US")
* .tags(Map.of("ENVIRONMENT", "development"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Transcribe LanguageModel using the `model_name`. For example:
*
* ```sh
* $ pulumi import aws:transcribe/languageModel:LanguageModel example example-name
* ```
*
*/
@ResourceType(type="aws:transcribe/languageModel:LanguageModel")
public class LanguageModel extends com.pulumi.resources.CustomResource {
/**
* ARN of the LanguageModel.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return ARN of the LanguageModel.
*
*/
public Output arn() {
return this.arn;
}
/**
* Name of reference base model.
*
*/
@Export(name="baseModelName", refs={String.class}, tree="[0]")
private Output baseModelName;
/**
* @return Name of reference base model.
*
*/
public Output baseModelName() {
return this.baseModelName;
}
/**
* The input data config for the LanguageModel. See Input Data Config for more details.
*
*/
@Export(name="inputDataConfig", refs={LanguageModelInputDataConfig.class}, tree="[0]")
private Output inputDataConfig;
/**
* @return The input data config for the LanguageModel. See Input Data Config for more details.
*
*/
public Output inputDataConfig() {
return this.inputDataConfig;
}
/**
* The language code you selected for your language model. Refer to the [supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) page for accepted codes.
*
*/
@Export(name="languageCode", refs={String.class}, tree="[0]")
private Output languageCode;
/**
* @return The language code you selected for your language model. Refer to the [supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) page for accepted codes.
*
*/
public Output languageCode() {
return this.languageCode;
}
/**
* The model name.
*
*/
@Export(name="modelName", refs={String.class}, tree="[0]")
private Output modelName;
/**
* @return The model name.
*
*/
public Output modelName() {
return this.modelName;
}
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy