0

This is the sample code provided in pulumi documentation however this does throw an compilation error. https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/backend/

compilation error in local

Please let me know any idea to resolve or help me to provide a sample code through which i can create a Backend resource in APIM which can connect to the Named value in Headers.

Sample Backend Resource in Azure APIM through GUI

Refer to this picture about my comment of adding the named value in the Headers

1 Answer 1

0

The example are automatically generated and it looks like the generator didn't handle the type initialization correctly. Here is one way to fix it (replace the relevant lines):

Header = 
{
    {
        "x-my-1", new[] { "val1", "val2" }.ToImmutableArray()
    },
},
Query = 
{
    {
        "sv", new[] { "xx", "bb", "cc" }.ToImmutableArray()
    },
},
Sign up to request clarification or add additional context in comments.

3 Comments

Hi @Mikhail Thanks, this did work. This will attach the Manual value in the Headers. If i want to attach the Named Value , can you please share a sample of code. Uploaded the picture in the main description for reference.
Sorry I'm not too deep on that part of API management. Isn't that what pulumi.com/registry/packages/azure-native/api-docs/… is for?
No worries @Mikhail. The link that you shared is for creating the Named Value. And that named value can be used in the Header of the Backend. Trying to find a sample piece of code. However your code snippet did helped a lot. Thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.