question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom_headers parameter to NetworkInterfacesOperations._create_or_update_initial

See original GitHub issue

Is your feature request related to a problem? Please describe. In working with Azure on building a network integration, we’ve been asked to add a header to requests. To use the SDK and send custom headers requires some patching to get to work right now.

Describe the solution you’d like I’d like a “custom_headers: Optional[Mapping[str, str]]” parameter on NetworkInterfacesOperations._create_or_update_initial that matches behavior to other Operations classes in the SDK.

Describe alternatives you’ve considered Custom patching of the SDK.

Graphrbac is an example of another client with this feature already implemented: see sdk/graphrbac/azure-graphrbac/azure/graphrbac/operations/users_operations.py:73:

    def create(
            self, parameters, custom_headers=None, raw=False, **operation_config):
...
        :param dict custom_headers: headers that will be added to the request
...
        if custom_headers:
            header_parameters.update(custom_headers)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Wzb123456789commented, Aug 1, 2022

Hi @NCarter3, thanks for your feedback.

We are about to release a new package of azure-mgmt-network, which contains the parameters of custom headers, which you can use according to your own needs.

0reactions
NCarter3commented, Sep 2, 2022

Yep, that’s what I ended up doing. It just feels a little awkward, and doesn’t match what I would have expected. Thanks for making it possible!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Az.Network] Error using Set-AzNetworkInterface #14460
Updating Network Interface using Set-AzNetworkInterface outputs the following error: ... Long running operation failed with status 'Failed'.
Read more >
DscpConfigurationsClient Interface
Creates or updates a DSCP Configuration. Parameters: resourceGroupName - The name of the resource group. dscpConfigurationName - The name of the resource.
Read more >
TS 129 500 - V16.5.0 - 5G
This is the interface where the NF service operations are invoked. The service based Control Plane interfaces within the 5G Core Network are...
Read more >
c# - Web Api How to add a Header parameter for all API in ...
From: Operation to: OpenApiOperation ... Another way to add custom headers is by adding parameters into controller action.
Read more >
Chapter 10. Custom network interface templates
The parameters section contains all network configuration parameters for network interfaces. This includes information such as subnet ranges and VLAN IDs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found