createComplianceInquiry method
Create a new compliance inquiry.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter inquiryContent :
Content for creating a compliance inquiry - either a single query or file
content.
Parameter name :
Title of the inquiry.
Parameter clientToken :
Idempotency token for the request.
Parameter supportMode :
Support mode for inquiry processing. Only supported for file upload mode.
Defaults to AI_ONLY if not specified.
Parameter tags :
Tags to associate with the compliance inquiry resource.
Implementation
Future<CreateComplianceInquiryResponse> createComplianceInquiry({
required InquiryContent inquiryContent,
required String name,
String? clientToken,
InquirySupportMode? supportMode,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'inquiryContent': inquiryContent,
'name': name,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (supportMode != null) 'supportMode': supportMode.value,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/compliance-inquiry/create',
exceptionFnMap: _exceptionFns,
);
return CreateComplianceInquiryResponse.fromJson(response);
}