Skip to content

create_project

create_project(
    dataset_name: DatasetName,
    name: ProjectName,
    recipe_name: RecipeName,
    role_arn: Arn,
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    sample: Optional[Sample] = None,
    tags: Optional[TagMap] = None,
) -> CreateProjectResponse

Creates a new DataBrew project.

Parameters:

  • dataset_name (DatasetName) –

    The name of an existing dataset to associate this project with.

  • name (ProjectName) –

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

  • recipe_name (RecipeName) –

    The name of an existing recipe to associate with the project.

  • role_arn (Arn) –

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.

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

    Metadata tags to apply to this project.

Raises:

Source code in docs_src/capo_databrew/_services/data_brew.py
def create_project(
    self,
    dataset_name: "capo_databrew.types.dataset_name.DatasetName",
    name: "capo_databrew.types.project_name.ProjectName",
    recipe_name: "capo_databrew.types.recipe_name.RecipeName",
    role_arn: "capo_databrew.types.arn.Arn",
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    sample: Optional["capo_databrew.types.sample.Sample"] = None,
    tags: Optional["capo_databrew.types.tag_map.TagMap"] = None,
) -> "capo_databrew.types.create_project_response.CreateProjectResponse":
    """<p>Creates a new DataBrew project.</p>

    Args:
        dataset_name: <p>The name of an existing dataset to associate this project with.</p>
        name: <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
        recipe_name: <p>The name of an existing recipe to associate with the project.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
        tags: <p>Metadata tags to apply to this project.</p>

    Raises:
        capo_databrew.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_databrew.errors.internal_server_exception.InternalServerException: <p>An internal service failure occurred.</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.create_project_request.CreateProjectRequest]",
    ) -> OperationResponse[
        "capo_databrew.types.create_project_response.CreateProjectResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.create_project

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProject")
    )
    input_: capo_databrew.types.create_project_request.CreateProjectRequest = {
        "dataset_name": dataset_name,
        "name": name,
        "recipe_name": recipe_name,
        "role_arn": role_arn,
    }
    if sample is not None:
        input_["sample"] = sample
    if tags is not None:
        input_["tags"] = tags

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