Fabric capacity switch

Microsoft Fabric Automation Microsoft Fabric Automation

Fabric Capacity automatisch starten und stoppen Automatically Start and Stop a Fabric Capacity

Richten Sie eine Azure Logic App ein, um Kosten zu reduzieren und Ihre Microsoft Fabric Capacity zeitgesteuert zu pausieren oder fortzusetzen. Set up an Azure Logic App to reduce costs by suspending or resuming your Microsoft Fabric Capacity on a schedule.

Ziel Goal
Kosten senken Reduce costs
Technologie Technology
Azure Logic Apps Azure Logic Apps
Plattform Platform
Microsoft Fabric Microsoft Fabric

Schritt-für-Schritt-Anleitung Step-by-Step Guide

Zweck Purpose

Diese Anleitung zeigt, wie Sie eine Microsoft Fabric Capacity mit einer Azure Logic App automatisch starten und stoppen. This guide explains how to automatically start and stop a Microsoft Fabric Capacity by using an Azure Logic App.

Azure Logic Apps overview
Azure Logic Apps

Voraussetzungen Prerequisites

  • Microsoft Fabric Capacity
  • Azure Resource Group
  • Berechtigung zum Erstellen und Konfigurieren von Azure Logic Apps
  • Zugriff auf das Azure Portal
  • Berechtigungen zur Verwaltung der Fabric Capacity
  • A Microsoft Fabric Capacity
  • An Azure Resource Group
  • Permission to create and configure Azure Logic Apps
  • Access to the Azure Portal
  • Permissions to manage the Fabric Capacity

Schritt 1: Azure Portal öffnen Step 1: Open the Azure Portal

Öffnen Sie das Azure Portal und melden Sie sich mit einem Konto an, das die erforderlichen Berechtigungen besitzt. Open the Azure Portal and sign in with an account that has the required permissions.

Schritt 2: Resource Group erstellen oder auswählen Step 2: Create or Select a Resource Group

  1. Gehen Sie zu Resource Groups.
  2. Wählen Sie Create.
  3. Geben Sie die erforderlichen Informationen ein.
  4. Erstellen Sie die Resource Group.
  1. Go to Resource Groups.
  2. Select Create.
  3. Enter the required information.
  4. Create the Resource Group.

Schritt 3: Logic App erstellen Step 3: Create a Logic App

  1. Gehen Sie im Azure Portal zu Logic Apps.
  2. Wählen Sie Create.
  3. Wählen Sie den Plan Consumption.
  4. Wählen Sie Subscription und Resource Group aus.
  5. Erstellen Sie die Logic App.
  1. Go to Logic Apps in the Azure Portal.
  2. Select Create.
  3. Choose the Consumption plan.
  4. Select your subscription and Resource Group.
  5. Create the Logic App.

Schritt 4: Recurrence Trigger hinzufügen Step 4: Add a Recurrence Trigger

Fügen Sie den Trigger Schedule → Recurrence hinzu und definieren Sie, wann die Logic App laufen soll. Add the trigger Schedule → Recurrence and define when the Logic App should run.

  • 07:00 Uhr zum Fortsetzen der Fabric Capacity
  • 17:00 Uhr zum Pausieren der Fabric Capacity
  • 07:00 to resume the Fabric Capacity
  • 17:00 to suspend the Fabric Capacity
Recurrence trigger
Item: [Schedule – Recurrence]

Schritt 5: Fabric Capacity Resource lesen Step 5: Read the Fabric Capacity Resource

Fügen Sie die Aktion Azure Resource Manager → Read a resource hinzu. Add the action Azure Resource Manager → Read a resource.

Field Value
Short Resource ID capacities/<Fabric capacity name>
Client API version 2023-11-01
Azure Resource Manager Read a resource
Item: [Azure Resource Manager – Read a resource]

Schritt 6: Condition hinzufügen Step 6: Add a Condition

Fügen Sie Control → Condition hinzu und prüfen Sie den aktuellen Status der Capacity. Add Control → Condition and check the current state of the capacity.

body('ReadFabric')?['properties']?['state']

Ersetzen Sie ReadFabric, falls Ihr Schritt anders benannt wurde. Replace ReadFabric if your step uses a different name.

Condition expression
fx Condition

Schritt 7: Start- und Stop-Aktionen konfigurieren Step 7: Configure Start and Stop Actions

Konfigurieren Sie innerhalb der Condition zwei Aktionen:

Inside the condition, configure two actions:

  • Wenn TRUE: Aktion resume zum Fortsetzen der Fabric Capacity.
  • Wenn FALSE: Aktion suspend zum Pausieren der Fabric Capacity.
  • If TRUE: Action resume to resume the Fabric Capacity.
  • If FALSE: Action suspend to suspend the Fabric Capacity.
Start and stop actions
TRUE / FALSE

Schritt 8: Logic App speichern und testen Step 8: Save and Test the Logic App

  1. Wählen Sie Save.
  2. Starten Sie die Logic App manuell zum Testen.
  3. Öffnen Sie die Overview-Seite der Logic App.
  4. Prüfen Sie die Run History.
  5. Bestätigen Sie, dass der Lauf erfolgreich abgeschlossen wurde.
  1. Select Save.
  2. Run the Logic App manually for testing.
  3. Go to the Overview page of the Logic App.
  4. Check the run history.
  5. Confirm that the run completed successfully.
Test Logic App
Test

Ergebnis Result

Nach der Einrichtung prüft die Logic App die Fabric Capacity zu den definierten Zeiten und setzt sie je nach Workflow fort oder pausiert sie. After setup, the Logic App checks the Fabric Capacity at the configured times and either resumes or suspends it based on your workflow.

Check Fabric Capacity
Check Fabric Capacity

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert