updateThreatIntelSet method
Updates the ThreatIntelSet specified by the ThreatIntelSet ID.
May throw BadRequestException. May throw InternalServerErrorException.
Parameter detectorId
:
The detectorID that specifies the GuardDuty service whose ThreatIntelSet
you want to update.
Parameter threatIntelSetId
:
The unique ID that specifies the ThreatIntelSet that you want to update.
Parameter activate
:
The updated Boolean value that specifies whether the ThreateIntelSet is
active or not.
Parameter location
:
The updated URI of the file that contains the ThreateIntelSet.
Parameter name
:
The unique ID that specifies the ThreatIntelSet that you want to update.
Implementation
Future<void> updateThreatIntelSet({
required String detectorId,
required String threatIntelSetId,
bool? activate,
String? location,
String? name,
}) async {
ArgumentError.checkNotNull(detectorId, 'detectorId');
_s.validateStringLength(
'detectorId',
detectorId,
1,
300,
isRequired: true,
);
ArgumentError.checkNotNull(threatIntelSetId, 'threatIntelSetId');
_s.validateStringLength(
'location',
location,
1,
300,
);
_s.validateStringLength(
'name',
name,
1,
300,
);
final $payload = <String, dynamic>{
if (activate != null) 'activate': activate,
if (location != null) 'location': location,
if (name != null) 'name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/detector/${Uri.encodeComponent(detectorId)}/threatintelset/${Uri.encodeComponent(threatIntelSetId)}',
exceptionFnMap: _exceptionFns,
);
}