createRecipe method

Future<CreateRecipeResponse> createRecipe({
  1. required String name,
  2. required List<RecipeStep> steps,
  3. String? description,
  4. Map<String, String>? tags,
})

Creates a new DataBrew recipe.

May throw ConflictException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter name : A unique name for the recipe. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.

Parameter steps : An array containing the steps to be performed by the recipe. Each recipe step consists of one recipe action and (optionally) an array of condition expressions.

Parameter description : A description for the recipe.

Parameter tags : Metadata tags to apply to this recipe.

Implementation

Future<CreateRecipeResponse> createRecipe({
  required String name,
  required List<RecipeStep> steps,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'Steps': steps,
    if (description != null) 'Description': description,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/recipes',
    exceptionFnMap: _exceptionFns,
  );
  return CreateRecipeResponse.fromJson(response);
}