github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kendra/experience.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 "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 Kendra Experience. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := kendra.NewExperience(ctx, "example", &kendra.ExperienceArgs{ 35 // IndexId: pulumi.Any(exampleAwsKendraIndex.Id), 36 // Description: pulumi.String("My Kendra Experience"), 37 // Name: pulumi.String("example"), 38 // RoleArn: pulumi.Any(exampleAwsIamRole.Arn), 39 // Configuration: &kendra.ExperienceConfigurationArgs{ 40 // ContentSourceConfiguration: &kendra.ExperienceConfigurationContentSourceConfigurationArgs{ 41 // DirectPutContent: pulumi.Bool(true), 42 // FaqIds: pulumi.StringArray{ 43 // exampleAwsKendraFaq.FaqId, 44 // }, 45 // }, 46 // UserIdentityConfiguration: &kendra.ExperienceConfigurationUserIdentityConfigurationArgs{ 47 // IdentityAttributeName: pulumi.String("12345ec453-1546651e-79c4-4554-91fa-00b43ccfa245"), 48 // }, 49 // }, 50 // }) 51 // if err != nil { 52 // return err 53 // } 54 // return nil 55 // }) 56 // } 57 // 58 // ``` 59 // <!--End PulumiCodeChooser --> 60 // 61 // ## Import 62 // 63 // Using `pulumi import`, import Kendra Experience using the unique identifiers of the experience and index separated by a slash (`/`). For example: 64 // 65 // ```sh 66 // $ pulumi import aws:kendra/experience:Experience example 1045d08d-66ef-4882-b3ed-dfb7df183e90/b34dfdf7-1f2b-4704-9581-79e00296845f 67 // ``` 68 type Experience struct { 69 pulumi.CustomResourceState 70 71 // ARN of the Experience. 72 Arn pulumi.StringOutput `pulumi:"arn"` 73 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 74 Configuration ExperienceConfigurationOutput `pulumi:"configuration"` 75 // A description for your Amazon Kendra experience. 76 Description pulumi.StringPtrOutput `pulumi:"description"` 77 // Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by AWS. 78 Endpoints ExperienceEndpointArrayOutput `pulumi:"endpoints"` 79 // The unique identifier of the experience. 80 ExperienceId pulumi.StringOutput `pulumi:"experienceId"` 81 // The identifier of the index for your Amazon Kendra experience. 82 IndexId pulumi.StringOutput `pulumi:"indexId"` 83 // A name for your Amazon Kendra experience. 84 Name pulumi.StringOutput `pulumi:"name"` 85 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 86 // 87 // The following arguments are optional: 88 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 89 // The current processing status of your Amazon Kendra experience. 90 Status pulumi.StringOutput `pulumi:"status"` 91 } 92 93 // NewExperience registers a new resource with the given unique name, arguments, and options. 94 func NewExperience(ctx *pulumi.Context, 95 name string, args *ExperienceArgs, opts ...pulumi.ResourceOption) (*Experience, error) { 96 if args == nil { 97 return nil, errors.New("missing one or more required arguments") 98 } 99 100 if args.IndexId == nil { 101 return nil, errors.New("invalid value for required argument 'IndexId'") 102 } 103 if args.RoleArn == nil { 104 return nil, errors.New("invalid value for required argument 'RoleArn'") 105 } 106 opts = internal.PkgResourceDefaultOpts(opts) 107 var resource Experience 108 err := ctx.RegisterResource("aws:kendra/experience:Experience", name, args, &resource, opts...) 109 if err != nil { 110 return nil, err 111 } 112 return &resource, nil 113 } 114 115 // GetExperience gets an existing Experience resource's state with the given name, ID, and optional 116 // state properties that are used to uniquely qualify the lookup (nil if not required). 117 func GetExperience(ctx *pulumi.Context, 118 name string, id pulumi.IDInput, state *ExperienceState, opts ...pulumi.ResourceOption) (*Experience, error) { 119 var resource Experience 120 err := ctx.ReadResource("aws:kendra/experience:Experience", name, id, state, &resource, opts...) 121 if err != nil { 122 return nil, err 123 } 124 return &resource, nil 125 } 126 127 // Input properties used for looking up and filtering Experience resources. 128 type experienceState struct { 129 // ARN of the Experience. 130 Arn *string `pulumi:"arn"` 131 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 132 Configuration *ExperienceConfiguration `pulumi:"configuration"` 133 // A description for your Amazon Kendra experience. 134 Description *string `pulumi:"description"` 135 // Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by AWS. 136 Endpoints []ExperienceEndpoint `pulumi:"endpoints"` 137 // The unique identifier of the experience. 138 ExperienceId *string `pulumi:"experienceId"` 139 // The identifier of the index for your Amazon Kendra experience. 140 IndexId *string `pulumi:"indexId"` 141 // A name for your Amazon Kendra experience. 142 Name *string `pulumi:"name"` 143 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 144 // 145 // The following arguments are optional: 146 RoleArn *string `pulumi:"roleArn"` 147 // The current processing status of your Amazon Kendra experience. 148 Status *string `pulumi:"status"` 149 } 150 151 type ExperienceState struct { 152 // ARN of the Experience. 153 Arn pulumi.StringPtrInput 154 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 155 Configuration ExperienceConfigurationPtrInput 156 // A description for your Amazon Kendra experience. 157 Description pulumi.StringPtrInput 158 // Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by AWS. 159 Endpoints ExperienceEndpointArrayInput 160 // The unique identifier of the experience. 161 ExperienceId pulumi.StringPtrInput 162 // The identifier of the index for your Amazon Kendra experience. 163 IndexId pulumi.StringPtrInput 164 // A name for your Amazon Kendra experience. 165 Name pulumi.StringPtrInput 166 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 167 // 168 // The following arguments are optional: 169 RoleArn pulumi.StringPtrInput 170 // The current processing status of your Amazon Kendra experience. 171 Status pulumi.StringPtrInput 172 } 173 174 func (ExperienceState) ElementType() reflect.Type { 175 return reflect.TypeOf((*experienceState)(nil)).Elem() 176 } 177 178 type experienceArgs struct { 179 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 180 Configuration *ExperienceConfiguration `pulumi:"configuration"` 181 // A description for your Amazon Kendra experience. 182 Description *string `pulumi:"description"` 183 // The identifier of the index for your Amazon Kendra experience. 184 IndexId string `pulumi:"indexId"` 185 // A name for your Amazon Kendra experience. 186 Name *string `pulumi:"name"` 187 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 188 // 189 // The following arguments are optional: 190 RoleArn string `pulumi:"roleArn"` 191 } 192 193 // The set of arguments for constructing a Experience resource. 194 type ExperienceArgs struct { 195 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 196 Configuration ExperienceConfigurationPtrInput 197 // A description for your Amazon Kendra experience. 198 Description pulumi.StringPtrInput 199 // The identifier of the index for your Amazon Kendra experience. 200 IndexId pulumi.StringInput 201 // A name for your Amazon Kendra experience. 202 Name pulumi.StringPtrInput 203 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 204 // 205 // The following arguments are optional: 206 RoleArn pulumi.StringInput 207 } 208 209 func (ExperienceArgs) ElementType() reflect.Type { 210 return reflect.TypeOf((*experienceArgs)(nil)).Elem() 211 } 212 213 type ExperienceInput interface { 214 pulumi.Input 215 216 ToExperienceOutput() ExperienceOutput 217 ToExperienceOutputWithContext(ctx context.Context) ExperienceOutput 218 } 219 220 func (*Experience) ElementType() reflect.Type { 221 return reflect.TypeOf((**Experience)(nil)).Elem() 222 } 223 224 func (i *Experience) ToExperienceOutput() ExperienceOutput { 225 return i.ToExperienceOutputWithContext(context.Background()) 226 } 227 228 func (i *Experience) ToExperienceOutputWithContext(ctx context.Context) ExperienceOutput { 229 return pulumi.ToOutputWithContext(ctx, i).(ExperienceOutput) 230 } 231 232 // ExperienceArrayInput is an input type that accepts ExperienceArray and ExperienceArrayOutput values. 233 // You can construct a concrete instance of `ExperienceArrayInput` via: 234 // 235 // ExperienceArray{ ExperienceArgs{...} } 236 type ExperienceArrayInput interface { 237 pulumi.Input 238 239 ToExperienceArrayOutput() ExperienceArrayOutput 240 ToExperienceArrayOutputWithContext(context.Context) ExperienceArrayOutput 241 } 242 243 type ExperienceArray []ExperienceInput 244 245 func (ExperienceArray) ElementType() reflect.Type { 246 return reflect.TypeOf((*[]*Experience)(nil)).Elem() 247 } 248 249 func (i ExperienceArray) ToExperienceArrayOutput() ExperienceArrayOutput { 250 return i.ToExperienceArrayOutputWithContext(context.Background()) 251 } 252 253 func (i ExperienceArray) ToExperienceArrayOutputWithContext(ctx context.Context) ExperienceArrayOutput { 254 return pulumi.ToOutputWithContext(ctx, i).(ExperienceArrayOutput) 255 } 256 257 // ExperienceMapInput is an input type that accepts ExperienceMap and ExperienceMapOutput values. 258 // You can construct a concrete instance of `ExperienceMapInput` via: 259 // 260 // ExperienceMap{ "key": ExperienceArgs{...} } 261 type ExperienceMapInput interface { 262 pulumi.Input 263 264 ToExperienceMapOutput() ExperienceMapOutput 265 ToExperienceMapOutputWithContext(context.Context) ExperienceMapOutput 266 } 267 268 type ExperienceMap map[string]ExperienceInput 269 270 func (ExperienceMap) ElementType() reflect.Type { 271 return reflect.TypeOf((*map[string]*Experience)(nil)).Elem() 272 } 273 274 func (i ExperienceMap) ToExperienceMapOutput() ExperienceMapOutput { 275 return i.ToExperienceMapOutputWithContext(context.Background()) 276 } 277 278 func (i ExperienceMap) ToExperienceMapOutputWithContext(ctx context.Context) ExperienceMapOutput { 279 return pulumi.ToOutputWithContext(ctx, i).(ExperienceMapOutput) 280 } 281 282 type ExperienceOutput struct{ *pulumi.OutputState } 283 284 func (ExperienceOutput) ElementType() reflect.Type { 285 return reflect.TypeOf((**Experience)(nil)).Elem() 286 } 287 288 func (o ExperienceOutput) ToExperienceOutput() ExperienceOutput { 289 return o 290 } 291 292 func (o ExperienceOutput) ToExperienceOutputWithContext(ctx context.Context) ExperienceOutput { 293 return o 294 } 295 296 // ARN of the Experience. 297 func (o ExperienceOutput) Arn() pulumi.StringOutput { 298 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 299 } 300 301 // Configuration information for your Amazon Kendra experience. The provider will only perform drift detection of its value when present in a configuration. Detailed below. 302 func (o ExperienceOutput) Configuration() ExperienceConfigurationOutput { 303 return o.ApplyT(func(v *Experience) ExperienceConfigurationOutput { return v.Configuration }).(ExperienceConfigurationOutput) 304 } 305 306 // A description for your Amazon Kendra experience. 307 func (o ExperienceOutput) Description() pulumi.StringPtrOutput { 308 return o.ApplyT(func(v *Experience) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 309 } 310 311 // Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by AWS. 312 func (o ExperienceOutput) Endpoints() ExperienceEndpointArrayOutput { 313 return o.ApplyT(func(v *Experience) ExperienceEndpointArrayOutput { return v.Endpoints }).(ExperienceEndpointArrayOutput) 314 } 315 316 // The unique identifier of the experience. 317 func (o ExperienceOutput) ExperienceId() pulumi.StringOutput { 318 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.ExperienceId }).(pulumi.StringOutput) 319 } 320 321 // The identifier of the index for your Amazon Kendra experience. 322 func (o ExperienceOutput) IndexId() pulumi.StringOutput { 323 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.IndexId }).(pulumi.StringOutput) 324 } 325 326 // A name for your Amazon Kendra experience. 327 func (o ExperienceOutput) Name() pulumi.StringOutput { 328 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 329 } 330 331 // The Amazon Resource Name (ARN) of a role with permission to access `Query API`, `QuerySuggestions API`, `SubmitFeedback API`, and `AWS SSO` that stores your user and group information. For more information, see [IAM roles for Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 332 // 333 // The following arguments are optional: 334 func (o ExperienceOutput) RoleArn() pulumi.StringOutput { 335 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 336 } 337 338 // The current processing status of your Amazon Kendra experience. 339 func (o ExperienceOutput) Status() pulumi.StringOutput { 340 return o.ApplyT(func(v *Experience) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 341 } 342 343 type ExperienceArrayOutput struct{ *pulumi.OutputState } 344 345 func (ExperienceArrayOutput) ElementType() reflect.Type { 346 return reflect.TypeOf((*[]*Experience)(nil)).Elem() 347 } 348 349 func (o ExperienceArrayOutput) ToExperienceArrayOutput() ExperienceArrayOutput { 350 return o 351 } 352 353 func (o ExperienceArrayOutput) ToExperienceArrayOutputWithContext(ctx context.Context) ExperienceArrayOutput { 354 return o 355 } 356 357 func (o ExperienceArrayOutput) Index(i pulumi.IntInput) ExperienceOutput { 358 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Experience { 359 return vs[0].([]*Experience)[vs[1].(int)] 360 }).(ExperienceOutput) 361 } 362 363 type ExperienceMapOutput struct{ *pulumi.OutputState } 364 365 func (ExperienceMapOutput) ElementType() reflect.Type { 366 return reflect.TypeOf((*map[string]*Experience)(nil)).Elem() 367 } 368 369 func (o ExperienceMapOutput) ToExperienceMapOutput() ExperienceMapOutput { 370 return o 371 } 372 373 func (o ExperienceMapOutput) ToExperienceMapOutputWithContext(ctx context.Context) ExperienceMapOutput { 374 return o 375 } 376 377 func (o ExperienceMapOutput) MapIndex(k pulumi.StringInput) ExperienceOutput { 378 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Experience { 379 return vs[0].(map[string]*Experience)[vs[1].(string)] 380 }).(ExperienceOutput) 381 } 382 383 func init() { 384 pulumi.RegisterInputType(reflect.TypeOf((*ExperienceInput)(nil)).Elem(), &Experience{}) 385 pulumi.RegisterInputType(reflect.TypeOf((*ExperienceArrayInput)(nil)).Elem(), ExperienceArray{}) 386 pulumi.RegisterInputType(reflect.TypeOf((*ExperienceMapInput)(nil)).Elem(), ExperienceMap{}) 387 pulumi.RegisterOutputType(ExperienceOutput{}) 388 pulumi.RegisterOutputType(ExperienceArrayOutput{}) 389 pulumi.RegisterOutputType(ExperienceMapOutput{}) 390 }