Giter Site home page Giter Site logo

Comments (11)

alex-frankel avatar alex-frankel commented on July 29, 2024 1

There was an internal discussion about it, but it did not end up producing anything meaningful. I just asked for an update.

from bicep-types-az.

Willem-J-an avatar Willem-J-an commented on July 29, 2024 1

You should be able to use the mentioned ARM payload in an az rest command.

from bicep-types-az.

alex-frankel avatar alex-frankel commented on July 29, 2024

I'm having trouble following the exact issue. Can you share the full bicep file? This looks like a partial snippet atm.

A working payload would look like this:

When you say working payload, is that the REST API payload? Where is that coming from?

from bicep-types-az.

Willem-J-an avatar Willem-J-an commented on July 29, 2024

Ah I was missing some details indeed. I have updated the issue to include the parent resource and the ARM template this compiles to.

Working payload is indeed for the REST API, as it is used in the Azure Portal. It also works to add items when they do not exist yet. When the item does exist, the REST API requires an additional property to be set on the body, [ Id ], with the Id of the existing item. Additionally a query parameter must be set overrideItem=true. Not sure if those things are handled through an ARM template, and cannot test because the deploy command does not get that far.

from bicep-types-az.

alex-frankel avatar alex-frankel commented on July 29, 2024

Something seems really off here. I've never seen a top level property content before..

It also does not make sense to have two name properties. The name is going to map to a specific segment in the resource ID, so it is not possible to have two name properties. I wonder if these are actually supposed to be inside of the properties object.

I'm going to reach out to the microsoft.insights team to see if they can take a look.

cc @anthony-c-martin who might be able to take a closer look at the swagger definition.

from bicep-types-az.

benclerix-cegeka avatar benclerix-cegeka commented on July 29, 2024

Hi,
Is there any update on this?

from bicep-types-az.

radxhunter avatar radxhunter commented on July 29, 2024

@alex-frankel any update on this?

from bicep-types-az.

alex-frankel avatar alex-frankel commented on July 29, 2024

No update. The best path forward will be to open a support ticket. We have made efforts to get the Insights team to work on it, but it is not being prioritized.

from bicep-types-az.

triplebeta avatar triplebeta commented on July 29, 2024

Same problem here, using latest version of az and bicep.
resource myFunction 'microsoft.insights/components/analyticsItems@2015-05-01' = { name: 'item' // must be set to item Name: 'Foo' // There is another Name property (?) with uppercase? parent: azAppInsights Scope: 'user' Id: 'b401c7de-0c50-4c07-91c4-e975694fdd32' Content: loadTextContent('some_function.kql') // throws the error Properties: { functionAlias: 'some_function' } }
That show the following error
{"code": "InvalidRequestContent", "message": "The request content was invalid and could not be deserialized: 'Could not find member 'Content' on object of type 'TemplateResource'. Path 'properties.template.resources[0].Content', line 21, position 16.'."}

from bicep-types-az.

electroma avatar electroma commented on July 29, 2024

I'm having the same issue. Were you able to find any workaround to deploy functions using ARM or AZ CLI calls?
In the meantime I have created a support case and crosslinked this issue there.

from bicep-types-az.

electroma avatar electroma commented on July 29, 2024

In case somebody else will hit this issue, there is a workaround: for log analytics workspace-based AppInsights instances, you can switch to Log Analytics functions, which have proper Bicep support and can accept parameters as well.

from bicep-types-az.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.