Azure Consumption Management Client for accessing consumption resources, budgets, and usage analytics for Azure Enterprise Subscriptions
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
List all available consumption REST API operations for service discovery and capability exploration. This provides metadata about all supported operations in the Azure Consumption Management API.
Retrieve all available consumption REST API operations to understand service capabilities and available endpoints.
def list(**kwargs) -> Iterable[OperationListResult]:
"""
Lists all of the available consumption REST API operations.
Returns:
Iterable[OperationListResult]: Collection of available API operations with metadata
"""from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
# Authenticate and create client
credential = DefaultAzureCredential()
subscription_id = "your-subscription-id"
client = ConsumptionManagementClient(credential, subscription_id)
# List all available operations
operations = client.operations.list()
print("Available Azure Consumption Management API Operations:")
for operation in operations:
print(f"- {operation.name}: {operation.display.description}")
print(f" Provider: {operation.display.provider}")
print(f" Resource: {operation.display.resource}")
print(f" Operation: {operation.display.operation}")
print()
# Filter operations by name pattern
budget_operations = [
op for op in client.operations.list()
if 'budgets' in op.name.lower()
]
print("Budget-related operations:")
for op in budget_operations:
print(f"- {op.name}")class OperationListResult:
value: List[Operation]
next_link: str
class Operation:
id: str
name: str
type: str
display: OperationDisplay
class OperationDisplay:
provider: str
resource: str
operation: str
description: strInstall with Tessl CLI
npx tessl i tessl/pypi-azure-mgmt-consumption