updateThreatEntitySet method

Future<void> updateThreatEntitySet({
  1. required String detectorId,
  2. required String threatEntitySetId,
  3. bool? activate,
  4. String? expectedBucketOwner,
  5. String? location,
  6. String? name,
})

Updates the threat entity set associated with the specified threatEntitySetId.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter detectorId : The unique ID of the GuardDuty detector associated with the threat entity set that you want to update.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Parameter threatEntitySetId : The ID returned by GuardDuty after updating the threat entity set resource.

Parameter activate : A boolean value that indicates whether GuardDuty is to start using this updated threat entity set. After you update an entity set, you will need to activate it again. It might take up to 15 minutes for the updated entity set to be effective.

Parameter expectedBucketOwner : The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the location parameter.

Parameter location : The URI of the file that contains the trusted entity set.

Parameter name : A user-friendly name to identify the trusted entity set.

The name of your list can include lowercase letters, uppercase letters, numbers, dash (-), and underscore (_).

Implementation

Future<void> updateThreatEntitySet({
  required String detectorId,
  required String threatEntitySetId,
  bool? activate,
  String? expectedBucketOwner,
  String? location,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (activate != null) 'activate': activate,
    if (expectedBucketOwner != null)
      'expectedBucketOwner': expectedBucketOwner,
    if (location != null) 'location': location,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/detector/${Uri.encodeComponent(detectorId)}/threatentityset/${Uri.encodeComponent(threatEntitySetId)}',
    exceptionFnMap: _exceptionFns,
  );
}