-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
App ServicesMgmtThis issue is related to a management package.This issue is related to a management package.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Library name and version
Azure.ResourceManager.AppService
Query/Question
Consider the following code that worked for function apps prior to v4:
var bindingsConfig = new
{
bindings = new object[]
{
new
{
AuthLevel = "function",
Type = "httpTrigger",
Direction = "in",
Name = "request",
Methods = new[] {"post"}
},
new
{
Type = "http",
Direction = "out",
Name = "$return"
}
}
};
app = await myResourceGroup.GetWebSites().GetAsync("my-app-name", ct);
var func = await app.GetSiteFunctions().CreateOrUpdateAsync(WaitUntil.Completed, "my-func-name", new FunctionEnvelopeData
{
Config = BinaryData.FromObjectAsJson(config)
}, ct);
Now according to this doc, function.json is no longer used in v4 programming model. My question is - does it mean I shouldn't be passing bindingsConfig into CreateOrUpdateAsync()? When I try it though I get the following error:
Azure.RequestFailedException: 'Error creating function. <my-func-name> is not a valid function name
Status: 400 (Bad Request)
ErrorCode: BadRequest
In general how should I call CreateOrUpdateAsync() to create a v4 kind of function?
Environment
No response
Metadata
Metadata
Assignees
Labels
App ServicesMgmtThis issue is related to a management package.This issue is related to a management package.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that