Skip to content

create_recipe async

create_recipe(
    name: RecipeName,
    steps: RecipeStepList,
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = None,
    description: Optional[RecipeDescription] = None,
    tags: Optional[TagMap] = None,
) -> CreateRecipeResponse

Creates a new DataBrew recipe.

Parameters:

  • description (Optional[RecipeDescription], default: None ) –

    A description for the recipe.

  • name (RecipeName) –

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

  • steps (RecipeStepList) –

    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.

  • tags (Optional[TagMap], default: None ) –

    Metadata tags to apply to this recipe.

Raises:

Source code in docs_src/capo_databrew/_services/async_data_brew.py
async def create_recipe(
    self,
    name: "capo_databrew.types.recipe_name.RecipeName",
    steps: "capo_databrew.types.recipe_step_list.RecipeStepList",
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = None,
    description: Optional[
        "capo_databrew.types.recipe_description.RecipeDescription"
    ] = None,
    tags: Optional["capo_databrew.types.tag_map.TagMap"] = None,
) -> "capo_databrew.types.create_recipe_response.CreateRecipeResponse":
    """<p>Creates a new DataBrew recipe.</p>

    Args:
        description: <p>A description for the recipe.</p>
        name: <p>A unique name for the recipe. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
        steps: <p>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.</p>
        tags: <p>Metadata tags to apply to this recipe.</p>

    Raises:
        capo_databrew.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_databrew.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota is exceeded.</p>
        capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
        capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_databrew.types.create_recipe_request.CreateRecipeRequest]",
    ) -> AsyncOperationResponse[
        "capo_databrew.types.create_recipe_response.CreateRecipeResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.create_recipe

        (
            output,
            http_response,
        ) = await capo_databrew._operations.aws_glue_data_brew.create_recipe.async_create_recipe(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRecipe")
    )
    input_: capo_databrew.types.create_recipe_request.CreateRecipeRequest = {
        "name": name,
        "steps": steps,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output