updateIndex method
- required String id,
- CapacityUnitsConfiguration? capacityUnits,
- String? description,
- List<
DocumentMetadataConfiguration> ? documentMetadataConfigurationUpdates, - String? name,
- String? roleArn,
- UserContextPolicy? userContextPolicy,
- List<
UserTokenConfiguration> ? userTokenConfigurations,
Updates an existing Amazon Kendra index.
May throw ValidationException. May throw ConflictException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw AccessDeniedException. May throw ServiceQuotaExceededException. May throw InternalServerException.
Parameter id
:
The identifier of the index to update.
Parameter capacityUnits
:
Sets the number of addtional storage and query capacity units that should
be used by the index. You can change the capacity of the index up to 5
times per day.
If you are using extra storage units, you can't reduce the storage capacity below that required to meet the storage needs for your index.
Parameter description
:
A new description for the index.
Parameter documentMetadataConfigurationUpdates
:
The document metadata to update.
Parameter name
:
The name of the index to update.
Parameter roleArn
:
A new IAM role that gives Amazon Kendra permission to access your Amazon
CloudWatch logs.
Parameter userContextPolicy
:
The user user token context policy.
Parameter userTokenConfigurations
:
The user token configuration.
Implementation
Future<void> updateIndex({
required String id,
CapacityUnitsConfiguration? capacityUnits,
String? description,
List<DocumentMetadataConfiguration>? documentMetadataConfigurationUpdates,
String? name,
String? roleArn,
UserContextPolicy? userContextPolicy,
List<UserTokenConfiguration>? userTokenConfigurations,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
36,
36,
isRequired: true,
);
_s.validateStringLength(
'description',
description,
0,
1000,
);
_s.validateStringLength(
'name',
name,
1,
1000,
);
_s.validateStringLength(
'roleArn',
roleArn,
1,
1284,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.UpdateIndex'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
if (capacityUnits != null) 'CapacityUnits': capacityUnits,
if (description != null) 'Description': description,
if (documentMetadataConfigurationUpdates != null)
'DocumentMetadataConfigurationUpdates':
documentMetadataConfigurationUpdates,
if (name != null) 'Name': name,
if (roleArn != null) 'RoleArn': roleArn,
if (userContextPolicy != null)
'UserContextPolicy': userContextPolicy.toValue(),
if (userTokenConfigurations != null)
'UserTokenConfigurations': userTokenConfigurations,
},
);
}