Skip to content

update_project

update_project(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    project_name: Optional[ProjectEntityName] = None,
    project_description: Optional[EntityDescription] = None,
    service_catalog_provisioning_update_details: Optional[
        ServiceCatalogProvisioningUpdateDetails
    ] = None,
    tags: Optional[TagList] = None,
    template_providers_to_update: Optional[UpdateTemplateProviderList] = None,
) -> UpdateProjectOutput

Updates a machine learning (ML) project that is created from a template that sets up an ML pipeline from training to deploying an approved model.

You must not update a project that is in use. If you update the ServiceCatalogProvisioningUpdateDetails of a project that is active or being created, or updated, you may lose resources already created by the project.

Parameters:

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def update_project(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = 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_update_details: Optional[
        "capo_sagemaker.types.service_catalog_provisioning_update_details.ServiceCatalogProvisioningUpdateDetails"
    ] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
    template_providers_to_update: Optional[
        "capo_sagemaker.types.update_template_provider_list.UpdateTemplateProviderList"
    ] = None,
) -> "capo_sagemaker.types.update_project_output.UpdateProjectOutput":
    """<p>Updates a machine learning (ML) project that is created from a template that sets up an ML pipeline from training to deploying an approved model.</p> <note> <p>You must not update a project that is in use. If you update the <code>ServiceCatalogProvisioningUpdateDetails</code> of a project that is active or being created, or updated, you may lose resources already created by the project.</p> </note>

    Args:
        project_name: <p>The name of the project.</p>
        project_description: <p>The description for the project.</p>
        service_catalog_provisioning_update_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. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
        template_providers_to_update: <p> The template providers to update in the project. </p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.update_project_input.UpdateProjectInput]",
    ) -> OperationResponse[
        "capo_sagemaker.types.update_project_output.UpdateProjectOutput"
    ]:
        import capo_sagemaker._operations.sage_maker.update_project

        output, http_response = (
            capo_sagemaker._operations.sage_maker.update_project.update_project(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProject")
    )
    input_: capo_sagemaker.types.update_project_input.UpdateProjectInput = {}
    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_update_details is not None:
        input_["service_catalog_provisioning_update_details"] = (
            service_catalog_provisioning_update_details
        )
    if tags is not None:
        input_["tags"] = tags
    if template_providers_to_update is not None:
        input_["template_providers_to_update"] = template_providers_to_update

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