
Azure Fabric Management SDK
FreeManage Microsoft Fabric resources programmatically.
Free · Opens the source repo
What Azure Fabric Management SDK does
The Azure Fabric Management SDK for Python provides developers with the tools necessary to manage Microsoft Fabric capacities and resources through code. This SDK allows for programmatic interactions with Azure Fabric, enabling users to create, update, suspend, resume, and delete fabric capacities seamlessly. By leveraging this SDK, developers can automate their resource management tasks, ensuring efficient utilization of cloud resources.
To get started, users need to install the SDK via pip and set up necessary environment variables for Azure authentication. The SDK utilizes the DefaultAzureCredential from the Azure Identity library for secure authentication, making it easier to manage credentials without hardcoding sensitive information. Once authenticated, users can interact with the Fabric management client to perform various operations such as creating new fabric capacities, retrieving details about existing capacities, and listing available SKUs.
The SDK includes comprehensive functionality for managing fabric capacities, including the ability to check name availability, list capacities within a resource group, and monitor the state of each capacity. It also supports long-running operations, ensuring that users can handle tasks that may take time to complete without blocking their application. This makes it suitable for developers looking to integrate Azure Fabric management into their applications or workflows.
Overall, the Azure Fabric Management SDK is designed for developers and cloud engineers who need to manage Azure Fabric resources programmatically. By automating these tasks, users can improve efficiency and reduce the potential for human error in resource management.
When to use it
Use this SDK when you need to programmatically manage Microsoft Fabric resources, such as creating or updating capacities.
When not to use it
This SDK is not suitable for users who prefer a graphical interface for managing Azure resources or those who do not require programmatic access.
What you can build with it
Automating Resource Management
Use the SDK to automate the creation and management of Azure Fabric capacities, reducing manual intervention.
Monitoring Capacity States
Implement scripts to regularly check and report on the state of your Azure Fabric capacities.
Scaling Resources Dynamically
Utilize the SDK to scale your Azure Fabric capacities up or down based on application demand.
How to install Azure Fabric Management SDK
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/azure-mgmt-fabric-py --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33Azure Fabric Management SDK for Python
Manage Microsoft Fabric capacities and resources programmatically.
Installation
pip install azure-mgmt-fabric
pip install azure-identity
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id>
AZURE_RESOURCE_GROUP=<your-resource-group>
Authentication
from azure.identity import DefaultAzureCredential
from azure.mgmt.fabric import FabricMgmtClient
import os
credential = DefaultAzureCredential()
client = FabricMgmtClient(
credential=credential,
subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"]
)
Create Fabric Capacity
from azure.mgmt.fabric import FabricMgmtClient
from azure.mgmt.fabric.models import FabricCapacity, FabricCapacityProperties, CapacitySku
from azure.identity import DefaultAzureCredential
import os
credential = DefaultAzureCredential()
client = FabricMgmtClient(
credential=credential,
subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"]
)
resource_group = os.environ["AZURE_RESOURCE_GROUP"]
capacity_name = "myfabriccapacity"
capacity = client.fabric_capacities.begin_create_or_update(
resource_group_name=resource_group,
capacity_name=capacity_name,
resource=FabricCapacity(
location="eastus",
sku=CapacitySku(
name="F2", # Fabric SKU
tier="Fabric"
),
properties=FabricCapacityProperties(
administration=FabricCapacityAdministration(
members=["user@contoso.com"]
)
)
)
).result()
print(f"Capacity created: {capacity.name}")
Get Capacity Details
capacity = client.fabric_capacities.get(
resource_group_name=resource_group,
capacity_name=capacity_name
)
print(f"Capacity: {capacity.name}")
print(f"SKU: {capacity.sku.name}")
print(f"State: {capacity.properties.state}")
print(f"Location: {capacity.location}")
List Capacities in Resource Group
capacities = client.fabric_capacities.list_by_resource_group(
resource_group_name=resource_group
)
for capacity in capacities:
print(f"Capacity: {capacity.name} - SKU: {capacity.sku.name}")
List All Capacities in Subscription
all_capacities = client.fabric_capacities.list_by_subscription()
for capacity in all_capacities:
print(f"Capacity: {capacity.name} in {capacity.location}")
Update Capacity
from azure.mgmt.fabric.models import FabricCapacityUpdate, CapacitySku
updated = client.fabric_capacities.begin_update(
resource_group_name=resource_group,
capacity_name=capacity_name,
properties=FabricCapacityUpdate(
sku=CapacitySku(
name="F4", # Scale up
tier="Fabric"
),
tags={"environment": "production"}
)
).result()
print(f"Updated SKU: {updated.sku.name}")
Suspend Capacity
Pause capacity to stop billing:
client.fabric_capacities.begin_suspend(
resource_group_name=resource_group,
capacity_name=capacity_name
).result()
print("Capacity suspended")
Resume Capacity
Resume a paused capacity:
client.fabric_capacities.begin_resume(
resource_group_name=resource_group,
capacity_name=capacity_name
).result()
print("Capacity resumed")
Delete Capacity
client.fabric_capacities.begin_delete(
resource_group_name=resource_group,
capacity_name=capacity_name
).result()
print("Capacity deleted")
Check Name Availability
from azure.mgmt.fabric.models import CheckNameAvailabilityRequest
result = client.fabric_capacities.check_name_availability(
location="eastus",
body=CheckNameAvailabilityRequest(
name="my-new-capacity",
type="Microsoft.Fabric/capacities"
)
)
if result.name_available:
print("Name is available")
else:
print(f"Name not available: {result.reason}")
List Available SKUs
skus = client.fabric_capacities.list_skus(
resource_group_name=resource_group,
capacity_name=capacity_name
)
for sku in skus:
print(f"SKU: {sku.name} - Tier: {sku.tier}")
Client Operations
| Operation | Method |
|---|---|
client.fabric_capacities | Capacity CRUD operations |
client.operations | List available operations |
Fabric SKUs
| SKU | Description | CUs |
|---|---|---|
F2 | Entry level | 2 Capacity Units |
F4 | Small | 4 Capacity Units |
F8 | Medium | 8 Capacity Units |
F16 | Large | 16 Capacity Units |
F32 | X-Large | 32 Capacity Units |
F64 | 2X-Large | 64 Capacity Units |
F128 | 4X-Large | 128 Capacity Units |
F256 | 8X-Large | 256 Capacity Units |
F512 | 16X-Large | 512 Capacity Units |
F1024 | 32X-Large | 1024 Capacity Units |
F2048 | 64X-Large | 2048 Capacity Units |
Capacity States
| State | Description |
|---|---|
Active | Capacity is running |
Paused | Capacity is suspended (no billing) |
Provisioning | Being created |
Updating | Being modified |
Deleting | Being removed |
Failed | Operation failed |
Long-Running Operations
All mutating operations are long-running (LRO). Use .result() to wait:
# Synchronous wait
capacity = client.fabric_capacities.begin_create_or_update(...).result()
# Or poll manually
poller = client.fabric_capacities.begin_create_or_update(...)
while not poller.done():
print(f"Status: {poller.status()}")
time.sleep(5)
capacity = poller.result()
Best Practices
- Use DefaultAzureCredential for authentication
- Suspend unused capacities to reduce costs
- Start with smaller SKUs and scale up as needed
- Use tags for cost tracking and organization
- Check name availability before creating capacities
- Handle LRO properly — don't assume immediate completion
- Set up capacity admins — specify users who can manage workspaces
- Monitor capacity usage via Azure Monitor metrics
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Frequently asked questions about Azure Fabric Management SDK
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
