deleteAIGuardrailVersion method

Future<void> deleteAIGuardrailVersion({
  1. required String aiGuardrailId,
  2. required String assistantId,
  3. required int versionNumber,
})

Delete and Amazon Q in Connect AI Guardrail version.

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter aiGuardrailId : The identifier of the Amazon Q in Connect AI Guardrail.

Parameter assistantId : The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

Parameter versionNumber : The version number of the AI Guardrail version to be deleted.

Implementation

Future<void> deleteAIGuardrailVersion({
  required String aiGuardrailId,
  required String assistantId,
  required int versionNumber,
}) async {
  _s.validateNumRange(
    'versionNumber',
    versionNumber,
    1,
    1152921504606846976,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/assistants/${Uri.encodeComponent(assistantId)}/aiguardrails/${Uri.encodeComponent(aiGuardrailId)}/versions/${Uri.encodeComponent(versionNumber.toString())}',
    exceptionFnMap: _exceptionFns,
  );
}