Azure Custom Vision Project - azure

I am creating an azure custom vision project in python, every time i run the code, it creates new projects and my project count keeps increasing.
How can i delete an existing project before creating a new one?

First you're going to want to check which projects you have, which you can check with the GetProjects API. This will give you have a list of projects with their project ids. Once you have project ids for the projects you want to delete, then you can just call the DeleteProject API, passing in the project id. You can also managed you projects via the Custom Vision Service portal at www.customvision.ai, just be sure to sign in with your account.

Related

Using terraform how can I create one service account used across multiple project?

I am currently trying to use a service account that is already created in one project and use it again in a different project. I do not want to create a new service account in the new project I want to use the already existing service account. I am clueless on how to go about implementing this.
You can use data terraform. But I think u need grant permisions or roles for the new project in this sa.

Link a dialogflow agent to a Google Cloud Console project and inherit all the team members i assigned to the project?

How can i create a dialogflow agent and associate it with the Google Cloud Console project i created and have it inherit all the team members i assigned to the project ?
I am working on a dialogflow project. I created a new project in the Google Cloud Console and added some team members. However when i switch to the dialogflow console i do not see my project and the people i added to it. when i create a new agent in dialogflow it seems to have nothing to do with the project i created in the cloud console and i have to explicitly share the agent with the team. So the Google Cloud Console project is sort of useless.
For example in Azure cognitive services i can link everything to my root project.
Best CK
Google could do better in making these resources (e.g. Projects) more clear.
Actually (to my knowledge) all Google Projects represent the same underlying project resource and you can e.g. view DialogFlow projects from Google Cloud Console and vice versa.
I suspect (!) that you created 2 different projects: one using (Google Cloud Platform) Console and one using DialogFlow Console
If you have the Cloud SDK (aka gcloud) installed, you should be able to list all your projects (Cloud, DialogFlow etc.) using:
gcloud projects list
Now, to answer your question. Users of Google (!) Projects are Google accounts users and groups and also include service accounts. You may list the users for a given project with:
gcloud projects get-iam-policy ${PROJECT}
Ideally, what you want to do is ensure that this policy is reflected across both projects. I'm reluctant to provide a script because service accounts complicate this sharing. Service accounts work across projects but they are created automatically in projects. A simple copy-and-paste of accounts may break something for you.
That said, here's a gcloud command to enumerate the list of ${ROLE} (roles/owner) from one project ${SRC}:
PSRC=...
ROLE="roles/owner"
MEMBERS=$(gcloud projects get-iam-policy ${PSRC} \
--flatten=bindings \
--filter=bindings.role:${ROLE} \
--format="value(bindings.members)") && echo ${MEMBERS}
NB There's probably a way to split user:some#email.com if you need to
You could then iterate over this list and add (!) these accounts to ${PDST}
for MEMBER in ${MEMBERS}
do
gcloud projects add-iam-policy-binding ${DST} \
--member=${MEMBER} \
--role=${ROLE}
done
Lastly, when you create a DialogFlow project you are provided with the option to use an existing Google (Cloud) Project. Next time, you follow this flow, please look for the "create new or use existing project" prompt. You would be able to select the Project you'd created previously to reuse your users.

How to migrate 2 team collections from tfs to one organization in azure devops services?

From what I’ve read that for each collection will be migrating to one organization. Is there any suggestion or other way to migrate to solve this issue?
By default we cannot achieve that by the official migration tool. Since each collection maps to one database in Azure DevOps Server, and the migration
process works by importing an entire collection. So, each collection will be migrating to one organization separately.
As a workaround, you can try to create new projects in the migrated organization, then manually migrate the projects, of course it will has some limits.
For the sources,you can import the repository directly, please see
Import a Git repo for details.
For work items you can use the third-party tools or extensions or
Microsoft Excel to do that, however the history will be missed. You can reference this thread: Move bugs with history and attachments to a new project

How to clone/make another copy of an deployed bot on Azure?

I want to create a copy of an existing bot deployed on Azure. So, that the new copy can be used to create a new bot with minor changes.
Wanted to know if there is any direct option on Azure portal itself to create the clone of the existing bot
You could use the Export Template functionality to export the existing bot and any other associated resources from Azure, then use the Template deployment function to deploy your custom template.
As the bot channels registration isn't currently supported for template export (as you have found), the best option might be to script something. You can build a bot and have it zipped up and then use cli/powershell to create the needed resources and have it deployed. You can script creating new apps and bot channel resources fairly easy.
See here for more info on how to generally go about that. Let me know if you want a sudo sample.

Old Azure functions return after deleting and recreating publishing profile VS 2017

I have noticed that if Azure function e.g 'My-Function-App' is deleted using Azure portal and a new app with same name 'My-Function-App' is created in same resource group using Visual Studio 2017, then all old functions return to that new function app in read-only mode. Any idea what is happening here?
What #David has said is right, and I want to provide some details for you to refer.
all old functions return to that new function app
For Azure functions created in Consumption plan, one function app has one individual file share folder in the storage account you specified. You can see the file share name in your application settings tab in portal.
For functions created in portal, the file share name corresponds to the function app name plus an unique suffix generated by azure, like myfunctionae23.
For functions created using VS, the file share name is exactly the same as the function app name, like myfunction.
So if we publish a function app from VS, and its name happens to be identical to some existing file share which was used to store functions, these functions will be restored in the new function app.
in read-only mode
It is set by Azure due to publishing functions from VS. It's not recommended to make changes to files developed locally.
If you want to solve this with minimum changes, in publish panel, click Manage profile settings and click Remove addition files at destination and publish again.
When a Function App is created, a Storage Account also gets created alongside in the same resource group. If you delete both (or delete the whole RG), you will see no traces of previous apps.

Resources