Skip to content

create_project

create_project(
    domain_identifier: DomainId,
    name: ProjectName,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    description: Optional[Description] = None,
    resource_tags: Optional[Tags] = None,
    glossary_terms: Optional[GlossaryTerms] = None,
    domain_unit_id: Optional[DomainUnitId] = None,
    project_profile_id: Optional[ProjectProfileId] = None,
    user_parameters: Optional[EnvironmentConfigurationUserParametersList] = None,
    project_category: Optional[str] = None,
    project_execution_role: Optional[RoleArn] = None,
    membership_assignments: Optional[ProjectMembershipAssignments] = None,
) -> CreateProjectOutput

Creates an Amazon DataZone project.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the Amazon DataZone domain in which this project is created.

  • name (ProjectName) –

    The name of the Amazon DataZone project.

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

    The description of the Amazon DataZone project.

  • resource_tags (Optional[Tags], default: None ) –

    The resource tags of the project.

  • glossary_terms (Optional[GlossaryTerms], default: None ) –

    The glossary terms that can be used in this Amazon DataZone project.

  • domain_unit_id (Optional[DomainUnitId], default: None ) –

    The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.

  • project_profile_id (Optional[ProjectProfileId], default: None ) –

    The ID of the project profile.

  • user_parameters (Optional[EnvironmentConfigurationUserParametersList], default: None ) –

    The user parameters of the project.

  • project_category (Optional[str], default: None ) –

    The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.

  • project_execution_role (Optional[RoleArn], default: None ) –

    The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.

  • membership_assignments (Optional[ProjectMembershipAssignments], default: None ) –

    The members to be assigned to the project.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def create_project(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    name: "capo_datazone.types.project_name.ProjectName",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
    resource_tags: Optional["capo_datazone.types.tags.Tags"] = None,
    glossary_terms: Optional[
        "capo_datazone.types.glossary_terms.GlossaryTerms"
    ] = None,
    domain_unit_id: Optional[
        "capo_datazone.types.domain_unit_id.DomainUnitId"
    ] = None,
    project_profile_id: Optional[
        "capo_datazone.types.project_profile_id.ProjectProfileId"
    ] = None,
    user_parameters: Optional[
        "capo_datazone.types.environment_configuration_user_parameters_list.EnvironmentConfigurationUserParametersList"
    ] = None,
    project_category: Optional[str] = None,
    project_execution_role: Optional["capo_datazone.types.role_arn.RoleArn"] = None,
    membership_assignments: Optional[
        "capo_datazone.types.project_membership_assignments.ProjectMembershipAssignments"
    ] = None,
) -> "capo_datazone.types.create_project_output.CreateProjectOutput":
    """<p>Creates an Amazon DataZone project.</p>

    Args:
        domain_identifier: <p>The ID of the Amazon DataZone domain in which this project is created.</p>
        name: <p>The name of the Amazon DataZone project.</p>
        description: <p>The description of the Amazon DataZone project.</p>
        resource_tags: <p>The resource tags of the project.</p>
        glossary_terms: <p>The glossary terms that can be used in this Amazon DataZone project.</p>
        domain_unit_id: <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
        project_profile_id: <p>The ID of the project profile.</p>
        user_parameters: <p>The user parameters of the project.</p>
        project_category: <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
        project_execution_role: <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
        membership_assignments: <p>The members to be assigned to the project.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.create_project_input.CreateProjectInput]",
    ) -> OperationResponse[
        "capo_datazone.types.create_project_output.CreateProjectOutput"
    ]:
        import capo_datazone._operations.data_zone.create_project

        output, http_response = (
            capo_datazone._operations.data_zone.create_project.create_project(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.create_project_input.CreateProjectInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.create_project_input

        return capo_datazone.types.create_project_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_datazone.types.create_project_output.CreateProjectOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.create_project_output

        return capo_datazone.types.create_project_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateProject",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.create_project_input.CreateProjectInput = {
        "domain_identifier": domain_identifier,
        "name": name,
    }
    if description is not None:
        input_["description"] = description
    if resource_tags is not None:
        input_["resource_tags"] = resource_tags
    if glossary_terms is not None:
        input_["glossary_terms"] = glossary_terms
    if domain_unit_id is not None:
        input_["domain_unit_id"] = domain_unit_id
    if project_profile_id is not None:
        input_["project_profile_id"] = project_profile_id
    if user_parameters is not None:
        input_["user_parameters"] = user_parameters
    if project_category is not None:
        input_["project_category"] = project_category
    if project_execution_role is not None:
        input_["project_execution_role"] = project_execution_role
    if membership_assignments is not None:
        input_["membership_assignments"] = membership_assignments

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