Skip to content

create_project async

create_project(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    project_name: Optional[ProjectEntityName] = None,
    project_description: Optional[EntityDescription] = None,
    service_catalog_provisioning_details: Optional[
        ServiceCatalogProvisioningDetails
    ] = None,
    tags: Optional[TagList] = None,
    template_providers: Optional[CreateTemplateProviderList] = None,
    project_config: Optional[ProjectConfig] = None,
) -> CreateProjectOutput

Creates a machine learning (ML) project. You can create the following types of projects:

  • CLASSIC - A project that contains one or more templates that set up an ML pipeline from training to deploying an approved model. To create a CLASSIC project, specify ServiceCatalogProvisioningDetails or TemplateProviders.

  • STANDARD - A project that SageMaker sets up with an Amazon Web Services CodeCommit repository and a leaderboard. To create a STANDARD project, specify ProjectConfig.

STANDARD projects are available only in the US East (N. Virginia) and US West (Oregon) Regions.

Parameters:

  • project_name (Optional[ProjectEntityName], default: None ) –

    The name of the project.

  • project_description (Optional[EntityDescription], default: None ) –

    A description for the project.

  • service_catalog_provisioning_details (Optional[ServiceCatalogProvisioningDetails], default: None ) –

    The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see What is Amazon Web Services Service Catalog.

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

    An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

  • template_providers (Optional[CreateTemplateProviderList], default: None ) –

    An array of template provider configurations for creating infrastructure resources for the project.

  • project_config (Optional[ProjectConfig], default: None ) –

    The configuration for a STANDARD project. Specify this to create a STANDARD project. You can't specify ProjectConfig together with ServiceCatalogProvisioningDetails or TemplateProviders.

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def create_project(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    project_name: Optional[
        "capo_sagemaker.types.project_entity_name.ProjectEntityName"
    ] = None,
    project_description: Optional[
        "capo_sagemaker.types.entity_description.EntityDescription"
    ] = None,
    service_catalog_provisioning_details: Optional[
        "capo_sagemaker.types.service_catalog_provisioning_details.ServiceCatalogProvisioningDetails"
    ] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
    template_providers: Optional[
        "capo_sagemaker.types.create_template_provider_list.CreateTemplateProviderList"
    ] = None,
    project_config: Optional[
        "capo_sagemaker.types.project_config.ProjectConfig"
    ] = None,
) -> "capo_sagemaker.types.create_project_output.CreateProjectOutput":
    """<p>Creates a machine learning (ML) project. You can create the following types of projects:</p> <ul> <li> <p> <code>CLASSIC</code> - A project that contains one or more templates that set up an ML pipeline from training to deploying an approved model. To create a <code>CLASSIC</code> project, specify <code>ServiceCatalogProvisioningDetails</code> or <code>TemplateProviders</code>.</p> </li> <li> <p> <code>STANDARD</code> - A project that SageMaker sets up with an Amazon Web Services CodeCommit repository and a leaderboard. To create a <code>STANDARD</code> project, specify <code>ProjectConfig</code>.</p> </li> </ul> <p> <code>STANDARD</code> projects are available only in the US East (N. Virginia) and US West (Oregon) Regions.</p>

    Args:
        project_name: <p>The name of the project.</p>
        project_description: <p>A description for the project.</p>
        service_catalog_provisioning_details: <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
        tags: <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
        template_providers: <p> An array of template provider configurations for creating infrastructure resources for the project. </p>
        project_config: <p>The configuration for a <code>STANDARD</code> project. Specify this to create a <code>STANDARD</code> project. You can't specify <code>ProjectConfig</code> together with <code>ServiceCatalogProvisioningDetails</code> or <code>TemplateProviders</code>.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.create_project_input.CreateProjectInput]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.create_project_output.CreateProjectOutput"
    ]:
        import capo_sagemaker._operations.sage_maker.create_project

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.create_project.async_create_project(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProject")
    )
    input_: capo_sagemaker.types.create_project_input.CreateProjectInput = {}
    if project_name is not None:
        input_["project_name"] = project_name
    if project_description is not None:
        input_["project_description"] = project_description
    if service_catalog_provisioning_details is not None:
        input_["service_catalog_provisioning_details"] = (
            service_catalog_provisioning_details
        )
    if tags is not None:
        input_["tags"] = tags
    if template_providers is not None:
        input_["template_providers"] = template_providers
    if project_config is not None:
        input_["project_config"] = project_config

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