def METHOD_NAME(cmd, namespace):
    client = cf_spring(cmd.cli_ctx)
    sku = get_spring_sku(client, namespace.resource_group, namespace.service)
    if sku.name == 'E0':
        try:
            build_service = client.build_service.get_build_service(namespace.resource_group,
                                                                   namespace.service,
                                                                   DEFAULT_BUILD_SERVICE_NAME)
            if build_service.properties.container_registry:
                if namespace.source_path or namespace.artifact_path:
                    raise InvalidArgumentValueError(
                        "The instance using your own container registry can only use '--container-image' to deploy."
                        " See more details in https://learn.microsoft.com/en-us/azure/spring-apps/how-to-deploy-with-custom-container-image?tabs=azure-cli")
        except ResourceNotFoundError:
            if namespace.source_path or namespace.artifact_path:
                    raise InvalidArgumentValueError(
                        "The instance without build service can only use '--container-image' to deploy."
                        " See more details in https://learn.microsoft.com/en-us/azure/spring-apps/how-to-deploy-with-custom-container-image?tabs=azure-cli")