github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kendra/getIndex.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 kendra 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 Kendra Index. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := kendra.LookupIndex(ctx, &kendra.LookupIndexArgs{ 32 // Id: "12345678-1234-1234-1234-123456789123", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupIndex(ctx *pulumi.Context, args *LookupIndexArgs, opts ...pulumi.InvokeOption) (*LookupIndexResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupIndexResult 46 err := ctx.Invoke("aws:kendra/getIndex:getIndex", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getIndex. 54 type LookupIndexArgs struct { 55 // Returns information on a specific Index by id. 56 Id string `pulumi:"id"` 57 // Metadata that helps organize the Indices you create. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getIndex. 62 type LookupIndexResult struct { 63 // ARN of the Index. 64 Arn string `pulumi:"arn"` 65 // Block that sets the number of additional document storage and query capacity units that should be used by the index. Documented below. 66 CapacityUnits []GetIndexCapacityUnit `pulumi:"capacityUnits"` 67 // Unix datetime that the index was created. 68 CreatedAt string `pulumi:"createdAt"` 69 // Description of the Index. 70 Description string `pulumi:"description"` 71 // One or more blocks that specify the configuration settings for any metadata applied to the documents in the index. Documented below. 72 DocumentMetadataConfigurationUpdates []GetIndexDocumentMetadataConfigurationUpdate `pulumi:"documentMetadataConfigurationUpdates"` 73 // Amazon Kendra edition for the index. 74 Edition string `pulumi:"edition"` 75 // When the Status field value is `FAILED`, this contains a message that explains why. 76 ErrorMessage string `pulumi:"errorMessage"` 77 // Identifier of the Index. 78 Id string `pulumi:"id"` 79 // Block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Documented below. 80 IndexStatistics []GetIndexIndexStatistic `pulumi:"indexStatistics"` 81 // Name of the index field. Minimum length of 1. Maximum length of 30. 82 Name string `pulumi:"name"` 83 // An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role you use when you call the `BatchPutDocument` API to index documents from an Amazon S3 bucket. 84 RoleArn string `pulumi:"roleArn"` 85 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Documented below. 86 ServerSideEncryptionConfigurations []GetIndexServerSideEncryptionConfiguration `pulumi:"serverSideEncryptionConfigurations"` 87 // Current status of the index. When the value is `ACTIVE`, the index is ready for use. If the Status field value is `FAILED`, the `errorMessage` field contains a message that explains why. 88 Status string `pulumi:"status"` 89 // Metadata that helps organize the Indices you create. 90 Tags map[string]string `pulumi:"tags"` 91 // Unix datetime that the index was last updated. 92 UpdatedAt string `pulumi:"updatedAt"` 93 // User context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). 94 UserContextPolicy string `pulumi:"userContextPolicy"` 95 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. Documented below. 96 UserGroupResolutionConfigurations []GetIndexUserGroupResolutionConfiguration `pulumi:"userGroupResolutionConfigurations"` 97 // A block that specifies the user token configuration. Documented below. 98 UserTokenConfigurations []GetIndexUserTokenConfiguration `pulumi:"userTokenConfigurations"` 99 } 100 101 func LookupIndexOutput(ctx *pulumi.Context, args LookupIndexOutputArgs, opts ...pulumi.InvokeOption) LookupIndexResultOutput { 102 return pulumi.ToOutputWithContext(context.Background(), args). 103 ApplyT(func(v interface{}) (LookupIndexResult, error) { 104 args := v.(LookupIndexArgs) 105 r, err := LookupIndex(ctx, &args, opts...) 106 var s LookupIndexResult 107 if r != nil { 108 s = *r 109 } 110 return s, err 111 }).(LookupIndexResultOutput) 112 } 113 114 // A collection of arguments for invoking getIndex. 115 type LookupIndexOutputArgs struct { 116 // Returns information on a specific Index by id. 117 Id pulumi.StringInput `pulumi:"id"` 118 // Metadata that helps organize the Indices you create. 119 Tags pulumi.StringMapInput `pulumi:"tags"` 120 } 121 122 func (LookupIndexOutputArgs) ElementType() reflect.Type { 123 return reflect.TypeOf((*LookupIndexArgs)(nil)).Elem() 124 } 125 126 // A collection of values returned by getIndex. 127 type LookupIndexResultOutput struct{ *pulumi.OutputState } 128 129 func (LookupIndexResultOutput) ElementType() reflect.Type { 130 return reflect.TypeOf((*LookupIndexResult)(nil)).Elem() 131 } 132 133 func (o LookupIndexResultOutput) ToLookupIndexResultOutput() LookupIndexResultOutput { 134 return o 135 } 136 137 func (o LookupIndexResultOutput) ToLookupIndexResultOutputWithContext(ctx context.Context) LookupIndexResultOutput { 138 return o 139 } 140 141 // ARN of the Index. 142 func (o LookupIndexResultOutput) Arn() pulumi.StringOutput { 143 return o.ApplyT(func(v LookupIndexResult) string { return v.Arn }).(pulumi.StringOutput) 144 } 145 146 // Block that sets the number of additional document storage and query capacity units that should be used by the index. Documented below. 147 func (o LookupIndexResultOutput) CapacityUnits() GetIndexCapacityUnitArrayOutput { 148 return o.ApplyT(func(v LookupIndexResult) []GetIndexCapacityUnit { return v.CapacityUnits }).(GetIndexCapacityUnitArrayOutput) 149 } 150 151 // Unix datetime that the index was created. 152 func (o LookupIndexResultOutput) CreatedAt() pulumi.StringOutput { 153 return o.ApplyT(func(v LookupIndexResult) string { return v.CreatedAt }).(pulumi.StringOutput) 154 } 155 156 // Description of the Index. 157 func (o LookupIndexResultOutput) Description() pulumi.StringOutput { 158 return o.ApplyT(func(v LookupIndexResult) string { return v.Description }).(pulumi.StringOutput) 159 } 160 161 // One or more blocks that specify the configuration settings for any metadata applied to the documents in the index. Documented below. 162 func (o LookupIndexResultOutput) DocumentMetadataConfigurationUpdates() GetIndexDocumentMetadataConfigurationUpdateArrayOutput { 163 return o.ApplyT(func(v LookupIndexResult) []GetIndexDocumentMetadataConfigurationUpdate { 164 return v.DocumentMetadataConfigurationUpdates 165 }).(GetIndexDocumentMetadataConfigurationUpdateArrayOutput) 166 } 167 168 // Amazon Kendra edition for the index. 169 func (o LookupIndexResultOutput) Edition() pulumi.StringOutput { 170 return o.ApplyT(func(v LookupIndexResult) string { return v.Edition }).(pulumi.StringOutput) 171 } 172 173 // When the Status field value is `FAILED`, this contains a message that explains why. 174 func (o LookupIndexResultOutput) ErrorMessage() pulumi.StringOutput { 175 return o.ApplyT(func(v LookupIndexResult) string { return v.ErrorMessage }).(pulumi.StringOutput) 176 } 177 178 // Identifier of the Index. 179 func (o LookupIndexResultOutput) Id() pulumi.StringOutput { 180 return o.ApplyT(func(v LookupIndexResult) string { return v.Id }).(pulumi.StringOutput) 181 } 182 183 // Block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Documented below. 184 func (o LookupIndexResultOutput) IndexStatistics() GetIndexIndexStatisticArrayOutput { 185 return o.ApplyT(func(v LookupIndexResult) []GetIndexIndexStatistic { return v.IndexStatistics }).(GetIndexIndexStatisticArrayOutput) 186 } 187 188 // Name of the index field. Minimum length of 1. Maximum length of 30. 189 func (o LookupIndexResultOutput) Name() pulumi.StringOutput { 190 return o.ApplyT(func(v LookupIndexResult) string { return v.Name }).(pulumi.StringOutput) 191 } 192 193 // An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role you use when you call the `BatchPutDocument` API to index documents from an Amazon S3 bucket. 194 func (o LookupIndexResultOutput) RoleArn() pulumi.StringOutput { 195 return o.ApplyT(func(v LookupIndexResult) string { return v.RoleArn }).(pulumi.StringOutput) 196 } 197 198 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Documented below. 199 func (o LookupIndexResultOutput) ServerSideEncryptionConfigurations() GetIndexServerSideEncryptionConfigurationArrayOutput { 200 return o.ApplyT(func(v LookupIndexResult) []GetIndexServerSideEncryptionConfiguration { 201 return v.ServerSideEncryptionConfigurations 202 }).(GetIndexServerSideEncryptionConfigurationArrayOutput) 203 } 204 205 // Current status of the index. When the value is `ACTIVE`, the index is ready for use. If the Status field value is `FAILED`, the `errorMessage` field contains a message that explains why. 206 func (o LookupIndexResultOutput) Status() pulumi.StringOutput { 207 return o.ApplyT(func(v LookupIndexResult) string { return v.Status }).(pulumi.StringOutput) 208 } 209 210 // Metadata that helps organize the Indices you create. 211 func (o LookupIndexResultOutput) Tags() pulumi.StringMapOutput { 212 return o.ApplyT(func(v LookupIndexResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 213 } 214 215 // Unix datetime that the index was last updated. 216 func (o LookupIndexResultOutput) UpdatedAt() pulumi.StringOutput { 217 return o.ApplyT(func(v LookupIndexResult) string { return v.UpdatedAt }).(pulumi.StringOutput) 218 } 219 220 // User context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). 221 func (o LookupIndexResultOutput) UserContextPolicy() pulumi.StringOutput { 222 return o.ApplyT(func(v LookupIndexResult) string { return v.UserContextPolicy }).(pulumi.StringOutput) 223 } 224 225 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. Documented below. 226 func (o LookupIndexResultOutput) UserGroupResolutionConfigurations() GetIndexUserGroupResolutionConfigurationArrayOutput { 227 return o.ApplyT(func(v LookupIndexResult) []GetIndexUserGroupResolutionConfiguration { 228 return v.UserGroupResolutionConfigurations 229 }).(GetIndexUserGroupResolutionConfigurationArrayOutput) 230 } 231 232 // A block that specifies the user token configuration. Documented below. 233 func (o LookupIndexResultOutput) UserTokenConfigurations() GetIndexUserTokenConfigurationArrayOutput { 234 return o.ApplyT(func(v LookupIndexResult) []GetIndexUserTokenConfiguration { return v.UserTokenConfigurations }).(GetIndexUserTokenConfigurationArrayOutput) 235 } 236 237 func init() { 238 pulumi.RegisterOutputType(LookupIndexResultOutput{}) 239 }