Azure management core library defines extensions to Azure Core that are specific to ARM (Azure Resource Management) needed when you use client libraries
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
ARM-specific pipeline clients that extend Azure Core's pipeline architecture with ARM-specific policies and behaviors. These clients automatically include resource provider registration, ARM-specific logging, and authentication challenge handling.
Synchronous pipeline client designed specifically for Azure Resource Manager operations. Automatically includes ARM-specific policies and handles ARM authentication patterns.
class ARMPipelineClient(PipelineClient[HTTPRequestType, HTTPResponseType]):
"""A pipeline client designed for ARM explicitly.
:param str base_url: URL for the request.
:keyword Pipeline pipeline: If omitted, a Pipeline object is created and returned.
:keyword list[HTTPPolicy] policies: If omitted, the standard policies of the configuration object is used.
:keyword per_call_policies: If specified, the policies will be added into the policy list before RetryPolicy
:paramtype per_call_policies: Union[HTTPPolicy, SansIOHTTPPolicy, list[HTTPPolicy], list[SansIOHTTPPolicy]]
:keyword per_retry_policies: If specified, the policies will be added into the policy list after RetryPolicy
:paramtype per_retry_policies: Union[HTTPPolicy, SansIOHTTPPolicy, list[HTTPPolicy], list[SansIOHTTPPolicy]]
:keyword HttpTransport transport: If omitted, RequestsTransport is used for synchronous transport.
"""
def __init__(self, base_url: str, **kwargs: Any) -> None: ...from azure.mgmt.core import ARMPipelineClient
from azure.core.configuration import Configuration
from azure.core.credentials import DefaultAzureCredential
# Create configuration
config = Configuration()
# Create ARM pipeline client
client = ARMPipelineClient(
base_url="https://management.azure.com",
config=config
)
# The client automatically includes:
# - ARMAutoResourceProviderRegistrationPolicy
# - ARMHttpLoggingPolicy (if not already configured)Asynchronous pipeline client designed specifically for Azure Resource Manager operations. Provides the same ARM-specific enhancements as ARMPipelineClient but for async/await patterns.
class AsyncARMPipelineClient(AsyncPipelineClient[HTTPRequestType, AsyncHTTPResponseType]):
"""A pipeline client designed for ARM explicitly.
:param str base_url: URL for the request.
:keyword AsyncPipeline pipeline: If omitted, a Pipeline object is created and returned.
:keyword list[AsyncHTTPPolicy] policies: If omitted, the standard policies of the configuration object is used.
:keyword per_call_policies: If specified, the policies will be added into the policy list before RetryPolicy
:paramtype per_call_policies: Union[AsyncHTTPPolicy, SansIOHTTPPolicy,
list[AsyncHTTPPolicy], list[SansIOHTTPPolicy]]
:keyword per_retry_policies: If specified, the policies will be added into the policy list after RetryPolicy
:paramtype per_retry_policies: Union[AsyncHTTPPolicy, SansIOHTTPPolicy,
list[AsyncHTTPPolicy], list[SansIOHTTPPolicy]]
:keyword AsyncHttpTransport transport: If omitted, AioHttpTransport is used for asynchronous transport.
"""
def __init__(self, base_url: str, **kwargs: Any) -> None: ...import asyncio
from azure.mgmt.core import AsyncARMPipelineClient
from azure.core.configuration import Configuration
from azure.core.credentials import DefaultAzureCredential
async def main():
# Create configuration
config = Configuration()
# Create async ARM pipeline client
client = AsyncARMPipelineClient(
base_url="https://management.azure.com",
config=config
)
# The client automatically includes:
# - AsyncARMAutoResourceProviderRegistrationPolicy
# - ARMHttpLoggingPolicy (if not already configured)
asyncio.run(main())Both pipeline clients automatically inject ARM-specific policies when no explicit policies are provided:
MissingSubscriptionRegistrationBoth clients require either:
policies parameter, ORconfig parameter (Configuration object)If neither is provided, a ValueError is raised.
When using configuration-based initialization, policies are added in this order:
HTTPResponseType = TypeVar("HTTPResponseType")
HTTPRequestType = TypeVar("HTTPRequestType")
AsyncHTTPResponseType = TypeVar("AsyncHTTPResponseType", bound=AsyncContextManager)Install with Tessl CLI
npx tessl i tessl/pypi-azure-mgmt-core