github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getVocabulary.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 connect
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides details about a specific Amazon Connect Vocabulary.
    15  //
    16  // ## Example Usage
    17  //
    18  // By `name`
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := connect.LookupVocabulary(ctx, &connect.LookupVocabularyArgs{
    34  //				InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    35  //				Name:       pulumi.StringRef("Example"),
    36  //			}, nil)
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  //
    47  // By `vocabularyId`
    48  //
    49  // <!--Start PulumiCodeChooser -->
    50  // ```go
    51  // package main
    52  //
    53  // import (
    54  //
    55  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    56  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    57  //
    58  // )
    59  //
    60  //	func main() {
    61  //		pulumi.Run(func(ctx *pulumi.Context) error {
    62  //			_, err := connect.LookupVocabulary(ctx, &connect.LookupVocabularyArgs{
    63  //				InstanceId:   "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    64  //				VocabularyId: pulumi.StringRef("cccccccc-bbbb-cccc-dddd-111111111111"),
    65  //			}, nil)
    66  //			if err != nil {
    67  //				return err
    68  //			}
    69  //			return nil
    70  //		})
    71  //	}
    72  //
    73  // ```
    74  // <!--End PulumiCodeChooser -->
    75  func LookupVocabulary(ctx *pulumi.Context, args *LookupVocabularyArgs, opts ...pulumi.InvokeOption) (*LookupVocabularyResult, error) {
    76  	opts = internal.PkgInvokeDefaultOpts(opts)
    77  	var rv LookupVocabularyResult
    78  	err := ctx.Invoke("aws:connect/getVocabulary:getVocabulary", args, &rv, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return &rv, nil
    83  }
    84  
    85  // A collection of arguments for invoking getVocabulary.
    86  type LookupVocabularyArgs struct {
    87  	// Reference to the hosting Amazon Connect Instance
    88  	InstanceId string `pulumi:"instanceId"`
    89  	// Returns information on a specific Vocabulary by name
    90  	Name *string `pulumi:"name"`
    91  	// A map of tags to assign to the Vocabulary.
    92  	Tags map[string]string `pulumi:"tags"`
    93  	// Returns information on a specific Vocabulary by Vocabulary id
    94  	VocabularyId *string `pulumi:"vocabularyId"`
    95  }
    96  
    97  // A collection of values returned by getVocabulary.
    98  type LookupVocabularyResult struct {
    99  	// The Amazon Resource Name (ARN) of the Vocabulary.
   100  	Arn string `pulumi:"arn"`
   101  	// The content of the custom vocabulary in plain-text format with a table of values. Each row in the table represents a word or a phrase, described with Phrase, IPA, SoundsLike, and DisplayAs fields. Separate the fields with TAB characters. For more information, see [Create a custom vocabulary using a table](https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html#create-vocabulary-table).
   102  	Content string `pulumi:"content"`
   103  	// The reason why the custom vocabulary was not created.
   104  	FailureReason string `pulumi:"failureReason"`
   105  	// The provider-assigned unique ID for this managed resource.
   106  	Id         string `pulumi:"id"`
   107  	InstanceId string `pulumi:"instanceId"`
   108  	// The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see [What is Amazon Transcribe?](https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html). Valid Values are `ar-AE`, `de-CH`, `de-DE`, `en-AB`, `en-AU`, `en-GB`, `en-IE`, `en-IN`, `en-US`, `en-WL`, `es-ES`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `ko-KR`, `pt-BR`, `pt-PT`, `zh-CN`.
   109  	LanguageCode string `pulumi:"languageCode"`
   110  	// The timestamp when the custom vocabulary was last modified.
   111  	LastModifiedTime string `pulumi:"lastModifiedTime"`
   112  	Name             string `pulumi:"name"`
   113  	// The current state of the custom vocabulary. Valid values are `CREATION_IN_PROGRESS`, `ACTIVE`, `CREATION_FAILED`, `DELETE_IN_PROGRESS`.
   114  	State string `pulumi:"state"`
   115  	// A map of tags to assign to the Vocabulary.
   116  	Tags map[string]string `pulumi:"tags"`
   117  	// The identifier of the custom vocabulary.
   118  	VocabularyId string `pulumi:"vocabularyId"`
   119  }
   120  
   121  func LookupVocabularyOutput(ctx *pulumi.Context, args LookupVocabularyOutputArgs, opts ...pulumi.InvokeOption) LookupVocabularyResultOutput {
   122  	return pulumi.ToOutputWithContext(context.Background(), args).
   123  		ApplyT(func(v interface{}) (LookupVocabularyResult, error) {
   124  			args := v.(LookupVocabularyArgs)
   125  			r, err := LookupVocabulary(ctx, &args, opts...)
   126  			var s LookupVocabularyResult
   127  			if r != nil {
   128  				s = *r
   129  			}
   130  			return s, err
   131  		}).(LookupVocabularyResultOutput)
   132  }
   133  
   134  // A collection of arguments for invoking getVocabulary.
   135  type LookupVocabularyOutputArgs struct {
   136  	// Reference to the hosting Amazon Connect Instance
   137  	InstanceId pulumi.StringInput `pulumi:"instanceId"`
   138  	// Returns information on a specific Vocabulary by name
   139  	Name pulumi.StringPtrInput `pulumi:"name"`
   140  	// A map of tags to assign to the Vocabulary.
   141  	Tags pulumi.StringMapInput `pulumi:"tags"`
   142  	// Returns information on a specific Vocabulary by Vocabulary id
   143  	VocabularyId pulumi.StringPtrInput `pulumi:"vocabularyId"`
   144  }
   145  
   146  func (LookupVocabularyOutputArgs) ElementType() reflect.Type {
   147  	return reflect.TypeOf((*LookupVocabularyArgs)(nil)).Elem()
   148  }
   149  
   150  // A collection of values returned by getVocabulary.
   151  type LookupVocabularyResultOutput struct{ *pulumi.OutputState }
   152  
   153  func (LookupVocabularyResultOutput) ElementType() reflect.Type {
   154  	return reflect.TypeOf((*LookupVocabularyResult)(nil)).Elem()
   155  }
   156  
   157  func (o LookupVocabularyResultOutput) ToLookupVocabularyResultOutput() LookupVocabularyResultOutput {
   158  	return o
   159  }
   160  
   161  func (o LookupVocabularyResultOutput) ToLookupVocabularyResultOutputWithContext(ctx context.Context) LookupVocabularyResultOutput {
   162  	return o
   163  }
   164  
   165  // The Amazon Resource Name (ARN) of the Vocabulary.
   166  func (o LookupVocabularyResultOutput) Arn() pulumi.StringOutput {
   167  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.Arn }).(pulumi.StringOutput)
   168  }
   169  
   170  // The content of the custom vocabulary in plain-text format with a table of values. Each row in the table represents a word or a phrase, described with Phrase, IPA, SoundsLike, and DisplayAs fields. Separate the fields with TAB characters. For more information, see [Create a custom vocabulary using a table](https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html#create-vocabulary-table).
   171  func (o LookupVocabularyResultOutput) Content() pulumi.StringOutput {
   172  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.Content }).(pulumi.StringOutput)
   173  }
   174  
   175  // The reason why the custom vocabulary was not created.
   176  func (o LookupVocabularyResultOutput) FailureReason() pulumi.StringOutput {
   177  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.FailureReason }).(pulumi.StringOutput)
   178  }
   179  
   180  // The provider-assigned unique ID for this managed resource.
   181  func (o LookupVocabularyResultOutput) Id() pulumi.StringOutput {
   182  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.Id }).(pulumi.StringOutput)
   183  }
   184  
   185  func (o LookupVocabularyResultOutput) InstanceId() pulumi.StringOutput {
   186  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.InstanceId }).(pulumi.StringOutput)
   187  }
   188  
   189  // The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see [What is Amazon Transcribe?](https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html). Valid Values are `ar-AE`, `de-CH`, `de-DE`, `en-AB`, `en-AU`, `en-GB`, `en-IE`, `en-IN`, `en-US`, `en-WL`, `es-ES`, `es-US`, `fr-CA`, `fr-FR`, `hi-IN`, `it-IT`, `ja-JP`, `ko-KR`, `pt-BR`, `pt-PT`, `zh-CN`.
   190  func (o LookupVocabularyResultOutput) LanguageCode() pulumi.StringOutput {
   191  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.LanguageCode }).(pulumi.StringOutput)
   192  }
   193  
   194  // The timestamp when the custom vocabulary was last modified.
   195  func (o LookupVocabularyResultOutput) LastModifiedTime() pulumi.StringOutput {
   196  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.LastModifiedTime }).(pulumi.StringOutput)
   197  }
   198  
   199  func (o LookupVocabularyResultOutput) Name() pulumi.StringOutput {
   200  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.Name }).(pulumi.StringOutput)
   201  }
   202  
   203  // The current state of the custom vocabulary. Valid values are `CREATION_IN_PROGRESS`, `ACTIVE`, `CREATION_FAILED`, `DELETE_IN_PROGRESS`.
   204  func (o LookupVocabularyResultOutput) State() pulumi.StringOutput {
   205  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.State }).(pulumi.StringOutput)
   206  }
   207  
   208  // A map of tags to assign to the Vocabulary.
   209  func (o LookupVocabularyResultOutput) Tags() pulumi.StringMapOutput {
   210  	return o.ApplyT(func(v LookupVocabularyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   211  }
   212  
   213  // The identifier of the custom vocabulary.
   214  func (o LookupVocabularyResultOutput) VocabularyId() pulumi.StringOutput {
   215  	return o.ApplyT(func(v LookupVocabularyResult) string { return v.VocabularyId }).(pulumi.StringOutput)
   216  }
   217  
   218  func init() {
   219  	pulumi.RegisterOutputType(LookupVocabularyResultOutput{})
   220  }