Azure Scheduler Management Client Library

7.0.0 · abandoned · verified Sat Apr 11

The `azure-mgmt-scheduler` library is the Microsoft Azure Scheduler Management Client Library for Python. It provides programmatic access to manage Azure Scheduler resources. While the library's current version is 7.0.0, the underlying Azure Scheduler service has been retired by Microsoft. This package received security fixes until January 31, 2022, and is no longer actively maintained for new features or non-security bug fixes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to instantiate the `SchedulerManagementClient` using `azure.identity.DefaultAzureCredential`. It's crucial to note that the Azure Scheduler service has been retired, so most operations will fail. This example serves primarily to show the client initialization pattern.

from azure.identity import DefaultAzureCredential
from azure.mgmt.scheduler import SchedulerManagementClient
import os

# Your Azure subscription ID (get it from environment variable or replace directly)
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "YOUR_SUBSCRIPTION_ID")

# Authenticate with Azure (DefaultAzureCredential tries multiple authentication methods)
# Ensure AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET (for service principal)
# or AZURE_USERNAME, AZURE_PASSWORD (for developer login) are set as environment variables
# or use other credential types from azure.identity.
credential = DefaultAzureCredential()

# Create the Scheduler management client
try:
    scheduler_client = SchedulerManagementClient(credential, subscription_id)
    print(f"SchedulerManagementClient created for subscription: {subscription_id}")
    print("\nWARNING: The Azure Scheduler service has been retired as of January 31, 2022.")
    print("Any operations attempted with this client (e.g., listing job collections) will likely fail.")
    # Example: Attempt to list job collections (this will likely fail)
    # for collection in scheduler_client.job_collections.list_by_subscription():
    #     print(f"Job Collection: {collection.name}")
except Exception as e:
    print(f"Error creating or using SchedulerManagementClient: {e}")
    print("This is expected behavior as the underlying service is retired.")

view raw JSON →