With the Azure Core generation of NetworkManagementClient, supply the proxy map at construction:

from azure.mgmt.network import NetworkManagementClient

network = NetworkManagementClient(
    credential,
    subscription_id,
    proxies={
        'http': 'http://proxy.example:8080',
        'https': 'http://proxy.example:8080',
    },
)

Keep the application's existing credential and subscription_id. The https key selects HTTPS management destinations; its http:// value describes the intermediary listener. Leave the management endpoint as the real Azure service. An address from the HTTP proxy list belongs in the proxy-map values when you are choosing a public HTTP route.

Choose the configuration source

The SDK also supports HTTP_PROXY and HTTPS_PROXY in the process environment. Apply them to the service, notebook kernel or CI worker that uses the client. The documented use_env_settings option controls whether applicable environment settings are used.

Do not mix this constructor pattern with old client.config.proxies.add examples: those belong to the msrest generation.

Locate the failed request

This map controls the management pipeline. If the failure occurs while obtaining a token, examine the credential object's supported network configuration; it can make that request through its own transport before a management call is sent.

ХӀокхунах тера йаззамаш