azure-mgmt-fabric-py – skill DevOps & Hạ tầng cho agent AI
SDK quản lý Azure Fabric cho Python. Dùng để quản lý dung lượng và tài nguyên Microsoft Fabric.
Cài skill azure-mgmt-fabric-py bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-mgmt-fabric-py-96876.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /azure-mgmt-fabric-py – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-mgmt-fabric-py-96876.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $azure-mgmt-fabric-py – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-mgmt-fabric-py-96876.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /azure-mgmt-fabric-py – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-mgmt-fabric-py-96876.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /azure-mgmt-fabric-py – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Azure Fabric Management SDK for Python
Manage Microsoft Fabric capacities and resources programmatically.
Installation
pip install azure-mgmt-fabric
pip install azure-identityEnvironment 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, FabricCapacityAdministration, 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=["[email protected]"]
)
)
)
).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
Suspend only an approved capacity after assessing active workloads; verify the actual billing and commitment terms rather than promising all charges stop:
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) # import time before this optional manual polling fragment
capacity = poller.result()Best Practices
1. Use DefaultAzureCredential for authentication
2. Suspend unused capacities to reduce costs
3. Start with smaller SKUs and scale up as needed
4. Use tags for cost tracking and organization
5. Check name availability before creating capacities
6. Handle LRO properly — don't assume immediate completion
7. Set up capacity admins — specify users who can manage workspaces
8. 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.
Skill liên quan
- azure-mgmt-mongodbatlas-dotnet – Quản lý tổ chức MongoDB Atlas như tài nguyên ARM của Azure, với thanh toán hợp nhất qua…
- azure-mgmt-weightsandbiases-dotnet – SDK Azure Weights & Biases cho .NET. Theo dõi thí nghiệm ML và quản lý mô hình qua Azure…
- mtls-configuration – Cấu hình mutual TLS (mTLS) cho giao tiếp zero-trust giữa các dịch vụ. Dùng khi triển…
- multi-cloud-architecture – Thiết kế kiến trúc multi-cloud bằng khung quyết định để chọn và tích hợp dịch vụ trên…
- azure-microsoft-playwright-testing-ts – Chạy test Playwright ở quy mô lớn với trình duyệt đám mây và báo cáo tích hợp trên Azure…
- azure-monitor-audit – Cấu hình Azure Monitor và Activity Log để kiểm toán. Thiết lập diagnostic settings và…
- azure-monitor-ingestion-java – SDK Azure Monitor Ingestion cho Java. Gửi log tùy chỉnh tới Azure Monitor qua Data…
- azure-monitor-ingestion-py – SDK Azure Monitor Ingestion cho Python. Dùng để gửi log tùy chỉnh tới Log Analytics…