All skills
microsoft avatar

/azure-mgmt-fabric-py

@e19efc2
by microsoftmicrosoft/skills3.1k stars
351

Azure Fabric Management SDK for Python. Use for managing Microsoft Fabric capacities and resources. Triggers: "azure-mgmt-fabric", "FabricMgmtClient", "Fabric capacity", "Microsoft Fabric", "Power BI capacity".

Use this Skill: https://skilld.dev/gh/microsoft/skills/azure-mgmt-fabric-py

This session only. Nothing lands on disk.

referencesnon-hero-scenarios.md

≈837 tokens on demand. Your agent reads this file only when SKILL.md points to it.

azure-mgmt-fabric-py non-hero scenarios

These scenarios are intentionally separate from hero flows in SKILL.md. They cover secondary/advanced patterns typically used after the primary end-to-end path is working.

Update Capacity

from azure.mgmt.fabric.models import FabricCapacityUpdate, RpSku

updated = client.fabric_capacities.begin_update(
    resource_group_name=resource_group,
    capacity_name=capacity_name,
    properties=FabricCapacityUpdate(
        sku=RpSku(
            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()

for sku in skus:
    locations = ", ".join(sku.locations) if sku.locations is not None else "N/A"
    print(f"SKU: {sku.name} - Locations: {locations}")

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()

Source: SKILL.md on GitHub

1 warning15d4 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill provides a standard implementation for the Microsoft Fabric Management SDK. It incorporates security considerations regarding external data ingestion, which are handled through recommended authentication practices and the use of official libraries.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

  • Runlayer7mo

    2/2 files flagged

Signed by skilld at e19efc2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
metadata
{
  "author": "Microsoft",
  "version": "1.0.0"
}

README badge

README badge for microsoft/skills/azure-mgmt-fabric-py