UserTokenConfigurationProperty Struct
Provides the configuration information for a token.
If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use
UserTokenConfigurationsto configure user context policy, Amazon Kendra returns aValidationExceptionerror.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const userTokenConfigurationProperty: kendra.CfnIndex.UserTokenConfigurationProperty = {
jsonTokenTypeConfiguration: {
groupAttributeField: 'groupAttributeField',
userNameAttributeField: 'userNameAttributeField',
},
jwtTokenTypeConfiguration: {
keyLocation: 'keyLocation',
// the properties below are optional
claimRegex: 'claimRegex',
groupAttributeField: 'groupAttributeField',
issuer: 'issuer',
secretManagerArn: 'secretManagerArn',
url: 'url',
userNameAttributeField: 'userNameAttributeField',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_kendra as kendra
user_token_configuration_property = kendra.CfnIndex.UserTokenConfigurationProperty(
json_token_type_configuration=kendra.CfnIndex.JsonTokenTypeConfigurationProperty(
group_attribute_field="groupAttributeField",
user_name_attribute_field="userNameAttributeField"
),
jwt_token_type_configuration=kendra.CfnIndex.JwtTokenTypeConfigurationProperty(
key_location="keyLocation",
# the properties below are optional
claim_regex="claimRegex",
group_attribute_field="groupAttributeField",
issuer="issuer",
secret_manager_arn="secretManagerArn",
url="url",
user_name_attribute_field="userNameAttributeField"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.kendra.*;
UserTokenConfigurationProperty userTokenConfigurationProperty = UserTokenConfigurationProperty.builder()
.jsonTokenTypeConfiguration(JsonTokenTypeConfigurationProperty.builder()
.groupAttributeField("groupAttributeField")
.userNameAttributeField("userNameAttributeField")
.build())
.jwtTokenTypeConfiguration(JwtTokenTypeConfigurationProperty.builder()
.keyLocation("keyLocation")
// the properties below are optional
.claimRegex("claimRegex")
.groupAttributeField("groupAttributeField")
.issuer("issuer")
.secretManagerArn("secretManagerArn")
.url("url")
.userNameAttributeField("userNameAttributeField")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Kendra;
var userTokenConfigurationProperty = new UserTokenConfigurationProperty {
JsonTokenTypeConfiguration = new JsonTokenTypeConfigurationProperty {
GroupAttributeField = "groupAttributeField",
UserNameAttributeField = "userNameAttributeField"
},
JwtTokenTypeConfiguration = new JwtTokenTypeConfigurationProperty {
KeyLocation = "keyLocation",
// the properties below are optional
ClaimRegex = "claimRegex",
GroupAttributeField = "groupAttributeField",
Issuer = "issuer",
SecretManagerArn = "secretManagerArn",
Url = "url",
UserNameAttributeField = "userNameAttributeField"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
userTokenConfigurationProperty := &UserTokenConfigurationProperty{
JsonTokenTypeConfiguration: &JsonTokenTypeConfigurationProperty{
GroupAttributeField: jsii.String("groupAttributeField"),
UserNameAttributeField: jsii.String("userNameAttributeField"),
},
JwtTokenTypeConfiguration: &JwtTokenTypeConfigurationProperty{
KeyLocation: jsii.String("keyLocation"),
// the properties below are optional
ClaimRegex: jsii.String("claimRegex"),
GroupAttributeField: jsii.String("groupAttributeField"),
Issuer: jsii.String("issuer"),
SecretManagerArn: jsii.String("secretManagerArn"),
Url: jsii.String("url"),
UserNameAttributeField: jsii.String("userNameAttributeField"),
},
}
Properties
jsonTokenTypeConfigurationoptionalIResolvable | CfnIndex.json_token_type_configurationoptionaltyping.Union[IResolvable, JsonTokenTypeConfigurationProperty]jsonTokenTypeConfigurationoptionalIResolvableJsonTokenTypeConfigurationoptionalIResolvableJsonTokenTypeConfigurationoptionalinterface{} #Information about the JSON token type configuration.
jwtTokenTypeConfigurationoptionalIResolvable | CfnIndex.jwt_token_type_configurationoptionaltyping.Union[IResolvable, JwtTokenTypeConfigurationProperty]jwtTokenTypeConfigurationoptionalIResolvableJwtTokenTypeConfigurationoptionalIResolvableJwtTokenTypeConfigurationoptionalinterface{} #Information about the JWT token type configuration.