Skip to content

publish_recipe

publish_recipe(
    name: RecipeName,
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    description: Optional[RecipeDescription] = None,
) -> PublishRecipeResponse

Publishes a new version of a DataBrew recipe.

Parameters:

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

    A description of the recipe to be published, for this version of the recipe.

  • name (RecipeName) –

    The name of the recipe to be published.

Raises:

Source code in docs_src/capo_databrew/_services/data_brew.py
def publish_recipe(
    self,
    name: "capo_databrew.types.recipe_name.RecipeName",
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    description: Optional[
        "capo_databrew.types.recipe_description.RecipeDescription"
    ] = None,
) -> "capo_databrew.types.publish_recipe_response.PublishRecipeResponse":
    """<p>Publishes a new version of a DataBrew recipe.</p>

    Args:
        description: <p>A description of the recipe to be published, for this version of the recipe.</p>
        name: <p>The name of the recipe to be published.</p>

    Raises:
        capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</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.
    """

    def _handler(
        req: "OperationRequest[capo_databrew.types.publish_recipe_request.PublishRecipeRequest]",
    ) -> OperationResponse[
        "capo_databrew.types.publish_recipe_response.PublishRecipeResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.publish_recipe

        output, http_response = (
            capo_databrew._operations.aws_glue_data_brew.publish_recipe.publish_recipe(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PublishRecipe")
    )
    input_: capo_databrew.types.publish_recipe_request.PublishRecipeRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output