I am trying to create linked ARM tempIates using Visual Studio. For creating a VM I need to pass the variable for vnet prefix, subnet name etc to a different template using a parameter file or a template file. I couldn't get a relevant example in the microsoft site. Please help.
There is a well defined way of doing this. You have a 'deployment' resource in your template that references another template with a uri.
"resources": [
{
"name": "myNestedTemplate",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('template').base, 'nested/', variables('template').nested2)]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"apiVersion": {
"value": "[variables('sharedState')]"
}
}
}
So you need to have the other template accessible. In Visual studio, you can make sure it gets uploaded along with the rest of your artifacts to the storage account.
Check out Mark van Eijk's blog for this particular solution, but also the quick start templates on GitHub are a great resource for finding how to do something.
Also, you must've not looked very hard on the msft website...: Linked Template Example on msft
Related
I am using Azure API for FHIR. I have a Claims payload that requires some additional fields, which I am adding to the extension structure like:
extension: [
{
"url": "ROW_ID",
"valueString": "1"
},
{
"url": "LOB",
"valueString": "MAPD"
}
]
To perform a search on ROW_ID, and LOB, I need to publish this extension which I would be using in my SearchParameter.
How and where do I publish the extension ?
To publish an extension, you post the structure definition to your FHIR server. In addition, if you need to search for it you will need to create a custom search parameter and reindex the database. You can read more about that here: https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/how-to-do-custom-search
I'm trying to send pdf file as attachment proactively to teams user with https://smba.trafficmanager.net/in/v3/conversations/ and attachment format as below
"attachments": [
{
"contentType": "application/pdf",
"contentUrl": "http://www.africau.edu/images/default/sample.pdf",
"name": "sample.pdf",
"content": {
"uniqueId": "1150D938-8870-4044-9F2C-1213213123",
"fileType": "pdf"
}
}
]
I'm able to send txt files but not pdf, every time I'm getting
{"error":{"code":"BadArgument","message":"Unknown attachment type"}}
Is there any other contentType other than application/pdf ?
I agree with Hilton and Dev here. I think it's more convenient to post messages with card attachments referencing existing SharePoint files using the Microsoft Graph APIs.
MS documents referred to 2 ways for bots send attachment. Using the Microsoft Graph APIs works for bots in all scopes in Teams while using the Teams APIs works only in the personal context.
By the way, the document says pdf is ok to be a file type.
#kiran, The below payload works for me. So i am adding the payload for your convenience (below), so that you can copy/test it.
{ "body": { "contentType": "html", "content": "Here's the latest budget. <attachment id=\"153fa47d-18c9-4179-be08-9879815a9f90\"></attachment>" }, "attachments": [ { "id": "153fa47d-18c9-4179-be08-9879815a9f90", "contentType": "reference", "contentUrl": "m365x987948.sharepoint.com/sites/test/Shared%20Documents/…", "name": "Budget.pdf" } ] }
Based on the discussion in the comments, it is definitely better to rather provide a link to the document, hosted in SharePoint (files tab) - that's exactly what the Files tab is intended for, rather than every user having to download their own copy. In addition, have a look at the topic of Link Unfurling to see how to provide a better embedded experience for the posted file.
I need to add a text as a privacy policy in the manifest. Where shall I add it in the manifest?
{
"developer": {
"name": ,
"websiteUrl": ,
"privacyUrl": ,
"termsOfUseUrl":
},
"description": {
},
"permissions": ["identity", "messageTeamMembers"],
"validDomains": [
"contoso.com",
"token.botframework.com"
]
}
How can i update this section?
#Anu The privacyUrl only accepts a URL. You cannot add a plain text as privacy policy in the manifest.
Are you using the App Studio tool from Microsoft? It's an app that installs directly into Teams itself, to help with various Teams development tasks, and one of these is to provide a nice graphical interface to create and edit your app manifest. In this tool you can capture the url to your privacy policy, wherever it is hosted (to confirm, it does need to be a url to a page hosted somewhere).
In the final manifest, if you do want to edit it by hand rather, it would look something like this:
"privacyUrl": "[your web address to your own policy goes here]",
I am referring to this QnA create knowledgebaseAPI documentation. I want to upload the knowledge base through the Excel file which is stored in the local path. I don't have URL for the excel file, only the local path.
I followed the code given on github link, I removed the unnecessary things and kept the variable "kb" as shown below:
static string kb = $#"
{{
'name': 'VivekKB',
'qnaList': [],
'urls': [ ],
'files': [
'files': {{DBFile}}
]
}}
DBFile is the filename with full path. When I run the code, it creates an Empty knowledge store. It doesn't upload the excel file which I mentioned. Can you please help me to figure it out how to upload a local excel QnA data directly to QnA store. I want to avoid manual uploading excel to knowledgebases at https://www.qnamaker.ai.
Thanks in advance.
Vivek
Connected with the QnA team directly, asking the following:
Question: Is it possible to use a local file path to create KB through the programmatic API?
I know given in the programmatic QnA API docs it demonstrates how to add a PDF file that’s already also available online as well:
"files": [
{
"fileName": "SurfaceManual.pdf",
"fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf"
}
However when I tried using “POST Create Knowledgebase “ in Postman using the relative file path in the “fileUri”, I get “invalid uri” error.
Request Body
{
"name": "Simple QnA",
"files": [
{
"fileName": "simpleQnaSource.docx",
"fileUri": "C:\\Users\\v-asho\\Documents\\RandomWordDocs"
}
]
}
Response
{
"error": {
"code": "BadArgument",
"message": "Invalid input. See details.",
"details": [
{
"code": "ValidationFailure",
"message": "File Uri has one or more invalid uri.",
"target": "Files[0].FileUri"
}
]
}
}
Uploading the .docx file online through qnamaker.ai portal successfully creates a KB, it’s specifically through the programmatic api where I’m having issues.
QnA Team's Answer:
“fileUri” can have a publicly available and downloadable URI as value.
When using it via API, please upload the contents of local file to a publicly available domain. (Example: Azure storage blob shared to public).
This my seem childish but I have not found anything with any search in this forum - a very basic thing.
I have no experience with the Chrome environment or webkit - mine is with IE. but here goes...
Following along with the getting started tutorials - is fine - got to Finnur's using debug video link and ran into a confusing problem. He states that to inspect items not currently active with an unpackaged extension that is loaded - you enter chrome-extensions://[extension id]/options.html in the omnibar. The options.html file resides in the same folder as all other components dedicated to the extension. The problem: Every time I enter this info into the omnibar it brings up a web-search. through the preset default search engine. Cant seem to find a way to work offline or to turn off the search function.
So, I'm sure I am missing something very simple that all of your are very familiar with. I am using all the "getting started" files and a copy of the options.html found there. Options is grayed out in the drop-down menu of the extension but cant seem to load it.
MANIFEST.JSON
{
"name": "My First Extension",
"version": "1.0",
"manifest_version": 2,
"description": "The first extension that I made.",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html",
"options_page": "options.html"
},
"permissions": [
"http://api.flickr.com/"
]
}
Very simple but cant seem to enter the options.html into the omnibar without having the search engine try to find it on the web and not in the folder.
The url should be chrome-extension://[extension id]/options.html not `chrome-extensions://[extension id]/options.html, notice theres no s at the end of extension in chrome-extension://.
Your manifest is a litlle malformed, the options_page shouldnt be in the browser_action field, try......
{
"name": "My First Extension",
"version": "1.0",
"manifest_version": 2,
"description": "The first extension that I made.",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"http://api.flickr.com/"
],
"options_page": "options.html"
}