github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/transcribe/medicalVocabulary.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package transcribe
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Resource for managing an AWS Transcribe MedicalVocabulary.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"fmt"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transcribe"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
    38  //				Bucket:       pulumi.String("example-medical-vocab-123"),
    39  //				ForceDestroy: pulumi.Bool(true),
    40  //			})
    41  //			if err != nil {
    42  //				return err
    43  //			}
    44  //			object, err := s3.NewBucketObjectv2(ctx, "object", &s3.BucketObjectv2Args{
    45  //				Bucket: example.ID(),
    46  //				Key:    pulumi.String("transcribe/test1.txt"),
    47  //				Source: pulumi.NewFileAsset("test.txt"),
    48  //			})
    49  //			if err != nil {
    50  //				return err
    51  //			}
    52  //			_, err = transcribe.NewMedicalVocabulary(ctx, "example", &transcribe.MedicalVocabularyArgs{
    53  //				VocabularyName: pulumi.String("example"),
    54  //				LanguageCode:   pulumi.String("en-US"),
    55  //				VocabularyFileUri: pulumi.All(example.ID(), object.Key).ApplyT(func(_args []interface{}) (string, error) {
    56  //					id := _args[0].(string)
    57  //					key := _args[1].(string)
    58  //					return fmt.Sprintf("s3://%v/%v", id, key), nil
    59  //				}).(pulumi.StringOutput),
    60  //				Tags: pulumi.StringMap{
    61  //					"tag1": pulumi.String("value1"),
    62  //					"tag2": pulumi.String("value3"),
    63  //				},
    64  //			}, pulumi.DependsOn([]pulumi.Resource{
    65  //				object,
    66  //			}))
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			return nil
    71  //		})
    72  //	}
    73  //
    74  // ```
    75  // <!--End PulumiCodeChooser -->
    76  //
    77  // ## Import
    78  //
    79  // Using `pulumi import`, import Transcribe MedicalVocabulary using the `vocabulary_name`. For example:
    80  //
    81  // ```sh
    82  // $ pulumi import aws:transcribe/medicalVocabulary:MedicalVocabulary example example-name
    83  // ```
    84  type MedicalVocabulary struct {
    85  	pulumi.CustomResourceState
    86  
    87  	// ARN of the MedicalVocabulary.
    88  	Arn pulumi.StringOutput `pulumi:"arn"`
    89  	// Generated download URI.
    90  	DownloadUri pulumi.StringOutput `pulumi:"downloadUri"`
    91  	// The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
    92  	LanguageCode pulumi.StringOutput `pulumi:"languageCode"`
    93  	// A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    94  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    95  	// Deprecated: Please use `tags` instead.
    96  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    97  	// The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
    98  	VocabularyFileUri pulumi.StringOutput `pulumi:"vocabularyFileUri"`
    99  	// The name of the Medical Vocabulary.
   100  	//
   101  	// The following arguments are optional:
   102  	VocabularyName pulumi.StringOutput `pulumi:"vocabularyName"`
   103  }
   104  
   105  // NewMedicalVocabulary registers a new resource with the given unique name, arguments, and options.
   106  func NewMedicalVocabulary(ctx *pulumi.Context,
   107  	name string, args *MedicalVocabularyArgs, opts ...pulumi.ResourceOption) (*MedicalVocabulary, error) {
   108  	if args == nil {
   109  		return nil, errors.New("missing one or more required arguments")
   110  	}
   111  
   112  	if args.LanguageCode == nil {
   113  		return nil, errors.New("invalid value for required argument 'LanguageCode'")
   114  	}
   115  	if args.VocabularyFileUri == nil {
   116  		return nil, errors.New("invalid value for required argument 'VocabularyFileUri'")
   117  	}
   118  	if args.VocabularyName == nil {
   119  		return nil, errors.New("invalid value for required argument 'VocabularyName'")
   120  	}
   121  	opts = internal.PkgResourceDefaultOpts(opts)
   122  	var resource MedicalVocabulary
   123  	err := ctx.RegisterResource("aws:transcribe/medicalVocabulary:MedicalVocabulary", name, args, &resource, opts...)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return &resource, nil
   128  }
   129  
   130  // GetMedicalVocabulary gets an existing MedicalVocabulary resource's state with the given name, ID, and optional
   131  // state properties that are used to uniquely qualify the lookup (nil if not required).
   132  func GetMedicalVocabulary(ctx *pulumi.Context,
   133  	name string, id pulumi.IDInput, state *MedicalVocabularyState, opts ...pulumi.ResourceOption) (*MedicalVocabulary, error) {
   134  	var resource MedicalVocabulary
   135  	err := ctx.ReadResource("aws:transcribe/medicalVocabulary:MedicalVocabulary", name, id, state, &resource, opts...)
   136  	if err != nil {
   137  		return nil, err
   138  	}
   139  	return &resource, nil
   140  }
   141  
   142  // Input properties used for looking up and filtering MedicalVocabulary resources.
   143  type medicalVocabularyState struct {
   144  	// ARN of the MedicalVocabulary.
   145  	Arn *string `pulumi:"arn"`
   146  	// Generated download URI.
   147  	DownloadUri *string `pulumi:"downloadUri"`
   148  	// The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
   149  	LanguageCode *string `pulumi:"languageCode"`
   150  	// A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   151  	Tags map[string]string `pulumi:"tags"`
   152  	// Deprecated: Please use `tags` instead.
   153  	TagsAll map[string]string `pulumi:"tagsAll"`
   154  	// The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
   155  	VocabularyFileUri *string `pulumi:"vocabularyFileUri"`
   156  	// The name of the Medical Vocabulary.
   157  	//
   158  	// The following arguments are optional:
   159  	VocabularyName *string `pulumi:"vocabularyName"`
   160  }
   161  
   162  type MedicalVocabularyState struct {
   163  	// ARN of the MedicalVocabulary.
   164  	Arn pulumi.StringPtrInput
   165  	// Generated download URI.
   166  	DownloadUri pulumi.StringPtrInput
   167  	// The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
   168  	LanguageCode pulumi.StringPtrInput
   169  	// A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   170  	Tags pulumi.StringMapInput
   171  	// Deprecated: Please use `tags` instead.
   172  	TagsAll pulumi.StringMapInput
   173  	// The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
   174  	VocabularyFileUri pulumi.StringPtrInput
   175  	// The name of the Medical Vocabulary.
   176  	//
   177  	// The following arguments are optional:
   178  	VocabularyName pulumi.StringPtrInput
   179  }
   180  
   181  func (MedicalVocabularyState) ElementType() reflect.Type {
   182  	return reflect.TypeOf((*medicalVocabularyState)(nil)).Elem()
   183  }
   184  
   185  type medicalVocabularyArgs struct {
   186  	// The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
   187  	LanguageCode string `pulumi:"languageCode"`
   188  	// A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   189  	Tags map[string]string `pulumi:"tags"`
   190  	// The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
   191  	VocabularyFileUri string `pulumi:"vocabularyFileUri"`
   192  	// The name of the Medical Vocabulary.
   193  	//
   194  	// The following arguments are optional:
   195  	VocabularyName string `pulumi:"vocabularyName"`
   196  }
   197  
   198  // The set of arguments for constructing a MedicalVocabulary resource.
   199  type MedicalVocabularyArgs struct {
   200  	// The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
   201  	LanguageCode pulumi.StringInput
   202  	// A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   203  	Tags pulumi.StringMapInput
   204  	// The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
   205  	VocabularyFileUri pulumi.StringInput
   206  	// The name of the Medical Vocabulary.
   207  	//
   208  	// The following arguments are optional:
   209  	VocabularyName pulumi.StringInput
   210  }
   211  
   212  func (MedicalVocabularyArgs) ElementType() reflect.Type {
   213  	return reflect.TypeOf((*medicalVocabularyArgs)(nil)).Elem()
   214  }
   215  
   216  type MedicalVocabularyInput interface {
   217  	pulumi.Input
   218  
   219  	ToMedicalVocabularyOutput() MedicalVocabularyOutput
   220  	ToMedicalVocabularyOutputWithContext(ctx context.Context) MedicalVocabularyOutput
   221  }
   222  
   223  func (*MedicalVocabulary) ElementType() reflect.Type {
   224  	return reflect.TypeOf((**MedicalVocabulary)(nil)).Elem()
   225  }
   226  
   227  func (i *MedicalVocabulary) ToMedicalVocabularyOutput() MedicalVocabularyOutput {
   228  	return i.ToMedicalVocabularyOutputWithContext(context.Background())
   229  }
   230  
   231  func (i *MedicalVocabulary) ToMedicalVocabularyOutputWithContext(ctx context.Context) MedicalVocabularyOutput {
   232  	return pulumi.ToOutputWithContext(ctx, i).(MedicalVocabularyOutput)
   233  }
   234  
   235  // MedicalVocabularyArrayInput is an input type that accepts MedicalVocabularyArray and MedicalVocabularyArrayOutput values.
   236  // You can construct a concrete instance of `MedicalVocabularyArrayInput` via:
   237  //
   238  //	MedicalVocabularyArray{ MedicalVocabularyArgs{...} }
   239  type MedicalVocabularyArrayInput interface {
   240  	pulumi.Input
   241  
   242  	ToMedicalVocabularyArrayOutput() MedicalVocabularyArrayOutput
   243  	ToMedicalVocabularyArrayOutputWithContext(context.Context) MedicalVocabularyArrayOutput
   244  }
   245  
   246  type MedicalVocabularyArray []MedicalVocabularyInput
   247  
   248  func (MedicalVocabularyArray) ElementType() reflect.Type {
   249  	return reflect.TypeOf((*[]*MedicalVocabulary)(nil)).Elem()
   250  }
   251  
   252  func (i MedicalVocabularyArray) ToMedicalVocabularyArrayOutput() MedicalVocabularyArrayOutput {
   253  	return i.ToMedicalVocabularyArrayOutputWithContext(context.Background())
   254  }
   255  
   256  func (i MedicalVocabularyArray) ToMedicalVocabularyArrayOutputWithContext(ctx context.Context) MedicalVocabularyArrayOutput {
   257  	return pulumi.ToOutputWithContext(ctx, i).(MedicalVocabularyArrayOutput)
   258  }
   259  
   260  // MedicalVocabularyMapInput is an input type that accepts MedicalVocabularyMap and MedicalVocabularyMapOutput values.
   261  // You can construct a concrete instance of `MedicalVocabularyMapInput` via:
   262  //
   263  //	MedicalVocabularyMap{ "key": MedicalVocabularyArgs{...} }
   264  type MedicalVocabularyMapInput interface {
   265  	pulumi.Input
   266  
   267  	ToMedicalVocabularyMapOutput() MedicalVocabularyMapOutput
   268  	ToMedicalVocabularyMapOutputWithContext(context.Context) MedicalVocabularyMapOutput
   269  }
   270  
   271  type MedicalVocabularyMap map[string]MedicalVocabularyInput
   272  
   273  func (MedicalVocabularyMap) ElementType() reflect.Type {
   274  	return reflect.TypeOf((*map[string]*MedicalVocabulary)(nil)).Elem()
   275  }
   276  
   277  func (i MedicalVocabularyMap) ToMedicalVocabularyMapOutput() MedicalVocabularyMapOutput {
   278  	return i.ToMedicalVocabularyMapOutputWithContext(context.Background())
   279  }
   280  
   281  func (i MedicalVocabularyMap) ToMedicalVocabularyMapOutputWithContext(ctx context.Context) MedicalVocabularyMapOutput {
   282  	return pulumi.ToOutputWithContext(ctx, i).(MedicalVocabularyMapOutput)
   283  }
   284  
   285  type MedicalVocabularyOutput struct{ *pulumi.OutputState }
   286  
   287  func (MedicalVocabularyOutput) ElementType() reflect.Type {
   288  	return reflect.TypeOf((**MedicalVocabulary)(nil)).Elem()
   289  }
   290  
   291  func (o MedicalVocabularyOutput) ToMedicalVocabularyOutput() MedicalVocabularyOutput {
   292  	return o
   293  }
   294  
   295  func (o MedicalVocabularyOutput) ToMedicalVocabularyOutputWithContext(ctx context.Context) MedicalVocabularyOutput {
   296  	return o
   297  }
   298  
   299  // ARN of the MedicalVocabulary.
   300  func (o MedicalVocabularyOutput) Arn() pulumi.StringOutput {
   301  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   302  }
   303  
   304  // Generated download URI.
   305  func (o MedicalVocabularyOutput) DownloadUri() pulumi.StringOutput {
   306  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringOutput { return v.DownloadUri }).(pulumi.StringOutput)
   307  }
   308  
   309  // The language code you selected for your medical vocabulary. US English (en-US) is the only language supported with Amazon Transcribe Medical.
   310  func (o MedicalVocabularyOutput) LanguageCode() pulumi.StringOutput {
   311  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringOutput { return v.LanguageCode }).(pulumi.StringOutput)
   312  }
   313  
   314  // A map of tags to assign to the MedicalVocabulary. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   315  func (o MedicalVocabularyOutput) Tags() pulumi.StringMapOutput {
   316  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   317  }
   318  
   319  // Deprecated: Please use `tags` instead.
   320  func (o MedicalVocabularyOutput) TagsAll() pulumi.StringMapOutput {
   321  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   322  }
   323  
   324  // The Amazon S3 location (URI) of the text file that contains your custom medical vocabulary.
   325  func (o MedicalVocabularyOutput) VocabularyFileUri() pulumi.StringOutput {
   326  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringOutput { return v.VocabularyFileUri }).(pulumi.StringOutput)
   327  }
   328  
   329  // The name of the Medical Vocabulary.
   330  //
   331  // The following arguments are optional:
   332  func (o MedicalVocabularyOutput) VocabularyName() pulumi.StringOutput {
   333  	return o.ApplyT(func(v *MedicalVocabulary) pulumi.StringOutput { return v.VocabularyName }).(pulumi.StringOutput)
   334  }
   335  
   336  type MedicalVocabularyArrayOutput struct{ *pulumi.OutputState }
   337  
   338  func (MedicalVocabularyArrayOutput) ElementType() reflect.Type {
   339  	return reflect.TypeOf((*[]*MedicalVocabulary)(nil)).Elem()
   340  }
   341  
   342  func (o MedicalVocabularyArrayOutput) ToMedicalVocabularyArrayOutput() MedicalVocabularyArrayOutput {
   343  	return o
   344  }
   345  
   346  func (o MedicalVocabularyArrayOutput) ToMedicalVocabularyArrayOutputWithContext(ctx context.Context) MedicalVocabularyArrayOutput {
   347  	return o
   348  }
   349  
   350  func (o MedicalVocabularyArrayOutput) Index(i pulumi.IntInput) MedicalVocabularyOutput {
   351  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MedicalVocabulary {
   352  		return vs[0].([]*MedicalVocabulary)[vs[1].(int)]
   353  	}).(MedicalVocabularyOutput)
   354  }
   355  
   356  type MedicalVocabularyMapOutput struct{ *pulumi.OutputState }
   357  
   358  func (MedicalVocabularyMapOutput) ElementType() reflect.Type {
   359  	return reflect.TypeOf((*map[string]*MedicalVocabulary)(nil)).Elem()
   360  }
   361  
   362  func (o MedicalVocabularyMapOutput) ToMedicalVocabularyMapOutput() MedicalVocabularyMapOutput {
   363  	return o
   364  }
   365  
   366  func (o MedicalVocabularyMapOutput) ToMedicalVocabularyMapOutputWithContext(ctx context.Context) MedicalVocabularyMapOutput {
   367  	return o
   368  }
   369  
   370  func (o MedicalVocabularyMapOutput) MapIndex(k pulumi.StringInput) MedicalVocabularyOutput {
   371  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MedicalVocabulary {
   372  		return vs[0].(map[string]*MedicalVocabulary)[vs[1].(string)]
   373  	}).(MedicalVocabularyOutput)
   374  }
   375  
   376  func init() {
   377  	pulumi.RegisterInputType(reflect.TypeOf((*MedicalVocabularyInput)(nil)).Elem(), &MedicalVocabulary{})
   378  	pulumi.RegisterInputType(reflect.TypeOf((*MedicalVocabularyArrayInput)(nil)).Elem(), MedicalVocabularyArray{})
   379  	pulumi.RegisterInputType(reflect.TypeOf((*MedicalVocabularyMapInput)(nil)).Elem(), MedicalVocabularyMap{})
   380  	pulumi.RegisterOutputType(MedicalVocabularyOutput{})
   381  	pulumi.RegisterOutputType(MedicalVocabularyArrayOutput{})
   382  	pulumi.RegisterOutputType(MedicalVocabularyMapOutput{})
   383  }