or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

exceptions.mdindex.mdpipeline-clients.mdpolicies.mdpolling.mdresource-tools.md
tile.json

tessl/pypi-azure-mgmt-core

Azure management core library defines extensions to Azure Core that are specific to ARM (Azure Resource Management) needed when you use client libraries

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-mgmt-core@1.6.x

To install, run

npx @tessl/cli install tessl/pypi-azure-mgmt-core@1.6.0

index.mddocs/

Azure Management Core

Azure Management Core provides essential ARM (Azure Resource Management) extensions and utilities that are shared across Azure management client libraries. It offers base classes for ARM-specific pipeline clients, custom exception handling, ARM-specific policies for authentication and request processing, specialized polling mechanisms for long-running operations, and utility functions for ARM resource operations.

Package Information

  • Package Name: azure-mgmt-core
  • Language: Python
  • Installation: pip install azure-mgmt-core
  • Minimum Python Version: 3.9+
  • Dependencies: azure-core >= 1.32.0

Core Imports

from azure.mgmt.core import ARMPipelineClient, AsyncARMPipelineClient, VERSION, __version__

For specific functionality:

from azure.mgmt.core.exceptions import TypedErrorInfo, ARMErrorFormat
from azure.mgmt.core.tools import parse_resource_id, resource_id, is_valid_resource_id
from azure.mgmt.core.policies import (
    ARMAutoResourceProviderRegistrationPolicy,
    ARMChallengeAuthenticationPolicy,
    ARMHttpLoggingPolicy
)
from azure.mgmt.core.polling.arm_polling import ARMPolling, AzureAsyncOperationPolling, BodyContentPolling
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling

Basic Usage

from azure.mgmt.core import ARMPipelineClient
from azure.core.credentials import DefaultAzureCredential

# Create an ARM pipeline client
credential = DefaultAzureCredential()
base_url = "https://management.azure.com"

# Initialize with configuration
from azure.core.configuration import Configuration

config = Configuration()
client = ARMPipelineClient(
    base_url=base_url,
    config=config
)

# The client automatically includes ARM-specific policies:
# - Resource provider auto-registration
# - ARM-specific HTTP logging
# - Authentication challenge handling

Architecture

Azure Management Core implements the Azure SDK's pipeline architecture with ARM-specific enhancements:

  • Pipeline Clients: ARMPipelineClient and AsyncARMPipelineClient extend core pipeline clients with ARM-specific policies and behaviors
  • Policies: ARM-specific HTTP policies for authentication challenges, resource provider registration, and enhanced logging
  • Polling: Specialized long-running operation (LRO) polling strategies for Azure ARM asynchronous operations
  • Tools: Utilities for parsing and validating Azure resource identifiers and names
  • Exceptions: ARM-specific error formatting that extends OData v4 error formats

This design provides maximum reusability across Azure management SDKs while maintaining consistency with Azure's authentication systems, continuous access evaluation (CAE), and ARM's asynchronous operation patterns.

Capabilities

Pipeline Clients

ARM-specific pipeline clients for synchronous and asynchronous HTTP operations, with built-in support for ARM policies, authentication, and request processing.

# Version information
VERSION: str  # Package version string 
__version__: str  # Package version alias

class ARMPipelineClient(PipelineClient):
    def __init__(self, base_url: str, **kwargs) -> None: ...

class AsyncARMPipelineClient(AsyncPipelineClient):
    def __init__(self, base_url: str, **kwargs) -> None: ...

Pipeline Clients

ARM Policies

Specialized HTTP pipeline policies for Azure Resource Manager operations, including automatic resource provider registration, authentication challenge handling, and ARM-specific logging.

class ARMAutoResourceProviderRegistrationPolicy(HTTPPolicy): ...
class ARMChallengeAuthenticationPolicy(BearerTokenCredentialPolicy): ...
class ARMHttpLoggingPolicy(HttpLoggingPolicy): ...

ARM Policies

Long-Running Operation Polling

ARM-specific polling strategies for managing long-running operations, supporting Azure-AsyncOperation headers, location headers, and body content polling patterns.

class ARMPolling(LROBasePolling): ...
class AsyncARMPolling(AsyncLROBasePolling): ...
class AzureAsyncOperationPolling(OperationResourcePolling): ...
class BodyContentPolling(LongRunningOperation): ...

Polling

Resource Management Tools

Utilities for parsing Azure resource identifiers, constructing resource IDs, and validating resource names according to ARM specifications.

def parse_resource_id(rid: str) -> Mapping[str, Union[str, int]]: ...
def resource_id(**kwargs: Optional[str]) -> str: ...
def is_valid_resource_id(rid: str, exception_type: Optional[Type[BaseException]] = None) -> bool: ...
def is_valid_resource_name(rname: str, exception_type: Optional[Type[BaseException]] = None) -> bool: ...
def get_arm_endpoints(cloud_setting: AzureClouds) -> Dict[str, Any]: ...

Resource Tools

Exception Handling

ARM-specific error formatting and exception handling that extends Azure Core's OData v4 error format with additional ARM-specific error information.

class TypedErrorInfo:
    def __init__(self, type: str, info: Mapping[str, Any]) -> None: ...

class ARMErrorFormat(ODataV4Format):
    def __init__(self, json_object: Mapping[str, Any]) -> None: ...

Exception Handling

Types

# Type aliases for HTTP request/response handling
HTTPResponseType = TypeVar("HTTPResponseType")
HTTPRequestType = TypeVar("HTTPRequestType")
AllHttpResponseType = Union[LegacyHttpResponse, HttpResponse, LegacyAsyncHttpResponse, AsyncHttpResponse]