deleteSchema method

Future<void> deleteSchema({
  1. required String schemaArn,
})

Deletes a schema. Before deleting a schema, you must delete all datasets referencing the schema. For more information on schemas, see CreateSchema.

May throw InvalidInputException. May throw ResourceNotFoundException. May throw ResourceInUseException.

Parameter schemaArn : The Amazon Resource Name (ARN) of the schema to delete.

Implementation

Future<void> deleteSchema({
  required String schemaArn,
}) async {
  ArgumentError.checkNotNull(schemaArn, 'schemaArn');
  _s.validateStringLength(
    'schemaArn',
    schemaArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonPersonalize.DeleteSchema'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'schemaArn': schemaArn,
    },
  );
}