putEnforcedGuardrailConfiguration method

Future<PutEnforcedGuardrailConfigurationResponse> putEnforcedGuardrailConfiguration({
  1. required AccountEnforcedGuardrailInferenceInputConfiguration guardrailInferenceConfig,
  2. String? configId,
})

Sets the account-level enforced guardrail configuration.

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

Parameter guardrailInferenceConfig : Account-level enforced guardrail input configuration.

Parameter configId : Unique ID for the account enforced configuration.

Implementation

Future<PutEnforcedGuardrailConfigurationResponse>
    putEnforcedGuardrailConfiguration({
  required AccountEnforcedGuardrailInferenceInputConfiguration
      guardrailInferenceConfig,
  String? configId,
}) async {
  final $payload = <String, dynamic>{
    'guardrailInferenceConfig': guardrailInferenceConfig,
    if (configId != null) 'configId': configId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/enforcedGuardrailsConfiguration',
    exceptionFnMap: _exceptionFns,
  );
  return PutEnforcedGuardrailConfigurationResponse.fromJson(response);
}